com.mizar.addressing.tiger.state
Class Edges

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.Edges
All Implemented Interfaces:
JPAGeometryInterface, JPAInterface, java.io.Serializable, java.lang.Comparable

@Entity
public class Edges
extends GeometryBean

See Also:
Serialized Form

Nested Class Summary
static class Edges.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
Edges()
           
 
Method Summary
 oracle.spatial.geometry.JGeometry geocode(long number, double offset)
          Geocodes an address along an Edge
 int getAddressCount()
           
 java.util.List<Addr> getAddresses()
           
 long[] getAddressRange(boolean odd)
          This method return the address range of an Edge.
 java.lang.String getArtpath()
           
 java.lang.Boolean getBoolArtpath()
           
 java.lang.Boolean getBoolDeckedroad()
           
 java.lang.Boolean getBoolDivroad()
           
 java.lang.Boolean getBoolExttyp()
           
 java.lang.Boolean getBoolHydroflg()
           
 java.lang.Boolean getBoolOlfflg()
           
 java.lang.Boolean getBoolPassflg()
           
 java.lang.Boolean getBoolRailflg()
           
 java.lang.Boolean getBoolRoadflg()
           
 County getCounty()
           
 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(Edges.AddressSide side, double offset)
          Return JGeometry Point of the edge's midpoint
 java.lang.String getOlfflg()
           
 java.lang.String getPassflg()
           
 oracle.spatial.geometry.JGeometry getPointToSide(Edges.AddressSide side, double distanceAlong, double offset)
          Returns a Point geom 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)
          This method return the Point of an address along an Edge.
 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 setBoolArtpath(java.lang.Boolean boolArtpath)
           
 void setBoolDeckedroad(java.lang.Boolean boolDeckedroad)
           
 void setBoolDivroad(java.lang.Boolean boolDivroad)
           
 void setBoolExttyp(java.lang.Boolean boolExttyp)
           
 void setBoolHydroflg(java.lang.Boolean boolHydroflg)
           
 void setBoolOlfflg(java.lang.Boolean boolOlfflg)
           
 void setBoolPassflg(java.lang.Boolean boolPassflg)
           
 void setBoolRailflg(java.lang.Boolean boolRailflg)
           
 void setBoolRoadflg(java.lang.Boolean boolRoadflg)
           
 void setCounty(County county)
           
 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 setRightHighAddress(java.lang.Long rightHighAddress)
           
 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)
           
 Edges.AddressSide sideOfStreet(long number)
          The side of the street that a specific house number occurs.
 boolean withinRange(long number)
          This method determine if given address number is in range of an Edge.
 
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

Edges

public Edges()
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)

setCounty

public void setCounty(County county)

getCounty

public County getCounty()

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 along an Edge

Parameters:
number - Address number
offset - Offset from center line
Returns:
JGeometry object representing the address
Throws:
GeometryException

getPointToSide

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

Parameters:
side. - Left, right, or nether side of the edge
distanceAlong. - Distance along the edge
offset -
Returns:
JGeometry Point
Throws:
GeometryException

getOffsetMidPoint

public oracle.spatial.geometry.JGeometry getOffsetMidPoint(Edges.AddressSide side,
                                                           double offset)
                                                    throws GeometryException
Return JGeometry Point of the edge's midpoint

Parameters:
side. - Left, right, or neither side
offset -
Returns:
JGeometry Point object
Throws:
GeometryException

pointAlong

public double[] pointAlong(long number)
                    throws GeometryException
This method return the Point of an address along an Edge.

Parameters:
number - The address number
Returns:
JGeometry Point of the address
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 return the address range of an Edge.

Parameters:
odd - A boolean switch to indicate Odd or Even address range to get.
Returns:
An array with two (2) elements representing the lower & upper end of an address range. Return NULL if it can't determine the address range.

withinRange

public boolean withinRange(long number)
This method determine if given address number is in range of an Edge.

Parameters:
number - The address number
Returns:
True, if address number within the Edge. False, if address number not in within the Edge or Edge does not have address range.

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 Edges.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:

setRightHighAddress

public void setRightHighAddress(java.lang.Long rightHighAddress)

setBoolArtpath

public void setBoolArtpath(java.lang.Boolean boolArtpath)

getBoolArtpath

public java.lang.Boolean getBoolArtpath()

setBoolDeckedroad

public void setBoolDeckedroad(java.lang.Boolean boolDeckedroad)

getBoolDeckedroad

public java.lang.Boolean getBoolDeckedroad()

setBoolDivroad

public void setBoolDivroad(java.lang.Boolean boolDivroad)

getBoolDivroad

public java.lang.Boolean getBoolDivroad()

setBoolExttyp

public void setBoolExttyp(java.lang.Boolean boolExttyp)

getBoolExttyp

public java.lang.Boolean getBoolExttyp()

setBoolHydroflg

public void setBoolHydroflg(java.lang.Boolean boolHydroflg)

getBoolHydroflg

public java.lang.Boolean getBoolHydroflg()

setBoolOlfflg

public void setBoolOlfflg(java.lang.Boolean boolOlfflg)

getBoolOlfflg

public java.lang.Boolean getBoolOlfflg()

setBoolPassflg

public void setBoolPassflg(java.lang.Boolean boolPassflg)

getBoolPassflg

public java.lang.Boolean getBoolPassflg()

setBoolRailflg

public void setBoolRailflg(java.lang.Boolean boolRailflg)

getBoolRailflg

public java.lang.Boolean getBoolRailflg()

setBoolRoadflg

public void setBoolRoadflg(java.lang.Boolean boolRoadflg)

getBoolRoadflg

public java.lang.Boolean getBoolRoadflg()

setToNode

public void setToNode(Nodes toNode)

getToNode

public Nodes getToNode()

setFromNode

public void setFromNode(Nodes fromNode)

getFromNode

public Nodes getFromNode()