uk.ac.starlink.ttools.taplint
Class IvoaSchemaResolver

java.lang.Object
  extended by uk.ac.starlink.ttools.taplint.IvoaSchemaResolver
All Implemented Interfaces:
org.w3c.dom.ls.LSResourceResolver

public class IvoaSchemaResolver
extends 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
static String AVAILABILITY_URI
          Namespace URI for VOSI availability schema.
static String CAPABILITIES_URI
          Namespace URI for VOSI capabilities schema.
static String VODATASERVICE_URI
          Namespace URI for VODataService schema.
 
Constructor Summary
IvoaSchemaResolver(Reporter reporter)
          Constructor.
 
Method Summary
 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(String type, String namespaceURI, String publicId, String systemId, String baseURI)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VODATASERVICE_URI

public static final String VODATASERVICE_URI
Namespace URI for VODataService schema.


CAPABILITIES_URI

public static final String CAPABILITIES_URI
Namespace URI for VOSI capabilities schema.


AVAILABILITY_URI

public static final String AVAILABILITY_URI
Namespace URI for VOSI availability 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(String type,
                                              String namespaceURI,
                                              String publicId,
                                              String systemId,
                                              String baseURI)
Specified by:
resolveResource in interface org.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


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.