Package org.mapsforge.poi.storage
Interface PoiCategoryManager
- All Known Implementing Classes:
AbstractPoiCategoryManager
public interface PoiCategoryManager
A category manager is a storage for
PoiCategorys. It manages the categories' hierarchy in
a tree structure. Adding and deleting categories should be done via this interface.-
Method Summary
Modifier and TypeMethodDescriptiongetPoiCategoryByID(int id) Returns a category given by its ID or throws an exception if this category does not exist.getPoiCategoryByTitle(String title) Returns a category given by unique title or throws an exception if this category does not exist.Returns the category tree's root.
-
Method Details
-
getPoiCategoryByID
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
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
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.
-