com.mizar.addressing.tiger.state
Class TopoEdges

java.lang.Object
  extended by com.mizar.persistence.jpa.beans.GenericBean
      extended by com.mizar.persistence.jpa.beans.GeometryBean
          extended by com.mizar.addressing.tiger.state.TopoEdges
All Implemented Interfaces:
JPAGeometryInterface, JPAInterface, java.io.Serializable, java.lang.Comparable

@Entity
public class TopoEdges
extends GeometryBean

See Also:
Serialized Form

Nested Class Summary
static class TopoEdges.AddressSide
           
 
Field Summary
 
Fields inherited from class com.mizar.persistence.jpa.beans.GeometryBean
searchTolerance, sridPrecision, wktLocation, wktMBR, wktShape
 
Fields inherited from class com.mizar.persistence.jpa.beans.GenericBean
_logger, DELETE, EDIT, NEW, READ, serialVersionUID
 
Constructor Summary
TopoEdges()
           
 
Method Summary
 oracle.spatial.geometry.JGeometry geocode(long number, double offset)
          Geocodes an address number.
 int getAddressCount()
           
 java.util.List<Addr> getAddresses()
           
 long[] getAddressRange(boolean odd)
          This method returns an address range of the TopoEdge.
 java.lang.String getArtpath()
           
 java.lang.String getCountyfp()
           
 java.lang.String getCountyns()
           
 java.lang.String getDeckedroad()
           
 java.lang.String getDivroad()
           
 java.lang.String getExttyp()
           
 java.lang.String getFeatcat()
           
 java.util.List<Featnames> getFeatureNames()
           
 Nodes getFromNode()
           
 java.lang.String getFullname()
           
 oracle.spatial.geometry.JGeometry getGeom()
          Entity classes implementing GeometryBean should have at least one SDO_GEOMETRY column in their associated table.
 java.lang.Long getHighAddress()
           
 java.lang.String getHydroflg()
           
 Faces getLeftFace()
           
 java.lang.Long getLeftHighAddress()
           
 java.lang.Long getLeftLowAddress()
           
 java.lang.String getLfromadd()
           
 java.lang.Long getLowAddress()
           
 java.lang.String getLtoadd()
           
 Mtfcc getMtfcc()
           
 oracle.spatial.geometry.JGeometry getOffsetMidPoint(TopoEdges.AddressSide side, double offset)
          Returns the midpoint of an edge.
 java.lang.String getOlfflg()
           
 java.lang.String getPassflg()
           
 oracle.spatial.geometry.JGeometry getPointToSide(TopoEdges.AddressSide side, double distanceAlong, double offset)
          Returns a Point object along the edge.
 java.lang.Long getPrimaryKeyValue()
          NOTE: If an implementing bean expects to be extended by a RowInterface in a often-used Table, you should override this method in order to avoid the overheads associated with the reflective code in JPAUtils.getPrimaryKeyValue(this)
 java.lang.String getRailflg()
           
 java.lang.String getRfromadd()
           
 Faces getRightFace()
           
 java.lang.Long getRightHighAddress()
           
 java.lang.Long getRightLowAddress()
           
 java.lang.String getRoadflg()
           
 java.lang.String getRtoadd()
           
 java.lang.String getSmid()
           
 State getState()
           
 java.lang.Long getTlid()
           
 Nodes getToNode()
           
 java.lang.String getTtyp()
           
 java.lang.String getUspsname()
           
 java.lang.String getUspsnameDir()
           
 java.lang.String getUspsnameSoundex()
           
 java.lang.String getUspsnameStreet()
           
 java.lang.String getUspsnameType()
           
 java.lang.String getZipl()
           
 java.lang.String getZipr()
           
 boolean hasAddresses()
           
 boolean hasAddresses(boolean left)
           
 java.lang.Boolean isLeftOdd()
           
 java.lang.Boolean isRightOdd()
           
 double[] pointAlong(long number)
           
 double relativeAddress(long number)
          Get the ratio along the edge that a perfectly interpolated address would appear.
 void reverseAddressOrder()
           
 void setAddresses(java.util.List<Addr> addresses)
           
 void setArtpath(java.lang.String artpath)
           
 void setCountyfp(java.lang.String countyfp)
           
 void setCountyns(java.lang.String countyns)
           
 void setDeckedroad(java.lang.String deckedroad)
           
 void setDivroad(java.lang.String divroad)
           
 void setExttyp(java.lang.String exttyp)
           
 void setFeatcat(java.lang.String featcat)
           
 void setFeatureNames(java.util.List<Featnames> featureNames)
           
 void setFromNode(Nodes fromNode)
           
 void setFullname(java.lang.String fullname)
           
 void setGeom(oracle.spatial.geometry.JGeometry geom)
           
 void setHydroflg(java.lang.String hydroflg)
           
 void setLeftFace(Faces faces)
           
 void setLfromadd(java.lang.String lfromadd)
           
 void setLtoadd(java.lang.String ltoadd)
           
 void setMtfcc(Mtfcc mtfcc)
           
 void setOlfflg(java.lang.String olfflg)
           
 void setPassflg(java.lang.String passflg)
           
 void setRailflg(java.lang.String railflg)
           
 void setRfromadd(java.lang.String rfromadd)
           
 void setRightFace(Faces faces1)
           
 void setRoadflg(java.lang.String roadflg)
           
 void setRtoadd(java.lang.String rtoadd)
           
 void setSmid(java.lang.String smid)
           
 void setState(State state)
           
 void setTlid(java.lang.Long tlid)
           
 void setToNode(Nodes toNode)
           
 void setTtyp(java.lang.String ttyp)
           
 void setUspsname(java.lang.String uspsname)
           
 void setZipl(java.lang.String zipl)
           
 void setZipr(java.lang.String zipr)
           
 TopoEdges.AddressSide sideOfStreet(long number)
          The side of the street that a specific house number occurs.
 boolean withinRange(long number)
          This method determine if a given address number is in range of the TopoEdge
 
Methods inherited from class com.mizar.persistence.jpa.beans.GeometryBean
getArea, getBasicGeometryType, getGeomDimensions, getGeomNumPoints, getGeomType, getGType, getHeight, getLength, getRange, getSearchTolerance, getSrid, getSridPrecision, getWidth, getWktLocation, getWktMBR, getWktShape, isGeometryExtant, setArea, setSearchTolerance, setSridPrecision, setWktLocation, setWktShape
 
Methods inherited from class com.mizar.persistence.jpa.beans.GenericBean
compareTo, equals, getDELETE, getEDIT, getEntityState, getEntityStateLabel, getLogger, getNEW, getREAD, hashCode, isEditable, isNew, setEditable, setEntityState, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TopoEdges

public TopoEdges()
Method Detail

getPrimaryKeyValue

public java.lang.Long getPrimaryKeyValue()
Description copied from class: GenericBean

NOTE: If an implementing bean expects to be extended by a RowInterface in a often-used Table, you should override this method in order to avoid the overheads associated with the reflective code in JPAUtils.getPrimaryKeyValue(this)

 public Object getPrimaryKeyValue(){
   return getProperty();
 }
 

In the absence of an overriding method, this method provides a generic method to get the value of the primary key. This is especially useful for calls to em.find(object) from within abstract classes

Overrides:
getPrimaryKeyValue in class GenericBean
Returns:
JPAUtils#getPrimaryKeyValue(this)
See Also:
RowInterface.getPrimaryKeyValue()

getArtpath

public java.lang.String getArtpath()

setArtpath

public void setArtpath(java.lang.String artpath)

getCountyfp

public java.lang.String getCountyfp()

setCountyfp

public void setCountyfp(java.lang.String countyfp)

getCountyns

public java.lang.String getCountyns()

setCountyns

public void setCountyns(java.lang.String countyns)

getDeckedroad

public java.lang.String getDeckedroad()

setDeckedroad

public void setDeckedroad(java.lang.String deckedroad)

getDivroad

public java.lang.String getDivroad()

setDivroad

public void setDivroad(java.lang.String divroad)

getExttyp

public java.lang.String getExttyp()

setExttyp

public void setExttyp(java.lang.String exttyp)

getFeatcat

public java.lang.String getFeatcat()

setFeatcat

public void setFeatcat(java.lang.String featcat)

getFullname

public java.lang.String getFullname()

setFullname

public void setFullname(java.lang.String fullname)

getHydroflg

public java.lang.String getHydroflg()

setHydroflg

public void setHydroflg(java.lang.String hydroflg)

reverseAddressOrder

public void reverseAddressOrder()

hasAddresses

public boolean hasAddresses()
Returns:
true if either left or right addresses exist

hasAddresses

public boolean hasAddresses(boolean left)
Parameters:
left - if true check left addresses, else check right addresses
Returns:

getLfromadd

public java.lang.String getLfromadd()

setLfromadd

public void setLfromadd(java.lang.String lfromadd)

getLtoadd

public java.lang.String getLtoadd()

setLtoadd

public void setLtoadd(java.lang.String ltoadd)

isLeftOdd

public java.lang.Boolean isLeftOdd()

isRightOdd

public java.lang.Boolean isRightOdd()

geocode

public oracle.spatial.geometry.JGeometry geocode(long number,
                                                 double offset)
                                          throws GeometryException
Geocodes an address number.

Parameters:
number. - The address number.
offset. - Offset from topoEdge.
Returns:
Point geometry represeting the address.
Throws:
GeometryException

getPointToSide

public oracle.spatial.geometry.JGeometry getPointToSide(TopoEdges.AddressSide side,
                                                        double distanceAlong,
                                                        double offset)
                                                 throws GeometryException
Returns a Point object along the edge.

Parameters:
side. - Left, right, or neither side of edge.
distanceAlong. - Distance along the edge.
offset. - Offset from the edge.
Returns:
JGemetry Point object
Throws:
GeometryException

getOffsetMidPoint

public oracle.spatial.geometry.JGeometry getOffsetMidPoint(TopoEdges.AddressSide side,
                                                           double offset)
                                                    throws GeometryException
Returns the midpoint of an edge.

Parameters:
side. - Left, right, or neither side of the edge.
offset. - Offside from the edge.
Returns:
JGemoetry Point representing the edge's midpoint.
Throws:
GeometryException

pointAlong

public double[] pointAlong(long number)
                    throws GeometryException
Throws:
GeometryException

relativeAddress

public double relativeAddress(long number)
Get the ratio along the edge that a perfectly interpolated address would appear. For instance, if the number is 25 and the address range on the odd range of the edge is 1-99 then 25 would be just about 25% along the line. If the address range numbers run counter to the geometry direction, i.e., from 99-1 then the result would be about 75% (the inverse).

Parameters:
number -
Returns:

getAddressRange

public long[] getAddressRange(boolean odd)
This method returns an address range of the TopoEdge.

Parameters:
odd - Boolean switch to determine if Odd or Even address range to get.
Returns:
Two elements array representing lower and upper end of address range. NULL if TopoEdge have no address range.

withinRange

public boolean withinRange(long number)
This method determine if a given address number is in range of the TopoEdge

Parameters:
number - Address number
Returns:
True, if address number is in range. False, if address number isn't in range or TopoEdge's range is null.

getLeftLowAddress

public java.lang.Long getLeftLowAddress()

getLeftHighAddress

public java.lang.Long getLeftHighAddress()

getRfromadd

public java.lang.String getRfromadd()

setRfromadd

public void setRfromadd(java.lang.String rfromadd)

getRtoadd

public java.lang.String getRtoadd()

setRtoadd

public void setRtoadd(java.lang.String rtoadd)

getRightLowAddress

public java.lang.Long getRightLowAddress()

getRightHighAddress

public java.lang.Long getRightHighAddress()

getLowAddress

public java.lang.Long getLowAddress()

getHighAddress

public java.lang.Long getHighAddress()

getMtfcc

public Mtfcc getMtfcc()

setMtfcc

public void setMtfcc(Mtfcc mtfcc)

getOlfflg

public java.lang.String getOlfflg()

setOlfflg

public void setOlfflg(java.lang.String olfflg)

getPassflg

public java.lang.String getPassflg()

setPassflg

public void setPassflg(java.lang.String passflg)

getRailflg

public java.lang.String getRailflg()

setRailflg

public void setRailflg(java.lang.String railflg)

getRoadflg

public java.lang.String getRoadflg()

setRoadflg

public void setRoadflg(java.lang.String roadflg)

getSmid

public java.lang.String getSmid()

setSmid

public void setSmid(java.lang.String smid)

setState

public void setState(State state)

getState

public State getState()

getTlid

public java.lang.Long getTlid()

setTlid

public void setTlid(java.lang.Long tlid)

getTtyp

public java.lang.String getTtyp()

setTtyp

public void setTtyp(java.lang.String ttyp)

getZipl

public java.lang.String getZipl()

setZipl

public void setZipl(java.lang.String zipl)

getZipr

public java.lang.String getZipr()

setZipr

public void setZipr(java.lang.String zipr)

getLeftFace

public Faces getLeftFace()

setLeftFace

public void setLeftFace(Faces faces)

getRightFace

public Faces getRightFace()

setRightFace

public void setRightFace(Faces faces1)

getGeom

public oracle.spatial.geometry.JGeometry getGeom()
Description copied from class: GeometryBean
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.

Specified by:
getGeom in class GeometryBean
Returns:
the principal SDO_GEOMETRY column

setGeom

public void setGeom(oracle.spatial.geometry.JGeometry geom)
Specified by:
setGeom in class GeometryBean

setAddresses

public void setAddresses(java.util.List<Addr> addresses)

getAddresses

public java.util.List<Addr> getAddresses()

getAddressCount

public int getAddressCount()

setFeatureNames

public void setFeatureNames(java.util.List<Featnames> featureNames)

getFeatureNames

public java.util.List<Featnames> getFeatureNames()

setUspsname

public void setUspsname(java.lang.String uspsname)

getUspsname

public java.lang.String getUspsname()

getUspsnameSoundex

public java.lang.String getUspsnameSoundex()

getUspsnameStreet

public java.lang.String getUspsnameStreet()

getUspsnameType

public java.lang.String getUspsnameType()

getUspsnameDir

public java.lang.String getUspsnameDir()

sideOfStreet

public TopoEdges.AddressSide sideOfStreet(long number)
The side of the street that a specific house number occurs. This is made a little more interesting by the fact that either the right or the left side of the street may have a null address range. So if the number to test is 11 and the left side of the street is determined to be even, that does not guarantee that the right side is odd. It just means that the right side might be odd or might be undefined.

Parameters:
number -
Returns:

setToNode

public void setToNode(Nodes toNode)

getToNode

public Nodes getToNode()

setFromNode

public void setFromNode(Nodes fromNode)

getFromNode

public Nodes getFromNode()