citysdk.tourism.client.poi.single
Class Category

java.lang.Object
  extended by citysdk.tourism.client.poi.base.POIBaseType
      extended by citysdk.tourism.client.poi.base.POIType
          extended by citysdk.tourism.client.poi.single.POI
              extended by citysdk.tourism.client.poi.single.Category
All Implemented Interfaces:
Deserializable

public class Category
extends POI

Representation of a Category object.

A Category is used to characterize PointOfInterest, Event or Route. It can contain its own set of sub-categories.

Author:
Pedro Cruz

Constructor Summary
Category()
           
 
Method Summary
 void addCategory(Category category)
          Adds a Category to this Category.
 Category getCategory(int i)
          Gets the category at a given index
 int getNumCategories()
          Gets the number of sub categories in the Category.
 java.util.List<Category> getSubCategories()
          Gets all the sub categories of the Category.
 boolean hasSubCategories()
          Checks whether this Category has sub-categories.
 
Methods inherited from class citysdk.tourism.client.poi.single.POI
getLocation, hasAddress, setLocation
 
Methods inherited from class citysdk.tourism.client.poi.base.POIType
addCategory, addDescription, addLabel, addLink, addTime, getCategory, getDescription, getLabel, getLink, getTime, hasCategories, hasDescriptions, hasLabels, hasLinks, hasTimes
 
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

Category

public Category()
Method Detail

getSubCategories

public java.util.List<Category> getSubCategories()
Gets all the sub categories of the Category.

Returns:
a list of Category.

addCategory

public void addCategory(Category category)
Adds a Category to this Category.

Parameters:
category - Category to be added.

getCategory

public Category getCategory(int i)
Gets the category at a given index

Parameters:
i - an index
Returns:
the category at index i

getNumCategories

public int getNumCategories()
Gets the number of sub categories in the Category.

Returns:
the total number of sub-categories.

hasSubCategories

public boolean hasSubCategories()
Checks whether this Category has sub-categories.

Returns:
true if it has sub-categories, false otherwise