org.geotools.xml.filter
Class FilterComplexTypes.ExpressionType

java.lang.Object
  extended byorg.geotools.xml.filter.FilterSchema.FilterComplexType
      extended byorg.geotools.xml.filter.FilterComplexTypes.ExpressionType
All Implemented Interfaces:
ComplexType, ExpressionType, Type
Enclosing class:
FilterComplexTypes

public static class FilterComplexTypes.ExpressionType
extends org.geotools.xml.filter.FilterSchema.FilterComplexType
implements ExpressionType


Field Summary
 
Fields inherited from interface org.geotools.filter.expression.ExpressionType
ATTRIBUTE, ATTRIBUTE_DOUBLE, ATTRIBUTE_GEOMETRY, ATTRIBUTE_INTEGER, ATTRIBUTE_STRING, ATTRIBUTE_UNDECLARED, FUNCTION, LITERAL_DOUBLE, LITERAL_GEOMETRY, LITERAL_INTEGER, LITERAL_STRING, MATH_ADD, MATH_DIVIDE, MATH_MULTIPLY, MATH_SUBTRACT
 
Constructor Summary
FilterComplexTypes.ExpressionType()
           
 
Method Summary
 boolean cache(Element element, java.util.Map hints)
          This method is a directive to the parser whether to keep the data around in memory for post processing.
 boolean canEncode(Element element, java.lang.Object value, java.util.Map hints)
          Subclass must override this method to allow encoding.
 void encode(Element element, java.lang.Object value, PrintHandler output, java.util.Map hints)
          Subclass should implement this, this implementation provides a good OperationsNotSupportedException.
 Element findChildElement(java.lang.String name)
          Convinience method used to search this type's children for the requested element by localName.
 java.lang.String getAnyAttributeNameSpace()
          This methos represents the potential 'anyAttribute' declaration's namespace attribute which may occur within a complex type definition.
 Attribute[] getAttributes()
          The set of attributes required by this complex type declaration.
 int getBlock()
          Specifies a mask which denotes which substitution mechanisms may be used for this complex type definition.
 ElementGrouping getChild()
          Returns the child element representing the structure of nested child nodes (if any are allowed).
 Element[] getChildElements()
           
 int getFinal()
          Specifies a mask which denotes which substitution mechanisms prohibited for use by child definitions of this complex type.
 java.lang.String getId()
          Returns the xml schema id of this complexType if one exists, null otherwise.
static ComplexType getInstance()
           
 java.lang.Class getInstanceType()
           This will return the intended Java Class for this element type.
 java.lang.String getName()
           This returns the XML Schema declaration name of this type (both complex and simple types have names ...)
 java.net.URI getNamespace()
           This is used for validation of an XML document, and represents the targetNamespace of that this type resides in.
 Type getParent()
           This is used to represent the heirarchy represented within an xml schema document(s).
 java.lang.Object getValue(Element element, ElementValue[] value, org.xml.sax.Attributes attrs, java.util.Map hints)
           This method is intended to receive the child elements in the form of ElementValues (@see ElementValue).
 boolean isAbstract()
          Returns true when the complexType should be considered abstract, as defined by the XML schema of which this complex type definition is a part.
 boolean isDerived()
          This method is used to publish whether this complexType is at the root of an inheritance tree, or a leaf within an inheritance tree.
 boolean isMixed()
          Returns true if this complexType allows mixed content (Child elements and a String value).
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FilterComplexTypes.ExpressionType

public FilterComplexTypes.ExpressionType()
Method Detail

getInstance

public static ComplexType getInstance()

isAbstract

public boolean isAbstract()
Description copied from interface: ComplexType
Returns true when the complexType should be considered abstract, as defined by the XML schema of which this complex type definition is a part.

Specified by:
isAbstract in interface ComplexType
See Also:
ComplexType.isAbstract()

getChild

public ElementGrouping getChild()
Description copied from interface: ComplexType
Returns the child element representing the structure of nested child nodes (if any are allowed).

Specified by:
getChild in interface ComplexType
Returns:
See Also:
ComplexType.getChild()

getChildElements

public Element[] getChildElements()
Specified by:
getChildElements in interface ComplexType
See Also:
ComplexType.getChildElements()

getValue

public java.lang.Object getValue(Element element,
                                 ElementValue[] value,
                                 org.xml.sax.Attributes attrs,
                                 java.util.Map hints)
Description copied from interface: Type

This method is intended to receive the child elements in the form of ElementValues (@see ElementValue). Recall that this is a pairing containing a reference to the type and the actual value (do not call .getValue on the types). This should return the real value (interpreted value) for this element based on it's children. Remember, this is a XML is a tree structure, so if you don't include some children, they are gone forever (so be careful when ignoring data).

If the element had #CData (Nested Child Text), this will appear in the first slot, with a null Element.

A SAXNotSupportedException should be thrown when the child's [inherited, default implementation of getValue(ElementValue[],Attributes)] method should be used.

Specified by:
getValue in interface Type
Returns:
Object
See Also:
Type.getValue(org.geotools.xml.schema.Element, org.geotools.xml.schema.ElementValue[], org.xml.sax.Attributes, java.util.Map)

getName

public java.lang.String getName()
Description copied from interface: Type

This returns the XML Schema declaration name of this type (both complex and simple types have names ...)

Specified by:
getName in interface Type
Returns:
See Also:
Type.getName()

getInstanceType

public java.lang.Class getInstanceType()
Description copied from interface: Type

This will return the intended Java Class for this element type. For generic complex types this will be an object array. SimpleTypes will match as they are parsed, and custom extensions will also return the appropriate class value.

Specified by:
getInstanceType in interface Type
Returns:
See Also:
Type.getInstanceType()

canEncode

public boolean canEncode(Element element,
                         java.lang.Object value,
                         java.util.Map hints)
Description copied from class: org.geotools.xml.filter.FilterSchema.FilterComplexType
Subclass must override this method to allow encoding.

Specified by:
canEncode in interface Type
Returns:
false, subclass override to allow encoding
See Also:
Type.canEncode(org.geotools.xml.schema.Element, java.lang.Object, java.util.Map)

encode

public void encode(Element element,
                   java.lang.Object value,
                   PrintHandler output,
                   java.util.Map hints)
            throws java.io.IOException,
                   javax.naming.OperationNotSupportedException
Description copied from class: org.geotools.xml.filter.FilterSchema.FilterComplexType
Subclass should implement this, this implementation provides a good OperationsNotSupportedException.

Specified by:
encode in interface Type
Throws:
java.io.IOException
javax.naming.OperationNotSupportedException
See Also:
Type.encode(org.geotools.xml.schema.Element, java.lang.Object, org.geotools.xml.PrintHandler, java.util.Map)

getParent

public Type getParent()
Description copied from interface: ComplexType

This is used to represent the heirarchy represented within an xml schema document(s). This is particularily useful, as the parent will have the first attempt to create a real (non Object[]) value of the element. For more information see getValue.

Specified by:
getParent in interface ComplexType
Returns:
See Also:
ComplexType.getParent()

getAnyAttributeNameSpace

public java.lang.String getAnyAttributeNameSpace()
Description copied from interface: ComplexType
This methos represents the potential 'anyAttribute' declaration's namespace attribute which may occur within a complex type definition.

Specified by:
getAnyAttributeNameSpace in interface ComplexType
Returns:
See Also:
ComplexType.getAnyAttributeNameSpace()

getAttributes

public Attribute[] getAttributes()
Description copied from interface: ComplexType
The set of attributes required by this complex type declaration. As per the xml schema definition, there is not an implied order to the attributes. For performance reasons an implementor may wich to order the attributes from most common to least commonly used attributes.

Specified by:
getAttributes in interface ComplexType
Returns:
See Also:
ComplexType.getAttributes()

getBlock

public int getBlock()
Description copied from interface: ComplexType
Specifies a mask which denotes which substitution mechanisms may be used for this complex type definition.

Specified by:
getBlock in interface ComplexType
Returns:
See Also:
ComplexType.getBlock()

getFinal

public int getFinal()
Description copied from interface: ComplexType
Specifies a mask which denotes which substitution mechanisms prohibited for use by child definitions of this complex type.

Specified by:
getFinal in interface ComplexType
Returns:
See Also:
ComplexType.getFinal()

getId

public java.lang.String getId()
Description copied from interface: ComplexType
Returns the xml schema id of this complexType if one exists, null otherwise.

Specified by:
getId in interface ComplexType
Returns:
See Also:
ComplexType.getId()

isMixed

public boolean isMixed()
Description copied from interface: ComplexType
Returns true if this complexType allows mixed content (Child elements and a String value).

Specified by:
isMixed in interface ComplexType
Returns:
See Also:
ComplexType.isMixed()

isDerived

public boolean isDerived()
Description copied from interface: ComplexType
This method is used to publish whether this complexType is at the root of an inheritance tree, or a leaf within an inheritance tree. This method should return true when the complexType is not a root of an inheritance tree.

Specified by:
isDerived in interface ComplexType
Returns:
See Also:
ComplexType.isDerived()

cache

public boolean cache(Element element,
                     java.util.Map hints)
Description copied from interface: ComplexType
This method is a directive to the parser whether to keep the data around in memory for post processing. Generally this should return True, except when streaming.

Specified by:
cache in interface ComplexType
Parameters:
element - DOCUMENT ME!
hints - DOCUMENT ME!
Returns:
True, except when streaming the element.
See Also:
ComplexType.cache(org.geotools.xml.schema.Element, java.util.Map)

getNamespace

public java.net.URI getNamespace()
Description copied from interface: Type

This is used for validation of an XML document, and represents the targetNamespace of that this type resides in.

Specified by:
getNamespace in interface Type
Returns:
See Also:
Type.getNamespace()

findChildElement

public Element findChildElement(java.lang.String name)
Description copied from interface: Type
Convinience method used to search this type's children for the requested element by localName.

Specified by:
findChildElement in interface Type
Parameters:
name - the element's localName to search for.
Returns:
See Also:
Type.findChildElement(java.lang.String)

toString

public java.lang.String toString()


Copyright © GeoTools. All Rights Reserved.