Class TreeFactory

java.lang.Object
org.eclipse.dawnsci.analysis.tree.TreeFactory

public class TreeFactory extends Object
  • Constructor Details

    • TreeFactory

      public TreeFactory()
  • Method Details

    • createAttribute

      public static Attribute createAttribute(String attrName)
      Create an attribute with name
      Parameters:
      attrName -
    • createAttribute

      public static Attribute createAttribute(String attrName, Object attrValue)
      Create an attribute with name and value
      Parameters:
      attrName -
      attrValue - (usually, this is a Java array)
    • createAttribute

      public static Attribute createAttribute(String attrName, Object attrValue, boolean isUnsigned)
      Create an attribute with name, value and sign
      Parameters:
      attrName -
      attrValue - (usually, this is a Java array)
      isUnsigned - true if items are unsigned but held in signed primitives
    • createNodeLink

      public static NodeLink createNodeLink(String link, Node source, Node destination)
      Create a node link
      Parameters:
      link - name
      source - node which link starts from (can be null)
      destination - node which link points to
      path - to source
    • createSymbolicNode

      public static SymbolicNode createSymbolicNode(byte[] oid, Tree tree, GroupNode groupWithNode, String pathToNode)
      Create a symbolic link with given object ID, from tree, group and node path
      Parameters:
      oid - object ID
      tree -
      groupWithNode - (can be null if path is absolute)
      pathToNode - (ends in separator if group, otherwise a dataset)
    • createSymbolicNode

      public static SymbolicNode createSymbolicNode(byte[] oid, URI uri, GroupNode groupWithNode, String pathToNode)
      Create a symbolic link with given object ID, from URI to tree, group and node path
      Parameters:
      oid - object ID
      uri -
      groupWithNode - (can be null if path is absolute)
      pathToNode - (ends in separator if group, otherwise a dataset)
    • createDataNode

      public static DataNode createDataNode(byte[] oid)
      Create a data node with given object ID
      Parameters:
      oid - object ID
    • createGroupNode

      public static GroupNode createGroupNode(byte[] oid)
      Create a group node with given object ID
      Parameters:
      oid - object ID
    • createTree

      public static Tree createTree(byte[] oid, URI uri)
      Create a tree with given object ID and URI
      Parameters:
      oid - object ID
      uri - (can be null)
    • createTreeFile

      public static TreeFile createTreeFile(byte[] oid, URI uri)
      Create a tree file with given object ID and URI
      Parameters:
      oid - object ID
      uri -
    • createTreeFile

      public static TreeFile createTreeFile(byte[] oid, String fileName)
      Create a tree file with given object ID and file name
      Parameters:
      oid - object ID
      fileName -
    • createSymbolicNode

      public static SymbolicNode createSymbolicNode(long oid, Tree tree, GroupNode groupWithNode, String pathToNode)
      Create a symbolic link with given object ID, from tree, group and node path
      Parameters:
      oid - object ID
      tree -
      groupWithNode - (can be null if path is absolute)
      pathToNode - (ends in separator if group, otherwise a dataset)
    • createSymbolicNode

      public static SymbolicNode createSymbolicNode(long oid, URI uri, GroupNode groupWithNode, String pathToNode)
      Create a symbolic link with given object ID, from URI to tree, group and node path
      Parameters:
      oid - object ID
      uri -
      groupWithNode - (can be null if path is absolute)
      pathToNode - (ends in separator if group, otherwise a dataset)
    • createDataNode

      public static DataNode createDataNode(long oid)
      Create a data node with given object ID
      Parameters:
      oid - object ID
    • createGroupNode

      public static GroupNode createGroupNode(long oid)
      Create a group node with given object ID
      Parameters:
      oid - object ID
    • createTree

      public static Tree createTree(long oid, URI uri)
      Create a tree with given object ID and URI
      Parameters:
      oid - object ID
      uri - (can be null)
    • createTreeFile

      public static TreeFile createTreeFile(long oid, URI uri)
      Create a tree file with given object ID and URI
      Parameters:
      oid - object ID
      uri -
    • createTreeFile

      public static TreeFile createTreeFile(long oid, String fileName)
      Create a tree file with given object ID and file name
      Parameters:
      oid - object ID
      fileName -