Interface INode

  • All Superinterfaces:
    INodeState, IPathElement
    All Known Implementing Classes:
    Node, TransientNode

    public interface INode
    extends INodeState, IPathElement
    Interface that all Nodes implement. Currently, there are two implementations: Transient nodes which only exist in memory, and persistent Nodes, which are stored in a database (either the internal Object DB or an external relational DB).
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      INode addNode​(INode node)
      Add a child node to this node.
      INode addNode​(INode node, int where)
      Add a child node to this node at the given position
      void clearCacheNode()
      Clear the cache node associated with this node.
      int contains​(INode node)
      Returns the position of the child or -1.
      long created()
      Get the node's creation timestamp.
      INode createNode​(java.lang.String name)
      Create a new named property with a node value
      INode createNode​(java.lang.String name, int where)
      Create a new unnamed child node at the given position.
      IProperty get​(java.lang.String name)
      Get a property with the given name.
      boolean getBoolean​(java.lang.String name)
      Get a boolean property with the given name.
      INode getCacheNode()
      Get the cache node associated with this node.
      java.util.Date getDate​(java.lang.String name)
      Get a date property with the given name.
      DbMapping getDbMapping()
      Get the node's DbMapping.
      double getFloat​(java.lang.String name)
      Get a float property with the given name.
      java.lang.String getID()
      Get the node's ID.
      long getInteger​(java.lang.String name)
      Get an integer property with the given name.
      java.lang.Object getJavaObject​(java.lang.String name)
      Get a Java object property with the given name.
      java.lang.String getName()
      Get the node's name.
      INode getNode​(java.lang.String name)
      Get a node property with the given name.
      INode getParent()
      Get the node's parent node.
      java.lang.String getPath()
      Get the node's path.
      java.lang.String getPrototype()
      Return the node's prototype name.
      int getState()
      Get the node's state flag.
      java.lang.String getString​(java.lang.String name)
      Get a string property with the given name.
      INode getSubnode​(java.lang.String name)
      Get a named child node with the given name or id.
      INode getSubnodeAt​(int index)
      GEt an unnamed child node at the given position
      java.lang.String getSubnodeRelation()
      Get the node's explicit subnode select clause if one was set, or null
      java.util.Enumeration getSubnodes()
      Get an enumeration of this node's unnamed child nodes
      boolean isAnonymous()
      Returns true if this node is an unnamed node.
      long lastModified()
      Get the node's last modification timestamp.
      int numberOfNodes()
      Get the number the node's direct child nodes.
      java.util.Enumeration properties()
      Get an enumeration over the node's properties.
      boolean remove()
      Remove this node from the database.
      void removeNode​(INode node)
      Remove the given node from this node's child nodes.
      void setBoolean​(java.lang.String name, boolean value)
      Set the property with the given name to the given boolean value.
      void setDate​(java.lang.String name, java.util.Date value)
      Set the property with the given name to the given date value.
      void setDbMapping​(DbMapping dbmap)
      Set the node's DbMapping.
      void setFloat​(java.lang.String name, double value)
      Set the property with the given name to the given float value.
      void setInteger​(java.lang.String name, long value)
      Set the property with the given name to the given integer value.
      void setJavaObject​(java.lang.String name, java.lang.Object value)
      Set the property with the given name to the given Java object value.
      void setName​(java.lang.String name)
      Set the node's name.
      void setNode​(java.lang.String name, INode value)
      Set the property with the given name to the given node value.
      void setPrototype​(java.lang.String prototype)
      Set the node's prototype name.
      void setState​(int s)
      Set the node's state flag.
      void setString​(java.lang.String name, java.lang.String value)
      Set the property with the given name to the given string value.
      void setSubnodeRelation​(java.lang.String clause)
      Set an explicit select clause for the node's subnodes
      void unset​(java.lang.String name)
      Unset the property with the given name..
    • Method Detail

      • getID

        java.lang.String getID()
        Get the node's ID.
      • getName

        java.lang.String getName()
        Get the node's name.
      • getState

        int getState()
        Get the node's state flag.
        Returns:
        one of the constants defined in the INodeState interface.
      • setState

        void setState​(int s)
        Set the node's state flag.
        Parameters:
        s - one of the constants defined in the INodeState interface.
      • setName

        void setName​(java.lang.String name)
        Set the node's name.
      • lastModified

        long lastModified()
        Get the node's last modification timestamp.
      • created

        long created()
        Get the node's creation timestamp.
      • isAnonymous

        boolean isAnonymous()
        Returns true if this node is an unnamed node.
      • getPrototype

        java.lang.String getPrototype()
        Return the node's prototype name.
        Specified by:
        getPrototype in interface IPathElement
      • setPrototype

        void setPrototype​(java.lang.String prototype)
        Set the node's prototype name.
      • getCacheNode

        INode getCacheNode()
        Get the cache node associated with this node.
      • clearCacheNode

        void clearCacheNode()
        Clear the cache node associated with this node.
      • getPath

        java.lang.String getPath()
        Get the node's path.
      • getParent

        INode getParent()
        Get the node's parent node.
      • setSubnodeRelation

        void setSubnodeRelation​(java.lang.String clause)
        Set an explicit select clause for the node's subnodes
      • getSubnodeRelation

        java.lang.String getSubnodeRelation()
        Get the node's explicit subnode select clause if one was set, or null
      • numberOfNodes

        int numberOfNodes()
        Get the number the node's direct child nodes.
      • addNode

        INode addNode​(INode node)
        Add a child node to this node.
      • addNode

        INode addNode​(INode node,
                      int where)
        Add a child node to this node at the given position
      • createNode

        INode createNode​(java.lang.String name)
        Create a new named property with a node value
      • createNode

        INode createNode​(java.lang.String name,
                         int where)
        Create a new unnamed child node at the given position.
      • getSubnodes

        java.util.Enumeration getSubnodes()
        Get an enumeration of this node's unnamed child nodes
      • getSubnode

        INode getSubnode​(java.lang.String name)
        Get a named child node with the given name or id.
      • getSubnodeAt

        INode getSubnodeAt​(int index)
        GEt an unnamed child node at the given position
      • contains

        int contains​(INode node)
        Returns the position of the child or -1.
      • remove

        boolean remove()
        Remove this node from the database.
      • removeNode

        void removeNode​(INode node)
        Remove the given node from this node's child nodes.
      • properties

        java.util.Enumeration properties()
        Get an enumeration over the node's properties.
      • get

        IProperty get​(java.lang.String name)
        Get a property with the given name.
      • getString

        java.lang.String getString​(java.lang.String name)
        Get a string property with the given name.
      • getBoolean

        boolean getBoolean​(java.lang.String name)
        Get a boolean property with the given name.
      • getDate

        java.util.Date getDate​(java.lang.String name)
        Get a date property with the given name.
      • getInteger

        long getInteger​(java.lang.String name)
        Get an integer property with the given name.
      • getFloat

        double getFloat​(java.lang.String name)
        Get a float property with the given name.
      • getNode

        INode getNode​(java.lang.String name)
        Get a node property with the given name.
      • getJavaObject

        java.lang.Object getJavaObject​(java.lang.String name)
        Get a Java object property with the given name.
      • setString

        void setString​(java.lang.String name,
                       java.lang.String value)
        Set the property with the given name to the given string value.
      • setBoolean

        void setBoolean​(java.lang.String name,
                        boolean value)
        Set the property with the given name to the given boolean value.
      • setDate

        void setDate​(java.lang.String name,
                     java.util.Date value)
        Set the property with the given name to the given date value.
      • setInteger

        void setInteger​(java.lang.String name,
                        long value)
        Set the property with the given name to the given integer value.
      • setFloat

        void setFloat​(java.lang.String name,
                      double value)
        Set the property with the given name to the given float value.
      • setNode

        void setNode​(java.lang.String name,
                     INode value)
        Set the property with the given name to the given node value.
      • setJavaObject

        void setJavaObject​(java.lang.String name,
                           java.lang.Object value)
        Set the property with the given name to the given Java object value.
      • unset

        void unset​(java.lang.String name)
        Unset the property with the given name..