API
and Documentation
Finder: Subject Concept 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
Finder: Subject Concept Structured Dynamics LLC. 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.structureddynamics.com/ws/finder/subject_concept/
?mode=param1&text=param2&lang=param3
URI dynamic parameters description:
Note: All parameters have to be URL-encoded
- param1. One of:
- " all_labels (default)": Search within all labels
- " uri_label":
Search for the subject concept URI only
- " pref_label":
Search for the preferred label only
- " alt_label":
Search for the alternative label(s) only
- param2. The search string
- param3. 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 where one of their preferred
label match the example "project" search string.
Query:
- http://umbel.structureddynamics.com/ws/finder/subject_concept/
?mode=pref_label&text=project
"Accept:" HTTP header field value::
Result:
-
<?xml version="1.0" encoding="utf-8"?>
-
<!DOCTYPE
resultset PUBLIC "-//Structured Dynamics LLC.//
Finder: Subject Concept DTD
0.1//EN"
"http://umbel.structureddynamics.com/ws/dtd/finder/subject_concept.dtd">
-
<resultset>
-
<subject type="rdf:Bag" uri="">
-
<predicate type="rdf:li">
-
<object type="umbel:SubjectConcept"
uri="http://umbel.org/umbel/sc/ConstructionProject"/>
-
</predicate>
-
<predicate type="rdf:li">
-
<object type="umbel:SubjectConcept"
uri="http://umbel.org/umbel/sc/Project"/>
-
</predicate>
-
<predicate type="rdf:li">
-
<object type="umbel:SubjectConcept"
uri="http://umbel.org/umbel/sc/ProjectManager"/>
-
</predicate>
-
<predicate type="rdf:li">
-
<object type="umbel:SubjectConcept"
uri="http://umbel.org/umbel/sc/ProjectReport_CW"/>
-
</predicate>
-
<predicate type="rdf:li">
-
<object type="umbel:SubjectConcept"
uri="http://umbel.org/umbel/sc/ResearchProject"/>
-
</predicate>
-
</subject>
-
</resultset>
DTD of the XML Document
-
<!DOCTYPE
resultset [
-
-
<!ELEMENT resultset (subject)+ >
-
-
<!ELEMENT subject (predicate)*>
-
<!ATTLIST subject type (rdf:Bag) "rdf:Bag">
-
<!ATTLIST subject uri CDATA #IMPLIED>
-
-
<!ELEMENT
predicate (object)>
-
<!ATTLIST predicate type (rdf:li) "rdf:li">
-
-
<!ELEMENT
object EMPTY>
-
<!ATTLIST object type (umbel:SubjectConcept)
"umbel:SubjectConcept">
-
<!ATTLIST object uri CDATA
#REQUIRED>
-
-
]>
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.
- rdf:Bag (subject/object).
An unordered set of resources returned by the
Web service
- umbel:SubjectConcept (subject/object). An UMBEL subject concept resource
returned
by the Web service for the requested parameters
- rdf:li (predicate). An item of a rdf:Bag that refers to a resource
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 where
the preferred label matches the example "project" search string.
Query:
- http://umbel.structureddynamics.com/ws/finder/subject_concept/
?mode=pref_label&text=project
"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:Bag>
-
<rdf:li rdf:resource="http://umbel.org/umbel/sc/ConstructionProject" />
-
<rdf:li rdf:resource="http://umbel.org/umbel/sc/Project" />
-
<rdf:li rdf:resource="http://umbel.org/umbel/sc/ProjectManager" />
-
<rdf:li rdf:resource="http://umbel.org/umbel/sc/ProjectReport_CW" />
-
<rdf:li rdf:resource="http://umbel.org/umbel/sc/ResearchProject" />
-
</rdf:Bag>
-
-
</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 where
the preferred label matches the example "project" search string.
Query:
- http://umbel.structureddynamics.com/ws/finder/subject_concept/
?mode=pref_label&text=project
"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#> .
-
_:bnode0 rdf:type rdf:Bag ;
-
rdf:li
<http://umbel.org/umbel/sc/ConstructionProject> ;
-
rdf:li
<http://umbel.org/umbel/sc/Project> ;
-
rdf:li
<http://umbel.org/umbel/sc/ProjectManager> ;
-
rdf:li
<http://umbel.org/umbel/sc/ProjectReport_CW> ;
-
rdf:li
<http://umbel.org/umbel/sc/ResearchProject> .
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 search
keywords
- Code: 406
- Message: Not Acceptable
- Message description: Unacceptable mime type requested
- Code: 500