Added documentation for the search REST web services used in the ViBRANT project.
authorl.morris <l.morris@localhost>
Thu, 31 Jan 2013 11:10:03 +0000 (11:10 +0000)
committerl.morris <l.morris@localhost>
Thu, 31 Jan 2013 11:10:03 +0000 (11:10 +0000)
.gitattributes
src/site/apt/remote/search-fulltext-info.apt [new file with mode: 0644]
src/site/apt/remote/search-name-default.apt [new file with mode: 0644]
src/site/apt/remote/search-taxon-info.apt [new file with mode: 0644]
src/site/apt/rest-api-search.apt [new file with mode: 0644]
src/site/site.xml

index f171f8bb2a1aa08ee16223f2cdc56a96d6a4bd31..43ea5cc6f4f32088747d4e104a02501b7caf25c8 100644 (file)
@@ -2195,7 +2195,11 @@ src/site/apt/reference.apt -text
 src/site/apt/remote/name-catalogue-default.apt -text
 src/site/apt/remote/name-catalogue-name-info.apt -text
 src/site/apt/remote/name-catalogue-taxon-info.apt -text
+src/site/apt/remote/search-fulltext-info.apt -text
+src/site/apt/remote/search-name-default.apt -text
+src/site/apt/remote/search-taxon-info.apt -text
 src/site/apt/rest-api-name-catalogue.apt -text
+src/site/apt/rest-api-search.apt -text
 src/site/apt/rest-api-statistics.apt -text
 src/site/apt/rest-api.apt -text
 src/site/fml/faq.fml -text
diff --git a/src/site/apt/remote/search-fulltext-info.apt b/src/site/apt/remote/search-fulltext-info.apt
new file mode 100644 (file)
index 0000000..6965114
--- /dev/null
@@ -0,0 +1,30 @@
+       ---------------
+       Full text Search API
+       ---------------
+
+{CDM Full text Search API}
+
+       This web service endpoint serves as a search engine for a query term related to a Taxon, e.g. In the free text descriptive data or aspart of the scientific name.
+       
+       The request parameters are :    
+       
+       * '<<query>>' [mandatory] : any free text you wish to search for.
+       
+       * '<<class>>' [optional] : the class of the TaxonBase object you wish to search for.
+       
+       * '<<tree>>' [optional] : the uuid of the classification you wish to search for with the query string.
+       
+       * '<<languages>>' [optional] : a list of the languages you wish to search for the query string. English is the default.
+                                                                       
+       * '<<hl>>' [optional, default value = <<<20>>>]  : a boolean to indicate whether the query term should be highlighted in the response.
+                                                                       
+       * '<<pageSize>>' [optional, default value = <<<20>>>]   : the number of results within each page in the response. The default is set to 20.
+       
+       * '<<pageNumber>>' [optional, default value = <<<1>>>]  : the number of the page to be returned, the first page has the pageNumber = 1.
+       
+       
+       []
+                                                                       
+       The response format can be set by appending the format extension to the service endpoint. Currently this web service supports JSON and XML.
+       
+       
\ No newline at end of file
diff --git a/src/site/apt/remote/search-name-default.apt b/src/site/apt/remote/search-name-default.apt
new file mode 100644 (file)
index 0000000..dcabbc3
--- /dev/null
@@ -0,0 +1,155 @@
+       ---------------
+       Name Search API
+       ---------------
+
+{CDM Search API for Distinct Taxonomic Name}
+
+       This web service endpoint serves as a search engine for searching a CDM datasource for distinct scientific names which contain the query string within the scientific name.
+       
+       The request parameters are :    
+       
+       * '<<query>>' [mandatory] : this could either be part of a scientific name or the complete scientific name. Wild-card searches are possible by including a * within the query string.
+       
+       * '<<matchMode>>' [optional, default value = <<<BEGINNING>>>]   : Case sensitive. This parameter can have the values,
+       
+                                                                       * <<<BEGINNING>>>       : MatchMode should be set to BEGINNING if the query contains a * at the beginning (e.g. *ichorieae).
+                                                                       
+                                                                       * <<<END>>>     :  MatchMode should be set to END if the query contains a * at the end (e.g. Cichori*).
+                                                                       
+                                                                       * <<<ANYWHERE>>>        : MatchMode should be set to ANYWHERE if the query contains a * within it (e.g.Hy*ridineae).
+                                                                       
+                                                                       * <<<EXACT>>>   : MatchMode should be set to EXACT to query for an exact name match.
+                                                                       
+       * '<<pageSize>>' [optional, default value = <<<20>>>]   : the number of results within each page in the response. The default is set to 20.
+       
+       * '<<pageNumber>>' [optional, default value = <<<1>>>]  : the number of the page to be returned, the first page has the pageNumber = 1.
+       
+       
+       []
+                                                                       
+       The response format can be set by appending the format extension to the service endpoint. Currently this web service supports JSON and XML.
+       
+       The response objects returned by this web service endpoint have the following structure:
+                         
+               * <<<class>>> : "DefaultPagerImpl" is always returned for a name search.
+               
+               * <<<count>>> : the total number of records returned.
+               
+               * <<<currentIndex>>> : the current index of the response. Index 0 corresponds to the first page.
+               
+               * <<<firstRecord>>> : an integer indicating the number of the first record on the current page.
+               
+               * <<<indexes>>> : a sliding window showing a list of integers showing the previous and next indexes of the avaiable pages.
+                       
+               * <<<lastRecord>>> : an integer indicating the number of the last record on the current page.
+               
+               * <<<nextIndex>>> : the index corresponding to the next page.
+               
+               * <<<pageSize>>> : page size provided as input.
+               
+               * <<<pagesAvailable>>> : the total number of pages available.
+               
+               * <<<prevIndex>>> : the index corresponding to the previous page.
+               
+               * <<<records>>> : a list of the scientific names returned in this page.
+               
+               * <<<suggestion>>>
+                                               
+       
+       Note:
+               
+               * When the number of records returned are greater than the page size multiple calls to the web service must be made to return the susequent pages.
+               
+       
+       Example Requests :
+               
+               * Exact scientific name search :        
+                               
+                       * {{{queryCichorium_endivia} /name/findTitleCache.json?query=Cichorium endivia}}
+                       
+               * Wild-card scientific name search (with page size specified): 
+               
+                       * {{{queryCichori*pageSize25matchModeBEGINNING} /name/findTitleCache.json?query=Cichori*&pageSize=25&matchMode=BEGINNING}}
+                                       
+                       
+       Example Responses :
+               
+               * Exact scientific name search : {query=Cichorium_endivia} [{{{CDM_Search_API_for_Distinct_Taxonomic_Name}back}}]
+                                                                               
+---
+
+[{
+
+    "class": "DefaultPagerImpl",
+    "count": 1,
+    "currentIndex": 0,
+    "firstRecord": 1,
+    "indices": [
+        0
+    ],
+    "lastRecord": 1,
+    "nextIndex": 0,
+    "pageSize": 20,
+    "pagesAvailable": 1,
+    "prevIndex": 0,
+    "records": [
+        "Cichorium endivia"
+    ],
+    "suggestion": ""
+
+}]
+
+---            
+               * Wild-card scientific name search (with page size specified): {query=Cichori*&pageSize=25&matchMode=BEGINNING} [{{{CDM_Search_API_for_Distinct_Taxonomic_Name}back}}]
+                               
+---
+
+[{
+
+    "class": "DefaultPagerImpl",
+    "count": 83,
+    "currentIndex": 0,
+    "firstRecord": 1,
+    "indices": [
+        0,
+        1,
+        2
+    ],
+    "lastRecord": 25,
+    "nextIndex": 1,
+    "pageSize": 25,
+    "pagesAvailable": 4,
+    "prevIndex": 0,
+    "records": [
+        "Cichoriaceae Juss.",
+        "Cichorieae Lam. & DC.",
+        "Cichoriinae Dumort.",
+        "Cichorioideae (Juss.) Chevall.",
+        "Cichorium alatum Hochst. & Steud.",
+        "Cichorium ambiguum Schult.",
+        "Cichorium aposeris E. H. L. Krause",
+        "Cichorium arnoseris E. H. L. Krause",
+        "Cichorium balearicum Porta",
+        "Cichorium barbatum (L.) E. H. L. Krause",
+        "Cichorium bottae Deflers",
+        "Cichorium byzantinum Clementi",
+        "Cichorium caeruleum Gilib.",
+        "Cichorium callosum Pomel",
+        "Cichorium calvum Asch.",
+        "Cichorium calvum Sch. Bip.",
+        "Cichorium casnia Wall.",
+        "Cichorium cicorea Dumort.",
+        "Cichorium commune Pall.",
+        "Cichorium crispum Mill.",
+        "Cichorium dichotomum Link",
+        "Cichorium divaricatum Schousb.",
+        "Cichorium dubium E. H. L. Krause",
+        "Cichorium endivia",
+        "Cichorium endivia L."
+    ],
+    "suggestion": ""
+
+}]
+
+---            
+
diff --git a/src/site/apt/remote/search-taxon-info.apt b/src/site/apt/remote/search-taxon-info.apt
new file mode 100644 (file)
index 0000000..97fe93e
--- /dev/null
@@ -0,0 +1,205 @@
+       ---------------\r
+       Name Search API\r
+       ---------------\r
+\r
+{CDM Search for Taxon information associated to a Name}\r
+\r
+       This web service endpoint provides taxon information for a scientific name.\r
+       \r
+       The request parameters are :    \r
+       \r
+       * '<<query>>' [mandatory] : this could either be part of a scientific name or the complete scientific name. Wild-card searches are possible by including a * within the query string.\r
+       \r
+       * '<<matchMode>>' [optional, default value = <<<BEGINNING>>>]   :  Case sensitive. This parameter can have the values,\r
+       \r
+                                                                       * <<<BEGINNING>>>       : MatchMode should be set to BEGINNING if the query contains a * at the beginning (e.g. *ichorieae).\r
+                                                                       \r
+                                                                       * <<<END>>>     :  MatchMode should be set to END if the query contains a * at the end (e.g. Cichori*).\r
+                                                                       \r
+                                                                       * <<<ANYWHERE>>>        : MatchMode should be set to ANYWHERE if the query contains a * within it (e.g.Hy*ridineae).\r
+                                                                       \r
+                                                                       * <<<EXACT>>>   : MatchMode should be set to EXACT to query for an exact name match.\r
+                                                                       \r
+       * '<<pageSize>>' [optional, default value = <<<20>>>]   : the maximum number of entities returned per page (can be -1 to return all entities in a single page). The default is set to 20.\r
+       \r
+       * '<<pageNumber>>' [optional, default value = <<<1>>>]  : the number of the page to be returned, the first page has the pageNumber = 1.\r
+       \r
+       \r
+       []\r
+                                                                       \r
+       The response format can be set by appending the format extension to the service endpoint. Currently this web service supports JSON and XML.\r
+       \r
+       The response objects returned by this web service endpoint have the following structure:\r
+                         \r
+               * <<<class>>> : "DefaultPagerImpl" is always returned for a name search.\r
+               \r
+               * <<<count>>> : the total number of records returned.\r
+               \r
+               * <<<currentIndex>>> : the current index of the response. Index 0 corresponds to the first page.\r
+               \r
+               * <<<firstRecord>>> : an integer indicating the number of the first record on the current page.\r
+               \r
+               * <<<indexes>>> : a sliding window showing a list of integers showing the previous and next indexes of the avaiable pages.\r
+                       \r
+               * <<<lastRecord>>> : an integer indicating the number of the last record on the current page.\r
+               \r
+               * <<<nextIndex>>> : the index corresponding to the next page.\r
+               \r
+               * <<<pageSize>>> : page size provided as input.\r
+               \r
+               * <<<pagesAvailable>>> : the total number of pages available.\r
+               \r
+               * <<<prevIndex>>> : the index corresponding to the previous page.\r
+               \r
+               * <<<records>>> : \r
+               \r
+                       * <<<appendedPhrase>>> : scientific name provided as input.\r
+                       \r
+                       * <<<class>>> : can be Taxon or Synonym\r
+                       \r
+                       * <<<created>>> : the date this object was created.\r
+                       \r
+                       * <<<data>>> : \r
+                       \r
+                       * <<<doubtful>>> : true or false\r
+                       \r
+                       * <<<excluded>>> : true or false\r
+                       \r
+                       * <<<lsid>>> : lsid of the object if stored otherwise null\r
+                       \r
+                       * <<<protectedTitleCache>>> : true or false\r
+                       \r
+                       * <<<sec>>> : \r
+               \r
+                               * <<<titleCache>>> : the name of the secundum reference.\r
+                               \r
+                               * <<<type>>> : for example Generic\r
+                               \r
+                               * <<<problemEnds>>> : \r
+                               \r
+                               * <<<parsingProblem>>> : 0 or 1 to indicate whether there was a parsing problem.\r
+                               \r
+                               * <<<datePublished>>> \r
+                               \r
+                                       * <<<class>>> : for example TimePeriod\r
+                       \r
+                                       * <<<end>>> : the end date if known\r
+                       \r
+                                       * <<<freeText>>> : free text for the date\r
+                       \r
+                                       * <<<start>>> : the start date\r
+                               \r
+                               * <<<created>>> : a timestamp indicating when the secundum reference was created in the database.\r
+                               \r
+                               * <<<problemStarts>>> : \r
+                               \r
+                               * <<<nomenclaturallyRelevant>>> : true or false.\r
+                               \r
+                               * <<<updated>>> : a timestamp indicating when the secundum reference was updated in the database.\r
+                               \r
+                               * <<<uri>>> : the uri of the secundum reference.\r
+                               \r
+                               * <<<uuid>>> : the uuid of the secundum reference\r
+                               \r
+                               * <<<protectedTitleCache>>> : true or false.\r
+                               \r
+                               * <<<class>>> : for example Reference\r
+                               \r
+                       * <<<taxonStatusUnknown>>> : true or false.\r
+                       \r
+                       * <<<taxonomicChildrenCount>>> : the number of children connected to this Taxon.\r
+                       \r
+                       * <<<titleCache>>> : the full scientfic name of the object e.g.Taxon\r
+                       \r
+                       * <<<unplaced>>> : true or false\r
+                       \r
+                       * <<<updated>>> : a timestamp indicating when the object e.g. Taxon was updated in the database.\r
+                       \r
+                       * <<<useNameCache>>> : true or false\r
+                       \r
+                       * <<<uuid>>> : the uuid of the object e.g.Taxon\r
+               \r
+               * <<<suggestion>>>\r
+               \r
+\r
+                               \r
+                       \r
+       Note:\r
+       \r
+               * When the number of records returned are greater than the page size multiple calls to the web service must be made to return the susequent pages.\r
+               \r
+       \r
+       Example Request :\r
+               \r
+               * Exact scientific name search :        \r
+                               \r
+                       * {{{queryCichorium_endivia} /taxon/findByTitle.json?query=Cichorium endivia}}\r
+                                                               \r
+                       \r
+       Example Response :\r
+               \r
+               * Exact scientific name search : {query=Cichorium_endivia} [{{{CDM_Search_API_for_Distinct_Taxonomic_Name}back}}]\r
+                                                                               \r
+---\r
+\r
+[{\r
+\r
+    "class": "DefaultPagerImpl",\r
+    "count": 12,\r
+    "currentIndex": 0,\r
+    "firstRecord": 1,\r
+    "indices": [\r
+        0\r
+    ],\r
+    "lastRecord": 12,\r
+    "nextIndex": 0,\r
+    "pageSize": 20,\r
+    "pagesAvailable": 1,\r
+    "prevIndex": 0\r
+    "records": [\r
+       {\r
+       "appendedPhrase": "",\r
+               "class": "Taxon",\r
+               "created": "2011-02-25T17:44:07.000Z",\r
+               "data": [ ],\r
+               "doubtful": false,\r
+               "excluded": false,\r
+               "lsid": null,\r
+               "protectedTitleCache": false\r
+               "sec": {\r
+                       "titleCache": "\"Edit WP6 - Cichorieae\", . 2006",\r
+                       "type": "Generic",\r
+                       "problemEnds": -1,\r
+                       "parsingProblem": 0\r
+                       "datePublished": {\r
+                               "class": "TimePeriod",\r
+                               "end": "",\r
+                               "freeText": "2006",\r
+                               "start": "2006-10-12"\r
+                               }        ,\r
+                       "created": "2010-05-27T17:54:55.000+01:00",\r
+                       "problemStarts": -1,\r
+                       "nomenclaturallyRelevant": false,\r
+                       "updated": "2013-01-30T16:09:17.196Z",\r
+                       "uri": "",\r
+                       "uuid": "c5b96998-9c52-4f24-81f9-9d0f4de43052",\r
+                       "protectedTitleCache": false,\r
+                       "class": "Reference"\r
+                   },\r
+           "taxonStatusUnknown": false,\r
+           "taxonomicChildrenCount": 0,\r
+           "titleCache": "Cichorium endivia L. sec. \"Edit WP6 - Cichorieae\", . 2006",\r
+           "unplaced": false,\r
+           "updated": "2010-05-27T18:05:58.000+01:00",\r
+           "useNameCache": false,\r
+           "uuid": "4f6c68d0-63f2-4235-83c2-5bff14532f90"\r
+           },\r
+           {...}\r
+    ],\r
+    "suggestion": ""\r
+   \r
+}]\r
+\r
+\r
+---            \r
+\r
diff --git a/src/site/apt/rest-api-search.apt b/src/site/apt/rest-api-search.apt
new file mode 100644 (file)
index 0000000..25c96f6
--- /dev/null
@@ -0,0 +1,32 @@
+                       ------
+                       Search REST API
+                       ------
+                       ------
+                       2012-01-29
+                       ------
+
+Search REST API                
+       
+       This web service namespace is part of the existing CDM REST API and provides the functionality to search for distinct taxonomic names and for associated taxonomic data. There is also functionality for an advanced search, which searches all database fields including descriptive data, in the underlying CDM datasource.
+       
+       The services include,
+               
+               *** {{{./remote/search-name-default.html} name search}}                 : This web service endpoint serves as a search engine for a query string within the scientific name.
+       
+               *** {{{./remote/search-taxon-info.html} taxon name search}}     : This web service endpoint provides taxon information related to a specific taxon name.
+       
+               *** {{{./remote/search-fulltext-info.html} full text search}}   : This web service endpoint provides taxon information related to a query string, e.g. a string found within the free text description associated with a taxon.
+       
+       []
+       
+       These web services have been used in the ViBRANT project ({{{http://vbrant.eu/}http://vbrant.eu/}}) using data imported into the CDM from Scratchpads, for example ({{{http://dioscoreaceae.e-monocot.org/}http://dioscoreaceae.e-monocot.org/}}). The ViBRANT search interface which uses these services can be found here: ({{http://dev.e-taxonomy.eu/vibrant_index/search}})        
+               
+       The search services (and related documentation) can be found at,
+       
+       *** name search                 : {{{http://dev.e-taxonomy.eu/vibrant_index/name/findTitleCache} http://dev.e-taxonomy.eu/vibrant_index/name/findTitleCache}} 
+               
+       *** taxon search        : {{{http://dev.e-taxonomy.eu/vibrant_index/taxon/findByTitle} http://dev.e-taxonomy.eu/vibrant_index/taxon/findByTitle}}       
+       
+       *** full text search    : {{{http://dev.e-taxonomy.eu/vibrant_index/taxon/findByDescriptionElementFullText} http://dev.e-taxonomy.eu/vibrant_index/taxon/findByDescriptionElementFullText}} 
+       
+               
\ No newline at end of file
index 6fa5d812e973263939b38d37fb4974bd87252d72..45d6760ee2cc3737b28d5df47bf77b8a3285e71c 100644 (file)
@@ -18,8 +18,9 @@
       <item name="UML" href="http://wp5.e-taxonomy.eu/cdm-uml"/>
       <item name="API" href="apidocs/index.html"/>
       <item name="REST API" href="rest-api.html">
-      <item name="Name Catalogue" href="rest-api-name-catalogue.html"/>
+      <item name="Search" href="rest-api-search.html"/>
       <item name="Statistics" href="rest-api-statistics.html"/>
+      <item name="Name Catalogue" href="rest-api-name-catalogue.html"/>
       </item>
       <item name="OAI-PMH" href="oai-pmh.html"/>
       <item name="Troubleshooting" href="troubleshooting.html"/>