com.gisgraphy.domain.geoloc.entity

## Class OpenStreetMap

- java.lang.Object
- - com.gisgraphy.domain.geoloc.entity.OpenStreetMap

-     public class OpenStreetMap
      extends Object

  Represents a street in OpenStreetMap. it is different from `Street` that represent a street in Geonames.
  Author:
    David Masclet

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static 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 String` | `FULLTEXTSEARCH_PROPERTY_NAME` Name of the field property in hibernate.
    `static 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 String` | `LOCATION_COLUMN_NAME`
    `protected static org.slf4j.Logger` | `logger`
    `static int` | `MAX_ALTERNATENAME_SIZE`
    `static String` | `SHAPE_COLUMN_NAME`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `OpenStreetMap()` Needed by CGLib

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addAlternateName(AlternateOsmName alternateName)` Do a double set : add the alternate name to the current GisFeature and set this GisFeature as the GisFeature of the specified AlternateName
    `void` | `addAlternateNames(List<AlternateOsmName> alternateNames)` Do a double set : add (not replace !)
    `void` | `addHouseNumber(HouseNumber houseNumber)` Do a double set : add the house number to the current street and set this street as the street of the specified AlternateName
    `void` | `addHouseNumbers(List<HouseNumber> HouseNumbers)` Do a double set : add (not replace !)
    `void` | `addIsInCitiesAlternateName(String isInCityAlternateName)`
    `void` | `addIsInCitiesAlternateNames(Collection<String> isInCityAlternateNames)`
    `void` | `addZip(String zip)` add a zip
    `void` | `addZips(Collection<String> zips)` add zips
    `boolean` | `equals(Object obj)`
    `List<AlternateOsmName>` | `getAlternateNames()`
    `String` | `getCountryCode()`
    `String` | `getFullyQualifiedAddress()`
    `Long` | `getGid()`
    `SortedSet<HouseNumber>` | `getHouseNumbers()`
    `Long` | `getId()`
    `String` | `getIsIn()`
    `String` | `getIsInAdm()`
    `Set<String>` | `getIsInCityAlternateNames()` This field is only for relevance and allow to search for street<->cities in many alternateNames.
    `String` | `getIsInPlace()`
    `Set<String>` | `getIsInZip()`
    `Double` | `getLatitude()`
    `Double` | `getLength()`
    `com.vividsolutions.jts.geom.Point` | `getLocation()` Returns The JTS location point of the current street : The Geometry representation for the latitude, longitude.
    `Double` | `getLongitude()`
    `String` | `getName()`
    `Long` | `getOpenstreetmapId()`
    `String` | `getPartialSearchName()` (Experimental) This String is used to search for a part of a street name
    `String` | `getPartialsearchVector()` IT DOES NOTHING.
    `Integer` | `getPopulation()`
    `com.vividsolutions.jts.geom.LineString` | `getShape()`
    `com.gisgraphy.street.StreetType` | `getStreetType()`
    `String` | `getTextSearchName()` This value is use to do a Fulltext search for a street name with index
    `String` | `getTextsearchVector()` IT DOES NOTHING.
    `int` | `hashCode()`
    `boolean` | `isCityConfident()`
    `boolean` | `isOneWay()`
    `void` | `setAlternateNames(List<AlternateOsmName> alternateNames)`
    `void` | `setCityConfident(boolean cityConfident)`
    `void` | `setCountryCode(String countryCode)`
    `void` | `setFullyQualifiedAddress(String fullyQualifiedAddress)`
    `void` | `setGid(Long gid)`
    `void` | `setHouseNumbers(SortedSet<HouseNumber> houseNumbers)`
    `void` | `setId(Long id)`
    `void` | `setIsIn(String isIn)`
    `void` | `setIsInAdm(String isInAdm)`
    `void` | `setIsInCityAlternateNames(Set<String> isInCityAlternateNames)`
    `void` | `setIsInPlace(String isInPlace)`
    `void` | `setIsInZip(Set<String> isInZip)`
    `void` | `setLength(Double length)`
    `void` | `setLocation(com.vividsolutions.jts.geom.Point location)`
    `void` | `setName(String name)`
    `void` | `setOneWay(boolean oneWay)`
    `void` | `setOpenstreetmapId(Long openstreetmapId)`
    `void` | `setPartialSearchName(String partialSearchName)`
    `void` | `setPartialsearchVector(String partialsearchVector)` IT DOES NOTHING.
    `void` | `setPopulation(Integer population)`
    `void` | `setShape(com.vividsolutions.jts.geom.LineString shape)`
    `void` | `setStreetType(com.gisgraphy.street.StreetType streetType)`
    `void` | `setTextSearchName(String textSearchName)`
    `void` | `setTextsearchVector(String textsearchVector)` IT DOES NOTHING.
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### logger

          protected static final org.slf4j.Logger logger

    - #### SHAPE_COLUMN_NAME

          public static final String SHAPE_COLUMN_NAME

      See Also:
        Constant Field Values

    - #### MAX_ALTERNATENAME_SIZE

          public static final int MAX_ALTERNATENAME_SIZE

      See Also:
        Constant Field Values

    - #### FULLTEXTSEARCH_VECTOR_PROPERTY_NAME

          public static final 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

    - #### FULLTEXTSEARCH_PROPERTY_NAME

          public static final 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 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`

    - #### LOCATION_COLUMN_NAME

          public static final String LOCATION_COLUMN_NAME

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### OpenStreetMap

          public OpenStreetMap()

      Needed by CGLib

  - ### Method Detail

    - #### getAlternateNames

          public List<AlternateOsmName> getAlternateNames()

      Returns:
        A list of the `AlternateName`s for this GisFeature

    - #### setAlternateNames

          public void setAlternateNames(List<AlternateOsmName> alternateNames)

      Parameters:
        `alternateNames` - The `AlternateName`s for this GisFeature

    - #### addAlternateName

          public void addAlternateName(AlternateOsmName alternateName)

      Do a double set : add the alternate name to the current GisFeature and set this GisFeature as the GisFeature of the specified AlternateName
      Parameters:
        `alternateName` - the alternateName to add

    - #### addAlternateNames

          public void addAlternateNames(List<AlternateOsmName> alternateNames)

      Do a double set : add (not replace !) the AlternateNames to the current GisFeature and for each alternatenames : set the current GisFeature as the GisFeature of the Alternate Names
      Parameters:
        `alternateNames` - The alternateNames list to add

    - #### getPartialSearchName

          public String getPartialSearchName()

      (Experimental) This String is used to search for a part of a street name
      Returns:
        the partialSearchName
      See Also:
        `StreetSearchMode.CONTAINS`

    - #### setPartialSearchName

          public void setPartialSearchName(String partialSearchName)

      Parameters:
        `partialSearchName` - the partialSearchName to set

    - #### getTextSearchName

          public String getTextSearchName()

      This value is use to do a Fulltext search for a street name with index
      Returns:
        the textSearchName

    - #### setTextSearchName

          public void setTextSearchName(String textSearchName)

      Parameters:
        `textSearchName` - the textSearchName to set

    - #### getTextsearchVector

          public 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(String textsearchVector)

      IT DOES NOTHING. ONLY USE BY HIBERNATE
      Parameters:
        `textsearchVector` - the textsearchVector to set

    - #### getPartialsearchVector

          public 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(String partialsearchVector)

      IT DOES NOTHING. ONLY USE BY HIBERNATE
      Parameters:
        `partialsearchVector` - the ilikesearch to set

    - #### getId

          public Long getId()

      Returns:
        the id

    - #### setId

          public void setId(Long id)

      Parameters:
        `id` - the id to set

    - #### getGid

          public Long getGid()

      Returns:
        an uniqueid that identify the street, it differs from `openstreetmapId` because the value can not be in conflict between geonames and openstreetmap

    - #### setGid

          public void setGid(Long gid)

      Parameters:
        `gid` - the gid to set

    - #### getOpenstreetmapId

          public Long getOpenstreetmapId()

      Returns:
        the openstreetmap internal id

    - #### setOpenstreetmapId

          public void setOpenstreetmapId(Long openstreetmapId)

      Parameters:
        `openstreetmapId` - the openstreetmap internal id

    - #### getName

          public String getName()

      Returns:
        the name

    - #### setName

          public void setName(String name)

      Parameters:
        `name` - the name to set

    - #### getStreetType

          public com.gisgraphy.street.StreetType getStreetType()

      Returns:
        the type of the street

    - #### setStreetType

          public void setStreetType(com.gisgraphy.street.StreetType streetType)

      Parameters:
        `streetType` - the streetType to set

    - #### isOneWay

          public boolean isOneWay()

      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`

    - #### getLatitude

          public Double getLatitude()

      Returns:
        Returns the latitude (north-south) from the Location `getLocation()`.
      See Also:
        `getLongitude()`, `getLocation()`

    - #### getLongitude

          public Double getLongitude()

      Returns:
        Returns the longitude (east-west) from the Location `getLocation()`.
      See Also:
        `getLongitude()`, `getLocation()`

    - #### 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 String getCountryCode()

      Returns:
        The ISO 3166 alpha-2 letter code.

    - #### setCountryCode

          public void setCountryCode(String countryCode)

      Parameters:
        `countryCode` - the countryCode to set

    - #### getLength

          public Double getLength()

      Returns:
        the length of the street in meters

    - #### setLength

          public void setLength(Double length)

      Parameters:
        `length` - the length to set

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### getIsIn

          public String getIsIn()

      Returns:
        The city or state or any information where the street is located

    - #### setIsIn

          public void setIsIn(String isIn)

      Parameters:
        `isIn` - The city or state or any information where the street is located

    - #### getIsInPlace

          public String getIsInPlace()

      Returns:
        the place where the street is located, this field is filled when `isIn` is filled and we got more specific details (generally quarter, neighborhood)

    - #### setIsInPlace

          public void setIsInPlace(String isInPlace)

      Parameters:
        `isInPlace` - the most precise information on where the street is located, generally quarter neighborhood

    - #### getIsInAdm

          public String getIsInAdm()

      Returns:
        the adm (aka administrative division) where the street is located.

    - #### setIsInAdm

          public void setIsInAdm(String isInAdm)

      Parameters:
        `isInAdm` - the adm (aka administrative division) where the street is located

    - #### getIsInZip

          public Set<String> getIsInZip()

      Returns:
        the zipcode where the street is located

    - #### setIsInZip

          public void setIsInZip(Set<String> isInZip)

      Parameters:
        `isInZip` - the zipcode where the street is located.

    - #### addZip

          public void addZip(String zip)

      add a zip

    - #### addZips

          public void addZips(Collection<String> zips)

      add zips

    - #### getFullyQualifiedAddress

          public String getFullyQualifiedAddress()

    - #### setFullyQualifiedAddress

          public void setFullyQualifiedAddress(String fullyQualifiedAddress)

    - #### getPopulation

          public Integer getPopulation()

    - #### setPopulation

          public void setPopulation(Integer population)

    - #### getHouseNumbers

          public SortedSet<HouseNumber> getHouseNumbers()

      Returns:
        the houseNumbers associated to that street

    - #### setHouseNumbers

          public void setHouseNumbers(SortedSet<HouseNumber> houseNumbers)

      Parameters:
        `houseNumbers` - the houseNumbers to set

    - #### addHouseNumber

          public void addHouseNumber(HouseNumber houseNumber)

      Do a double set : add the house number to the current street and set this street as the street of the specified AlternateName
      Parameters:
        `houseNumber` - the houseNumber to add

    - #### addHouseNumbers

          public void addHouseNumbers(List<HouseNumber> HouseNumbers)

      Do a double set : add (not replace !) the House Numbers to the current street and for each House numbers : set the current street as the street of the House Numbers
      Parameters:
        `HouseNumbers` - The House Numbers list to add

    - #### isCityConfident

          public boolean isCityConfident()

    - #### setCityConfident

          public void setCityConfident(boolean cityConfident)

    - #### getIsInCityAlternateNames

          public Set<String> getIsInCityAlternateNames()

      This field is only for relevance and allow to search for street<->cities in many alternateNames. It is not in stored

    - #### setIsInCityAlternateNames

          public void setIsInCityAlternateNames(Set<String> isInCityAlternateNames)

    - #### addIsInCitiesAlternateName

          public void addIsInCitiesAlternateName(String isInCityAlternateName)

    - #### addIsInCitiesAlternateNames

          public void addIsInCitiesAlternateNames(Collection<String> isInCityAlternateNames)

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2015. All rights reserved.