org.gvsig.fmap.geom.type
Interface GeometryType

All Known Implementing Classes:
DefaultGeometryType

public interface GeometryType

This class represents the type of a geometry. All the geometries has to have a type that can be retrieved using the Geometry#getGeometryType() method.

Author:
Jorge Piera

Method Summary
 Geometry create()
          This method creates a Geometry with the type specified by this class.
 GeometryOperation getGeometryOperation(int index)
          Get the operation for this geometry at a concrete position
 int getId()
           
 String getName()
           
 int getSubType()
           
 int getType()
           
 boolean isSubTypeOf(GeometryType geometryType)
          Check if a geometry subType inherits of other subType.
 boolean isSubTypeOf(int geometrySubType)
          Check if a geometry subType inherits of other subType.
 boolean isTypeOf(GeometryType geometryType)
          Check if a geometry type inherits of other type.
 boolean isTypeOf(int geometryType)
          Check if a geometry type inherits of other type.
 void setGeometryOperation(int index, GeometryOperation geomOp)
          Registers an operation for this geometry type.
 String toString()
           
 

Method Detail

getId

int getId()
Returns:
the identifier of the geometry type. This identifier is assigned by the GeometryManager in run time.

getName

String getName()
Returns:
the name of the geometry type.

getType

int getType()
Returns:
the type of the geometry. It is a constant value that has to be one of the values in Geometry.TYPES The type is an abstract representation of the object (Point, Curve...) but it is not a concrete representation (Point2D, Point3D...).

getSubType

int getSubType()
Returns:
the subtype of the geometry. It is a constant value that has to be one of the values in Geometry.SUBTYPES. The subtype represents a set of geometries with a dimensional relationship (2D, 3D, 2DM...)

isTypeOf

boolean isTypeOf(int geometryType)
Check if a geometry type inherits of other type. E.g: the super type of an arc could be a a curve, the super type of a circle could be a surface...

Parameters:
geometryType - the value of the Geometry.TYPES to check if is it super type
Returns:
if the the parameter is a super type of this geometry type

isSubTypeOf

boolean isSubTypeOf(int geometrySubType)
Check if a geometry subType inherits of other subType. E.g: the super Subtype of a geometry 3D could be a geometry 2D, because the 3D extends the behavior of a geometry 2D.

Parameters:
geometrySubType - the value of the Geometry.SUBTYPES to check if is it super subType
Returns:
if the the parameter is a super subType of this geometry type

isTypeOf

boolean isTypeOf(GeometryType geometryType)
Check if a geometry type inherits of other type. E.g: the super type of an arc could be a a curve, the super type of a circle could be a surface...

Parameters:
geometryType - the geometry type to check if is it super type
Returns:
if the the parameter is a super type of this geometry type

isSubTypeOf

boolean isSubTypeOf(GeometryType geometryType)
Check if a geometry subType inherits of other subType. E.g: the super Subtype of a geometry 3D could be a geometry 2D, because the 3D extends the behavior of a geometry 2D.

Parameters:
geometryType - the geometry type to check if is it super subtype
Returns:
if the the parameter is a super subType of this geometry type

create

Geometry create()
                throws CreateGeometryException
This method creates a Geometry with the type specified by this class. The geometry is empty, and all the internal attributes must be assigned to a value when the geometry has been created.

Returns:
A empty geometry
Throws:
InstantiationException - This exception is maybe thrown when the application is trying to instantiate the geometry
IllegalAccessException - This exception is maybe thrown when the application is trying to instantiate the geometry
CreateGeometryException

setGeometryOperation

void setGeometryOperation(int index,
                          GeometryOperation geomOp)
Registers an operation for this geometry type.

Parameters:
index -
geomOp -

getGeometryOperation

GeometryOperation getGeometryOperation(int index)
Get the operation for this geometry at a concrete position

Parameters:
index - The position of the operation
Returns:
A geometry operation

toString

String toString()
Overrides:
toString in class Object
Returns:
the geometry as a String


Copyright © 2004-2012 gvSIG. All Rights Reserved.