|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.ttools.votlint.VotLintContext
public class VotLintContext
Context for a VOTLint process. This is the object which knows most of the available global information about the parse. It also provides facilities for reporting log information about the parse to the user.
Field Summary | |
---|---|
static int |
MAX_REPEAT
Maximum number of identical error messages which will be logged. |
Constructor Summary | |
---|---|
VotLintContext(VOTableVersion version,
boolean validate,
boolean debug,
PrintStream out)
Constructor. |
Method Summary | |
---|---|
void |
error(String msg)
Write an error message to the user. |
Locator |
getLocator()
Returns the SAX document locator for this parse. |
Map |
getNamespaceMap()
Returns prefix->namespaceURI map for the xmlns namespaces currently in scope. |
PrintStream |
getOutput()
Returns the output stream to which messages will be written. |
VOTableVersion |
getVersion()
Returns the version of VOTable this context is parsing. |
void |
info(String msg)
Write an informative message to the user. |
boolean |
isDebug()
Returns whether we are in debug mode. |
boolean |
isValidating()
Indicates whether this lint is validating. |
void |
message(String type,
String msg,
Throwable e)
Dispatches a message to the user. |
void |
registerID(String id,
ElementHandler handler)
Register the fact that an XML ID-type attribute has been seen on an element. |
void |
registerRef(String id,
ElementRef from,
RefChecker checker)
Register the fact that an XML IDREF-type attribute has been seen on an element. |
void |
reportUncheckedRefs()
Goes through all the unresolved IDREF->ID arcs and reports them. |
void |
setLocator(Locator locator)
Sets the SAX document locator for this parse. |
void |
warning(String msg)
Write a warning message to the user. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MAX_REPEAT
Constructor Detail |
---|
public VotLintContext(VOTableVersion version, boolean validate, boolean debug, PrintStream out)
version
- version of VOTable for which the parse will be donevalidate
- if true, validation will be performed against
the appropriate DTD/schemadebug
- if true, a stack trace will be output with each
log messageout
- output stream to which messages will be writtenMethod Detail |
---|
public VOTableVersion getVersion()
public boolean isValidating()
public boolean isDebug()
public void setLocator(Locator locator)
locator
- locatorpublic Locator getLocator()
public PrintStream getOutput()
public Map getNamespaceMap()
public void registerID(String id, ElementHandler handler)
id
- ID valuehandler
- element labelled idpublic void registerRef(String id, ElementRef from, RefChecker checker)
id
- ID valuefrom
- the element on which the ref has been seenchecker
- the checker which knows how to check links of this
typepublic void reportUncheckedRefs()
public void info(String msg)
msg
- messagepublic void warning(String msg)
msg
- messagepublic void error(String msg)
msg
- messagepublic void message(String type, String msg, Throwable e)
type
- indication of message severitymsg
- specific message contente
- throwable associated with this message
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |