org.geotools.gml
Class SubHandler

java.lang.Object
  extended byorg.geotools.gml.SubHandler
Direct Known Subclasses:
SubHandlerBox, SubHandlerLinearRing, SubHandlerLineString, SubHandlerMulti, SubHandlerPoint, SubHandlerPolygon

public abstract class SubHandler
extends java.lang.Object

Specifies how a generic OGC simple geometry handler should behave.

Version:
$Id: SubHandler.java 17701 2006-01-23 00:00:51Z desruisseaux $
Author:
Ian Turton, CCG, Rob Hranac, Vision for New York

Field Summary
static int GEOMETRY_END
          Indicates end of a geometry.
static int GEOMETRY_START
          Indicates start of a geometry.
static int GEOMETRY_SUB
          Indicates a sub geometry message.
 
Constructor Summary
SubHandler()
           
 
Method Summary
abstract  void addCoordinate(com.vividsolutions.jts.geom.Coordinate coordinate)
          Adds a coordinate to the object being built if appropriate.
abstract  com.vividsolutions.jts.geom.Geometry create(com.vividsolutions.jts.geom.GeometryFactory geometryFactory)
          Creates a new JTS geometry.
abstract  boolean isComplete(java.lang.String message)
          Determines whether or not the geometry is ready to return.
 void subGeometry(java.lang.String message, int type)
          Tells the handler that it just saw a subhandler.
 java.lang.String toString()
          Describes the handler.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

GEOMETRY_START

public static final int GEOMETRY_START
Indicates start of a geometry.

See Also:
Constant Field Values

GEOMETRY_END

public static final int GEOMETRY_END
Indicates end of a geometry.

See Also:
Constant Field Values

GEOMETRY_SUB

public static final int GEOMETRY_SUB
Indicates a sub geometry message.

See Also:
Constant Field Values
Constructor Detail

SubHandler

public SubHandler()
Method Detail

addCoordinate

public abstract void addCoordinate(com.vividsolutions.jts.geom.Coordinate coordinate)
Adds a coordinate to the object being built if appropriate.

Parameters:
coordinate - Coordinate to add

subGeometry

public void subGeometry(java.lang.String message,
                        int type)
Tells the handler that it just saw a subhandler.

Parameters:
message - The sub geometry message (i.e. isInnerBoundary).
type - The type of sub message (start, end, etc.)

isComplete

public abstract boolean isComplete(java.lang.String message)
Determines whether or not the geometry is ready to return.

Parameters:
message - The geometry to inspect.
Returns:
Flag for a complete geometry.

create

public abstract com.vividsolutions.jts.geom.Geometry create(com.vividsolutions.jts.geom.GeometryFactory geometryFactory)
Creates a new JTS geometry.

Parameters:
geometryFactory - The JTS geometry factory to use for geometry creation.
Returns:
An OGC simple geometry type for return.

toString

public java.lang.String toString()
Describes the handler.

Returns:
String representation of the current handler.


Copyright © GeoTools. All Rights Reserved.