Service Description

The Resource Oriented Architecture (Web Services) interface provides ways for web-based clients to perform collocation queries.

References

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

ROA Layer API

RESTful service methods for invoking the Collocation Service via HTTP.

 

Base URLs



 

HTTP Headers and Output Formats

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

Output will be serialized accordingly.

Sample xml Collocation Service Output

Calling Method and Arguments

Perform collocation table query.

GET /collocation/$service/$identifier?q=$query

Response

Adheres to the CollocationServiceResponse schema - ${REPOSITORY_ROOT}/sandbox/christensen/trunk/collocation-service/resource/src/main/resources/CollocationServiceResponse.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

Collocation service API.

Calling methods and arguments

Perform collocation query.
 /**
  * Perform collocation query.
  *
  * @param  service name
  * @param  identifier that is specific to service
  * @param  query to perform
  * @throws IllegalArgumentException if invalid argument.
  * @throws IllegalStateException if no collection available.
  * @throws CollocationException if request cannot be completed
  * @return Collocation results
  */
  public abstract Collocation getCollocation(String service, String identifier, String query) throws CollocationException;