|
Hilbert II - Version 0.03.08 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
org.qedeq.kernel.xml.parser.SaxDefaultHandler
Default SAX handler. Delegates SAX events to a
AbstractSimpleHandler
which could also delegate events to other
AbstractSimpleHandlers.
Before anything is parsed the method setExceptionList(DefaultSourceFileExceptionList)
must be called.
| Constructor Summary | |
SaxDefaultHandler()
Constructor. |
|
| Method Summary | |
void |
changeHandler(AbstractSimpleHandler newHandler,
String elementName,
SimpleAttributes attributes)
Change current handler to new one. |
void |
characters(char[] ch,
int start,
int length)
|
SAXParseException |
createSAXParseException(Exception e)
Wraps exception in new SAXParseException including parsing position information. |
SAXParseException |
createSAXParseException(String message)
Creates new SAXParseException including parsing position information. |
void |
endDocument()
|
void |
endElement(String uri,
String localName,
String qName)
|
int |
getLevel()
Get current level. |
URL |
getUrl()
Get original file URL. |
void |
setBasisDocumentHandler(AbstractSimpleHandler handler)
Set basis handler for documents. |
void |
setDocumentLocator(Locator locator)
Receive a Locator object for document events. |
void |
setExceptionList(DefaultSourceFileExceptionList errorList)
Set parse exception list. |
void |
setUrl(URL url)
Set original file URL. |
void |
startDocument()
|
void |
startElement(String uri,
String localName,
String qName,
Attributes amap)
|
| Methods inherited from class org.xml.sax.helpers.DefaultHandler |
endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SaxDefaultHandler()
| Method Detail |
public void setExceptionList(DefaultSourceFileExceptionList errorList)
errorList - Collect errors here.public void setDocumentLocator(Locator locator)
locator - A locator for all SAX document events.ContentHandler.setDocumentLocator(org.xml.sax.Locator),
Locatorpublic final void setBasisDocumentHandler(AbstractSimpleHandler handler)
handler - Basis handler for documents. This handler might also pass control to
another handler via the
AbstractSimpleHandler.changeHandler(AbstractSimpleHandler, String, SimpleAttributes)
method.
public final void startDocument()
throws SAXException
SAXException
public final void endDocument()
throws SAXException
SAXException
public final void startElement(String uri,
String localName,
String qName,
Attributes amap)
throws SAXException
SAXException
public final void endElement(String uri,
String localName,
String qName)
throws SAXException
SAXException
public final void characters(char[] ch,
int start,
int length)
public final void changeHandler(AbstractSimpleHandler newHandler,
String elementName,
SimpleAttributes attributes)
throws XmlSyntaxException
AbstractSimpleHandler.init().
The new handler also gets a AbstractSimpleHandler.startElement(String,
SimpleAttributes) event.
The current handler is stacked. After the new handler gets the appropriate endElement
event, the control is switched back to the old handler.
The switch back is also done, if the tag level gets back to the same number. That means
if for example the new handler starts with the <banana> tag, the
old handler is restored when the misspelled </bnana> tag occurs:
<banana>
<one />
<two >
<one />
<one />
</two >
</bnana>
newHandler - This handler gets the new events.elementName - Element name.attributes - Element attributes.
XmlSyntaxException - New Handler detected a semantic problem.public final int getLevel()
public final SAXParseException createSAXParseException(Exception e)
SAXParseException including parsing position information.
e - Exception to wrap.
public final SAXParseException createSAXParseException(String message)
SAXParseException including parsing position information.
message - Problem description.
public final void setUrl(URL url)
url - Data from this source is parsed. This URL is only for information. The
actual parsed data might be a local copy.public final URL getUrl()
|
Hilbert II - Version 0.03.08 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
| ©left GNU General Public Licence All Rights Reserved. |