org.apache.jackrabbit.core
Class AbstractNodeData

java.lang.Object
  extended by org.apache.jackrabbit.core.ItemData
      extended by org.apache.jackrabbit.core.AbstractNodeData

public abstract class AbstractNodeData
extends ItemData

Data object representing a node.


Constructor Summary
protected AbstractNodeData(ItemId id)
          Create a new instance of this class.
protected AbstractNodeData(NodeState state, NodeDefinition definition)
          Create a new instance of this class.
 
Method Summary
 NodeDefinition getNodeDefinition()
          Return the associated node defintion.
 NodeState getNodeState()
          Return the associated node state.
 NodeId getParentId()
          Return the parent id of this node.
 NodeId getPrimaryParentId()
          Return the primary parent id of this node.
 boolean isNode()
          Return a flag indicating whether item is a node.
 void setNodeDefinition(NodeDefinition definition)
          Sets the associated node defintion.
protected  void setPrimaryParentId(NodeId primaryParentId)
          Set the primary parent id of this node.
 
Methods inherited from class org.apache.jackrabbit.core.ItemData
getDefinition, getId, getState, getStatus, setDefinition, setState, setStatus, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractNodeData

protected AbstractNodeData(NodeState state,
                           NodeDefinition definition)
Create a new instance of this class.

Parameters:
state - node state
definition - node definition

AbstractNodeData

protected AbstractNodeData(ItemId id)
Create a new instance of this class.

Parameters:
id - item id
Method Detail

getNodeState

public NodeState getNodeState()
Return the associated node state.

Returns:
node state

getNodeDefinition

public NodeDefinition getNodeDefinition()
Return the associated node defintion.

Returns:
node definition

setNodeDefinition

public void setNodeDefinition(NodeDefinition definition)
Sets the associated node defintion.

Parameters:
definition - new node definition

getParentId

public NodeId getParentId()
Return the parent id of this node. Every shareable node in a shared set has a different parent.

Overrides:
getParentId in class ItemData
Returns:
parent id

getPrimaryParentId

public NodeId getPrimaryParentId()
Return the primary parent id of this node. Every shareable node in a shared set has a different primary parent. Returns null for nodes that are not shareable.

Returns:
primary parent id or null

setPrimaryParentId

protected void setPrimaryParentId(NodeId primaryParentId)
Set the primary parent id of this node.

Parameters:
primaryParentId - primary parent id

isNode

public boolean isNode()
Return a flag indicating whether item is a node.

Overrides:
isNode in class ItemData
Returns:
true if this item is a node; false otherwise.


Copyright © 2004-2009 The Apache Software Foundation. All Rights Reserved.