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
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:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Type constantsstatic final int
Type constantsstatic final int
Type constantsstatic final int
Type constantsstatic final Logger
the logger -- should be used for debugging (assuming there are bugs LOL)static final int
Type constantsstatic final int
Type constantsstatic final int
Type constantsstatic final int
Type constants -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Creates a new XSIElementHandler object. -
Method Summary
Modifier and TypeMethodDescriptionvoid
characters
(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 void
endElement
(String namespaceURI, String localName) handles SAX end Element events. this is an opportunity to complete some post-processingboolean
abstract XSIElementHandler
getHandler
(String namespaceURI, String localName) This method will be used to create the XSI document.abstract int
Returns one of the Specified types ... intended for use by the child packages onlyabstract String
Returns the LocalName for this element (ie this declaration in the Schema ... so ComplexType or Sequence ...)abstract int
hashCode()
static void
setLogLevel
(Level l) Sets the logging level for all XSIElementHandlersabstract void
startElement
(String namespaceURI, String localName, Attributes attr) handles SAX start Element events.
-
Field Details
-
logger
the logger -- should be used for debugging (assuming there are bugs LOL) -
DEFAULT
public static final int DEFAULTType constants- See Also:
-
UNION
public static final int UNIONType constants- See Also:
-
LIST
public static final int LISTType constants- See Also:
-
RESTRICTION
public static final int RESTRICTIONType constants- See Also:
-
EXTENSION
public static final int EXTENSIONType constants- See Also:
-
SIMPLETYPE
public static final int SIMPLETYPEType constants- See Also:
-
SEQUENCE
public static final int SEQUENCEType constants- See Also:
-
FACET
public static final int FACETType constants- See Also:
-
-
Constructor Details
-
XSIElementHandler
protected XSIElementHandler()Creates a new XSIElementHandler object. Intended to limit creation to the sub-packages
-
-
Method Details
-
getHandlerType
public abstract int getHandlerType()Returns one of the Specified types ... intended for use by the child packages only- Returns:
- int (DEFAULT?)
-
characters
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
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
Returns the LocalName for this element (ie this declaration in the Schema ... so ComplexType or Sequence ...)- Returns:
- String (not-null)
-
equals
-
hashCode
public abstract int hashCode() -
setLogLevel
Sets the logging level for all XSIElementHandlers
-