Class NodeRef

    • Constructor Detail

      • NodeRef

        public NodeRef​(StoreRef storeRef,
                       String id)
        Construct a Node Reference from a Store Reference and Node Id
        Parameters:
        storeRef - store reference
        id - the manually assigned identifier of the node
      • NodeRef

        public NodeRef​(String nodeRef)
        Construct a Node Reference from a string representation of a Node Reference.

        The string representation of a Node Reference is as follows:

        /
        Parameters:
        nodeRef - the string representation of a node ref
    • Method Detail

      • hashCode

        public int hashCode()
        Hashes on ID alone. As the number of copies of a particular node will be minimal, this is acceptable
        Overrides:
        hashCode in class Object
      • getStoreRef

        public final StoreRef getStoreRef()
        Returns:
        The StoreRef part of this reference
      • getId

        public final String getId()
        Returns:
        The Node Id part of this reference
      • isNodeRef

        public static boolean isNodeRef​(String nodeRef)
        Determine if passed string conforms to the pattern of a node reference
        Parameters:
        nodeRef - the node reference as a string
        Returns:
        true => it matches the pattern of a node reference
      • getNodeRefs

        public static List<NodeRef> getNodeRefs​(String values,
                                                org.apache.commons.logging.Log logger)
        Converts a String containing a comma-separated list of NodeRef Ids into NodeRefs. If a logger is supplied then invalid ids are logged as warnings.
        Parameters:
        values - the String of NodeRef ids.
        logger - Log
        Returns:
        A List of NodeRefs.