org.geotools.xml.handlers.xsi
Class AttributeHandler

java.lang.Object
  extended byorg.geotools.xml.XSIElementHandler
      extended byorg.geotools.xml.handlers.xsi.AttributeHandler
All Implemented Interfaces:
java.io.Serializable

public class AttributeHandler
extends XSIElementHandler

AttributeHandler purpose.

Represents an 'attribute' element

Example Use:


 
  AttributeHandler x = new AttributeHandler(...);
  
 

Version:
$Id: AttributeHandler.java 17701 2006-01-23 00:00:51Z desruisseaux $
Author:
dzwiers, Refractions Research, Inc. http://www.refractions.net, $Author:$ (last modification)
See Also:
Serialized Form

Field Summary
static java.lang.String LOCALNAME
          'attribute'
static int OPTIONAL
          OPTIONAL
static int PROHIBITED
          PROHIBITED
static int REQUIRED
          REQUIRED
 
Fields inherited from class org.geotools.xml.XSIElementHandler
DEFAULT, EXTENSION, FACET, LIST, logger, RESTRICTION, SEQUENCE, SIMPLETYPE, UNION
 
Constructor Summary
AttributeHandler()
           
 
Method Summary
protected  Attribute compress(SchemaHandler parent)
           creates a smaller simpler version
 void endElement(java.lang.String namespaceURI, java.lang.String localName)
          handles SAX end Element events. this is an opportunity to complete some post-processing
static int findUse(java.lang.String use)
           Convert the 'use' attribute to an int mask
 XSIElementHandler getHandler(java.lang.String namespaceURI, java.lang.String localName)
          This method will be used to create the XSI document.
 int getHandlerType()
          Returns one of the Specified types ... intended for use by the child packages only
 java.lang.String getLocalName()
          Returns the LocalName for this element (ie this declaration in the Schema ... so ComplexType or Sequence ...)
 java.lang.String getName()
           Returns the attribute name
 int hashCode()
           
 void startElement(java.lang.String namespaceURI, java.lang.String localName, org.xml.sax.Attributes atts)
          handles SAX start Element events.
static java.lang.String writeUse(int use)
           converts an int mask representing use to the string representation
 
Methods inherited from class org.geotools.xml.XSIElementHandler
characters, equals, setLogLevel
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOCALNAME

public static final java.lang.String LOCALNAME
'attribute'

See Also:
Constant Field Values

OPTIONAL

public static final int OPTIONAL
OPTIONAL

See Also:
Constant Field Values

PROHIBITED

public static final int PROHIBITED
PROHIBITED

See Also:
Constant Field Values

REQUIRED

public static final int REQUIRED
REQUIRED

See Also:
Constant Field Values
Constructor Detail

AttributeHandler

public AttributeHandler()
Method Detail

hashCode

public int hashCode()
Specified by:
hashCode in class XSIElementHandler
See Also:
Object.hashCode()

getHandler

public XSIElementHandler getHandler(java.lang.String namespaceURI,
                                    java.lang.String localName)
                             throws org.xml.sax.SAXException
Description copied from class: XSIElementHandler
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.

Specified by:
getHandler in class XSIElementHandler
Parameters:
namespaceURI -
localName -
Returns:
XSIElementHandler, or null
Throws:
org.xml.sax.SAXException
See Also:
XSIElementHandler.getHandler(java.lang.String, java.lang.String)

startElement

public void startElement(java.lang.String namespaceURI,
                         java.lang.String localName,
                         org.xml.sax.Attributes atts)
Description copied from class: XSIElementHandler
handles SAX start Element events. This is an opportunity to complete some pre-processing.

Specified by:
startElement in class XSIElementHandler
Parameters:
namespaceURI -
localName -
atts -
See Also:
XSIElementHandler.startElement(java.lang.String, java.lang.String, org.xml.sax.Attributes)

getLocalName

public java.lang.String getLocalName()
Description copied from class: XSIElementHandler
Returns the LocalName for this element (ie this declaration in the Schema ... so ComplexType or Sequence ...)

Specified by:
getLocalName in class XSIElementHandler
Returns:
String (not-null)
See Also:
XSIElementHandler.getLocalName()

findUse

public static int findUse(java.lang.String use)

Convert the 'use' attribute to an int mask

Parameters:
use -
Returns:

writeUse

public static java.lang.String writeUse(int use)

converts an int mask representing use to the string representation

Parameters:
use -
Returns:

getName

public java.lang.String getName()

Returns the attribute name

Returns:

compress

protected Attribute compress(SchemaHandler parent)
                      throws org.xml.sax.SAXException

creates a smaller simpler version

Parameters:
parent -
Returns:
Throws:
org.xml.sax.SAXException

getHandlerType

public int getHandlerType()
Description copied from class: XSIElementHandler
Returns one of the Specified types ... intended for use by the child packages only

Specified by:
getHandlerType in class XSIElementHandler
Returns:
int (DEFAULT?)
See Also:
XSIElementHandler.getHandlerType()

endElement

public void endElement(java.lang.String namespaceURI,
                       java.lang.String localName)
Description copied from class: XSIElementHandler
handles SAX end Element events. this is an opportunity to complete some post-processing

Specified by:
endElement in class XSIElementHandler
Parameters:
namespaceURI -
localName -
See Also:
XSIElementHandler.endElement(java.lang.String, java.lang.String)


Copyright © GeoTools. All Rights Reserved.