com.gisgraphy.domain.geoloc.entity

## Class HouseNumber

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

- All Implemented Interfaces:
    Comparable<HouseNumber>

      public class HouseNumber
      extends Object
      implements Comparable<HouseNumber>

  Represents a housenumber (typically link to an `OpenStreetMap`.
  Author:
    David Masclet

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `LOCATION_COLUMN_NAME`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `HouseNumber()` Needed by CGLib
    `HouseNumber(String number, com.vividsolutions.jts.geom.Point location)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compareTo(HouseNumber o)`
    `boolean` | `equals(Object obj)`
    `Long` | `getId()`
    `Double` | `getLatitude()`
    `com.vividsolutions.jts.geom.Point` | `getLocation()` Returns The JTS location point of the current house : The Geometry representation for the latitude, longitude.
    `Double` | `getLongitude()`
    `String` | `getName()`
    `String` | `getNumber()`
    `Long` | `getOpenstreetmapId()`
    `OpenStreetMap` | `getStreet()`
    `HouseNumberType` | `getType()`
    `int` | `hashCode()`
    `boolean` | `is_same(Object obj)` check if address are content identical If number are equals and street (if number is null, we look at the name)
    `void` | `setId(Long id)`
    `void` | `setLocation(com.vividsolutions.jts.geom.Point location)`
    `void` | `setName(String name)`
    `void` | `setNumber(String number)`
    `void` | `setOpenstreetmapId(Long openstreetmapId)`
    `void` | `setStreet(OpenStreetMap street)`
    `void` | `setType(HouseNumberType type)`
    `String` | `toString()`

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

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

- - ### Field Detail

    - #### LOCATION_COLUMN_NAME

          public static final String LOCATION_COLUMN_NAME

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### HouseNumber

          public HouseNumber()

      Needed by CGLib

    - #### HouseNumber

          public HouseNumber(String number,
                     com.vividsolutions.jts.geom.Point location)

  - ### Method Detail

    - #### getId

          public Long getId()

      Returns:
        the id (technical one)

    - #### setId

          public void setId(Long id)

      Parameters:
        `id` - the id 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 of the house. It can be the name of the shop if present or of the house. associated to the house number, it gives more informations.

    - #### setName

          public void setName(String name)

      Parameters:
        `name` - the name to set

    - #### getLocation

          public com.vividsolutions.jts.geom.Point getLocation()

      Returns The JTS location point of the current house : 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

    - #### getNumber

          public String getNumber()

      Returns:
        the number of the house. it can be null if the house has only a name. but it is typically filled

    - #### setNumber

          public void setNumber(String number)

      Parameters:
        `number` - the number to set

    - #### getType

          public HouseNumberType getType()

      Returns:
        the type of node.
      See Also:
        `for details`

    - #### setType

          public void setType(HouseNumberType type)

      Parameters:
        `type` - the type to set

    - #### getStreet

          public OpenStreetMap getStreet()

      Returns:
        the street associated to this house number

    - #### setStreet

          public void setStreet(OpenStreetMap street)

      Parameters:
        `street` - the street to set

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### is_same

          public boolean is_same(Object obj)

      check if address are content identical If number are equals and street (if number is null, we look at the name)

    - #### compareTo

          public int compareTo(HouseNumber o)

      Specified by:
        `compareTo` in interface `Comparable<HouseNumber>`

Copyright © 2015. All rights reserved.