API
and Documentation
Inference Lister Web Service API
Documentation
For background, we suggest first reading the
about section for this Web
Service. Also, you may want to consult
this
document for an overall discussion of API design and philosophy.
Developers communicate with the
Inference Lister Zitgist UMBEL Web service using the HTTP GET method. You
may request one of the following mime types: (1)
text/xml,
(2)
application/rdf+xml and (3)
application/rdf+n3.
The content returned by the Web service will be serialized using the
mime type requested and the data returned will depend on the parameters
selected.
Web Service Endpoint
Information
Here is the information needed to communicate
with this Web service's endpoint. Descriptions of the parameters are
included below.
Note: if a parameter has a default value,
the requester can omit it and the default value will be used. Also,
some baseline UMBEL Web services may not offer other values than the
default.
HTTP
Method:
Possible "Accept:" HTTP header
field value:
URI:
- http://umbel.zitgist.com/ws/inference/lister/
?source_concept=param1&relation=param2&show_how_many=param3&lang=param3
URI dynamic parameters description:
Note: All parameters have to be URL-encoded
- param1. The source UMBEL
subject concept URI or external class URI
- param2. One of:
- " sub_class_of (default)": Get the
list of inferred
sub-classes-of the source subject concept
- " super_class_of": Get the list of inferred
super-classes-of
the source subject concept
- " equivalent_class":
Get the list of inferred
equivalent-classes-of the source subject
concept
- param3 (default: "0"). The number of maximum results to
add
to the resultset. "0" means as many results as possible
- param4. One of:
- " en (default)":
Labels of resultsets in English if available
Example
of Returned XML Document
This is an example of the XML document
returned by this Web service endpoint for a given URI. This example
returns a list of UMBEL subject concepts and external classes that are
super class/concept of the umbel:Project subject concept.
Query:
- http://umbel.zitgist.com/ws/inference/lister/
?source_concept=http://umbel.org/umbel/sc/Project&relation=super_class_of
"Accept:" HTTP header field value:
Result:
-
<?xml version="1.0" encoding="utf-8"?>
-
<!DOCTYPE
resultset PUBLIC
"-//Zitgist LLC.//Infer Lister DTD 0.1//EN"
"http://umbel.zitgist.com/ws/dtd/inference/lister.dtd">
-
<resultset>
-
<subject type="umbel:SubjectConcept"
uri="http://umbel.org/umbel/sc/Project">
-
<relation type="umbel:superClassOf">
-
<object type="owl:Class"
uri="http://purl.org/NET/c4dm/event.owl#Event"/>
-
</relation>
-
<relation type="umbel:superClassOf">
-
<object type="umbel:SubjectConcept"
uri="http://umbel.org/umbel/sc/Individual"/>
-
</relation>
-
</subject>
-
</resultset>
-
DTD of the XML
Document
-
<!DOCTYPE
resultset [
-
-
<!ELEMENT resultset (subject)+ >
-
-
<!ELEMENT subject (predicate)*>
-
<!ATTLIST subject type (umbel:SubjectConcept
| owl:Class) "umbel:SubjectConcept">
-
<!ATTLIST subject uri CDATA
#IMPLIED>
-
-
<!ELEMENT predicate (object)+>
-
<!ATTLIST predicate type (rdfs:subClassOf
| umbel:superClassOf |
owl:equivalentClass
| umbel:isAligned) "rdfs:subClassOf">
-
-
<!ELEMENT object EMPTY>
-
<!ATTLIST object type (umbel:SubjectConcept
| umbel:AbstractConcept
| owl:Class) "umbel:SubjectConcept">
-
<!ATTLIST object uri CDATA
#IMPLIED>
-
-
]>
Descriptions of the Types of XML Elements
Here are descriptions of the types
of XML elements that might be returned from from this Web
service. Please read the XML data structure documentation
to understand how the data is structured within these XML
documents.
- umbel:SubjectConcept (subject/object). An UMBEL subject concept
resource
returned by the Web service for the requested parameters
- umbel:AbstractConcept (subject/object). An UMBEL abstract concept
resource
returned by the Web service for the requested parameters
- owl:Class (subject/object).
A class defined in another
vocabulary than UMBEL
- owl:equivalentClass (predicate). Link a umbel:SubjectConcept or a
owl:Class to an equivalent owl:Class
- rdfs:subClassOf (predicate). Link a umbel:SubjectConcept or a
owl:Class to a sub-class-of a owl:Class
- umbel:superClassOf (predicate). Link a umbel:SubjectConcept or a
owl:Class ot a super-class-of a owl:Class
Example of
Returned RDF/XML Document
Here is an example of a RDF/XML document
returned by this Web service endpoint for a given URI. This example
returns a list of UMBEL subject concepts and external classes that are
super class/concept of the umbel:Project subject concept.
Query:
- http://umbel.zitgist.com/ws/inference/lister/
?source_concept=http://umbel.org/umbel/sc/Project&relation=super_class_of
"Accept:" HTTP header field value:
Result:
-
<?xml version="1.0"?>
-
<rdf:RDF xmlns:umbel="http://umbel.org/umbel#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
-
-
<rdf:Description rdf:about="http://umbel.org/umbel/sc/Project">
-
<umbel:superClassOf
rdf:resource="http://purl.org/NET/c4dm/event.owl#Event" />
-
</rdf:Description>
-
<rdf:Description rdf:about="http://umbel.org/umbel/sc/Project">
-
<umbel:superClassOf
rdf:resource="http://umbel.org/umbel/sc/Individual" />
-
</rdf:Description>
-
-
</rdf:RDF>
Example
of Returned RDF/N3 Document
Here is an example of
a RDF/N3 document returned by this Web service endpoint for a given
URI. This example returns a list of UMBEL subject concepts and external
classes that are super class/concept of the umbel:Project subject
concept.
Query:
- http://umbel.zitgist.com/ws/inference/lister/
?source_concept=http://umbel.org/umbel/sc/Project&relation=super_class_of
"Accept:" HTTP header field value:
Result:
-
@prefix rdf:
<http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
-
@prefix rdfs:
<http://www.w3.org/2000/01/rdf-schema#> .
-
@prefix owl:
<http://www.w3.org/2002/07/owl#> .
-
@prefix umbel:
<http://umbel.org/umbel#> .
-
<http://umbel.org/umbel/sc/Project>
umbel:superClassOf
<http://purl.org/NET/c4dm/event.owl#Event>
.
-
<http://umbel.org/umbel/sc/Project>
umbel:superClassOf
<http://umbel.org/umbel/sc/Individual> .
HTTP
Status Codes
Here are the possible HTTP status (error)
codes returned by this Web service endpoint.
- Code: 200
- Code: 400
- Message: Bad Request
- Message description: No subject
concept
- Code: 406
- Message: Not Acceptable
- Message description: Unacceptable mime type requested
- Code: 500