Difference between revisions of "App/API/Ontology/svg"

From mx Help Wiki
Jump to: navigation, search
(Example)
m (Example)
 
(2 intermediate revisions by one user not shown)
Line 4: Line 4:
  
 
<nowiki>http:</nowiki>//''base_url''/api/ontology/'''svg'''/<CLASS_ID>
 
<nowiki>http:</nowiki>//''base_url''/api/ontology/'''svg'''/<CLASS_ID>
 +
 +
Returns the SVG and URLs to a respective image for each of the figure markers associated with the requested ontology class.
  
 
== Response (JSON) ==
 
== Response (JSON) ==
Line 18: Line 20:
 
    
 
    
  
== Example ==
+
== Example (JSON) ==
  
 
Request:
 
Request:
Line 32: Line 34:
 
   {
 
   {
 
     "class":
 
     "class":
       {"id":"http://purl.obolibrary.org/obo/HAO_0000397",
+
       {"id":"<nowiki>h</nowiki>ttp://purl.obolibrary.org/obo/HAO_0000397",
 
         "label":"head"
 
         "label":"head"
 
       },
 
       },

Latest revision as of 15:38, 4 March 2011

Back to ontology API home

[edit] Description

http://base_url/api/ontology/svg/<CLASS_ID>

Returns the SVG and URLs to a respective image for each of the figure markers associated with the requested ontology class.

[edit] Response (JSON)

 CLASS_ID:
  [
   {
    image: URI 
    svg: svg
   }
   ...   
  ]
  
  

[edit] Example (JSON)

Request:

http://api.hymao.org/api/ontology/svg/http%3A%2F%2Fpurl%2Eobolibrary%2Eorg%2Fobo%2FHAO_0000397.json preferred, note the escape periods as well

or

http://api.hymao.org/api/ontology/svg/HAO_0000397.json short form, experimental

Response:

 {
   "class":
     {"id":"http://purl.obolibrary.org/obo/HAO_0000397",
       "label":"head"
     },
   "markers":
             [
              {
               "svg":"\u003Cg\u003E\u003Cg\u003E\u003Cpath d='m 867.21875,46.125 c -6.14998,3.306339 -13.06526,6.847492 -19.5625,9.78125 -15.33501,8.839851 -28.73,16.679989 -43.20145,24.111048 -13.03323,8.767705 -25.50581,16.002863 -39.3298,21.826452 -1.94683,3.86277 -2.06703,3.57218 2.00809,5.48382 1.18768,4.59964 2.64809,3.6253 9.09321,0.68403 9.9827,-4.55568 26.16562,-13.920577 33.18693,-17.284759 17.44876,-7.620424 33.63918,-16.966592 48.57756,-26.025389 7.4697,-3.823313 26.86944,-17.176795 9.22796,-18.576452 z M 736.75,113.3125 c -0.12966,0.006 -0.29396,0.0337 -0.5,0.0625 -7.79822,3.77395 -19.14874,6.72705 -26.625,11.5625 -19.7523,1.14686 -38.54843,5.50156 -56.78125,9.28125 -14.68344,4.21839 -30.44404,8.33684 -44.59375,14.125 -8.72247,3.40381 -17.60303,7.34053 -26,11.21875 -14.91296,7.99688 -29.6613,14.94051 -42.96875,22.78125 -12.78302,6.62789 -26.10491,15.53579 -37.875,22.78125 -9.67492,6.05761 -16.88186,13.34297 -25.57059,19.27427 -9.49606,8.15753 -14.95394,13.33485 -23.17941,21.13198 -16.12919,14.21668 -22.35215,24.30006 -34.42941,33.72461 -10.39597,12.57244 -22.963,24.84503 -32.63309,37.49414 -7.6676,8.18446 -12.20214,20.02494 -20.53125,28.25 -8.0643,11.36061 -15.09959,16.39931 -22.54186,27.97936 -6.54763,7.2839 -14.57142,18.49675 -19.74637,24.92103 -5.17372,9.39693 -14.27009,16.13602 -20.58677,26.31836 -9.57915,11.69049 -15.10771,21.33954 -24.6875,31.125 -11.22592,13.24536 -23.97825,32.37924 -33.46066,42.6875 -9.41316,12.18124 -17.15447,20.31351 -27.28125,36.66071 -5.55978,4.4152 -8.82178,7.36739 -17.08566,13.13784 -9.80805,7.34123 -11.46534,25.176 -13.08231,31.40039 -6.62864,-1.1042 -4.49163,-1.23413 -10.15262,4.70731 -3.706,3.83 -5.865,8.897 -7.75,13.75 -1.978,5.093 -3.4835,8.4815 -5.1875,14.8125 -1.993,7.409 -0.53975,16.139 0.53125,24 1.044,7.669 4.55675,14.64075 6.46875,21.96875 3.721,14.257 8.415,26.87625 19.125,37.90625 4.17,4.295 11.104,10.738 16.875,11.625 7.699,1.183 13.095,-5.632 19.625,-7.875 7.006,-2.407 14.994,-2.944 22.125,-6 7.22,-3.094 10.432,-5.431 15.5,-10.5 5.839,-5.839 12.756,-11.37425 17.375,-18.15625 4.319,-6.341 9.597,-15.91075 13.375,-22.46875 7.968,-13.828 9.157,-30.327 8.375,-46 -0.419,-8.391 -1.438,-16.474 -1.875,-25 -0.435,-8.5 -1.997,-16.039 -7.875,-21.875 -4.848,-4.813 -7.56375,-8.337 -13.09375,-12.75 -5.239,-4.181 -15.18625,-5.308 -22.03125,-4.875 -5.70028,-0.94598 -10.65567,-0.63451 -16.80218,2.44922 15.18265,-13.60868 30.62067,-27.56576 44.96429,-41.10547 10.64044,-6.52511 20.0986,-18.67205 31.52539,-27.90625 10.43779,-9.32279 20.99769,-16.79005 29.65625,-29.13086 10.61622,-6.5216 18.39423,-16.97942 28.02427,-24.98382 7.69448,-8.98686 17.87167,-16.65729 24.57757,-24.375 11.14526,-10.64635 21.81342,-21.57025 31.89118,-31.54743 10.56543,-12.7396 21.58473,-25.24944 32.17941,-37.58677 10.37874,-12.4758 22.13685,-23.6275 33.375,-34.96875 7.27683,-7.05428 12.91927,-13.52043 20.32869,-20.28014 7.81621,-6.96459 12.9703,-10.88254 19.62388,-18.47098 14.34711,-11.86786 29.87109,-24.11586 44.07868,-35.5452 17.33641,-11.05363 32.10375,-23.93099 49.85994,-31.89118 18.02961,-10.66565 36.21439,-19.05252 53.56138,-28.78237 8.27882,-5.17703 17.21425,-7.61213 23.5,-12.875 8.1432,-7.79015 15.02242,-11.91735 23.40625,-18.28125 0.74281,-1.6848 6.94494,-4.00359 5,-3.90625 z m 38.03125,7.625 c -1.69916,-0.028 -3.09679,0.49174 -1.65625,2.46875 1.40178,2.57345 1.41842,5.4935 1.28125,8.34375 0.12044,2.48477 4.59705,0.61128 6.625,1.1875 25.65673,-1.62782 46.50038,-0.24398 72.16698,-1.76031 17.9085,-11.60361 -16.41289,-8.89603 -20.76068,-8.83344 -19.04066,-0.12276 -37.39124,-1.34604 -54.8125,-0.9375 -0.69899,-0.219 -1.82425,-0.45193 -2.84375,-0.46875 z m -110.6875,22.9375 c 1.66664,-0.0647 2.30416,0.67702 -0.6875,2.875 -4.96878,2.48656 -9.637,4.72975 -15.71875,6.71875 -5.32241,2.45131 -9.5379,4.58582 -14.875,8 -4.66128,2.44957 -12.89103,8.09544 -18.46875,10.28125 -8.51097,4.18427 -16.40053,10.24244 -24.71875,14.78125 -6.38349,5.31826 -12.59684,9.56429 -18.90625,13.78125 -8.35359,5.78608 -15.30331,12.63744 -23.4375,18.9375 -7.89036,7.00924 -15.1859,13.07907 -22.5,20.5625 -3.27824,4.27775 -6.81677,5.5546 -9.5625,8.625 -3.4939,2.66011 -8.93583,9.15124 -13.5,12.1875 -8.79451,9.42851 -18.88803,18.57885 -28.21875,28.21875 -4.36949,4.71549 -11.21604,10.00666 -15.40625,16.0625 -20.1386,22.53097 -40.54965,48.28061 -57.21066,62.89927 -10.49613,10.87112 -18.08601,17.63185 -25.53934,26.25698 -8.06005,8.93446 -21.06491,15.64934 -26.9375,25.03125 -8.34646,6.39746 -14.61007,15.95115 -23.75,22.30329 -5.13372,4.52143 -11.73224,10.69001 -17.03125,16.05776 -11.1783,8.63381 -20.86539,19.55524 -31.09375,26.76395 -3.34892,3.34409 -6.49023,5.94566 -9.99888,8.71763 6.00356,-10.68495 16.57809,-18.42962 15.46903,-22.83008 7.81582,-9.2113 26.24266,-32.11656 34.44027,-40.05132 4.6749,-8.65549 1.94833,-4.61975 7.24583,-11.83623 5.82136,-8.23226 12.82027,-15.41504 18.59375,-23.8125 8.21641,-6.87456 13.59495,-16.89889 21.84375,-26.625 4.81366,-5.51401 10.69095,-13.39215 15.0625,-18.625 5.34192,-7.14405 10.54279,-13.18354 15.40625,-20.53125 3.74714,-6.22854 10.62796,-11.56594 15.0625,-17.625 5.56654,-6.99757 13.33758,-14.70118 18.9375,-22.15625 6.98581,-11.24833 18.86606,-19.28904 26.3125,-28.53125 7.67986,-7.23559 16.05839,-13.43069 23.71875,-21.1875 7.55423,-5.93602 14.25844,-11.14806 21.1875,-17.625 14.74559,-10.15681 26.96146,-18.42435 42.34375,-27.59375 18.12725,-10.66121 39.5942,-21.08995 56.92243,-29.24888 12.47139,-5.29863 31.50036,-11.81533 44.61803,-15.85994 5.55292,-1.86996 10.90071,-2.09934 15.86579,-3.67243 1.3229,-0.67414 3.23497,-1.1997 4.53125,-1.25 z'/\u003E\u003C/g\u003E\u003C/g\u003E","image":"http://morphbank.net/?id=103706\u0026imgType=jpg"
               },
               {
                "svg":"\u003Cg\u003E\u003Cpath d='m 1440.1083,2343.4185 c -10.4003,-14.3791 -29.4695,-33.7266 -42.1708,-35.1423 -13.0574,-2.1817 -35.4958,-3.6377 -49.1992,1e-4 -20.3936,-0.4947 -23.4992,13.6507 -39.2625,13.8145 -8.8348,-4.049 -18.363,-13.3383 -31.2646,-11.6333 -10.2648,5.5104 -14.9973,14.2069 -23.9937,21.5701 -10.4013,2.4928 -26.1117,0.9962 -31.2645,12.3604 -6.2216,7.19 -0.2361,21.6559 -12.3604,25.2055 -9.0712,2.348 -15.9081,7.2166 -22.0549,14.2993 -4.7701,5.4824 -10.4487,11.799 -12.3604,18.6618 -4.1152,7.0242 -12.445,10.4623 -14.0569,18.4194 -5.0828,6.4731 -12.0667,11.1603 -13.0875,20.116 -4.9938,4.588 -8.6419,8.7447 -11.1486,14.2993 -2.2758,1.2565 -9.3853,7.0557 -8.2403,11.1486 6.4748,2.89 -8.4592,1.0738 -2.9083,8.4826 -2.6863,3.7302 -4.7172,11.8837 -10.9062,13.3299 -8.7023,-0.677 -14.6827,-5.3727 -23.2667,-4.1202 -13.9278,2.0783 -24.6241,-1.7324 -34.8999,-3.8778 -13.3573,-3.9374 -29.6362,-5.9493 -43.3826,-9.9367 -11.5227,-1.5674 -19.91025,-5.0501 -29.32571,-8.9674 -9.12018,-3.1341 -20.40194,-4.9815 -29.56803,-1.4542 -15.81956,3.1725 -19.25495,-13.0504 -32.47636,-10.6638 -11.84718,-1.7838 -23.57771,-8.5473 -31.26455,-13.3299 -8.50267,-2.0173 -16.04402,-5.4122 -24.96317,-8.9673 -11.02146,-7.3383 -22.2271,-9.9675 -33.4458,-17.2077 -18.43812,-9.3543 -36.91629,-18.5118 -55.98536,-26.4173 -10.43326,-5.2416 -22.26277,-8.8898 -32.96108,-13.3299 -6.04322,-2.0488 -12.39376,-5.723 -18.90415,-7.5131 -21.49078,-8.4835 -45.69392,-12.6945 -65.93502,-22.1483 -14.02041,-1.9289 -25.63147,-9.6963 -39.93038,-12.1676 -15.97302,-6.6962 -33.79247,-10.3185 -49.18463,-17.3089 -5.9029,-1.5022 -12.47541,-3.162 -16.79476,-6.855 -8.47357,-0.9033 -13.54381,-6.9928 -22.10737,-7.8832 -3.01918,-2.505 -4.78101,-1.9751 -6.23792,-4.1641 -5.27492,1.0799 -6.32528,-3.3461 -10.05797,-3.6354 -1.14228,-5.3609 -8.67817,1.6102 -8.24027,-4.3625 -9.14948,3.9618 -1.29196,-9.2332 -5.45312,-3.7566 -4.08276,3.0666 -4.48012,-3.9956 -10.17916,-2.5447 -4.14839,-4.2375 -12.15601,-6.2531 -17.57116,-9.8157 -4.22019,0.6523 -6.10758,-3.6461 -9.81562,-3.9989 -3.41493,-2.6322 -8.00988,-2.797 -11.51214,-5.0896 -3.05044,-0.8058 -4.96098,-2.9903 -8.48263,-3.5142 -3.59211,-2.0265 -7.82966,-2.7694 -11.39096,-4.3625 -7.00199,1.2852 -11.77084,-4.2228 -17.93471,-0.9695 -2.48,-3.5943 -15.15662,-0.7827 -17.44998,-3.1507 -7.68425,0.3367 -10.73377,2.8126 -18.05588,1.4542 -5.37876,1.6816 -12.44201,-2.9466 -15.87464,3.6354 -7.07787,0.5775 -13.95821,1.7373 -18.66179,4.3625 -4.19561,1.8539 -6.30681,2.7237 -8.36145,5.8167 -3.55055,0.314 -3.43957,4.305 -6.05902,4.4837 -1.87519,2.3466 -1.73655,8.4592 1.09062,10.6638 -1.44993,4.9529 7.85966,1.4888 7.39201,6.7861 5.16669,-2.1249 13.75275,-1.1943 18.41943,-4.6048 1.70503,-1.8752 5.73439,-1.8263 7.87672,-3.6354 9.02396,0.2369 18.70295,-3.9499 26.78088,-2.1813 5.53259,-1.8608 12.40363,2.9406 18.66179,4.4837 2.77897,0.3401 1.91952,4.0776 5.45312,3.5142 0.43126,3.6235 6.21917,4.2372 6.90728,8.2403 1.30874,3.4145 6.10261,6.4991 10.66388,8.9674 0.97417,2.4186 3.83394,3.2617 4.84722,6.4225 2.48172,1.2087 7.4544,2.1538 7.63437,5.8167 5.16361,0.6217 5.64468,5.0807 10.17915,6.6649 4.03236,3.918 9.42533,6.0243 13.81457,9.4521 4.66286,1.6652 10.83659,7.4309 15.38992,8.2402 0.34526,2.7233 5.57734,2.8905 7.02846,5.332 5.11665,0.6768 7.55811,5.9811 12.96631,5.8166 5.78609,3.7808 13.05667,5.4848 19.87359,8.2403 7.68828,3.6772 16.30168,5.8428 23.4966,9.2571 7.56007,1.0255 12.69544,6.4977 19.53675,7.5405 5.83362,2.5564 10.43854,2.2618 15.59513,5.1412 5.69222,3.6362 13.32133,3.8813 18.85125,7.5405 8.27574,0.5767 14.30093,7.2518 23.46358,6.3901 17.52882,5.8125 34.307,11.6372 53.07703,17.45 28.44537,10.0785 57.59062,20.6974 85.55338,31.5069 17.60132,8.1839 36.9772,15.0246 55.98537,22.2972 8.0845,2.3942 15.22411,4.7475 21.81247,10.4215 13.53148,1.6084 24.66784,9.9789 38.05066,13.8146 9.84144,2.9044 19.37569,5.3676 25.69025,13.5722 7.80153,8.0396 21.41455,6.0929 29.32567,11.391 1.72455,8.3344 -8.22876,15.1372 -15.02637,7.5132 -9.59998,-7.391 -27.73646,-10.6231 -35.14233,-0.9695 -5.08111,2.5023 -7.8925,-8.4345 -15.5111,-4.1201 -19.99735,4.2177 -39.85591,-6.1589 -60.10549,-2.1813 -31.18858,-0.2189 -60.80584,-7.5605 -92.65789,-4.1201 -29.70863,0.1044 -58.79946,3.4679 -88.62805,2.9083 -21.75834,0.089 -42.22403,4.7232 -64.22563,3.6354 -32.55101,3.8249 -65.8165,5.1237 -99.36796,5.0896 -39.8307,3.0864 -79.80846,2.2828 -119.72627,1.2118 -17.85882,3.6239 -35.2269,5.662 -51.13814,7.5132 -2.19372,4.3666 -5.48134,8.6506 -11.63332,4.6049 -10.15516,-3.4588 -22.40399,-0.1449 -32.234,0.4847 -9.45311,-9.0367 -28.39116,-0.44 -38.29302,-8.2403 -7.57546,-3.1545 -17.7256,-1.2122 -24.72081,-4.1201 -10.01144,-7.7111 -21.49709,-4.6343 -31.74927,-2.9083 -5.03052,4.1414 -3.45022,12.4736 3.15069,13.5722 7.34146,4.6763 18.29878,5.459 26.17498,7.7555 7.22554,7.8403 22.09249,4.1555 32.47635,7.0285 10.34323,7.5209 29.47054,-0.8372 39.50482,7.5132 12.27353,1.2382 23.25504,0.01 33.44581,-3.8778 6.03453,0.2237 2.05505,11.0145 10.66387,9.6944 14.14596,0.98 27.34394,3.9755 41.44371,6.0591 21.60597,4.8143 45.49813,1.9661 67.13396,5.5743 64.08424,3.4991 127.4689,-2.6299 190.49565,-4.8473 19.37813,-1.7852 39.58295,0.1171 57.68189,-5.0895 30.71483,0.016 61.66176,-2.1339 92.09713,-1.4542 38.3177,2.2703 79.3096,0.9762 117.30266,-0.7271 3.54141,-0.487 7.94025,-0.1931 12.60277,-1.4542 5.07935,5.1074 10.19114,10.5943 18.66179,8.725 10.13359,1.4729 21.31471,2.4276 28.84094,-3.1507 7.04993,4.8926 16.65454,3.0174 20.84303,12.1181 4.79335,5.2959 9.99942,7.7949 18.90415,6.3014 6.57903,-0.01 10.95727,-5.2521 18.90415,-2.666 14.83613,-3.8933 31.19443,-6.1573 46.53323,-8.725 11.2481,-1.6377 27.2685,1.6533 35.1424,-1.4542 10.0731,0.5166 26.296,-6.0383 32.9611,2.9084 2.8412,11.0564 -4.6272,18.7559 -4.1202,29.3256 -12.9769,8.6912 -0.9243,31.9719 -14.1363,39.4169 -3.9402,18.2818 -4.4486,37.7325 -5.484,57.582 -3.3218,5.0763 -0.4789,21.9399 4.4557,11.9963 -1.0517,-6.8228 6.8198,-10.6711 9.597,-13.3673 7.8574,5.9659 0.7045,19.9542 2.0809,28.933 -3.7766,13.4834 -12.2335,29.0205 -3.1091,40.9881 5.7634,5.7825 -0.2065,13.4209 2.0565,20.565 7.9537,-2.7261 9.2465,5.3056 10.2825,11.3107 1.8036,8.4971 10.8465,3.1547 10.968,21.5933 6.3773,3.9599 12.0123,0.7271 14.7382,1.0282 7.0659,21.3009 5.6376,8.4501 17.8963,0.7845 5.9005,1.8286 2.0359,10.6605 3.724,11.9734 5.1371,-6.4017 -11.7853,13.4189 -14.4226,22.2027 1.1161,5.5344 5.7576,8.6326 9.5971,7.1976 7.2649,-4.8447 17.375,-14.9504 30.2335,-27.3351 4.712,1.6427 7.1922,7.4121 10.5537,6.0846 8.066,-3.6537 11.2312,-3.5503 18.5439,-0.7719 -3.1091,13.905 -8.9188,33.0405 -6.0988,36.4983 3.3347,6.5956 15.2047,30.542 21.8178,25.8149 9.9638,1.08 16.09,-10.5198 23.6798,-26.7548 3.0041,-6.4258 3.2148,-6.6526 7.7491,-12.4182 2.4107,-3.0653 0.7398,-7.8852 2.5795,-11.5381 2.6982,-9.8233 2.4941,14.4389 5.5647,-12.3448 2.4802,-5.6991 4.6352,-11.6203 6.4888,-16.9517 4.606,-0.736 2.8098,-17.4983 7.0765,-18.2079 13.1818,8.6638 8.4767,-5.9747 8.102,-20.4709 8.4074,3.4883 2.8501,-5.5274 9.144,-11.1071 4.9122,4.0236 0.038,4.1881 12.962,10.3472 -9.5555,-15.3016 -9.9723,-24.4905 -7.9293,-26.0687 11.7591,-10.1461 12.9183,10.4624 9.4051,-16.4268 -3.9248,-10.8793 -11.6635,-25.1259 1.1296,-27.6488 4.6782,-5.1151 12.5361,-2.5164 21.1546,-0.8104 17.055,-12.7291 8.3174,-27.2355 18.4418,-30.2562 4.7791,13.8009 0.6073,-4.9476 6.6518,-11.9444 -1.7977,-6.5274 19.5144,-14.2518 6.1899,-56.1829 15.0838,-13.1552 21.1227,-18.8099 37.7957,-36.3315 9.7794,-12.4896 15.7416,-28.5064 27.7628,-40.4445 18.2178,-27.249 19.8515,-33.7461 26.7345,-66.4935 8.3571,-28.6582 11.8664,-49.961 -10.0671,-127.5861 z'/\u003E\u003C/g\u003E","image":"http://morphbank.net/?id=102877\u0026imgType=jpg"
               }
             ]
  }
Personal tools