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 ParserHandlerhandler
-
Constructor Summary
Constructors Constructor Description XSDParserDelegate(Configuration configuration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanHandle(QName elementName, Attributes attributes, Handler handler, Handler parent)Determines if this delegate can handle the specified element name.voidcharacters(char[] ch, int start, int length)voidendDocument()voidendElement(String uri, String localName, String name)voidendPrefixMapping(String prefix)ObjectgetParsedObject()Gets the final parsed object from the delegate.voidignorableWhitespace(char[] ch, int start, int length)voidprocessingInstruction(String target, String data)voidsetDocumentLocator(Locator locator)voidskippedEntity(String name)voidstartDocument()voidstartElement(String uri, String localName, String name, Attributes atts)voidstartPrefixMapping(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:ParserDelegateDetermines 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:
canHandlein 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, possiblynullparent- 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:
setDocumentLocatorin interfaceContentHandler
-
startDocument
public void startDocument() throws SAXException- Specified by:
startDocumentin interfaceContentHandler- Throws:
SAXException
-
processingInstruction
public void processingInstruction(String target, String data) throws SAXException
- Specified by:
processingInstructionin interfaceContentHandler- Throws:
SAXException
-
skippedEntity
public void skippedEntity(String name) throws SAXException
- Specified by:
skippedEntityin interfaceContentHandler- Throws:
SAXException
-
startPrefixMapping
public void startPrefixMapping(String prefix, String uri) throws SAXException
- Specified by:
startPrefixMappingin interfaceContentHandler- Throws:
SAXException
-
endPrefixMapping
public void endPrefixMapping(String prefix) throws SAXException
- Specified by:
endPrefixMappingin interfaceContentHandler- Throws:
SAXException
-
startElement
public void startElement(String uri, String localName, String name, Attributes atts) throws SAXException
- Specified by:
startElementin interfaceContentHandler- Throws:
SAXException
-
characters
public void characters(char[] ch, int start, int length) throws SAXException- Specified by:
charactersin interfaceContentHandler- Throws:
SAXException
-
ignorableWhitespace
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException- Specified by:
ignorableWhitespacein interfaceContentHandler- Throws:
SAXException
-
endElement
public void endElement(String uri, String localName, String name) throws SAXException
- Specified by:
endElementin interfaceContentHandler- Throws:
SAXException
-
endDocument
public void endDocument() throws SAXException- Specified by:
endDocumentin interfaceContentHandler- Throws:
SAXException
-
getParsedObject
public Object getParsedObject()
Description copied from interface:ParserDelegateGets the final parsed object from the delegate.This method is called after parsing control returns to the main parsing driver.
- Specified by:
getParsedObjectin interfaceParserDelegate
-
-