Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.io.gml.geometry
Class FixedConstraintsGeometryHandler

java.lang.Object
  extended by eu.esdihumboldt.hale.io.gml.geometry.AbstractGeometryHandler
      extended by eu.esdihumboldt.hale.io.gml.geometry.FixedConstraintsGeometryHandler
All Implemented Interfaces:
GeometryConstants, GeometryHandler
Direct Known Subclasses:
EnvelopeHandler, GenericGeometryHandler, LinearRingHandler, LineStringHandler, PointHandler, PolygonHandler

public abstract class FixedConstraintsGeometryHandler
extends AbstractGeometryHandler

Base class for geometry handlers that provide fixed type constraints.

Author:
Simon Templer

Field Summary
 
Fields inherited from interface eu.esdihumboldt.hale.io.gml.geometry.GeometryConstants
NS_GML, NS_GML_32
 
Constructor Summary
FixedConstraintsGeometryHandler()
           
 
Method Summary
protected  void checkType(TypeDefinition type)
          Check if the given type definition is supported by the geometry handler.
 Iterable<TypeConstraint> getTypeConstraints(TypeDefinition type)
          Get the type constraints to associated with a geometry type definition.

This method should at least return the Binding and GeometryType constraints.
protected abstract  Collection<? extends TypeConstraint> initConstraints()
          Create the associated type constraints.
 
Methods inherited from class eu.esdihumboldt.hale.io.gml.geometry.AbstractGeometryHandler
getGeometryFactory, getSupportedTypes, initSupportedTypes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface eu.esdihumboldt.hale.io.gml.geometry.GeometryHandler
createGeometry
 

Constructor Detail

FixedConstraintsGeometryHandler

public FixedConstraintsGeometryHandler()
Method Detail

getTypeConstraints

public Iterable<TypeConstraint> getTypeConstraints(TypeDefinition type)
                                            throws GeometryNotSupportedException
Description copied from interface: GeometryHandler
Get the type constraints to associated with a geometry type definition.

This method should at least return the Binding and GeometryType constraints. Usually the binding should be GeometryProperty.

Parameters:
type - the type definition the constraints will be associated to
Returns:
the type constraints to be assigned to the type definition
Throws:
GeometryNotSupportedException - if the type definition doesn't represent a geometry type supported by the handler
See Also:
GeometryHandler.getTypeConstraints(TypeDefinition)

checkType

protected void checkType(TypeDefinition type)
                  throws GeometryNotSupportedException
Check if the given type definition is supported by the geometry handler. This implementation assumes the type is valid. Override to change this behavior.

Parameters:
type - the type definition to check
Throws:
GeometryNotSupportedException - if the check failed

initConstraints

protected abstract Collection<? extends TypeConstraint> initConstraints()
Create the associated type constraints.

Returns:
the type constraints to set on an associated geometry type

Humboldt Alignment Editor 2.5.0

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