Package org.geotools.xml
Class XSIElementHandler
- Object
-
- XSIElementHandler
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AnyAttributeHandler,AttributeGroupHandler,AttributeHandler,ComplexContentHandler,ComplexTypeHandler,ElementGroupingHandler,ExtensionHandler,FacetHandler,FieldHandler,IgnoreHandler,ImportHandler,IncludeHandler,KeyHandler,KeyrefHandler,ListHandler,RedefineHandler,RestrictionHandler,RootHandler,SchemaHandler,SelectorHandler,SimpleContentHandler,SimpleTypeHandler,UnionHandler,UniqueHandler
public abstract class XSIElementHandler extends Object implements Serializable
This abstract class is intended to act as both a definition of what a generic handler is, and a default handler.When extending this class, one should as a minimum replace the start/end Element methods.
- Author:
- dzwiers, Refractions Research, Inc. http://www.refractions.net, $Author:$ (last modification)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULTType constantsstatic intEXTENSIONType constantsstatic intFACETType constantsstatic intLISTType constantsstatic Loggerloggerthe logger -- should be used for debugging (assuming there are bugs LOL)static intRESTRICTIONType constantsstatic intSEQUENCEType constantsstatic intSIMPLETYPEType constantsstatic intUNIONType constants
-
Constructor Summary
Constructors Modifier Constructor Description protectedXSIElementHandler()Creates a new XSIElementHandler object.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidcharacters(String text)In most cases this class should not be called within this framework as we do not intend to parse + store all the information required to recreate the exact Schema document being parsed.abstract voidendElement(String namespaceURI, String localName)handles SAX end Element events. this is an opportunity to complete some post-processingbooleanequals(Object obj)abstract XSIElementHandlergetHandler(String namespaceURI, String localName)This method will be used to create the XSI document.abstract intgetHandlerType()Returns one of the Specified types ... intended for use by the child packages onlyabstract StringgetLocalName()Returns the LocalName for this element (ie this declaration in the Schema ... so ComplexType or Sequence ...)abstract inthashCode()static voidsetLogLevel(Level l)Sets the logging level for all XSIElementHandlersabstract voidstartElement(String namespaceURI, String localName, Attributes attr)handles SAX start Element events.
-
-
-
Field Detail
-
logger
public static final Logger logger
the logger -- should be used for debugging (assuming there are bugs LOL)
-
DEFAULT
public static final int DEFAULT
Type constants- See Also:
- Constant Field Values
-
UNION
public static final int UNION
Type constants- See Also:
- Constant Field Values
-
LIST
public static final int LIST
Type constants- See Also:
- Constant Field Values
-
RESTRICTION
public static final int RESTRICTION
Type constants- See Also:
- Constant Field Values
-
EXTENSION
public static final int EXTENSION
Type constants- See Also:
- Constant Field Values
-
SIMPLETYPE
public static final int SIMPLETYPE
Type constants- See Also:
- Constant Field Values
-
SEQUENCE
public static final int SEQUENCE
Type constants- See Also:
- Constant Field Values
-
FACET
public static final int FACET
Type constants- See Also:
- Constant Field Values
-
-
Method Detail
-
getHandlerType
public abstract int getHandlerType()
Returns one of the Specified types ... intended for use by the child packages only- Returns:
- int (DEFAULT?)
-
characters
public void characters(String text) throws SAXException
In most cases this class should not be called within this framework as we do not intend to parse + store all the information required to recreate the exact Schema document being parsed. As a result, information such as annotations are ignored. When used, they method may be called multiple times for one element. This means the implementor should keep this in mind when overriding this method.- Throws:
SAXException
-
endElement
public abstract void endElement(String namespaceURI, String localName) throws SAXException
handles SAX end Element events. this is an opportunity to complete some post-processing- Throws:
SAXException
-
startElement
public abstract void startElement(String namespaceURI, String localName, Attributes attr) throws SAXException
handles SAX start Element events. This is an opportunity to complete some pre-processing.- Throws:
SAXException
-
getHandler
public abstract XSIElementHandler getHandler(String namespaceURI, String localName) throws SAXException
This method will be used to create the XSI document. Validation and in-fix processing is expected to exist within this method, along with data logging for post-processing. This method will directly affect the stack being used to complete the parse.- Returns:
- XSIElementHandler, or null
- Throws:
SAXException
-
getLocalName
public abstract String getLocalName()
Returns the LocalName for this element (ie this declaration in the Schema ... so ComplexType or Sequence ...)- Returns:
- String (not-null)
-
equals
public boolean equals(Object obj)
- Overrides:
equalsin classObject- See Also:
Object.equals(java.lang.Object)
-
hashCode
public abstract int hashCode()
- Overrides:
hashCodein classObject- See Also:
Object.hashCode()
-
setLogLevel
public static void setLogLevel(Level l)
Sets the logging level for all XSIElementHandlers
-
-