Difference between revisions of "App/API/Ontology/uri markup"

From mx Help Wiki
Jump to: navigation, search
m (Example)
m (Description)
 
Line 5: Line 5:
 
<nowiki>http:</nowiki>//''base_url''/api/ontology/'''uri_markup'''/<text>
 
<nowiki>http:</nowiki>//''base_url''/api/ontology/'''uri_markup'''/<text>
  
Returns a block of text with matched labels hyperlinked.  Matching is based on exact comparisons of all labels in the ontology against the text.  Longest matches hit first and prevent smaller, overlapping matches from hitting. The URI links are the OBO standard.  ''This method is preferred vs. the similar "glossary_markup".''
+
Returns a block of text with matched labels hyperlinked, and the original text provided.  Matching is based on exact comparisons of all labels in the ontology against the text.  Longest matches hit first and prevent smaller, overlapping matches from hitting. The URI links are the OBO standard.  ''This method is preferred vs. the similar "glossary_markup".''
  
 
== Response (JSON) ==
 
== Response (JSON) ==

Latest revision as of 15:10, 4 March 2011

Back to ontology API home

[edit] Description

http://base_url/api/ontology/uri_markup/<text>

Returns a block of text with matched labels hyperlinked, and the original text provided. Matching is based on exact comparisons of all labels in the ontology against the text. Longest matches hit first and prevent smaller, overlapping matches from hitting. The URI links are the OBO standard. This method is preferred vs. the similar "glossary_markup".

[edit] Response (JSON)

 text: text
 markup: html

[edit] Example

Request:

http://api.hymao.org/api/ontology/uri_markup/Head%20longer%20than%20metasoma

Response:

 {
  "text":"Head longer than metasoma",
  "markup":"\u003Ca href=\"http://purl.obolibrary.org/obo/HAO_0000397\"\u003Ehead\u003C/a\u003E longer than \u003Ca href=\"http://purl.obolibrary.org/obo/HAO_0000626\"\u003Emetasoma\u003C/a\u003E"
 }
Personal tools