|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The HierarchyManager
interface ...
Method Summary | |
int |
getDepth(ItemId id)
Returns the depth of the specified item which is equivalent to getPath(id).getAncestorCount() . |
QName |
getName(ItemId id)
Returns the name of the specified item. |
Path |
getPath(ItemId id)
Returns the path to the given item. |
int |
getRelativeDepth(NodeId ancestorId,
ItemId descendantId)
Returns the depth of the specified descendant relative to the given ancestor. |
boolean |
isAncestor(NodeId nodeId,
ItemId itemId)
Determines whether the node with the specified nodeId
is an ancestor of the item denoted by the given itemId . |
ItemId |
resolvePath(Path path)
Resolves a path into an item id. |
Method Detail |
public ItemId resolvePath(Path path) throws PathNotFoundException, RepositoryException
path
-
PathNotFoundException
RepositoryException
public Path getPath(ItemId id) throws ItemNotFoundException, RepositoryException
id
-
ItemNotFoundException
RepositoryException
public QName getName(ItemId id) throws ItemNotFoundException, RepositoryException
id
- id of item whose name should be returned
ItemNotFoundException
RepositoryException
public int getDepth(ItemId id) throws ItemNotFoundException, RepositoryException
getPath(id).getAncestorCount()
. The depth reflects the
absolute hierarchy level.
id
- item id
ItemNotFoundException
- if the specified id
does not
denote an existing item.
RepositoryException
- if another error occurspublic int getRelativeDepth(NodeId ancestorId, ItemId descendantId) throws ItemNotFoundException, RepositoryException
ancestorId
and descendantId
denote the same item 0 is returned. If ancestorId
does not
denote an ancestor -1 is returned.
ancestorId
- ancestor iddescendantId
- descendant id
ancestorId
does not
denote an ancestor of the item denoted by descendantId
(or itself).
ItemNotFoundException
- if either of the specified id's does not
denote an existing item.
RepositoryException
- if another error occurspublic boolean isAncestor(NodeId nodeId, ItemId itemId) throws ItemNotFoundException, RepositoryException
nodeId
is an ancestor of the item denoted by the given itemId
.
This is equivalent to
getPath(nodeId).isAncestorOf(getPath(itemId))
.
nodeId
- node iditemId
- item id
true
if the node with the specified
nodeId
is an ancestor of the item denoted by the
given itemId
false otherwise
ItemNotFoundException
- if any of the specified id's does not
denote an existing item.
RepositoryException
- if another error occurs
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |