public abstract class BaseXMLTagInterpreterController extends org.xml.sax.helpers.DefaultHandler implements XMLTagInterpreterController
PROP_LEXICAL_HANDLER
Modifier | Constructor and Description |
---|---|
protected |
BaseXMLTagInterpreterController()
Initializes the instance variables with default values.
|
|
BaseXMLTagInterpreterController(org.xml.sax.XMLReader xmlReader)
Initializes the instance variables with default values.
|
Modifier and Type | Method and Description |
---|---|
protected abstract XMLTagInterpreterFactory |
createTagInterpreterFactory()
Returns a new instance of a tag interpreter factory.
|
protected XMLTagInterpreterFactory |
getInterpreterFactory() |
protected XMLTagInterpreter |
getInterpreterFor(java.lang.String tagName) |
protected java.util.Stack<XMLTagInterpreter> |
getInterpreterStack() |
LexicalHandlerDispatcher |
getLexicalHandlerHolder() |
protected org.xml.sax.XMLReader |
getReader() |
org.xml.sax.XMLReader |
getXmlReader()
Returns the XML reader that will be used to parse XML streams
|
protected abstract void |
handleFinalResult(java.lang.Object result)
This method is called, when the end tag of the document was reached.
|
protected void |
initLexicalHandler() |
protected boolean |
isLexicalHandlerSupported()
Returns true if the LexicalHandler callback is supported by the XML parser
|
protected boolean |
isStackEmpty()
Returns whether the stack is empty or not.
|
protected XMLTagInterpreter |
peekStack()
Returns the last element from the stack without removing it.
|
protected XMLTagInterpreter |
popFromStack()
Returns the last element from the stack and removes it.
|
protected void |
putOnStack(XMLTagInterpreter interpreter)
Puts the given tag interpreter on top of the stack.
|
protected void |
restartInterpreter(XMLTagInterpreter interpreter,
java.lang.String subTagName,
java.lang.Object result)
Restarts the given tag interpreter after a sub tag interpretation
was finished.
|
void |
returnControl(java.lang.Object result)
Gives back the control of the element interpretation to the receiver.
|
protected void |
setInterpreterFactory(XMLTagInterpreterFactory aValue) |
protected void |
setInterpreterStack(java.util.Stack<XMLTagInterpreter> aValue) |
void |
setLexicalHandlerHolder(LexicalHandlerDispatcher newValue) |
protected void |
setLexicalHandlerSupported(boolean newValue) |
protected void |
setReader(org.xml.sax.XMLReader aValue) |
void |
setXmlReader(org.xml.sax.XMLReader aReader)
Sets the XML reader that will be used to parse XML streams
|
void |
startElement(java.lang.String name,
org.xml.sax.Attributes attributes) |
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attributes)
Supports SAX 2.0
|
protected void |
startInterpreter(XMLTagInterpreter interpreter,
java.lang.String elementName,
org.xml.sax.Attributes attributes)
Starts the given tag interpreter for the first time.
|
protected void |
trace(java.lang.String text)
Method for debugging output.
|
characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
protected BaseXMLTagInterpreterController()
public BaseXMLTagInterpreterController(org.xml.sax.XMLReader xmlReader)
xmlReader
- The SAX reader that reads the XML source.public LexicalHandlerDispatcher getLexicalHandlerHolder()
public void setLexicalHandlerHolder(LexicalHandlerDispatcher newValue)
public void returnControl(java.lang.Object result) throws org.xml.sax.SAXException
returnControl
in interface XMLTagInterpreterController
result
- The result of a sub tag interpretation.org.xml.sax.SAXException
public void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes) throws org.xml.sax.SAXException
startElement
in interface org.xml.sax.ContentHandler
startElement
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
ContentHandler.startElement(String,String,String,Attributes)
public void startElement(java.lang.String name, org.xml.sax.Attributes attributes) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public org.xml.sax.XMLReader getXmlReader()
public void setXmlReader(org.xml.sax.XMLReader aReader)
aReader
- The reader this controller should use to parse XML streamsprotected abstract void handleFinalResult(java.lang.Object result)
result
- The result of the all embracing document tag.protected abstract XMLTagInterpreterFactory createTagInterpreterFactory()
protected void startInterpreter(XMLTagInterpreter interpreter, java.lang.String elementName, org.xml.sax.Attributes attributes) throws org.xml.sax.SAXException
interpreter
- The tag interpreter to be started.elementName
- The name of the tag.attributes
- All attributes and their values found in the start tag.org.xml.sax.SAXException
returnControl(Object)
,
startElement(String, Attributes)
protected void restartInterpreter(XMLTagInterpreter interpreter, java.lang.String subTagName, java.lang.Object result) throws org.xml.sax.SAXException
interpreter
- The tag interpreter to be restarted.subTagName
- The name of the sub tag, the result corresponds to.result
- The result object of the interpretation of the sub tag.org.xml.sax.SAXException
XMLTagInterpreter.restart(String, Object)
protected XMLTagInterpreter getInterpreterFor(java.lang.String tagName) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected XMLTagInterpreter popFromStack()
protected XMLTagInterpreter peekStack()
protected void putOnStack(XMLTagInterpreter interpreter)
protected boolean isStackEmpty()
protected void initLexicalHandler()
protected void trace(java.lang.String text)
protected org.xml.sax.XMLReader getReader()
protected void setReader(org.xml.sax.XMLReader aValue)
protected java.util.Stack<XMLTagInterpreter> getInterpreterStack()
protected void setInterpreterStack(java.util.Stack<XMLTagInterpreter> aValue)
protected XMLTagInterpreterFactory getInterpreterFactory()
protected void setInterpreterFactory(XMLTagInterpreterFactory aValue)
protected boolean isLexicalHandlerSupported()
protected void setLexicalHandlerSupported(boolean newValue)