All Downloads are FREE. Search and download functionalities are using the official Maven repository.

generated.docs.javadoc.org.eclipse.dawnsci.analysis.api.tree.TreeUtils.html Maven / Gradle / Ivy






TreeUtils (h5jan API)












org.eclipse.dawnsci.analysis.api.tree

Class TreeUtils

  • java.lang.Object
    • org.eclipse.dawnsci.analysis.api.tree.TreeUtils


  • public class TreeUtils
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor and Description
      TreeUtils() 
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      static Node getNode(Tree tree, java.lang.String path)
      Returns the node at the given path in the tree, or null if there is no such node.
      static java.lang.String getPath(Tree tree, Node node)
      Get the path which ends with if it refers to a group
      int getShortestUniqueSeparatorCrop(java.util.Set<java.lang.String> names) 
      static java.util.Map<DataNode,java.lang.String> getUniqueDataNodes(GroupNode node)
      Get a map of all the unique data nodes in a tree Map keys are the data nodes, map values are the shortest path to each node
      static void recursivelyLoadDataNodes(GroupNode node)
      Iterate though a tree and convert ILazyDatasets in DataNodes to IDatasets, allowing the tree to be written into a file.
      static java.util.Map<java.lang.String,NodeLink> treeBreadthFirstSearch(GroupNode file, IFindInTree finder, boolean findFirst, boolean maintainOrder, IMonitor mon)
      Breadth first search of nexus tree using visitor to determine whether a node link matches those searched for
      static java.util.Map<java.lang.String,NodeLink> treeBreadthFirstSearch(GroupNode file, IFindInTree finder, boolean findFirst, IMonitor mon)
      Breadth first search of nexus tree using visitor to determine whether a node link matches those searched for
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TreeUtils

        public TreeUtils()
    • Method Detail

      • getPath

        public static java.lang.String getPath(Tree tree,
                                               Node node)
        Get the path which ends with if it refers to a group
        Parameters:
        tree -
        node -
        Returns:
        path to node, return null if not found
      • getNode

        public static Node getNode(Tree tree,
                                   java.lang.String path)
        Returns the node at the given path in the tree, or null if there is no such node. The path given must be an absolute path, i.e. start with '/'.
        Parameters:
        tree - tree
        path - path
        Returns:
        node, or null
      • treeBreadthFirstSearch

        public static java.util.Map<java.lang.String,NodeLink> treeBreadthFirstSearch(GroupNode file,
                                                                                      IFindInTree finder,
                                                                                      boolean findFirst,
                                                                                      IMonitor mon)
        Breadth first search of nexus tree using visitor to determine whether a node link matches those searched for
        Parameters:
        file -
        finder -
        findFirst -
        mon -
        Returns:
        map with full path as key and NodeLink as value
      • treeBreadthFirstSearch

        public static java.util.Map<java.lang.String,NodeLink> treeBreadthFirstSearch(GroupNode file,
                                                                                      IFindInTree finder,
                                                                                      boolean findFirst,
                                                                                      boolean maintainOrder,
                                                                                      IMonitor mon)
        Breadth first search of nexus tree using visitor to determine whether a node link matches those searched for
        Parameters:
        file -
        finder -
        findFirst -
        maintainOrder -
        mon -
        Returns:
        map with full path as key and NodeLink as value
      • getUniqueDataNodes

        public static java.util.Map<DataNode,java.lang.String> getUniqueDataNodes(GroupNode node)
        Get a map of all the unique data nodes in a tree Map keys are the data nodes, map values are the shortest path to each node
        Parameters:
        node -
        Returns:
        map
      • recursivelyLoadDataNodes

        public static void recursivelyLoadDataNodes(GroupNode node)
        Iterate though a tree and convert ILazyDatasets in DataNodes to IDatasets, allowing the tree to be written into a file. WARNING: only use on tree structures containing metadata not large datasets as they will be loaded into memory
        Parameters:
        node -
      • getShortestUniqueSeparatorCrop

        public int getShortestUniqueSeparatorCrop(java.util.Set<java.lang.String> names)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy