Navigation:
Documentation
Archive
Page Tree:
This wiki space contains archival documentation of Project Bamboo, April 2008 - March 2013.
The Resource Oriented Architecture (Web Services) interface provides ways for web-based clients to search and retrieve responses from PhiloLogic 4 servers.
${REPOSITORY_ROOT} is http://svn.code.sf.net/p/projectbamboo/code/
${REPOSITORY_ROOT} is http://svn.code.sf.net/p/projectbamboo/code/
Note that references to schemas, below, are relative to ${REPOSITORY_ROOT}.
RESTful service methods for invoking the Philologic Service via HTTP.
It is assumed in this documentation that no centrally-run instances of the Bamboo Services Platform will be running after the project ends on 31 March 2013. Therefore, base URLs are assumed to be on a developer's machine, localhost. The base URL with a port number assumes that the BSP is running unsecured; the URL without a port number assumes that security is enforced and Apache Web Server is intercepting and redirecting service calls. Please see the page Identity and Access Management - Authentication and Authorization for context, as well as links to installation and configuration instructions for secured instances of BSP.
Note that ONLY services at v0.9 or greater will run properly in a secured instance of the BSP.
Currently available base URLs:
The service supports the following values in the HTTP Accept header:
Output will be serialized accordingly.
GET /philologic/collections
Adheres to the CollectionsResponse schema - ${REPOSITORY_ROOT}/sandbox/christensen/trunk/philologic-service/resource/src/main/resources/CollectionsResponse.xsd
GET /philologic/collections/$collection/documents
Adheres to the DocumentsResponse schema - ${REPOSITORY_ROOT}/sandbox/christensen/trunk/philologic-service/resource/src/main/resources/DocumentsResponse.xsd
GET /philologic/collections/$collection/documents/$document
Adheres to the DocumentResponse schema - ${REPOSITORY_ROOT}/sandbox/christensen/trunk/philologic-service/resource/src/main/resources/DocumentsResponse.xsd
GET /philologic/collections/$collection/collocation?q=$query
Adheres to the CollocationResponse schema - ${REPOSITORY_ROOT}/sandbox/christensen/trunk/philologic-service/resource/src/main/resources/CollocationResponse.xsd
GET /philologic/collections/$collection/concordance?q=$query
Adheres to the ConcordanceResponse schema - ${REPOSITORY_ROOT}/sandbox/christensen/trunk/philologic-service/resource/src/main/resources/ConcordanceResponse.xsd
GET /philologic/collections/$collection/frequency?q=$query
Adheres to the FrequencyResponse schema - ${REPOSITORY_ROOT}/sandbox/christensen/trunk/philologic-service/resource/src/main/resources/FrequencyResponse.xsd
If an error occurred, some non-2xx code will be returned. Check the HTTP Status Code that is returned in the response's HTTP headers for the specific error. The following errors may be returned in response to Philologic Service requests:
Error (Status Code) | Meaning | Returned When |
---|---|---|
400 | Bad Request | Request is missing required parameters |
404 | Not Found | The requested document does not exist and/or the requested analysis returned no results |
500 | Internal Server | A service error occurred |
Philologic service API.
Sample XML Output from PhiloLogic wrapped service calls running on BSP
/** * Get available Philologic collections. * * @throws IllegalStateException if no collections available. * @return Collections */ public abstract Collections getCollections();
/** * Get bibliography of documents within Philologic collection. * * @param name of <i>Philologic</i> collection. * @throws IllegalStateException if no collection available. * @throws PhilologicException if request cannot be completed. * @return Bibliography of available documents. */ public abstract Bibliography getBibliography(String name) throws PhilologicException;
/** * Perform collocation table query. * * @param name of <i>Philologic</i> collection. * @param query word-or-phrase. * @throws IllegalStateException if no collection available. * @throws PhilologicException if request cannot be completed * @return Collocation results */ public abstract Collocation getCollocation(String name, String query) throws PhilologicException;
/** * Perform concordance query. * * @param name of <i>Philologic</i> collection. * @param query word-or-phrase. * @throws IllegalStateException if no collection available. * @throws PhilologicException if request cannot be completed * @return Concordance results */ public abstract Concordance getConcordance(String name, String query) throws PhilologicException;
/** * Get document from Philologic collection. * * @param name of <i>Philologic</i> collection. * @param path of document within collection. * @throws IllegalStateException if no collection available. * @throws PhilologicException if request cannot be completed. * @return Document containing either navigation links or text. */ public abstract Document getDocument(String name, String path) throws PhilologicException;
/** * Perform frequency table query. * * @param name of <i>Philologic</i> collection. * @param query word-or-phrase. * @throws IllegalStateException if no collection available. * @throws PhilologicException if request cannot be completed * @return Frequency results */ public abstract Frequency getFrequency(String name, String query) throws PhilologicException;