Holger's
Java API

com.antelmann.opengeodb
Class GeoLocation

java.lang.Object
  extended by com.antelmann.db.AbstractDBEntry
      extended by com.antelmann.opengeodb.GeoLocation
All Implemented Interfaces:
Category<OpenGeoDB>, DBEntry, GeoEncoded, DetailedString, Serializable, Comparable<GeoLocation>, Iterable<GeoProperty>

public class GeoLocation
extends AbstractDBEntry
implements GeoEncoded, Category<OpenGeoDB>, DetailedString, Iterable<GeoProperty>, Comparable<GeoLocation>

represents a location entry in the OpenGeoDB

Since:
20.12.2014, 20:34:17
Author:
holger
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.antelmann.db.Category
Category.Adapter<T>, Category.Entry
 
Field Summary
 
Fields inherited from interface com.antelmann.db.DBEntry
ENTRY_FLAVOR, ENTRY_LIST_FLAVOR
 
Constructor Summary
GeoLocation(Object id)
           
 
Method Summary
 int compareTo(GeoLocation gl)
           
 String getCategoryName()
          returns the name for this category
 GeoPoint getGeoPoint()
           
 int getLayer()
           
 Stub<GeoLocation> getParent()
           
 GeoLocation getParentCategory()
          returns the super category that this category belongs to - or null if it is a top-level category
 List<GeoProperty> getProperties()
           
 String getSortName()
           
 List<GeoLocation> getSubCategories(OpenGeoDB context)
          retrieves a list of sub-categories for this category
 Iterator<GeoProperty> iterator()
           
 String toDetailedString()
          provides full details of this instance in a String.
 String toString()
           
 
Methods inherited from class com.antelmann.db.AbstractDBEntry
equals, getID, hashCode, hashEntry, sameEntry
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GeoLocation

public GeoLocation(Object id)
Method Detail

getProperties

public List<GeoProperty> getProperties()

iterator

public Iterator<GeoProperty> iterator()
Specified by:
iterator in interface Iterable<GeoProperty>

getGeoPoint

public GeoPoint getGeoPoint()
Specified by:
getGeoPoint in interface GeoEncoded

toDetailedString

public String toDetailedString()
Description copied from interface: DetailedString
provides full details of this instance in a String. In case the String contains multiple lines, it is recommended to use '\n' rather than the platform specific line-break for better compatibility.

Specified by:
toDetailedString in interface DetailedString
Returns:
a (potentially multi-line) String providing full details on this object instance

compareTo

public int compareTo(GeoLocation gl)
Specified by:
compareTo in interface Comparable<GeoLocation>

getSortName

public String getSortName()

getLayer

public int getLayer()

getParent

public Stub<GeoLocation> getParent()

toString

public String toString()
Overrides:
toString in class AbstractDBEntry

getCategoryName

public String getCategoryName()
Description copied from interface: Category
returns the name for this category

Specified by:
getCategoryName in interface Category<OpenGeoDB>

getParentCategory

public GeoLocation getParentCategory()
Description copied from interface: Category
returns the super category that this category belongs to - or null if it is a top-level category

Specified by:
getParentCategory in interface Category<OpenGeoDB>

getSubCategories

public List<GeoLocation> getSubCategories(OpenGeoDB context)
                                   throws IOException
Description copied from interface: Category
retrieves a list of sub-categories for this category

Specified by:
getSubCategories in interface Category<OpenGeoDB>
Parameters:
context - the object (typically a database, a file, a URL, etc.) that provides the information required to derive the children from.
Returns:
a list of Category objects that have this instance as a parent
Throws:
IOException - if the categories could not be retrieved


(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads