|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.harvard.cfa.vo.tapclient.tap.TapService
public class TapService
An object for accessing the service level functions of a VO TAP service. The functions include the VOSI availability, capabilites, and tables metadata as well as the TAP job list.
// Create a TapService object. TapService service = new TapService(baseURL); // Retrieve the VOSI tables for the service. TableSet tableset = service.getTableSet(); // Execute a metadata query at the TAP service synchronous endpoint. SyncJob syncJob = new SyncJob(tapService); syncJob.setParameter("FORMAT", "votable"); syncJob.setParameter("LANG", "ADQL"); syncJob.setParameter("QUERY", "SELECT * FROM master_source"); // Handle results InputStream = syncJob.run(); ...
Constructor Summary | |
---|---|
TapService(java.lang.String baseURL)
Constructs a TapService object associated with the service located at the baseURL. |
Method Summary | |
---|---|
Availability |
getAvailability()
Returns an Availability object that represents the VOSI availability of the service. |
java.lang.String |
getBaseURL()
Gets the base URL of this object. |
Capabilities |
getCapabilities()
Returns a list of Capability objects that represents the VOSI capabilities of the service. |
java.util.List<AsyncJob> |
getJobs()
Returns a List of AsyncJob objects. |
TableSet |
getTableSet()
Returns a list of Schema objects that represents the VOSI table set metadata of the service. |
TableSet |
getTableSetFromMetadata()
Returns a TableSet object constructed from a metadata query that represents the TAP tableset metadata of the service. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TapService(java.lang.String baseURL)
baseURL
- TAP service base URL, cannot be null.
java.lang.NullPointerException
- if baseURL is null.Method Detail |
---|
public TableSet getTableSetFromMetadata() throws HttpException, ResponseFormatException, java.io.IOException
HttpException
- if the service responses to the VOSI Tables request with an unexpected HTTP status.
ResponseFormatException
- if an error occurs parsing the service response into an VOSI Tables document.
java.io.IOException
- if an error occurs creating an input stream.public java.lang.String getBaseURL()
public Availability getAvailability() throws HttpException, ResponseFormatException, java.io.IOException
getAvailability
in interface Vosi
HttpException
- if the service responses to the VOSI Availability request with an unexpected HTTP status.
ResponseFormatException
- if an error occurs parsing the service response into an VOSI Availability document.
java.io.IOException
- if an error occurs creating an input stream.public Capabilities getCapabilities() throws HttpException, ResponseFormatException, java.io.IOException
getCapabilities
in interface Vosi
HttpException
- if the service responses to the VOSI Capabilities request with an unexpected HTTP status.
ResponseFormatException
- if an error occurs parsing the service response into an VOSI Capabilities document.
java.io.IOException
- if an error occurs creating an input stream.public TableSet getTableSet() throws HttpException, ResponseFormatException, java.io.IOException
getTableSet
in interface Vosi
HttpException
- if the service responses to the VOSI Tables request with an unexpected HTTP status.
ResponseFormatException
- if an error occurs parsing the service response into an VOSI Tables document.
java.io.IOException
- if an error occurs creating an input stream.public java.util.List<AsyncJob> getJobs() throws HttpException, ResponseFormatException, java.io.IOException
HttpException
- if the service responses to the metadata query with an unexpected HTTP status. It should be noted that some services may respond to a job list request with an HTTP 403 Forbidden code which will manifest in an HttpException.
ResponseFormatException
- if an error occurs parsing the service response into a metadata query result document.
java.io.IOException
- if an error occurs creating an input stream.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |