org.vamdc.tapservice.api
Interface DatabasePlugin


public interface DatabasePlugin

Interface a database plugin must implement to work with java VAMDC-TAP implementation.

Author:
doronin

Method Summary
 void buildXSAMS(RequestInterface userRequest)
          Build XSAMS data from user request
 String getErrorMessage()
          Return verbose reason of error if node is not available
 Map<org.vamdc.dictionary.HeaderMetrics,Object> getMetrics(RequestInterface userRequest)
          Get query metrics.
 Collection<org.vamdc.dictionary.Restrictable> getRestrictables()
          Get restrictables supported by this tapservice implementation.
 boolean isAvailable()
          Do some really node-specific availability checks
 

Method Detail

getRestrictables

Collection<org.vamdc.dictionary.Restrictable> getRestrictables()
Get restrictables supported by this tapservice implementation.
Must be a subset of VAMDC dictionary:
http://dictionary.vamdc.org/

Returns:
collection of Restrictable keywords from VAMDC dictionary

buildXSAMS

void buildXSAMS(RequestInterface userRequest)
Build XSAMS data from user request

Parameters:
userRequest - request and response wrapper, contains user query object and XSAMS output wrapper

getMetrics

Map<org.vamdc.dictionary.HeaderMetrics,Object> getMetrics(RequestInterface userRequest)
Get query metrics. Is called when there is a HEAD request to a node, result should be a map of HTTP header names and their values. In case of an HTTP GET request this metrics are not used currently but may become used in future versions

Parameters:
userRequest - the same RequestInterface structure as for buildXSAMS.
Returns:
map of HeaderMetrics and their values. Omitted headers would not be outputed.

isAvailable

boolean isAvailable()
Do some really node-specific availability checks

Returns:
true if node is available

getErrorMessage

String getErrorMessage()
Return verbose reason of error if node is not available

Returns:
error message


Copyright © 2012 VAMDC. All Rights Reserved.