Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.gisgraphy.domain.geoloc.entity
Class AlternateName

    java.lang.Object
      com.gisgraphy.domain.geoloc.entity.AlternateName

    public class AlternateName

extends Object

Represents an Alternate Name of a feature

Author:
  David Masclet

Constructor Summary
`AlternateName()` Default constructor (Needed by CGLib)
`AlternateName(String name, AlternateNameSource source)`

Method Summary
`boolean` | `equals(Object obj)`
`Integer` | `getAlternateNameId()` Returns the alternate name id.
`GisFeature` | `getGisFeature()` The GisFeature, the Alternate name refers to
`Long` | `getId()` The datastore id
`String` | `getLanguage()`
`String` | `getName()`
`AlternateNameSource` | `getSource()` It tells from which files / gazetteers it has been imported
`int` | `hashCode()`
`boolean` | `isPreferredName()` Whether the alternate name is the preferred name for The `GisFeature`
`boolean` | `isShortName()` Whether the alternate name is a short name
`void` | `setAlternateNameId(Integer alternateNameId)` Set the alternateName id
`void` | `setGisFeature(GisFeature gisFeature)` Set the gisFeature, the alternate name refers to
`void` | `setId(Long id)` Set the datastore id.
`void` | `setLanguage(String language)` Set the the iso 639 alpha2 or alpha 3 languageCode for the current alternate name
`void` | `setName(String name)` Set the name of the current alternate name
`void` | `setPreferredName(boolean isPreferredName)` Set the alternate name as a preferred name or Not
`void` | `setShortName(boolean isShortName)` Set the Alternate name as a short name or Not
`void` | `setSource(AlternateNameSource source)` Set the source from which the alternate name come from
`String` | `toString()`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### AlternateName

    public AlternateName(String name,
                         AlternateNameSource source)

Parameters:
  `name` - The name of the alternate name
  `source` - what is the source the alternate name
See Also:
  `AlternateNameSource`

### AlternateName

    public AlternateName()

  Default constructor (Needed by CGLib)

Method Detail

### getId

    public Long getId()

  The datastore id

  Returns:
    The datastore id, it is not a domain value, just a technical One

### setId

    public void setId(Long id)

  Set the datastore id. You should never call this method. It is the responsability of the dataStore

  Parameters:
    `id` - The datastore id

### getName

    public String getName()

  Returns:
    The name of the current alternate name

### setName

    public void setName(String name)

  Set the name of the current alternate name

  Parameters:
    `name` - The name to set

### getGisFeature

    public GisFeature getGisFeature()

  The GisFeature, the Alternate name refers to

  Returns:
    the GisFeature, the AlternateName refers to

### setGisFeature

    public void setGisFeature(GisFeature gisFeature)

  Set the gisFeature, the alternate name refers to

  Parameters:
    `gisFeature` - The GisFeature, the alternate name refers to

### getSource

    public AlternateNameSource getSource()

  It tells from which files / gazetteers it has been imported

  Returns:
    The source from which the Alternate name come From (from the alternate name file, from the dump of the country file, a personal add,...)
  See Also:
    `AlternateNameSource`

### setSource

    public void setSource(AlternateNameSource source)

  Set the source from which the alternate name come from

### getAlternateNameId

    public Integer getAlternateNameId()

  Returns the alternate name id. The id could be null if the alternate name come from the country dump file.

  Returns:
    The alternateNameId

### setAlternateNameId

    public void setAlternateNameId(Integer alternateNameId)

  Set the alternateName id

  Parameters:
    `alternateNameId` - The id to set

### isPreferredName

    public boolean isPreferredName()

  Whether the alternate name is the preferred name for The `GisFeature`

  Returns:
    true if the alternate name is the preferred name for the `GisFeature`

### setPreferredName

    public void setPreferredName(boolean isPreferredName)

  Set the alternate name as a preferred name or Not

  Parameters:
    `isPreferredName` - The preferred name property

### isShortName

    public boolean isShortName()

  Whether the alternate name is a short name

  Returns:
    true if the Alternate name is a short name

### setShortName

    public void setShortName(boolean isShortName)

  Set the Alternate name as a short name or Not

  Parameters:
    `isShortName` - The short name property

### getLanguage

    public String getLanguage()

  Returns:
    The iso639 Alpha2 or alpha 3 LanguageCode of the `AlternateName`

### setLanguage

    public void setLanguage(String language)

  Set the the iso 639 alpha2 or alpha 3 languageCode for the current alternate name

  Parameters:
    `language` - The language to set, it will be automaticaly upercased

### 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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2012. All Rights Reserved.