org.geotools.xml
Class AbstractComplexBinding

Object
  extended by AbstractComplexBinding
All Implemented Interfaces:
Binding, ComplexBinding
Direct Known Subclasses:
_Filter_CapabilitiesBinding, _Filter_CapabilitiesBinding, AbstractComplexEMFBinding, AbstractFeatureCollectionTypeBinding, AbstractFeatureTypeBinding, AbstractGeometryTypeBinding, AbstractRingPropertyTypeBinding, AbstractSurfaceTypeBinding, Arithmetic_OperatorsTypeBinding, BoundaryTypeBinding, BoundingShapeTypeBinding, ColorStyleTypeBinding, Comparison_OperatorsTypeBinding, ComparisonOperatorsTypeBinding, ComplexDataTypeBinding, ContainerTypeBinding, CurveArrayPropertyTypeBinding, CurvePropertyTypeBinding, CurveSegmentArrayPropertyTypeBinding, CurveTypeBinding, DirectPositionListTypeBinding, DirectPositionTypeBinding, DocumentTypeBinding, EnvelopeTypeBinding, FeatureArrayPropertyTypeBinding, FeaturePropertyTypeBinding, FeatureTypeBinding, FilterTypeBinding, FolderTypeBinding, Function_NamesTypeBinding, Function_NameTypeBinding, FunctionsTypeBinding, GeometryOperandsTypeBinding, GeometryPropertyTypeBinding, GeometryTypeBinding, GMLAbstractFeatureCollectionBaseTypeBinding, GMLAbstractFeatureCollectionTypeBinding, GMLAbstractFeatureTypeBinding, GMLAbstractGeometryCollectionBaseTypeBinding, GMLAbstractGeometryTypeBinding, GMLBoundingShapeTypeBinding, GMLBoxTypeBinding, GMLCoordinatesTypeBinding, GMLCoordTypeBinding, GMLFeatureAssociationTypeBinding, GMLGeometryAssociationTypeBinding, GMLGeometryCollectionTypeBinding, GMLGeometryPropertyTypeBinding, GMLLinearRingMemberTypeBinding, GMLLinearRingTypeBinding, GMLLineStringMemberTypeBinding, GMLLineStringPropertyTypeBinding, GMLLineStringTypeBinding, GMLMultiGeometryPropertyTypeBinding, GMLMultiLineStringPropertyTypeBinding, GMLMultiLineStringTypeBinding, GMLMultiPointPropertyTypeBinding, GMLMultiPointTypeBinding, GMLMultiPolygonPropertyTypeBinding, GMLMultiPolygonTypeBinding, GmlObjectIdTypeBinding, GMLPointMemberTypeBinding, GMLPointPropertyTypeBinding, GMLPointTypeBinding, GMLPolygonMemberTypeBinding, GMLPolygonPropertyTypeBinding, GMLPolygonTypeBinding, Id_CapabilitiesTypeBinding, KmlTypeBinding, LabelStyleTypeBinding, LanguagesBinding, LatLonBoxTypeBinding, LinearRingPropertyTypeBinding, LinearRingTypeBinding, LinearRingTypeBinding, LineStringPropertyTypeBinding, LineStringSegmentTypeBinding, LineStringTypeBinding, LineStringTypeBinding, LineStyleTypeBinding, LocationPropertyTypeBinding, LocationTypeBinding, LookAtTypeBinding, MeasureTypeBinding, MetadataTypeBinding, MultiCurvePropertyTypeBinding, MultiCurveTypeBinding, MultiGeometryPropertyTypeBinding, MultiGeometryTypeBinding, MultiGeometryTypeBinding, MultiLineStringPropertyTypeBinding, MultiLineStringTypeBinding, MultiPointPropertyTypeBinding, MultiPointTypeBinding, MultiPolygonPropertyTypeBinding, MultiPolygonTypeBinding, MultiSurfacePropertyTypeBinding, MultiSurfaceTypeBinding, ObjectTypeBinding, OGCAddBinding, OGCAndBinding, OGCBBOXTypeBinding, OGCBeyondBinding, OGCBinaryComparisonOpTypeBinding, OGCBinaryLogicOpTypeBinding, OGCBinaryOperatorTypeBinding, OGCBinarySpatialOpTypeBinding, OGCComparisonOpsTypeBinding, OGCContainsBinding, OGCCrossesBinding, OGCDisjointBinding, OGCDistanceBufferTypeBinding, OGCDistanceTypeBinding, OGCDivBinding, OGCDWithinBinding, OGCEqualsBinding, OGCExpressionTypeBinding, OGCFeatureIdTypeBinding, OGCFilterTypeBinding, OGCFunctionTypeBinding, OGCIntersectsBinding, OGCLiteralTypeBinding, OGCLogicOpsTypeBinding, OGCLowerBoundaryTypeBinding, OGCMulBinding, OGCNotBinding, OGCOrBinding, OGCOverlapsBinding, OGCPropertyIsBetweenTypeBinding, OGCPropertyIsEqualToBinding, OGCPropertyIsGreaterThanBinding, OGCPropertyIsGreaterThanOrEqualToBinding, OGCPropertyIsLessThanBinding, OGCPropertyIsLessThanOrEqualToBinding, OGCPropertyIsLikeTypeBinding, OGCPropertyIsNotEqualToBinding, OGCPropertyIsNullTypeBinding, OGCPropertyNameTypeBinding, OGCSpatialOpsTypeBinding, OGCSubBinding, OGCTouchesBinding, OGCUpperBoundaryTypeBinding, OGCWithinBinding, PlacemarkTypeBinding, PointArrayPropertyTypeBinding, PointPropertyTypeBinding, PointTypeBinding, PointTypeBinding, PolygonPatchTypeBinding, PolygonPropertyTypeBinding, PolygonTypeBinding, PolygonTypeBinding, PolyStyleTypeBinding, ReferenceTypeBinding, RegionTypeBinding, Scalar_CapabilitiesTypeBinding, SLDAnchorPointBinding, SLDBlueChannelBinding, SLDChannelSelectionBinding, SLDColorMapBinding, SLDColorMapEntryBinding, SLDContrastEnhancementBinding, SLDCssParameterBinding, SLDDisplacementBinding, SLDExtentBinding, SLDExternalGraphicBinding, SLDFeatureTypeConstraintBinding, SLDFeatureTypeStyleBinding, SLDFillBinding, SLDFontBinding, SLDGeometryBinding, SLDGraphicBinding, SLDGraphicFillBinding, SLDGraphicStrokeBinding, SLDGrayChannelBinding, SLDGreenChannelBinding, SLDHaloBinding, SLDHistogramBinding, SLDImageOutlineBinding, SLDLabelPlacementBinding, SLDLayerFeatureConstraintsBinding, SLDLegendGraphicBinding, SLDLinePlacementBinding, SLDLineSymbolizerBinding, SLDMarkBinding, SLDNamedLayerBinding, SLDNamedStyleBinding, SLDNormalizeBinding, SLDOnlineResourceBinding, SLDOverlapBehaviorBinding, SLDParameterValueTypeBinding, SLDPerpendicularOffsetBinding, SLDPointPlacementBinding, SLDPointSymbolizerBinding, SLDPolygonSymbolizerBinding, SLDRasterSymbolizerBinding, SLDRedChannelBinding, SLDRemoteOWSBinding, SLDRuleBinding, SLDSelectedChannelTypeBinding, SLDShadedReliefBinding, SLDStrokeBinding, SLDStyledLayerDescriptorBinding, SLDSymbolizerBinding, SLDSymbolizerTypeBinding, SLDTextSymbolizerBinding, SLDUserLayerBinding, SLDUserStyleBinding, SortByTypeBinding, SortPropertyTypeBinding, Spatial_CapabilitiesTypeBinding, Spatial_CapabilitiesTypeBinding, Spatial_OperatorsTypeBinding, SpatialOperatorsTypeBinding, SpatialOperatorTypeBinding, StyleTypeBinding, SurfaceArrayPropertyTypeBinding, SurfacePatchArrayPropertyTypeBinding, SurfacePropertyTypeBinding, SurfaceTypeBinding, XSAllBinding, XSAnnotatedBinding, XSAnyTypeBinding, XSAttributeBinding, XSAttributeGroupBinding, XSAttributeGroupRefBinding, XSComplexRestrictionTypeBinding, XSComplexTypeBinding, XSElementBinding, XSExplicitGroupBinding, XSExtensionTypeBinding, XSFacetBinding, XSGroupBinding, XSGroupRefBinding, XSKeybaseBinding, XSLocalComplexTypeBinding, XSLocalElementBinding, XSLocalSimpleTypeBinding, XSNamedAttributeGroupBinding, XSNamedGroupBinding, XSNarrowMaxMinBinding, XSNoFixedFacetBinding, XSNumFacetBinding, XSOpenAttrsBinding, XSRealGroupBinding, XSRestrictionTypeBinding, XSSimpleExplicitGroupBinding, XSSimpleExtensionTypeBinding, XSSimpleRestrictionTypeBinding, XSSimpleTypeBinding, XSTopLevelAttributeBinding, XSTopLevelComplexTypeBinding, XSTopLevelElementBinding, XSTopLevelSimpleTypeBinding, XSWildcardBinding

public abstract class AbstractComplexBinding
extends Object
implements ComplexBinding

Base class for complex bindings.

Author:
Justin Deoliveira, The Open Planning Project, jdeolive@openplans.org
Module:
modules/extension/xsd-core (gt-xsd-core.jar)

Field Summary
 
Fields inherited from interface Binding
AFTER, BEFORE, OVERRIDE
 
Constructor Summary
AbstractComplexBinding()
           
 
Method Summary
 Element encode(Object object, Document document, Element value)
          Subclasses should ovverride this method if need be, the default implementation returns value.
 int getExecutionMode()
          This implementation returns Binding.OVERRIDE.
 List getProperties(Object object)
          Deprecated. use getProperties(Object, XSDElementDeclaration)
 List getProperties(Object object, XSDElementDeclaration element)
          Subclasses should override this method if need be, the default implementation returns null.
 Object getProperty(Object object, QName name)
          Subclasses should override this method if need be, the default implementation returns null.
 void initializeChildContext(ElementInstance childInstance, Node node, MutablePicoContainer context)
          Does nothing, subclasses should override this method.
 Object parse(ElementInstance instance, Node node, Object value)
          Subclasses should override this method, the default implementation return null.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface Binding
getTarget, getType
 

Constructor Detail

AbstractComplexBinding

public AbstractComplexBinding()
Method Detail

initializeChildContext

public void initializeChildContext(ElementInstance childInstance,
                                   Node node,
                                   MutablePicoContainer context)
Does nothing, subclasses should override this method.

Specified by:
initializeChildContext in interface ComplexBinding
node - The parse node for the parent element.
context - the context in which the child element will be parsed.

getExecutionMode

public int getExecutionMode()
This implementation returns Binding.OVERRIDE.

Subclasses should override to change this behaviour.

Specified by:
getExecutionMode in interface Binding
Returns:
The execution mode of the binding, one of the constants AFTER, BEFORE, or OVERRIDE.
See Also:
Binding.AFTER, Binding.BEFORE, Binding.OVERRIDE

parse

public Object parse(ElementInstance instance,
                    Node node,
                    Object value)
             throws Exception
Subclasses should override this method, the default implementation return null.

Specified by:
parse in interface ComplexBinding
Parameters:
instance - The element being parsed.
node - The node in the parse tree representing the element being parsed.
value - The result of the parse from another strategy in the type hierarchy. Could be null if this is the first strategy being executed.
Returns:
The parsed object, or null if the component could not be parsed.
Throws:
Exception - Strategy objects should not attempt to handle any exceptions.

encode

public Element encode(Object object,
                      Document document,
                      Element value)
               throws Exception
Subclasses should ovverride this method if need be, the default implementation returns value.

Specified by:
encode in interface ComplexBinding
Parameters:
object - The object being encoded.
document - The document containing the encoded element.
value - The object as encoded by the parent binding.
Returns:
The element for the objcet being encoded, or null
Throws:
Exception
See Also:
ComplexBinding.encode(Object, Document, Element).

getProperty

public Object getProperty(Object object,
                          QName name)
                   throws Exception
Subclasses should override this method if need be, the default implementation returns null.

Specified by:
getProperty in interface ComplexBinding
Parameters:
object - The object being encoded.
name - The name of the property to obtain.
Returns:
The value of the property, or null.
Throws:
Exception
See Also:
ComplexBinding.getProperty(Object, QName)

getProperties

public List getProperties(Object object)
                   throws Exception
Deprecated. use getProperties(Object, XSDElementDeclaration)

Subclasses should override this method if need be, the default implementation returns null.

Note that this method only needs to be implemented for schema types which are open-ended in which the contents are not specifically specified by the schema.

Specified by:
getProperties in interface ComplexBinding
Parameters:
object - the object being encoded.
Returns:
A list of the properties for the object.
Throws:
Exception
See Also:
ComplexBinding.getProperties(Object)

getProperties

public List getProperties(Object object,
                          XSDElementDeclaration element)
                   throws Exception
Subclasses should override this method if need be, the default implementation returns null.

Note that this method only needs to be implemented for schema types which are open-ended in which the contents are not specifically specified by the schema.

Specified by:
getProperties in interface ComplexBinding
Parameters:
object - the object being encoded.
Returns:
A list of the properties for the object.
Throws:
Exception
See Also:
ComplexBinding.getProperties(Object)


Copyright © 1996-2010 Geotools. All Rights Reserved.