Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.io.gml.geometry.handler
Class GenericGeometryHandler

java.lang.Object
  extended by eu.esdihumboldt.hale.io.gml.geometry.AbstractGeometryHandler
      extended by eu.esdihumboldt.hale.io.gml.geometry.FixedConstraintsGeometryHandler
          extended by eu.esdihumboldt.hale.io.gml.geometry.handler.GenericGeometryHandler
All Implemented Interfaces:
GeometryConstants, GeometryHandler

public class GenericGeometryHandler
extends FixedConstraintsGeometryHandler

Generic geometry handler for AbstractGeometryType.

Author:
Simon Templer

Nested Class Summary
static class GenericGeometryHandler.CRSWrapper
          Wraps a CRSDefinition.
 
Field Summary
 
Fields inherited from interface eu.esdihumboldt.hale.io.gml.geometry.GeometryConstants
NS_GML, NS_GML_32
 
Constructor Summary
GenericGeometryHandler()
           
 
Method Summary
 Object createGeometry(Instance instance, int srsDimension)
          Create a geometry value from a given instance.
protected  Object createGeometry(Instance instance, List<GeometryProperty<?>> childGeometries, CRSDefinition defaultCrs)
          Create a geometry value from a given instance.
protected  Collection<? extends TypeConstraint> initConstraints()
          Create the associated type constraints.
protected  Set<? extends QName> initSupportedTypes()
          Create the set of supported types.
 
Methods inherited from class eu.esdihumboldt.hale.io.gml.geometry.FixedConstraintsGeometryHandler
checkType, getTypeConstraints
 
Methods inherited from class eu.esdihumboldt.hale.io.gml.geometry.AbstractGeometryHandler
getGeometryFactory, getSupportedTypes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericGeometryHandler

public GenericGeometryHandler()
Method Detail

initSupportedTypes

protected Set<? extends QName> initSupportedTypes()
Description copied from class: AbstractGeometryHandler
Create the set of supported types.

Specified by:
initSupportedTypes in class AbstractGeometryHandler
Returns:
the set of supported type names
See Also:
AbstractGeometryHandler.initSupportedTypes()

initConstraints

protected Collection<? extends TypeConstraint> initConstraints()
Description copied from class: FixedConstraintsGeometryHandler
Create the associated type constraints.

Specified by:
initConstraints in class FixedConstraintsGeometryHandler
Returns:
the type constraints to set on an associated geometry type
See Also:
FixedConstraintsGeometryHandler.initConstraints()

createGeometry

public Object createGeometry(Instance instance,
                             int srsDimension)
                      throws GeometryNotSupportedException
Description copied from interface: GeometryHandler
Create a geometry value from a given instance.

Parameters:
instance - the instance
srsDimension - the dimension of the instance
Returns:
the geometry value derived from the instance, the return type should match the Binding created in GeometryHandler.getTypeConstraints(TypeDefinition).
Throws:
GeometryNotSupportedException - if the type definition doesn't represent a geometry type supported by the handler
See Also:
GeometryHandler.createGeometry(Instance, int)

createGeometry

protected Object createGeometry(Instance instance,
                                List<GeometryProperty<?>> childGeometries,
                                CRSDefinition defaultCrs)
                         throws GeometryNotSupportedException
Create a geometry value from a given instance.

Parameters:
instance - the instance
childGeometries - the child geometries found in the instance
defaultCrs - the definition of the default CRS for this instance
Returns:
the geometry value derived from the instance, the return type should match the Binding created in FixedConstraintsGeometryHandler.getTypeConstraints(TypeDefinition).
Throws:
GeometryNotSupportedException - if the type definition doesn't represent a geometry type supported by the handler

Humboldt Alignment Editor 2.5.0

Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d