citysdk.tourism.client.poi.base
Class Location

java.lang.Object
  extended by citysdk.tourism.client.poi.base.POIBaseType
      extended by citysdk.tourism.client.poi.base.Location

public class Location
extends POIBaseType

Representation of the Location class of the UML diagram found in: http://www.w3.org/2010/POI/documents/Core/core-20111216.html#poi-data-model.

A Location is composed of:

Author:
Pedro Cruz

Constructor Summary
Location()
          Initializes an empty Location, with no geometries or addresses.
 
Method Summary
 void addLine(Line line)
          Adds a Line to the Location.
 void addPoint(Point point)
          Adds a Point to the Location.
 void addPolygon(Polygon polygon)
          Adds a Polygon to the Location.
 void addRelationship(Relationship relationship)
          Adds a Relationship to the Location.
 POIBaseType getAddress()
          Gets the address of the Location.
 java.util.List<Line> getLine()
          Gets all lines of the Location.
 java.util.List<Point> getPoint()
          Gets all points of the Location.
 java.util.List<Polygon> getPolygon()
          Gets all the polygons of the Location.
 java.util.List<Relationship> getRelationship()
          Gets all the relationships of the Location.
 boolean hasLines()
          Checks if the Location has any lines.
 boolean hasPoints()
          Checks if the Location has any points.
 boolean hasPolygons()
          Checks if the Location has any polygons.
 boolean hasRelationships()
          Checks if the Location has any relationships.
 void setAddress(POIBaseType address)
          Sets the address of the Location.
 
Methods inherited from class citysdk.tourism.client.poi.base.POIBaseType
getAuthor, getBase, getCreated, getDeleted, getHref, getId, getLang, getLicense, getType, getUpdated, getValue, setAuthor, setBase, setCreated, setDeleted, setHref, setId, setLang, setLicense, setType, setUpdated, setValue
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Location

public Location()
Initializes an empty Location, with no geometries or addresses.

Method Detail

addPoint

public void addPoint(Point point)
Adds a Point to the Location.

Parameters:
point - the Point to be added.

addLine

public void addLine(Line line)
Adds a Line to the Location.

Parameters:
line - the Line to be added.

addPolygon

public void addPolygon(Polygon polygon)
Adds a Polygon to the Location.

Parameters:
polygon - the Polygon to be added.

addRelationship

public void addRelationship(Relationship relationship)
Adds a Relationship to the Location.

Parameters:
relationship - the Relationship to be added.

getPoint

public java.util.List<Point> getPoint()
Gets all points of the Location.

Returns:
a list of Point of the Location.

getLine

public java.util.List<Line> getLine()
Gets all lines of the Location.

Returns:
a list of Line of the Location.

getPolygon

public java.util.List<Polygon> getPolygon()
Gets all the polygons of the Location.

Returns:
a list of Polygon of the Location.

getRelationship

public java.util.List<Relationship> getRelationship()
Gets all the relationships of the Location.

Returns:
a list of Relationship of the Location.

getAddress

public POIBaseType getAddress()
Gets the address of the Location.

Returns:
the address of the Location.

setAddress

public void setAddress(POIBaseType address)
Sets the address of the Location.

Parameters:
address - the new address for the Location.

hasPoints

public boolean hasPoints()
Checks if the Location has any points.

Returns:
true if there are points in the Location, false otherwise.

hasLines

public boolean hasLines()
Checks if the Location has any lines.

Returns:
true if there are lines in the Location, false otherwise

hasPolygons

public boolean hasPolygons()
Checks if the Location has any polygons.

Returns:
true if there are polygons in the Location, false otherwise

hasRelationships

public boolean hasRelationships()
Checks if the Location has any relationships.

Returns:
true if there are relationships in the Location, false otherwise