Package org.apache.jackrabbit.spi
Interface ItemId
-
- All Known Subinterfaces:
NodeId
,PropertyId
public interface ItemId
AnItemId
identifies an item using a combination of unique ID and path. There are three basic forms of an ItemId. The following table shows each of the allowed combinations where an X in the column indicates that a value is set and a - indicates that the value isnull
:allowed combinations of unique ID and path UniqueID Path Usage X - The item can be identified with a unique ID. In most cases such an item is also mix:referenceable but there is no restriction in that respect. An SPI implementation may also use a unique ID to identify non-referenceable nodes. Whether a node is referenceable is purely governed by its node type or the assigned mixin types. Note, that the format of the ID it is left to the implementation. - X The item can not be identified with a unique ID and none of its ancestors can be identified with a unique ID. The item is identified by an absolute path. X X The item can not be identified with a unique ID but one of its ancestors can. getUniqueID()
returns the unique ID of the nearest ancestor, which can be identified with a unique ID. The relative path provides a navigation path from the above mentioned ancestor to the item identified by theItemId
.Two
ItemId
s should be considered equal if both the unique part and the path part are equal AND if they denote the sametype
ofItemId
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
denotesNode()
Path
getPath()
String
getUniqueID()
-
-
-
Method Detail
-
denotesNode
boolean denotesNode()
- Returns:
true
if thisItemId
identifies a node; otherwisefalse
.
-
getUniqueID
String getUniqueID()
- Returns:
- the uniqueID part of this item id or
null
if the identified item nor any of its ancestors can be identified with a uniqueID.
-
getPath
Path getPath()
- Returns:
- the path part of this item id. Returns
null
if this item can be identified solely with a uniqueID.
-
-