DataHandler, ParamHandler, StreamHandler, StreamingHandler, TableHandler, TdHandler, TrHandlerpublic class ElementHandler
extends java.lang.Object
VotLintContentHandler which
calls various methods on it in a controlled sequence as its life
cycle progresses to handle the current state of the parse.
Element-specific subclasses should generally override only the
startElement(), endElement() and characters(char[], int, int)
methods, which are invoked by the ContentHandler's similarly named
methods.
The checking done by an ElementHandler does not attempt to repeat or replace that done by validating against a DTD, it provides additional semantic checks based on what it knows about VOTables.
| Constructor | Description |
|---|---|
ElementHandler() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
characters(char[] ch,
int start,
int length) |
Called when character content is found in the element.
|
void |
configure(java.lang.String localName,
VotLintContext context) |
Sets this handler up ready for use.
|
void |
endElement() |
Called when the element has ended.
|
void |
error(java.lang.String msg) |
Writes an error message through the context.
|
Ancestry |
getAncestry() |
Returns an object containing the family relationships of this
handler.
|
java.lang.String |
getAttribute(java.lang.String name) |
Returns the value of a named attribute.
|
VotLintContext |
getContext() |
Returns this handler's context.
|
java.lang.String |
getName() |
Returns the localName for this element.
|
ElementRef |
getRef() |
Returns a reference for this element.
|
void |
info(java.lang.String msg) |
Writes an info message through the context.
|
void |
registerChildName(ElementRef child,
java.lang.String name) |
Called to indicate that a child of this element has a "name" attribute.
|
void |
setAncestry(Ancestry ancestry) |
Sets the ancestry of this handler.
|
void |
setAttributes(java.util.Map atts) |
Sets this handler's attributes.
|
void |
startElement() |
Called after the attributes have been set and checked.
|
java.lang.String |
toString() |
|
void |
warning(java.lang.String msg) |
Writes a warning message through the context.
|
public void configure(java.lang.String localName,
VotLintContext context)
localName - local name of the element this handler knows aboutcontext - lint contextpublic void setAncestry(Ancestry ancestry)
ancestry - family valuespublic Ancestry getAncestry()
public ElementRef getRef()
public java.lang.String getName()
public void setAttributes(java.util.Map atts)
atts - name -> value map representing this element's attributespublic java.lang.String getAttribute(java.lang.String name)
name - attribute namepublic void startElement()
public void endElement()
public void characters(char[] ch,
int start,
int length)
public void registerChildName(ElementRef child, java.lang.String name)
child - child elementname - value of child's name attributepublic VotLintContext getContext()
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 java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2018 Central Laboratory of the Research Councils. All Rights Reserved.