Interface MCRCategory
- All Known Implementing Classes:
MCRAbstractCategoryImpl
,MCRCategoryImpl
,MCRJSONCategory
public interface MCRCategory
- Since:
- 2.0
- Version:
- $Revision$ $Date$
- Author:
- Thomas Scheffler (yagee)
-
Method Summary
Modifier and TypeMethodDescriptionReturns a list of subcategories.getId()
int
getLevel()
Returns the hierarchie level of this category.Returns the parent elementgetRoot()
Returns root category (the classification).getURI()
Returns the URI associated with this category.boolean
Tells if this category has subcategories.boolean
boolean
void
setId
(MCRCategoryID id) void
-
Method Details
-
isClassification
boolean isClassification()- Returns:
- true if this is a root category
-
isCategory
boolean isCategory()- Returns:
- true if this is not a root category
- See Also:
-
hasChildren
boolean hasChildren()Tells if this category has subcategories.- Returns:
- true if this category has subcategories
- See Also:
-
getChildren
List<MCRCategory> getChildren()Returns a list of subcategories. Implementors must never returnnull
if no children are present. As this method may need a new call the underlaying persistence layer use hasChildren() if you just want to know if subcategories are present. Changes to the list may not affect the underlaying persistence layer.- Returns:
- subcategories
- See Also:
-
getId
MCRCategoryID getId()- Returns:
- the id
-
setId
- Parameters:
id
- the id to set
-
getLabels
- Returns:
- the labels
-
getCurrentLabel
- Returns:
- the label in the current language (if available), default language (if available), any language in MCR.Metadata.Languages(if available), any other language that does not start with x- or any other language
-
getLabel
- Returns:
- the label in the specified language (if available) or null
-
getLevel
int getLevel()Returns the hierarchie level of this category.- Returns:
- 0 if this is the root category
-
getRoot
MCRCategory getRoot()Returns root category (the classification).- Returns:
- the root category
-
getParent
MCRCategory getParent()Returns the parent element- Returns:
- the categories parent or null if isClassification()==true or category currently not attached
-
getURI
URI getURI()Returns the URI associated with this category.- Returns:
- the URI
-
setURI
- Parameters:
uri
- the URI to set
-