Humboldt Alignment Editor 2.5.0

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

java.lang.Object
  extended by eu.esdihumboldt.hale.io.gml.geometry.Geometries
All Implemented Interfaces:
GeometryHandler

public class Geometries
extends Object
implements GeometryHandler

Manages geometry handlers.

Author:
Simon Templer

Method Summary
 Object createGeometry(Instance instance, int srsDimension)
          Create a geometry value from a given instance.
static Geometries getInstance()
          Get the geometries instance.
 Set<QName> getSupportedTypes()
          Get the geometry types 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.
 void register(GeometryHandler handler)
          Register a geometry handler.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static Geometries getInstance()
Get the geometries instance.

Returns:
the geometry handler manager

register

public void register(GeometryHandler handler)
Register a geometry handler.

Parameters:
handler - the geometry handler

getSupportedTypes

public Set<QName> getSupportedTypes()
Description copied from interface: GeometryHandler
Get the geometry types supported by the geometry handler.

Specified by:
getSupportedTypes in interface GeometryHandler
Returns:
the names of the supported types
See Also:
GeometryHandler.getSupportedTypes()

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.

Specified by:
getTypeConstraints in interface GeometryHandler
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)

createGeometry

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

Specified by:
createGeometry in interface GeometryHandler
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)

Humboldt Alignment Editor 2.5.0

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