Difference between revisions of "ASL HTTP InformationRetrieval"

From Gcube Wiki
Jump to: navigation, search
(submission of search query)
Line 36: Line 36:
  
 
==submission of search query==
 
==submission of search query==
 +
Four different ways to search the content of the Infrastructure are supported within the system and offered through equivalent REST calls. Those are: quick search (no need for selecting collections), simple search (no need for selecting criteria), browse, combined search. An HTTP GET request can be submitted to the Search servlet to access this functionality. The client can specify the type of search by passing the appropriaet valute to the "searchType" parameter of the request.
 +
 
==retrieval of search results==
 
==retrieval of search results==

Revision as of 13:02, 28 August 2012

The ASL HTTP Information Retrieval component is part of the HTTP Front End Framework and provides aggregated access to mandated functionality for performing a gCube search. It follows the all the framework principles for data interchange formats, error handling, and context management, supporting both JSON and XML, using the common framework utilities for user authentication and HTTP error responses, supporting all authentication modes and following the suggested design patterns for scope management and session management as well as coding guidelines. The features provided are listed as follows:

listing of searchable collections

Once logged in to a scope (either in named or anonymous access), the user is able to get the list of the available, searchable collections in the corresponding VO/VRE. By submitting a GET request to the ShowCollections servlet of the InformationRetrieval group of services, the user can retrieve an XML or a JSON representation of the list that aggregates the necessary information for the accessible collections.

<source lang=xml><?xml version="1.0" encoding="UTF-8"?><Collections><CollectionGroup name="Maps and National Overviews"><Collection><name>FARM Cultured Aquatic Species Fact Sheets</name><colId>7f78c200-f877-11dd-8103-acc6e633ea9e</colId></Collection><Collection><name>FARM Current National Aquaculture Sector Overview (NASO)</name><colId>8964ce50-f875-11dd-8103-acc6e633ea9e</colId></Collection><Collection><name>FARM Current National Legislation Overview (NALO)</name><colId>dfe59f60-f876-11dd-8103-acc6e633ea9e</colId></Collection><Collection><name>FARM FAO Country Maps</name><colId>c5b83790-f35f-11dd-9a37-9b05ac676cca</colId></Collection></CollectionGroup><CollectionGroup name="Time Series Graphs"><Collection><name>FARM Aquaculture Time Series Graphs</name><colId>cba3b770-f1e2-11dd-836f-ed8453cc0b6c</colId></Collection><Collection><name>FARM Capture Time Series Graphs</name><colId>9ac21cf0-f160-11dd-96f7-b87cc0f0b075</colId></Collection><Collection><name>FARM Production Time Series Graphs</name><colId>18611ed0-f162-11dd-96f7-b87cc0f0b075</colId></Collection><Collection><name>FARM Trade Time Series Graphs</name><colId>d14baeb0-f162-11dd-96f7-b87cc0f0b075</colId></Collection></CollectionGroup><CollectionGroup name="External Repositories"><Collection><name>Aquatic Commons</name><colId>3b9e3ad0-ee64-11df-8ac0-e72586f1640d</colId></Collection><Collection><name>WHOAS at MBLWHOI Library</name><colId>6b9e8ad0-eh68-11jf-8ac0-e72586n1670a</colId></Collection></CollectionGroup><CollectionGroup name="Fact Sheets"><Collection><name>FARM Introduced Species Fact sheets</name><colId>0a0574d0-f400-11dd-9a38-9b05ac676cca</colId></Collection><Collection><name>FARM Cultured Aquatic Species Fact Sheets</name><colId>7f78c200-f877-11dd-8103-acc6e633ea9e</colId></Collection></CollectionGroup></Collections></source>
  • Response in JSON:
    [{"name":"Maps and National Overviews","collections":[{"name":"FARM Cultured Aquatic Species Fact Sheets","colId":"7f78c200-f877-11dd-8103-acc6e633ea9e"},{"name":"FARM Current National Aquaculture Sector Overview (NASO)","colId":"8964ce50-f875-11dd-8103-acc6e633ea9e"},{"name":"FARM Current National Legislation Overview (NALO)","colId":"dfe59f60-f876-11dd-8103-acc6e633ea9e"},{"name":"FARM FAO Country Maps","colId":"c5b83790-f35f-11dd-9a37-9b05ac676cca"}]},{"name":"Time Series Graphs","collections":[{"name":"FARM Aquaculture Time Series Graphs","colId":"cba3b770-f1e2-11dd-836f-ed8453cc0b6c"},{"name":"FARM Capture Time Series Graphs","colId":"9ac21cf0-f160-11dd-96f7-b87cc0f0b075"},{"name":"FARM Production Time Series Graphs","colId":"18611ed0-f162-11dd-96f7-b87cc0f0b075"},{"name":"FARM Trade Time Series Graphs","colId":"d14baeb0-f162-11dd-96f7-b87cc0f0b075"}]},{"name":"External Repositories","collections":[{"name":"Aquatic Commons","colId":"3b9e3ad0-ee64-11df-8ac0-e72586f1640d"},{"name":"WHOAS at MBLWHOI Library","colId":"6b9e8ad0-eh68-11jf-8ac0-e72586n1670a"}]},{"name":"Fact Sheets","collections":[{"name":"FARM Introduced Species Fact sheets","colId":"0a0574d0-f400-11dd-9a38-9b05ac676cca"},{"name":"FARM Cultured Aquatic Species Fact Sheets","colId":"7f78c200-f877-11dd-8103-acc6e633ea9e"}]}]

retrieval of information about searchable collections

The client can choose one or more searchable collections and retrieve information about them, by making an HTTP GET request to the CollectionInfos servlet of the InformationRetrieval group of services. The input parameters to this query are the ids of the collections chosen, submitted in JSON format. The response to this query is either an xml file containing information about those collections or a JSON string. This information includes the available search languages, the searchable and the browsable fields corresponding to the collections selection.

<?xml version="1.0" encoding="UTF-8"?><CollectionsInfos><AvailableLanguages><language><name>en</name></language></AvailableLanguages><AvailableBrowseFields><browseField><id>0a488d99-6c36-47db-b150-817e3d7ab37c</id><name>title</name></browseField><browseField><id>0ffeb035-45a2-4fb8-8069-9d0d1ffc783f</id><name>gDocCollectionID</name></browseField><browseField><id>120c5538-b161-4b18-97a3-1c319c54163d</id><name>genus</name></browseField><browseField><id>16736880-038e-4d24-bc48-9b3fb6569acd</id><name>scientificName</name></browseField><browseField><id>1907702c-2f33-4d85-8ed3-c431e26065e1</id><name>ObjectID</name></browseField><browseField><id>39fee5d9-b6ce-43c5-8f4e-980133800b26</id><name>spatial</name></browseField><browseField><id>57cfa02f-e7ed-411a-bd67-18d0906e623e</id><name>species</name></browseField><browseField><id>6ad7bc02-15f2-481f-a27c-76466e9f02b5</id><name>family</name></browseField><browseField><id>e1276113-d2b3-4c83-bde2-b064d4d30b85</id><name>temporal</name></browseField><browseField><id>e631a537-a615-46e6-a4d8-8c204f5e6c7e</id><name>gDocCollectionLang</name></browseField><browseField><id>eba8ee07-f4de-42d2-aa8a-4fbe51279187</id><name>order</name></browseField></AvailableBrowseFields><AvailablesortFields/></CollectionsInfos>
  • Response in JSON:
{"Languages":["en"],"AvailableBrowseFields":[{"id":"0a488d99-6c36-47db-b150-817e3d7ab37c","name":"title"},{"id":"0ffeb035-45a2-4fb8-8069-9d0d1ffc783f","name":"gDocCollectionID"},{"id":"120c5538-b161-4b18-97a3-1c319c54163d","name":"genus"},{"id":"16736880-038e-4d24-bc48-9b3fb6569acd","name":"scientificName"},{"id":"1907702c-2f33-4d85-8ed3-c431e26065e1","name":"ObjectID"},{"id":"39fee5d9-b6ce-43c5-8f4e-980133800b26","name":"spatial"},{"id":"57cfa02f-e7ed-411a-bd67-18d0906e623e","name":"species"},{"id":"6ad7bc02-15f2-481f-a27c-76466e9f02b5","name":"family"},{"id":"e1276113-d2b3-4c83-bde2-b064d4d30b85","name":"temporal"},{"id":"e631a537-a615-46e6-a4d8-8c204f5e6c7e","name":"gDocCollectionLang"},{"id":"eba8ee07-f4de-42d2-aa8a-4fbe51279187","name":"order"}],"AvailableSortFields":[{"id":"0535eaeb-7070-42af-9d68-ed94ee649a07","name":"publisher"},{"id":"0a488d99-6c36-47db-b150-817e3d7ab37c","name":"title"},{"id":"0e6b455e-f4da-42ea-8008-91effa0da553","name":"Any"},{"id":"0ffeb035-45a2-4fb8-8069-9d0d1ffc783f","name":"gDocCollectionID"},{"id":"1907702c-2f33-4d85-8ed3-c431e26065e1","name":"ObjectID"},{"id":"1b2d64e4-d8ed-42f7-b565-8b96747c57cf","name":"type"},{"id":"39fee5d9-b6ce-43c5-8f4e-980133800b26","name":"spatial"},{"id":"3e0c3c9c-f7df-4725-9c8a-41357407ae0a","name":"identifier"},{"id":"5fef10d6-08ef-4a08-ad54-7b66355cf339","name":"language"},{"id":"6b6285a8-2759-450d-951e-424f7d8199b0","name":"creator"},{"id":"b97d6c80-b749-45c0-9db2-fea4c851c1ce","name":"created"},{"id":"d5d7d46f-156a-4219-a5b0-f0f8335df24e","name":"alternative"},{"id":"e1276113-d2b3-4c83-bde2-b064d4d30b85","name":"temporal"},{"id":"e31ffa9d-72e6-4238-a4e6-4b8246454ec9","name":"isPartOf"},{"id":"e631a537-a615-46e6-a4d8-8c204f5e6c7e","name":"gDocCollectionLang"}],"AvailableSearchFields":[]}

submission of search query

Four different ways to search the content of the Infrastructure are supported within the system and offered through equivalent REST calls. Those are: quick search (no need for selecting collections), simple search (no need for selecting criteria), browse, combined search. An HTTP GET request can be submitted to the Search servlet to access this functionality. The client can specify the type of search by passing the appropriaet valute to the "searchType" parameter of the request.

retrieval of search results