This wiki space contains archival documentation of Project Bamboo, April 2008 - March 2013.

Skip to end of metadata
Go to start of metadata

Service Description

The Resource Oriented Architecture (Web Services) interface provides ways for web-based clients to search and retrieve responses from PhiloLogic 4 servers. 

 

References

  • Codebase: ${REPOSITORY_ROOT}/sandbox/christensen/trunk/

Schemas

Note that references to schemas, below, are relative to ${REPOSITORY_ROOT}.

ROA Layer API

RESTful service methods for invoking the Philologic Service via HTTP.

Base URLs

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:

 

HTTP Headers and Output Formats

The service supports the following values in the HTTP Accept header:

  • application/xml

Output will be serialized accordingly.

Calling Method and Arguments

Get available Philologic collections

GET /philologic/collections

Response

Adheres to the CollectionsResponse schema - ${REPOSITORY_ROOT}/sandbox/christensen/trunk/philologic-service/resource/src/main/resources/CollectionsResponse.xsd

Get bibliography of documents within Philologic collection

GET /philologic/collections/$collection/documents

Response

Adheres to the DocumentsResponse schema - ${REPOSITORY_ROOT}/sandbox/christensen/trunk/philologic-service/resource/src/main/resources/DocumentsResponse.xsd

Get document from Philologic collection

GET /philologic/collections/$collection/documents/$document

Response

Adheres to the DocumentResponse schema - ${REPOSITORY_ROOT}/sandbox/christensen/trunk/philologic-service/resource/src/main/resources/DocumentsResponse.xsd

Perform collocation table query.

GET /philologic/collections/$collection/collocation?q=$query

Response

Adheres to the CollocationResponse schema - ${REPOSITORY_ROOT}/sandbox/christensen/trunk/philologic-service/resource/src/main/resources/CollocationResponse.xsd

Perform concordance query.

GET /philologic/collections/$collection/concordance?q=$query

Response

Adheres to the ConcordanceResponse schema - ${REPOSITORY_ROOT}/sandbox/christensen/trunk/philologic-service/resource/src/main/resources/ConcordanceResponse.xsd

Perform frequency table query.

GET /philologic/collections/$collection/frequency?q=$query

Response

Adheres to the FrequencyResponse schema - ${REPOSITORY_ROOT}/sandbox/christensen/trunk/philologic-service/resource/src/main/resources/FrequencyResponse.xsd

Error Responses

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

 


SOA Layer API

Philologic service API.

Sample XML Output from PhiloLogic wrapped service calls running on BSP

 

Calling methods and arguments

Get available Philologic collections
/**
 * Get available Philologic collections.
 *
 * @throws IllegalStateException if no collections available.
 * @return Collections
 */
public abstract Collections getCollections();
Get bibliography of documents within Philologic collection
/**
 * 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
/**
* 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.
/**
 * 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
/**
 * 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.
/**
 * 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;