uk.ac.starlink.ttools.votlint
Class VotLintEntityResolver

java.lang.Object
  extended by uk.ac.starlink.ttools.votlint.VotLintEntityResolver
All Implemented Interfaces:
EntityResolver, LexicalHandler

public class VotLintEntityResolver
extends Object
implements EntityResolver, LexicalHandler

Provides entity resolution for the VOTable linter. In particular, when registered as a LexicalHandler during the VOTable parse, this resolver will make sure that whatever entity is declared as the external DTD in fact resolves to the (locally held) text of one of the VOTable DTDs (according to the context's version). This both ensures that we're using a known, correct copy of the DTD, and prevents the necessity for making external network connections.

Since:
8 Apr 2005
Author:
Mark Taylor (Starlink)

Constructor Summary
VotLintEntityResolver(VotLintContext context)
          Constructor.
 
Method Summary
 void comment(char[] ch, int start, int length)
           
 void endCDATA()
           
 void endDTD()
           
 void endEntity(String name)
           
 InputSource resolveEntity(String publicId, String systemId)
           
 void startCDATA()
           
 void startDTD(String name, String publicId, String systemId)
           
 void startEntity(String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VotLintEntityResolver

public VotLintEntityResolver(VotLintContext context)
Constructor.

Parameters:
context - lint context
Method Detail

startDTD

public void startDTD(String name,
                     String publicId,
                     String systemId)
Specified by:
startDTD in interface LexicalHandler

resolveEntity

public InputSource resolveEntity(String publicId,
                                 String systemId)
Specified by:
resolveEntity in interface EntityResolver

endDTD

public void endDTD()
Specified by:
endDTD in interface LexicalHandler

startCDATA

public void startCDATA()
Specified by:
startCDATA in interface LexicalHandler

endCDATA

public void endCDATA()
Specified by:
endCDATA in interface LexicalHandler

startEntity

public void startEntity(String name)
Specified by:
startEntity in interface LexicalHandler

endEntity

public void endEntity(String name)
Specified by:
endEntity in interface LexicalHandler

comment

public void comment(char[] ch,
                    int start,
                    int length)
Specified by:
comment in interface LexicalHandler


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