Class AbstractNodeData


  • public abstract class AbstractNodeData
    extends ItemData
    Data object representing a node.
    • Constructor Detail

      • AbstractNodeData

        protected AbstractNodeData​(NodeState state,
                                   ItemManager itemMgr)
        Create a new instance of this class.
        Parameters:
        state - node state
        itemMgr - item manager
      • 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
      • setNodeDefinition

        public void setNodeDefinition​(NodeDefinition definition)
        Sets the associated node definition.
        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.