OUT_OF_BOUNDS| Constructor and Description |
|---|
LazyAncestryGeoName(GeoName geoName,
Integer parentId)
Creates a LazyAncestryGeoName whose ancestry must be manually loaded.
|
LazyAncestryGeoName(GeoName geoName,
Integer parentId,
Gazetteer gazetteer)
Creates a LazyAncestryGeoName that lazily loads the ancestry of the wrapped
GeoName when its parent is first requested.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
String |
getAdmin1Code()
Get the code for the first level administrative division (e.g.
|
String |
getAdmin2Code()
Get the code for the second level administrative division (e.g.
|
String |
getAdmin3Code()
Get the code for the third level administrative division.
|
String |
getAdmin4Code()
Get the code for the fourth level administrative division.
|
List<CountryCode> |
getAlternateCountryCodes()
Get the alternate ISO-3166 2-letter country codes.
|
List<String> |
getAlternateNames()
Get the alternate names for the location.
|
String |
getAncestryKey()
Get the ancestry key that can be used to identify this administrative division.
|
String |
getAsciiName()
Get the name of the geographical point in plain ascii characters.
|
int |
getDigitalElevationModel()
Get the digital elevation model, srtm3 or gtopo30, average
elevation of 3''x3'' (ca 90mx90m) or 30''x30'' (ca 900mx900m)
area in meters, integer.
|
int |
getElevation()
Get the elevation in meters.
|
FeatureClass |
getFeatureClass()
Get the major feature category.
|
FeatureCode |
getFeatureCode()
Get the feature code.
|
String |
getGazetteerRecord()
Get the gazetteer record for this GeoName.
|
String |
getGazetteerRecordWithAncestry()
Get the gazetteer records for this GeoName and its ancestors, separated
by newline characters.
|
int |
getGeonameID()
Get the ID of the record in geonames database.
|
double |
getLatitude()
Get the latitude in decimal degrees.
|
double |
getLongitude()
Get the longitude in decimal degrees.
|
Date |
getModificationDate()
Get the last modification date in the GeoNames database.
|
String |
getName()
Get the name of the geographical point (UTF-8).
|
GeoName |
getParent()
Get the parent of this GeoName.
|
String |
getParentAncestryKey()
Get the ancestry key that can be used to identify the direct administrative
parent of this GeoName.
|
Integer |
getParentId()
Get the ID of the parent of this GeoName.
|
long |
getPopulation()
Get the total number of inhabitants.
|
String |
getPreferredName()
Gets the preferred name of this GeoName, if configured,
otherwise returns the name.
|
CountryCode |
getPrimaryCountryCode()
Get the primary ISO-3166 2-letter country code.
|
String |
getPrimaryCountryName()
Get the name of the country associated with the primary country code.
|
TimeZone |
getTimezone()
Get the time zone for the geographical point.
|
int |
hashCode() |
boolean |
isAncestorOf(GeoName geoname)
Is this GeoName an ancestor of the provided GeoName?
|
boolean |
isAncestryResolved()
Check to see if the ancestry hierarchy has been completely resolved for this GeoName.
|
boolean |
isDescendantOf(GeoName geoname)
Is this GeoName a descendant of the provided GeoName?
|
boolean |
isTopLevelAdminDivision()
Is this GeoName a top-level administrative division (e.g.
|
boolean |
isTopLevelTerritory()
Is this GeoName a top-level territory? A GeoName is considered to be a
top-level territory if it is an A:TERR record and the name assigned to
its primary country code is either the name of the GeoName or one of its
configured alternate names.
|
boolean |
setParent(GeoName prnt)
Set the parent of this GeoName.
|
public LazyAncestryGeoName(GeoName geoName, Integer parentId)
geoName - the GeoName to wrapparentId - the ID of the parent of this GeoNamepublic LazyAncestryGeoName(GeoName geoName, Integer parentId, Gazetteer gazetteer)
geoName - the GeoName to wrapparentId - the ID of the parent of this GeoNamegazetteer - the Gazetteer used for ancestry resolution; if null, ancestry must be loaded manuallypublic Integer getParentId()
GeoNamegetParentId in interface GeoNamepublic GeoName getParent()
GeoNamepublic boolean setParent(GeoName prnt)
GeoNamepublic String getPrimaryCountryName()
GeoNamegetPrimaryCountryName in interface GeoNamepublic String getParentAncestryKey()
GeoNameGeoName.getAncestryKey() for a description
of an ancestry key.
For example, the GeoName "Reston, VA" is found in
the hierarchy:
GeoName.getAncestryKey() for the GeoName "Fairfax County."getParentAncestryKey in interface GeoNamenull for top-level elements such as countriespublic String getAncestryKey()
GeoNamenull for all feature types except the following
FeatureClass.A records:
FeatureCode.PCL)FeatureCode.ADM1)FeatureCode.ADM2)FeatureCode.ADM3)FeatureCode.ADM4)null)getAncestryKey in interface GeoNamenull if this
GeoName is not an administrative division or its ancestry key cannot be derived.public boolean isTopLevelAdminDivision()
GeoNameisTopLevelAdminDivision in interface GeoNametrue if this is a top-level administrative divisionpublic boolean isTopLevelTerritory()
GeoNameisTopLevelTerritory in interface GeoNametrue if the GeoName is a top level territorypublic boolean isDescendantOf(GeoName geoname)
GeoNameisDescendantOf in interface GeoNamegeoname - the GeoName to testtrue if the provided GeoName is hierarchically an ancestor of this GeoNamepublic boolean isAncestorOf(GeoName geoname)
GeoNameisAncestorOf in interface GeoNamegeoname - the GeoName to testtrue if this GeoName is hierarchically an ancestor of the provided GeoNamepublic boolean isAncestryResolved()
GeoNameisAncestryResolved in interface GeoNametrue if all administrative parents have been resolvedpublic int getGeonameID()
GeoNamegetGeonameID in interface GeoNamepublic String getName()
GeoNamepublic String getAsciiName()
GeoNamegetAsciiName in interface GeoNamepublic List<String> getAlternateNames()
GeoNamegetAlternateNames in interface GeoNamepublic String getPreferredName()
GeoNamegetPreferredName in interface GeoNamepublic double getLatitude()
GeoNamegetLatitude in interface GeoNamepublic double getLongitude()
GeoNamegetLongitude in interface GeoNamepublic FeatureClass getFeatureClass()
GeoNamegetFeatureClass in interface GeoNamepublic FeatureCode getFeatureCode()
GeoNamegetFeatureCode in interface GeoNamepublic CountryCode getPrimaryCountryCode()
GeoNamegetPrimaryCountryCode in interface GeoNamepublic List<CountryCode> getAlternateCountryCodes()
GeoNamegetAlternateCountryCodes in interface GeoNamepublic String getAdmin1Code()
GeoNamegetAdmin1Code in interface GeoNamepublic String getAdmin2Code()
GeoNamegetAdmin2Code in interface GeoNamepublic String getAdmin3Code()
GeoNamegetAdmin3Code in interface GeoNamepublic String getAdmin4Code()
GeoNamegetAdmin4Code in interface GeoNamepublic long getPopulation()
GeoNamegetPopulation in interface GeoNamepublic int getElevation()
GeoNamegetElevation in interface GeoNamepublic int getDigitalElevationModel()
GeoNamegetDigitalElevationModel in interface GeoNamepublic TimeZone getTimezone()
GeoNamegetTimezone in interface GeoNamenullpublic Date getModificationDate()
GeoNamegetModificationDate in interface GeoNamenullpublic String getGazetteerRecord()
GeoNamegetGazetteerRecord in interface GeoNamepublic String getGazetteerRecordWithAncestry()
GeoNamegetGazetteerRecordWithAncestry in interface GeoNameCopyright © 2012–2016 Berico Technologies. All rights reserved.