com.mizar.persistence.jpa.beans
Class GeometryBean

java.lang.Object
  extended by com.mizar.persistence.jpa.beans.GenericBean
      extended by com.mizar.persistence.jpa.beans.GeometryBean
All Implemented Interfaces:
JPAGeometryInterface, JPAInterface, java.io.Serializable, java.lang.Comparable
Direct Known Subclasses:
Aiannh, Aiannh00, AiannhMSc, Aitsaia, AitsaiaMSc, AitsMSc, Aitsn, Aitsn00, AitsnMSc, Anrc, AnrcMSc, Arealm, ArealmBean, Areawater, AreawaterBean, BasemapSetBean, Bg00, BgMSc, Cbsa, CbsaMSc, Cd106, Cd106Bean, Cd108, Cd108Bean, Cd110, Cd110Bean, Cd111Bean, CnectaMSc, Concity, ConcityMSc, County, County, County00, CountyMSc, Cousub, Cousub00, CousubMSc, CsaMSc, Edges, EdgesBean, EdgesFlat, Elsd, ElsdMSc, Faces, FacesBean, FacesMSc, LocationBean, Metdiv, MetdivMSc, Necta, Nectadiv, NectadivMSc, NectaMSc, Nodes, NodesBean, Place, Place00, PlaceMSc, Pointlm, PointlmBean, Puma100, Puma1MSc, Puma500, Puma5MSc, RoutingRow, Scsd, Scsd00, ScsdMSc, SegmentSequence, Site, Sldl, Sldl00, SldlMSc, Sldu, Sldu00, SlduMSc, State, State00, StateMSc, Street, Submcd, SubmcdMSc, Tabblock, Tabblock00, TabblockMSc, Taz00, TazMSc, TopoEdges, Town, Tract00, TractMSc, Unsd, Unsd00, Vtd, Vtd00, VtdActual, VtdActual00, VtdActual10, VtdMSc, Zcta300, Zcta500, Zcta5MSc

public abstract class GeometryBean
extends GenericBean
implements JPAGeometryInterface

See Also:
Serialized Form

Field Summary
protected  double searchTolerance
           
protected  double sridPrecision
           
protected  java.lang.String wktLocation
           
protected  java.lang.String wktMBR
           
protected  java.lang.String wktShape
           
 
Fields inherited from class com.mizar.persistence.jpa.beans.GenericBean
_logger, DELETE, EDIT, NEW, READ, serialVersionUID
 
Constructor Summary
GeometryBean()
           
 
Method Summary
 double getArea()
          If getGeom() is a JGeometry.GTYPE_POLYGON the method will compute the area If the geometry has more than 2 dimensions the area is computed against the first two dimensions only.
 int getBasicGeometryType()
          The method returns the simple geometry type, e.g.
abstract  oracle.spatial.geometry.JGeometry getGeom()
          Entity classes implementing GeometryBean should have at least one SDO_GEOMETRY column in their associated table.
 int getGeomDimensions()
           
 int getGeomNumPoints()
           
 java.lang.String getGeomType()
           
 int getGType()
          These exist to permit refere
 java.lang.Double getHeight()
           
 double getLength()
           
 double[] getRange()
           
 double getSearchTolerance()
           
 int getSrid()
           
 double getSridPrecision()
           
 java.lang.Double getWidth()
           
 java.lang.String getWktLocation()
           
 java.lang.String getWktMBR()
           
 java.lang.String getWktShape()
           
 boolean isGeometryExtant()
           
protected  void setArea(double area)
           
abstract  void setGeom(oracle.spatial.geometry.JGeometry geom)
           
 void setSearchTolerance(double searchTolerance)
           
 void setSridPrecision(double sridPrecision)
           
 void setWktLocation(java.lang.String wktLocation)
           
 void setWktShape(java.lang.String wktShape)
           
 
Methods inherited from class com.mizar.persistence.jpa.beans.GenericBean
compareTo, equals, getDELETE, getEDIT, getEntityState, getEntityStateLabel, getLogger, getNEW, getPrimaryKeyValue, getREAD, hashCode, isEditable, isNew, setEditable, setEntityState, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

wktShape

protected java.lang.String wktShape

wktMBR

protected java.lang.String wktMBR

wktLocation

protected java.lang.String wktLocation

searchTolerance

protected double searchTolerance

sridPrecision

protected double sridPrecision
Constructor Detail

GeometryBean

public GeometryBean()
Method Detail

getGeom

public abstract oracle.spatial.geometry.JGeometry getGeom()
Entity classes implementing GeometryBean should have at least one SDO_GEOMETRY column in their associated table. It is entirely possible for an Entity to support more than one SDO_GEOMETRY column but one must be designated and the default or nominal object and a getter method called getGeom() must be mapped to it.

Returns:
the principal SDO_GEOMETRY column

setGeom

public abstract void setGeom(oracle.spatial.geometry.JGeometry geom)

getWktMBR

public java.lang.String getWktMBR()

getSearchTolerance

public double getSearchTolerance()

getSridPrecision

public double getSridPrecision()

isGeometryExtant

public boolean isGeometryExtant()
Returns:
true if getGeom() does not return a null.

setWktShape

public void setWktShape(java.lang.String wktShape)

getWktShape

public java.lang.String getWktShape()
Returns:
a well known text (WKT) representation of getGeom()
See Also:
JGeometryUtils.getWKT(JGeometry,double)

setWktLocation

public void setWktLocation(java.lang.String wktLocation)

getWktLocation

public java.lang.String getWktLocation()
Returns:
a two dimensional point in well known text (WKT) format
See Also:
JGeometryUtils.getWKT(JGeometry,double)

getSrid

public int getSrid()
Returns:
the Oracle spatial reference id (srid) of getGeom()
See Also:
JGeometry.getSRID()

getWidth

public java.lang.Double getWidth()
Returns:
the width of the range

getHeight

public java.lang.Double getHeight()
Returns:
the height of the range

getRange

public double[] getRange()
Returns:
the range of getGeom() as a double array x1,y1,x2,y2
See Also:
JGeometryUtils.getRange(JGeometry)

getArea

public double getArea()
If getGeom() is a JGeometry.GTYPE_POLYGON the method will compute the area If the geometry has more than 2 dimensions the area is computed against the first two dimensions only.

Returns:
the area of getGeom() or 0.0 if it is not an area object

setArea

protected void setArea(double area)

getLength

public double getLength()

getGType

public int getGType()
These exist to permit refere

Returns:
geom.getType()

getGeomType

public java.lang.String getGeomType()

getBasicGeometryType

public int getBasicGeometryType()
The method returns the simple geometry type, e.g. GTYPE_POINT for GTYPE_MULTIPOINT whether the gtype is a single or multi instance.

Returns:
the simple GType

getGeomNumPoints

public int getGeomNumPoints()

getGeomDimensions

public int getGeomDimensions()

setSearchTolerance

public void setSearchTolerance(double searchTolerance)

setSridPrecision

public void setSridPrecision(double sridPrecision)