public interface ParserDelegate extends ContentHandler
An example of such a case is when a schema dynamically imports content from other schemas.
Instances of these objects are declared in the Configuration.getContext()
. Example:
MyParserDelegate delegate = new MyParserDelegate(); Configuration configuration = ...; configuration.getContext().registerComponentInstance( delegate );
ParserDelegate2
Modifier and Type | Method and Description |
---|---|
boolean |
canHandle(QName elementName,
Attributes attributes,
Handler handler,
Handler parent)
Determines if this delegate can handle the specified element name.
|
Object |
getParsedObject()
Gets the final parsed object from the delegate.
|
characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping
boolean canHandle(QName elementName, Attributes attributes, Handler handler, Handler parent)
A common check in this method would be to check the namespace of the element.
elementName
- The name of the element to potentially handle.attributes
- The attributes of the element to potentially handlehandler
- The parse handler that would normally handle the element, possibly null
parent
- The parse handler for the parent element, possibly null
.Object getParsedObject()
This method is called after parsing control returns to the main parsing driver.
Copyright © 1996–2022 Geotools. All rights reserved.