Difference between revisions of "Data Repository and Data Services"

From phenoscape
(Web services)
(Autocomplete)
Line 51: Line 51:
 
'''URI'''
 
'''URI'''
  
 
+
<BASE URI>/term/search/{text}?name=[true|false]&syn=[true|false]&def=[true|false]&ontologies=[ont1,ont2,...]
  
 
'''Returns'''
 
'''Returns'''
<BASE URI>/term/search/{text}?name={true|false}&syn={true|false}&def={true|false}
 
  
 
If there are no terms matching the given input, a document should still be returned, containing an empty results list.
 
If there are no terms matching the given input, a document should still be returned, containing an empty results list.

Revision as of 18:43, 10 November 2008

Data loader

A data loader application to refresh the data in the Phenoscape database on a daily basis is under development. The application is being developed as a Perl module which:

  1. Downloads curated NeXML files from the Phenoscape SVN repositories
  2. Drops and recreates the database
  3. Loads the requisite ontologies into the database
  4. Loads the data from the curated NeXML files into the database, and
  5. Invokes the OBD reasoner to elicit implicit information from the data and adds them to the database

Web services

Each service may support multiple media types. The desired media type can be specified by appending ?media=json or similar to the request URL. URI specifications are defined using URI Templates.

Term info

URI

<BASE URI>/term/{term_id}

Returns

JSON: <javascript> {

   "id" : "TAO:0001700",
   "name" : "caudal-fin stay",
   "definition" : "Bone that is located anterior to the caudal procurrent rays. Caudal fin stays are unpaired bone."
   "parents" :
   [
       {
           "relation" : "OBO_REL:is_a",
           "id" : "TAO:0001514",
           "name" : "bone"
       },
       {
           "relation" : "OBO_REL:part_of",
           "id" : "TAO:0000862",
           "name" : "caudal fin skeleton"
       }
   ],
   "children" : [] // if there are children, this content should be in the same format as the parents list

} // how should xrefs, etc. be represented, property_value definitions? </javascript>

OWL-RDF:

Todo...

If there is no term with the given ID, the service should return "404 Not Found".

Handling of anonymous post-compositions

Autocomplete

URI

<BASE URI>/term/search/{text}?name=[true|false]&syn=[true|false]&def=[true|false]&ontologies=[ont1,ont2,...]

Returns

If there are no terms matching the given input, a document should still be returned, containing an empty results list.