com.gisgraphy.domain.geoloc.entity
Class AlternateName

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

public class AlternateName
extends java.lang.Object

Represents an Alternate Name of a feature

Author:
David Masclet

Constructor Summary
AlternateName()
          Default constructor (Needed by CGLib)
AlternateName(java.lang.String name, AlternateNameSource source)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.Integer getAlternateNameId()
          Returns the alternateNameId.
 GisFeature getGisFeature()
          The GisFeature, the AlternateName refers To
 java.lang.Long getId()
          The datastore id
 java.lang.String getLanguage()
           
 java.lang.String getName()
           
 AlternateNameSource getSource()
          It tells from which files / gazetteers it has been imported
 int hashCode()
           
 boolean isPreferredName()
          Whether the AlternateName is the preferred name for The GisFeature
 boolean isShortName()
          Whether the AlternateName is a short name for The GisFeature
 void setAlternateNameId(java.lang.Integer alternateNameId)
          Set the AlternateNameId
 void setGisFeature(GisFeature gisFeature)
          Set The GisFeature, the AlternateName refers To
 void setId(java.lang.Long id)
          Set the datastore id.
 void setLanguage(java.lang.String language)
          Set the the iso639 Alpha2 or alpha 3 LanguageCode for the current AlternateName
 void setName(java.lang.String name)
          Set the name of the current AlternateName
 void setPreferredName(boolean isPreferredName)
          Set the AlternateName as a preferred name or Not
 void setShortName(boolean isShortName)
          Set the AlternateName as a short name or Not
 void setSource(AlternateNameSource source)
          Set the source from which the AlternateName come From
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AlternateName

public AlternateName(java.lang.String name,
                     AlternateNameSource source)
Parameters:
name - The name of the alternateName
source - From which source the alternateName come From

AlternateName

public AlternateName()
Default constructor (Needed by CGLib)

Method Detail

getId

public java.lang.Long getId()
The datastore id

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

setId

public void setId(java.lang.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 java.lang.String getName()
Returns:
The name of the current AlternateName

setName

public void setName(java.lang.String name)
Set the name of the current AlternateName

Parameters:
name - The name to set

getGisFeature

public GisFeature getGisFeature()
The GisFeature, the AlternateName refers To

Returns:
the GisFeature, the AlternateName refers To

setGisFeature

public void setGisFeature(GisFeature gisFeature)
Set The GisFeature, the AlternateName refers To

Parameters:
gisFeature - The GisFeature, the AlternateName refers To

getSource

public AlternateNameSource getSource()
It tells from which files / gazetteers it has been imported

Returns:
The source from which the AlternateName come From (from the AlternateName 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 AlternateName come From


getAlternateNameId

public java.lang.Integer getAlternateNameId()
Returns the alternateNameId. The alternatenameid could be null if the alternateName come from the Country dump file.

Returns:
The alternateNameId

setAlternateNameId

public void setAlternateNameId(java.lang.Integer alternateNameId)
Set the AlternateNameId

Parameters:
alternateNameId - The AlternateNameId to set

isPreferredName

public boolean isPreferredName()
Whether the AlternateName is the preferred name for The GisFeature

Returns:
true if the AlternateName is the preferred name for the GisFeature

setPreferredName

public void setPreferredName(boolean isPreferredName)
Set the AlternateName as a preferred name or Not

Parameters:
isPreferredName - The preferred Name property

isShortName

public boolean isShortName()
Whether the AlternateName is a short name for The GisFeature

Returns:
true if the AlternateName is a short name for the GisFeature

setShortName

public void setShortName(boolean isShortName)
Set the AlternateName as a short name or Not

Parameters:
isShortName - The short Name property

getLanguage

public java.lang.String getLanguage()
Returns:
The iso639 Alpha2 or alpha 3 LanguageCode of the AlternateName

setLanguage

public void setLanguage(java.lang.String language)
Set the the iso639 Alpha2 or alpha 3 LanguageCode for the current AlternateName

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

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

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2009. All Rights Reserved.