Package uk.ac.starlink.ttools.taplint
Class IvoaSchemaResolver
- java.lang.Object
-
- uk.ac.starlink.ttools.taplint.IvoaSchemaResolver
-
- All Implemented Interfaces:
org.w3c.dom.ls.LSResourceResolver
public class IvoaSchemaResolver extends java.lang.Object implements org.w3c.dom.ls.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
Fields Modifier and Type Field Description static java.lang.String
AVAILABILITY_URI
Namespace URI for VOSI availability schema.static java.lang.String
CAPABILITIES_URI
Namespace URI for VOSI capabilities schema.static java.lang.String
UWS_URI
Namespace URI for UWS schema.static java.lang.String
VODATASERVICE_URI
Namespace URI for VODataService schema.
-
Constructor Summary
Constructors Constructor Description IvoaSchemaResolver(Reporter reporter)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getResolvedCount()
Returns the number of schemas that this resolver has so far been asked to resolve, and has successfully resolved to known local URLs.org.w3c.dom.ls.LSInput
resolveResource(java.lang.String type, java.lang.String namespaceURI, java.lang.String publicId, java.lang.String systemId, java.lang.String baseURI)
-
-
-
Field Detail
-
VODATASERVICE_URI
public static final java.lang.String VODATASERVICE_URI
Namespace URI for VODataService schema.
-
CAPABILITIES_URI
public static final java.lang.String CAPABILITIES_URI
Namespace URI for VOSI capabilities schema.
-
AVAILABILITY_URI
public static final java.lang.String AVAILABILITY_URI
Namespace URI for VOSI availability schema.
-
UWS_URI
public static final java.lang.String UWS_URI
Namespace URI for UWS schema.
-
-
Constructor Detail
-
IvoaSchemaResolver
public IvoaSchemaResolver(Reporter reporter)
Constructor.- Parameters:
reporter
- destination for validation messages
-
-
Method Detail
-
resolveResource
public org.w3c.dom.ls.LSInput resolveResource(java.lang.String type, java.lang.String namespaceURI, java.lang.String publicId, java.lang.String systemId, java.lang.String baseURI)
- Specified by:
resolveResource
in interfaceorg.w3c.dom.ls.LSResourceResolver
-
getResolvedCount
public int getResolvedCount()
Returns the number of schemas that this resolver has so far been asked to resolve, and has successfully resolved to known local URLs.- Returns:
- number of successful entity resolutions to date
-
-