Package org.geotools.xsd
Class XSDParserDelegate
- Object
-
- XSDParserDelegate
-
- All Implemented Interfaces:
ParserDelegate
,ContentHandler
- Direct Known Subclasses:
FESParserDelegate
,FilterParserDelegate
,GMLParserDelegate
,GMLParserDelegate
,InterpolationParserDelegate
,RangeSubsetParserDelegate
,ScalingParserDelegate
,WFSParserDelegate
public class XSDParserDelegate extends Object implements ParserDelegate
Parser delegate which which uses the xsd framework to parse.This is used to support the parsing of dynamically imported schemas, ie schemas that are included on the fly in an instance document but not referenced by the schema itself.
- Since:
- 2.6
- Author:
- Justin Deoliveira, OpenGEO
-
-
Field Summary
Fields Modifier and Type Field Description protected ParserHandler
handler
-
Constructor Summary
Constructors Constructor Description XSDParserDelegate(Configuration configuration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canHandle(QName elementName, Attributes attributes, Handler handler, Handler parent)
Determines if this delegate can handle the specified element name.void
characters(char[] ch, int start, int length)
void
endDocument()
void
endElement(String uri, String localName, String name)
void
endPrefixMapping(String prefix)
Object
getParsedObject()
Gets the final parsed object from the delegate.void
ignorableWhitespace(char[] ch, int start, int length)
void
processingInstruction(String target, String data)
void
setDocumentLocator(Locator locator)
void
skippedEntity(String name)
void
startDocument()
void
startElement(String uri, String localName, String name, Attributes atts)
void
startPrefixMapping(String prefix, String uri)
-
-
-
Field Detail
-
handler
protected ParserHandler handler
-
-
Constructor Detail
-
XSDParserDelegate
public XSDParserDelegate(Configuration configuration)
-
-
Method Detail
-
canHandle
public boolean canHandle(QName elementName, Attributes attributes, Handler handler, Handler parent)
Description copied from interface:ParserDelegate
Determines if this delegate can handle the specified element name.A common check in this method would be to check the namespace of the element.
- Specified by:
canHandle
in interfaceParserDelegate
- Parameters:
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, possiblynull
parent
- The parse handler for the parent element, possiblynull
.- Returns:
- True if this delegate handles elements of the specified name and should take over parsing.
-
setDocumentLocator
public void setDocumentLocator(Locator locator)
- Specified by:
setDocumentLocator
in interfaceContentHandler
-
startDocument
public void startDocument() throws SAXException
- Specified by:
startDocument
in interfaceContentHandler
- Throws:
SAXException
-
processingInstruction
public void processingInstruction(String target, String data) throws SAXException
- Specified by:
processingInstruction
in interfaceContentHandler
- Throws:
SAXException
-
skippedEntity
public void skippedEntity(String name) throws SAXException
- Specified by:
skippedEntity
in interfaceContentHandler
- Throws:
SAXException
-
startPrefixMapping
public void startPrefixMapping(String prefix, String uri) throws SAXException
- Specified by:
startPrefixMapping
in interfaceContentHandler
- Throws:
SAXException
-
endPrefixMapping
public void endPrefixMapping(String prefix) throws SAXException
- Specified by:
endPrefixMapping
in interfaceContentHandler
- Throws:
SAXException
-
startElement
public void startElement(String uri, String localName, String name, Attributes atts) throws SAXException
- Specified by:
startElement
in interfaceContentHandler
- Throws:
SAXException
-
characters
public void characters(char[] ch, int start, int length) throws SAXException
- Specified by:
characters
in interfaceContentHandler
- Throws:
SAXException
-
ignorableWhitespace
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException
- Specified by:
ignorableWhitespace
in interfaceContentHandler
- Throws:
SAXException
-
endElement
public void endElement(String uri, String localName, String name) throws SAXException
- Specified by:
endElement
in interfaceContentHandler
- Throws:
SAXException
-
endDocument
public void endDocument() throws SAXException
- Specified by:
endDocument
in interfaceContentHandler
- Throws:
SAXException
-
getParsedObject
public Object getParsedObject()
Description copied from interface:ParserDelegate
Gets the final parsed object from the delegate.This method is called after parsing control returns to the main parsing driver.
- Specified by:
getParsedObject
in interfaceParserDelegate
-
-