com.gisgraphy.domain.geoloc.entity
Class OpenStreetMap

java.lang.Object
  extended by com.gisgraphy.domain.geoloc.entity.OpenStreetMap

public class OpenStreetMap
extends java.lang.Object

Represents a street in OpenStreetMap. it is different from Street that represent a street in Geonames.

Author:
David Masclet

Field Summary
static java.lang.String FULLTEXTSEARCH_COLUMN_NAME
          Name of the column that is equals to store a string that is used for fulltext search. it deffer form the @FULLTEXTSEARCH_COLUMN_NAME because Hibernate, by default, lowercase the property to get the column name This value should be change if the getter and the setter of the getTextsearchVector() change
static java.lang.String FULLTEXTSEARCH_PROPERTY_NAME
          Name of the field property in hibernate.
static java.lang.String FULLTEXTSEARCH_VECTOR_PROPERTY_NAME
          Name of the column that is equals to to_tsvector( FULLTEXTSEARCH_COLUMN_NAME It is used to do Fulltext search with the postgres text search module (to use the index).
static java.lang.String LOCATION_COLUMN_NAME
           
static java.lang.String PARTIALSEARCH_COLUMN_NAME
          Name of the column that is used to store a string used for partial search with postgres fulltext engine This value should be change if the getter and the setter of the getPartialsearchVector() change
static java.lang.String PARTIALSEARCH_VECTOR_PROPERTY_NAME
          (Experimental) Name of the column that is equals to to_tsvector( PARTIALSEARCH_COLUMN_NAME It is used to do Fulltext search with the postgres text search module (to use the index) This value should be change if the getter and the setter of the partialSearchName change
static java.lang.String SHAPE_COLUMN_NAME
           
 
Constructor Summary
OpenStreetMap()
          Needed by CGLib
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getCountryCode()
           
 java.lang.Long getGid()
           
 java.lang.Long getId()
           
 java.lang.Double getLength()
           
 com.vividsolutions.jts.geom.Point getLocation()
          Returns The JTS location point of the current street : The Geometry representation for the latitude, longitude.
 java.lang.String getName()
           
 boolean getOneWay()
           
 java.lang.String getPartialSearchName()
          (Experimental) This String is used to search for a part of a street name
 java.lang.String getPartialsearchVector()
          IT DOES NOTHING.
 com.vividsolutions.jts.geom.LineString getShape()
           
 StreetType getStreetType()
           
 java.lang.String getTextSearchName()
          This value is use to do a Fulltext search for a street name with index
 java.lang.String getTextsearchVector()
          IT DOES NOTHING.
 int hashCode()
           
 void setCountryCode(java.lang.String countryCode)
           
 void setGid(java.lang.Long gid)
           
 void setId(java.lang.Long id)
           
 void setLength(java.lang.Double length)
           
 void setLocation(com.vividsolutions.jts.geom.Point location)
           
 void setName(java.lang.String name)
           
 void setOneWay(boolean oneWay)
           
 void setPartialSearchName(java.lang.String partialSearchName)
           
 void setPartialsearchVector(java.lang.String partialsearchVector)
          IT DOES NOTHING.
 void setShape(com.vividsolutions.jts.geom.LineString shape)
           
 void setStreetType(StreetType streetType)
           
 void setTextSearchName(java.lang.String textSearchName)
           
 void setTextsearchVector(java.lang.String textsearchVector)
          IT DOES NOTHING.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SHAPE_COLUMN_NAME

public static final java.lang.String SHAPE_COLUMN_NAME
See Also:
Constant Field Values

FULLTEXTSEARCH_VECTOR_PROPERTY_NAME

public static final java.lang.String FULLTEXTSEARCH_VECTOR_PROPERTY_NAME
Name of the column that is equals to to_tsvector( FULLTEXTSEARCH_COLUMN_NAME It is used to do Fulltext search with the postgres text search module (to use the index). This value should be change if the getter and the setter of the textSearchName change

See Also:
Constant Field Values

PARTIALSEARCH_VECTOR_PROPERTY_NAME

public static final java.lang.String PARTIALSEARCH_VECTOR_PROPERTY_NAME
(Experimental) Name of the column that is equals to to_tsvector( PARTIALSEARCH_COLUMN_NAME It is used to do Fulltext search with the postgres text search module (to use the index) This value should be change if the getter and the setter of the partialSearchName change

See Also:
GisgraphyConfig.PARTIAL_SEARH_EXPERIMENTAL, Constant Field Values

FULLTEXTSEARCH_PROPERTY_NAME

public static final java.lang.String FULLTEXTSEARCH_PROPERTY_NAME
Name of the field property in hibernate. This is a string that is used for fulltext and contains search without postgres fulltext engine. this fields will have the name without accent and special char This value should be changed if the getter and the setter of the getTextsearchVector() change

See Also:
StreetSearchMode.FULLTEXT, Constant Field Values

FULLTEXTSEARCH_COLUMN_NAME

public static final java.lang.String FULLTEXTSEARCH_COLUMN_NAME
Name of the column that is equals to store a string that is used for fulltext search. it deffer form the @FULLTEXTSEARCH_COLUMN_NAME because Hibernate, by default, lowercase the property to get the column name This value should be change if the getter and the setter of the getTextsearchVector() change

See Also:
StreetSearchMode.FULLTEXT

PARTIALSEARCH_COLUMN_NAME

public static final java.lang.String PARTIALSEARCH_COLUMN_NAME
Name of the column that is used to store a string used for partial search with postgres fulltext engine This value should be change if the getter and the setter of the getPartialsearchVector() change

See Also:
GisgraphyConfig.PARTIAL_SEARH_EXPERIMENTAL, StreetSearchMode.CONTAINS, Constant Field Values

LOCATION_COLUMN_NAME

public static final java.lang.String LOCATION_COLUMN_NAME
See Also:
Constant Field Values
Constructor Detail

OpenStreetMap

public OpenStreetMap()
Needed by CGLib

Method Detail

getPartialSearchName

public java.lang.String getPartialSearchName()
(Experimental) This String is used to search for a part of a street name

Returns:
the partialSearchName
See Also:
StreetSearchMode.CONTAINS, GisgraphyConfig.PARTIAL_SEARH_EXPERIMENTAL

setPartialSearchName

public void setPartialSearchName(java.lang.String partialSearchName)
Parameters:
partialSearchName - the partialSearchName to set

getTextSearchName

public java.lang.String getTextSearchName()
This value is use to do a Fulltext search for a street name with index

Returns:
the textSearchName

setTextSearchName

public void setTextSearchName(java.lang.String textSearchName)
Parameters:
textSearchName - the textSearchName to set

getTextsearchVector

public java.lang.String getTextsearchVector()
IT DOES NOTHING. ONLY USE BY HIBERNATE This field is only use for the text search to improve performance, you should not set / get a value, it is declared here, to create the column

Returns:
null ALWAYS

setTextsearchVector

public void setTextsearchVector(java.lang.String textsearchVector)
IT DOES NOTHING. ONLY USE BY HIBERNATE

Parameters:
textsearchVector - the textsearchVector to set

getPartialsearchVector

public java.lang.String getPartialsearchVector()
IT DOES NOTHING. ONLY USE BY HIBERNATE This field is only use for the autocomplete search to improve performance, you should not set / get a value, it is declared here, to create the column

Returns:
null ALWAYS

setPartialsearchVector

public void setPartialsearchVector(java.lang.String partialsearchVector)
IT DOES NOTHING. ONLY USE BY HIBERNATE

Parameters:
partialsearchVector - the ilikesearch to set

getId

public java.lang.Long getId()
Returns:
the id

setId

public void setId(java.lang.Long id)
Parameters:
id - the id to set

getGid

public java.lang.Long getGid()
Returns:
an uniqueid that identify the street

setGid

public void setGid(java.lang.Long gid)
Parameters:
gid - the gid to set

getName

public java.lang.String getName()
Returns:
the name

setName

public void setName(java.lang.String name)
Parameters:
name - the name to set

getStreetType

public StreetType getStreetType()
Returns:
the type of the street

setStreetType

public void setStreetType(StreetType streetType)
Parameters:
streetType - the streetType to set

getOneWay

public boolean getOneWay()
Returns:
the oneway

setOneWay

public void setOneWay(boolean oneWay)
Parameters:
oneWay - the oneWay to set

getLocation

public com.vividsolutions.jts.geom.Point getLocation()
Returns The JTS location point of the current street : The Geometry representation for the latitude, longitude. The Return type is a JTS point. The Location is calculate from the 4326 SRID

Returns:
The JTS Point
See Also:
SRID

setLocation

public void setLocation(com.vividsolutions.jts.geom.Point location)
Parameters:
location - the location to set

getShape

public com.vividsolutions.jts.geom.LineString getShape()
Returns:
the shape

setShape

public void setShape(com.vividsolutions.jts.geom.LineString shape)
Parameters:
shape - the shape to set

getCountryCode

public java.lang.String getCountryCode()
Returns:
The ISO 3166 alpha-2 letter code.

setCountryCode

public void setCountryCode(java.lang.String countryCode)
Parameters:
countryCode - the countryCode to set

getLength

public java.lang.Double getLength()
Returns:
the length of the street in meters

setLength

public void setLength(java.lang.Double length)
Parameters:
length - the length to set

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object


Copyright © 2010. All Rights Reserved.