Package uk.ac.starlink.vo
Class TapServices
java.lang.Object
uk.ac.starlink.vo.TapServices
Utility class for working with TapService instances.
- Since:
- 18 Mar 2016
- Author:
- Mark Taylor
-
Method Summary
Modifier and TypeMethodDescriptionstatic TapService
createDefaultTapService
(URL baseUrl) Creates a TAP 1.0 service given the base URL, with the endpoints in the default places.static TapService
createTapService
(String baseUrl, TapVersion tapVersion) Creates a TAP 1.0 service given a base URL string, with the endpoints in the default places and a specified TAP version.static TapService
createTapService
(URL baseUrl, TapVersion tapVersion) Creates a TAP service given the base URL, with the endpoints in the default places and a specified TAP version.static TapService[]
createTapServices
(URL baseUrl, TapCapabilitiesDoc capsDoc) Returns an array of TapService instances that are described by a supplied TAP capabilities document.static TapService
Returns a default service corresponding to a Relational Registry (RegTAP) service.
-
Method Details
-
getRegTapService
Returns a default service corresponding to a Relational Registry (RegTAP) service.The current implementation returns a hardcoded value, the main GAVO registry service. Perhaps it should be pluggable, but the GAVO RegTAP service is expected to be pretty reliable.
- Returns:
- default RegTAP service
-
createDefaultTapService
Creates a TAP 1.0 service given the base URL, with the endpoints in the default places.- Parameters:
baseUrl
- base TAP URL- Returns:
- service using standard (v1.0) TAP endpoints
- Throws:
IllegalArgumentException
- in case of a bad URL
-
createTapService
Creates a TAP service given the base URL, with the endpoints in the default places and a specified TAP version.This setup is more or less mandatory for TAP 1.0 services, but TAP 1.1 services may have more freedom to provide different sets of endpoints (capability/interface elements) for different purposes, for instance with different securityMethods.
- Parameters:
baseUrl
- base TAP URLtapVersion
- TAP protocol version- Returns:
- TAP service with standard endpoints
-
createTapService
Creates a TAP 1.0 service given a base URL string, with the endpoints in the default places and a specified TAP version. If the URL is bad, a warning is logged, and null is returned.- Parameters:
baseUrl
- base TAP URLtapVersion
- TAP protocol version- Returns:
- service with standard (v1.0) TAP endpoints
-
createTapServices
Returns an array of TapService instances that are described by a supplied TAP capabilities document. The returned list will have at least one entry, but may have more if multiple TAP interfaces or security method variants have been declared.- Parameters:
baseUrl
- base URL for TAP service (source of capabilities doc)capsDoc
- parsed capabilities document- Returns:
- array containing one or more TAP services
-