public class VotLintContext extends Object
Constructor and Description |
---|
VotLintContext(VOTableVersion version,
boolean validate,
SaxMessager messager)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
error(VotLintCode code,
String msg)
Write an error message to the user.
|
Locator |
getLocator()
Returns the SAX document locator for this parse.
|
Map<String,String> |
getNamespaceMap()
Returns prefix->namespaceURI map for the xmlns namespaces currently
in scope.
|
VOTableVersion |
getVersion()
Returns the version of VOTable this context is parsing.
|
void |
info(VotLintCode code,
String msg)
Write an informative message to the user.
|
boolean |
isCheckUcd()
Indicates whether ucd attribute values will be checked.
|
boolean |
isCheckUnit()
Indicates whether unit attribute values will be checked.
|
boolean |
isValidating()
Indicates whether this lint is validating.
|
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 |
reportUnusedIds()
Goes through all declared IDs that were never referenced.
|
void |
setCheckUcd(boolean checkUcd)
Sets whether ucd attribute values will be checked.
|
void |
setCheckUnit(boolean checkUnit)
Sets whether unit attribute values will be checked.
|
void |
setLocator(Locator locator)
Sets the SAX document locator for this parse.
|
void |
warning(VotLintCode code,
String msg)
Write a warning message to the user.
|
public VotLintContext(VOTableVersion version, boolean validate, SaxMessager messager)
version
- version of VOTable for which the parse will be donevalidate
- if true, validation will be performed against
the appropriate DTD/schemamessager
- destination for validation messagespublic VOTableVersion getVersion()
public boolean isValidating()
public boolean isCheckUcd()
public void setCheckUcd(boolean checkUcd)
checkUcd
- whether to check UCD syntaxpublic boolean isCheckUnit()
public void setCheckUnit(boolean checkUnit)
checkUnit
- whether to check unit syntaxpublic void setLocator(Locator locator)
locator
- locatorpublic Locator getLocator()
public Map<String,String> getNamespaceMap()
public void registerID(String id, ElementHandler handler)
id
- ID valuehandler
- element labelled id
public 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 reportUnusedIds()
public void info(VotLintCode code, String msg)
code
- message identifiermsg
- message textpublic void warning(VotLintCode code, String msg)
code
- message identifiermsg
- message textpublic void error(VotLintCode code, String msg)
code
- message identifiermsg
- message textCopyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.