ReporterVotLintContext
public class VotLintContext
extends java.lang.Object
Modifier and Type | Field | Description |
---|---|---|
static int |
MAX_REPEAT |
Maximum number of identical error messages which will be logged.
|
Constructor | Description |
---|---|
VotLintContext(uk.ac.starlink.votable.VOTableVersion version,
boolean validate,
boolean debug,
java.io.PrintStream out) |
Constructor.
|
Modifier and Type | Method | Description |
---|---|---|
void |
error(java.lang.String msg) |
Write an error message to the user.
|
org.xml.sax.Locator |
getLocator() |
Returns the SAX document locator for this parse.
|
java.util.Map |
getNamespaceMap() |
Returns prefix->namespaceURI map for the xmlns namespaces currently
in scope.
|
java.io.PrintStream |
getOutput() |
Returns the output stream to which messages will be written.
|
uk.ac.starlink.votable.VOTableVersion |
getVersion() |
Returns the version of VOTable this context is parsing.
|
void |
info(java.lang.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(java.lang.String type,
java.lang.String msg,
java.lang.Throwable e) |
Dispatches a message to the user.
|
void |
registerID(java.lang.String id,
ElementHandler handler) |
Register the fact that an XML ID-type attribute has been seen on an
element.
|
void |
registerRef(java.lang.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(org.xml.sax.Locator locator) |
Sets the SAX document locator for this parse.
|
void |
warning(java.lang.String msg) |
Write a warning message to the user.
|
public static final int MAX_REPEAT
public VotLintContext(uk.ac.starlink.votable.VOTableVersion version, boolean validate, boolean debug, java.io.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 writtenpublic uk.ac.starlink.votable.VOTableVersion getVersion()
public boolean isValidating()
public boolean isDebug()
public void setLocator(org.xml.sax.Locator locator)
locator
- locatorpublic org.xml.sax.Locator getLocator()
public java.io.PrintStream getOutput()
public java.util.Map getNamespaceMap()
public void registerID(java.lang.String id, ElementHandler handler)
id
- ID valuehandler
- element labelled idpublic void registerRef(java.lang.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(java.lang.String msg)
msg
- messagepublic void warning(java.lang.String msg)
msg
- messagepublic void error(java.lang.String msg)
msg
- messagepublic void message(java.lang.String type, java.lang.String msg, java.lang.Throwable e)
type
- indication of message severitymsg
- specific message contente
- throwable associated with this messageCopyright © 2018 Central Laboratory of the Research Councils. All Rights Reserved.