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

From mx Help Wiki
Jump to: navigation, search
m (Created page with '<nowiki>http:</nowiki>//''base_url''/api/ontology/'''uri_markup'''/<text> == Description == == Response (JSON) == text: ''text'' markup: ''html'' == Example == Request: …')
 
m (Description)
 
(4 intermediate revisions by one user not shown)
Line 1: Line 1:
<nowiki>http:</nowiki>//''base_url''/api/ontology/'''uri_markup'''/<text>
+
[[App/API/Ontology|Back to ontology API home]]
  
 
== Description ==
 
== Description ==
 +
 +
<nowiki>http:</nowiki>//''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".''
  
 
== Response (JSON) ==
 
== Response (JSON) ==
Line 12: Line 16:
 
Request:
 
Request:
  
'''http://api.hymao.org/api/ontology/uri_markup/Head longer than metasoma'''
+
'''http://api.hymao.org/api/ontology/uri_markup/Head%20longer%20than%20metasoma'''
  
 
Response:
 
Response:
Line 18: Line 22:
 
   {
 
   {
 
   "text":"Head longer than metasoma",
 
   "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"
+
   "markup":"\u003Ca href=\"<nowiki>h</nowiki>ttp://purl.obolibrary.org/obo/HAO_0000397\"\u003Ehead\u003C/a\u003E longer than \u003Ca href=\"<nowiki>h</nowiki>ttp://purl.obolibrary.org/obo/HAO_0000626\"\u003Emetasoma\u003C/a\u003E"
 
   }
 
   }

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