Package uk.ac.starlink.ttools.taplint
Class IvoaSchemaResolver
java.lang.Object
uk.ac.starlink.ttools.taplint.IvoaSchemaResolver
- All Implemented Interfaces:
LSResourceResolver
ResourceResolver implementation used for validating documents against
XSD schemas relating to known IVOA standards.
Schemas for a number of IVOA-related namespaces are kept locally.
This means both that validation can be performed without having to
retrieve documents from the remote IVOA web site, and also that
documents are not able to subsitute their own hacked versions of
the schema for a given namespace, they have to use the official one.
- Since:
- 28 Apr 2014
- Author:
- Mark Taylor
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Namespace URI for VOSI availability schema.static final String
Namespace URI for VOSI capabilities schema.Unmodifiable map of namespace URIs to local schema URLs for a selection of schemas from http://www.ivoa.net.static final String
Namespace URI for UWS schema.static final String
Namespace URI for VODataService schema.Unmodifiable map of namespace URIs to local schema URLs for a selection of schemas from http://www.w3.org. -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a resolver with a default schema map.IvoaSchemaResolver
(Map<String, URL> schemaMap) Constructs a resolver with a supplied schema map. -
Method Summary
Modifier and TypeMethodDescriptionReturns the the schema namespaces which this resolver has so far been asked to resolve, and has successfully resolved to known URLs.Returns the namespace->URL map of schemas known by this resolver.Returns the schema namespaces which this resolver has so far been asked to resolve, and has failed because they are unknown.
-
Field Details
-
VODATASERVICE_URI
Namespace URI for VODataService schema.- See Also:
-
CAPABILITIES_URI
Namespace URI for VOSI capabilities schema.- See Also:
-
AVAILABILITY_URI
Namespace URI for VOSI availability schema.- See Also:
-
UWS_URI
Namespace URI for UWS schema.- See Also:
-
IVOA_SCHEMA_MAP
Unmodifiable map of namespace URIs to local schema URLs for a selection of schemas from http://www.ivoa.net. Note that the namespace (map key) does not necessarily match the URL (map value) in point of minor version number; the minor version number in the URL may be later than the one in the namespace. This is deliberate, and is codified and explained in the XML Versioning document (at time of writing, PEN-XMLVers-1.0-20160906, sec 2.2.3). -
W3C_SCHEMA_MAP
Unmodifiable map of namespace URIs to local schema URLs for a selection of schemas from http://www.w3.org.
-
-
Constructor Details
-
IvoaSchemaResolver
Constructs a resolver with a supplied schema map.- Parameters:
schemaMap
- of known namespace to schema URLs
-
IvoaSchemaResolver
public IvoaSchemaResolver()Constructs a resolver with a default schema map.
-
-
Method Details
-
getSchemaMap
Returns the namespace->URL map of schemas known by this resolver. This may be modified to change the resolution behaviour.- Returns:
- modifiable namespace->URL map for known schemas
-
resolveResource
public LSInput resolveResource(String type, String namespaceURI, String publicId, String systemId, String baseURI) - Specified by:
resolveResource
in interfaceLSResourceResolver
-
getResolvedNamespaces
Returns the the schema namespaces which this resolver has so far been asked to resolve, and has successfully resolved to known URLs.- Returns:
- successful schema namespace resolutions to date
-
getUnresolvedNamespaces
Returns the schema namespaces which this resolver has so far been asked to resolve, and has failed because they are unknown.- Returns:
- unsuccessful schema namespace resolutions to date
-