Terms Search Overview - Annotopia/AtConnectors GitHub Wiki

Terms Search Connectors are components that allow to integrate terms search services in the Annotopia framework. The framework will in turn make them available to third parties through the same protocol/schema of communication.

The idea is to provide a set of methods and tools allowing us and third parties to easily write connectors to the terms services of choice. The connectors will take care of communications and will all expose the same JSON-LD based format. The goal is to simplify the work of those that write applications and web applications for creating manual and automatic annotation.

Service

All the services offering Terms Search need to implement the interface ITermSearchService which includes the method:

   JSONObject search(String content, HashMap parameters);

with attributes:

  • content: the search query
  • parameters: the map with all parameters, including authorization tokens or apikeys

Controller

All the controllers offering Terms Search need to extend the class BaseController which provides some basic utilities such as the API key validation.

GET /search

Parameter Description Default Impl
apiKey The application assigned apikey. The API calls are available only for registered and authorized applications. REQUIRED YES
query The text to match for search. REQUIRED YES
max The number of records to display per page 10 yes
offset The page to be returned 0 yes
format The format of the results annotopia yes

Additional parameters can be defined by the different implementations.