|
JCas v0.3.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cas.xml.AbstractCasSaxTagHandler
Implements the basic functionality of CasSaxRagHandler.
Constructor Summary | |
AbstractCasSaxTagHandler()
Creates a new instance of AbstractCasSaxTagHandler |
Method Summary | |
void |
characters(char[] ch,
int start,
int length)
Receive notification of character data inside an element. |
void |
clear()
Initializes the handler. |
protected abstract AbstractCasSaxTagHandler |
createHandler(String tagName,
Attributes attributes)
Returns a new instance of the handler for the specified sub tag. |
void |
endElement(String uri,
String localName,
String qName)
Receive notification of the end of an element. |
CasSaxTagHandler |
getHandler(String tagName,
Attributes attributes)
Returns the handler responsible for the sub tag. |
abstract String[] |
getParentTagNames()
Returns the tag names of all possible parents. |
CasSaxTagHandler |
getSubHandler(int n)
Returns the n-thr sub handler as it appeared in the XML parsing. |
int |
getSubHandlerCount()
Returns the number of sub handlers. |
CasSaxTagHandler[] |
getSubHandlers()
Returns all sub handlers. |
String[] |
getSubTag(int n)
Returns the n-th sub tag as it appeared in the XML parsing. |
String |
getSubTag(String name)
Returns the first sub tag value with the specified name. |
int |
getSubTagCount()
Returns the number of sub tags. |
protected String[] |
getSubTagNames()
Returns the tag names that can appear within this handler but actually do not contain other tags. |
String[][] |
getSubTags()
Returns all sub tags. |
boolean |
ignoresUnknownTags()
Returns true if unknown tags are ignored. |
void |
setAttributes(Attributes attr)
Sets the attributes of the tag. |
void |
setIgnoreUnknownTags(boolean b)
Sets the ignoreUnknownTags flag. |
void |
startElement(String uri,
String localName,
String qName,
Attributes attributes)
Receive notification of the start of an element. |
void |
tagCompleted()
Validates the configuration. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface cas.xml.CasSaxTagHandler |
getTagName |
Constructor Detail |
public AbstractCasSaxTagHandler()
Method Detail |
public void clear()
public void setIgnoreUnknownTags(boolean b)
public boolean ignoresUnknownTags()
public void setAttributes(Attributes attr)
setAttributes
in interface CasSaxTagHandler
attr
- - attributes of tagpublic void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException
startElement
in interface CasSaxTagHandler
attributes
- - The specified or defaulted attributes.localName
- - The local name (without prefix), or the empty string if Namespace processing is not being performed.qName
- - The qualified name (with prefix), or the empty string if qualified names are not available.
SAXException
- - Any SAX exception, possibly wrapping another exception.ContentHandler.startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)
public void endElement(String uri, String localName, String qName) throws SAXException
endElement
in interface CasSaxTagHandler
localName
- - The local name (without prefix), or the empty string if Namespace processing is not being performed.qName
- - The qualified name (with prefix), or the empty string if qualified names are not available.
SAXException
- - Any SAX exception, possibly wrapping another exception.ContentHandler.endElement(java.lang.String, java.lang.String, java.lang.String)
public void characters(char[] ch, int start, int length) throws SAXException
characters
in interface CasSaxTagHandler
ch
- - The characters.start
- - The start position in the character array.length
- - The number of characters to use from the character array.
SAXException
- - Any SAX exception, possibly wrapping another exception.ContentHandler.characters(char[], int, int)
public abstract String[] getParentTagNames()
protected abstract AbstractCasSaxTagHandler createHandler(String tagName, Attributes attributes)
tagName
- - name of the sub tag
protected String[] getSubTagNames()
public CasSaxTagHandler getHandler(String tagName, Attributes attributes)
createHandler(String,Attributes)
to get an instance
of a handler and then checks with the defined parents if it can
pass the handler to the caller of the method.
getHandler
in interface CasSaxTagHandler
tagName
- - the parent of the handler
public CasSaxTagHandler[] getSubHandlers()
public int getSubHandlerCount()
public CasSaxTagHandler getSubHandler(int n)
n
- - index of sub handler
public String[][] getSubTags()
public int getSubTagCount()
public String[] getSubTag(int n)
n
- - index of sub tag
public void tagCompleted() throws SAXException
tagCompleted
in interface CasSaxTagHandler
SAXException
- if a configuration error occured.public String getSubTag(String name)
|
JCas v0.3.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |