|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface HierarchyManager
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 |
|---|
ItemId resolvePath(Path path)
throws RepositoryException
null
rather than throwing a PathNotFoundException if there's no
item to be found at path.
path - path to resolve
path or null
if there's no item at path.
RepositoryException - if an error occurs
Path getPath(ItemId id)
throws ItemNotFoundException,
RepositoryException
id -
ItemNotFoundException
RepositoryException
QName getName(ItemId id)
throws ItemNotFoundException,
RepositoryException
id - id of item whose name should be returned
ItemNotFoundException
RepositoryException
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 occurs
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 occurs
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 itemIdfalse 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 | |||||||||