org.mycore.datamodel.classifications2.impl
Class MCRCategoryImpl
java.lang.Object
org.mycore.datamodel.classifications2.impl.MCRAbstractCategoryImpl
org.mycore.datamodel.classifications2.impl.MCRCategoryImpl
- All Implemented Interfaces:
- Serializable, MCRCategory
public class MCRCategoryImpl
- extends MCRAbstractCategoryImpl
- implements Serializable
- Since:
- 2.0
- Version:
- $Revision: 15496 $ $Date: 2009-07-10 16:28:14 +0200 (Fri, 10 Jul 2009) $
- Author:
- Thomas Scheffler (yagee)
- See Also:
- Serialized Form
|
Field Summary |
(package private) int |
level
|
| Methods inherited from class org.mycore.datamodel.classifications2.impl.MCRAbstractCategoryImpl |
detachFromParent, getChildren, getCurrentLabel, getId, getLabel, getLabels, getParent, getRoot, getURI, isCategory, isClassification, setId, setParent, setURI |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
level
int level
MCRCategoryImpl
public MCRCategoryImpl()
getLeft
public int getLeft()
- Returns:
- the left
getLevel
public int getLevel()
- Description copied from interface:
MCRCategory
- Returns the hierarchie level of this category.
- Specified by:
getLevel in interface MCRCategory
- Returns:
- 0 if this is the root category
hasChildren
public boolean hasChildren()
- Description copied from interface:
MCRCategory
- Tells if this category has subcategories.
- Specified by:
hasChildren in interface MCRCategory- Overrides:
hasChildren in class MCRAbstractCategoryImpl
- Returns:
- true if this category has subcategories
- See Also:
MCRCategory.getChildren()
getPositionInParent
public int getPositionInParent()
- Returns:
- the positionInParent
getRight
public int getRight()
- Returns:
- the right
setChildren
public void setChildren(List<MCRCategory> children)
- Specified by:
setChildren in class MCRAbstractCategoryImpl
- Parameters:
children - the children to set
setLabels
public void setLabels(Collection<MCRLabel> labels)
- Parameters:
labels - the labels to set
setLeft
public void setLeft(int left)
- Parameters:
left - the left to set
setLevel
public void setLevel(int level)
setPositionInParent
public void setPositionInParent(int positionInParent)
- Parameters:
positionInParent - the positionInParent to set
setRight
public void setRight(int right)
- Parameters:
right - the right to set
setRoot
public void setRoot(MCRCategory root)
wrapCategories
static Collection<MCRCategoryImpl> wrapCategories(Collection<? extends MCRCategory> categories,
MCRCategory parent,
MCRCategory root)
wrapCategory
static MCRCategoryImpl wrapCategory(MCRCategory category,
MCRCategory parent,
MCRCategory root)
getLeftSiblingOrOfAncestor
MCRCategoryImpl getLeftSiblingOrOfAncestor()
getLeftSiblingOrParent
MCRCategoryImpl getLeftSiblingOrParent()
getRightSiblingOrOfAncestor
MCRCategoryImpl getRightSiblingOrOfAncestor()
getRightSiblingOrParent
MCRCategoryImpl getRightSiblingOrParent()
calculateLeftRightAndLevel
int calculateLeftRightAndLevel(int leftStart,
int levelStart)
- calculates left and right value throug the subtree rooted at
co.
- Parameters:
leftStart - this.left will be set to this valuelevelStart - this.getLevel() will return this value
- Returns:
- this.right
getInternalID
public int getInternalID()
- Returns:
- the internalID
setInternalID
public void setInternalID(int internalID)
- Parameters:
internalID - the internalID to set
setRootID
public void setRootID(String rootID)
setCategID
public void setCategID(String categID)
getRootID
public String getRootID()
getCategID
public String getCategID()