Package org.mapsforge.poi.storage
Interface PoiCategoryManager
-
- All Known Implementing Classes:
AbstractPoiCategoryManager
public interface PoiCategoryManagerA category manager is a storage forPoiCategorys. It manages the categories' hierarchy in a tree structure. Adding and deleting categories should be done via this interface.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PoiCategorygetPoiCategoryByID(int id)Returns a category given by its ID or throws an exception if this category does not exist.PoiCategorygetPoiCategoryByTitle(java.lang.String title)Returns a category given by unique title or throws an exception if this category does not exist.PoiCategorygetRootCategory()Returns the category tree's root.
-
-
-
Method Detail
-
getPoiCategoryByID
PoiCategory getPoiCategoryByID(int id) throws UnknownPoiCategoryException
Returns a category given by its ID or throws an exception if this category does not exist.- Parameters:
id- The category's ID.- Returns:
- The category having this ID or null.
- Throws:
UnknownPoiCategoryException- if the category has not been added to thePoiCategoryManager.
-
getPoiCategoryByTitle
PoiCategory getPoiCategoryByTitle(java.lang.String title) throws UnknownPoiCategoryException
Returns a category given by unique title or throws an exception if this category does not exist.- Parameters:
title- The category's title- Returns:
- The category c with
c.title.equalsIgnoreCase(title). - Throws:
UnknownPoiCategoryException- if the category has not been added to thePoiCategoryManager.
-
getRootCategory
PoiCategory getRootCategory() throws UnknownPoiCategoryException
Returns the category tree's root.- Returns:
- The tree's root category or null if the tree is empty.
- Throws:
UnknownPoiCategoryException- if the category has not been added to thePoiCategoryManager.
-
-