Interface GroupNode

All Superinterfaces:
Iterable<NodeLink>, Node
All Known Subinterfaces:
NXaberration, NXactivity, NXactuator, NXaperture, NXapm_charge_state_analysis, NXapm_event_data, NXapm_instrument, NXapm_measurement, NXapm_paraprobe_tool_common, NXapm_paraprobe_tool_parameters, NXapm_paraprobe_tool_process, NXapm_ranging, NXapm_reconstruction, NXapm_simulation, NXatom, NXattenuator, NXbeam, NXbeam_splitter, NXbeam_stop, NXbeam_transfer_matrix_table, NXbending_magnet, NXcalibration, NXcapillary, NXcg_alpha_complex, NXcg_cylinder, NXcg_ellipsoid, NXcg_face_list_data_structure, NXcg_grid, NXcg_half_edge_data_structure, NXcg_hexahedron, NXcg_parallelogram, NXcg_point, NXcg_polygon, NXcg_polyhedron, NXcg_polyline, NXcg_primitive, NXcg_roi, NXcg_tetrahedron, NXcg_triangle, NXcg_unit_normal, NXchemical_composition, NXcircuit, NXcite, NXcollection, NXcollectioncolumn, NXcollimator, NXcomponent, NXcontainer, NXcoordinate_system, NXcorrector_cs, NXcrystal, NXcs_computer, NXcs_filter_boolean_mask, NXcs_memory, NXcs_prng, NXcs_processor, NXcs_profiling, NXcs_profiling_event, NXcs_storage, NXcsg, NXcylindrical_geometry, NXdata, NXdeflector, NXdelocalization, NXdetector, NXdetector_channel, NXdetector_group, NXdetector_module, NXdisk_chopper, NXdispersion, NXdispersion_function, NXdispersion_repeated_parameter, NXdispersion_single_parameter, NXdispersion_table, NXdistortion, NXebeam_column, NXelectromagnetic_lens, NXelectron_detector, NXelectronanalyzer, NXelectrostatic_kicker, NXem_ebsd, NXem_eds, NXem_eels, NXem_event_data, NXem_img, NXem_instrument, NXem_interaction_volume, NXem_measurement, NXem_optical_system, NXem_simulation, NXenergydispersion, NXentry, NXenvironment, NXevent_data, NXfabrication, NXfermi_chopper, NXfilter, NXfit, NXfit_function, NXflipper, NXfresnel_zone_plate, NXgeometry, NXgrating, NXguide, NXhistory, NXibeam_column, NXimage, NXinsertion_device, NXinstrument, NXisocontour, NXlog, NXmagnetic_kicker, NXmanipulator, NXmatch_filter, NXmicrostructure, NXmicrostructure_feature, NXmicrostructure_ipf, NXmicrostructure_mtex_config, NXmicrostructure_odf, NXmicrostructure_pf, NXmicrostructure_slip_system, NXmirror, NXmoderator, NXmonitor, NXmonochromator, NXnote, NXobject, NXoff_geometry, NXoptical_fiber, NXoptical_lens, NXoptical_polarizer, NXoptical_window, NXorientation, NXparameters, NXpdb, NXpeak, NXphase, NXpid_controller, NXpinhole, NXpolarizer, NXpositioner, NXprocess, NXprogram, NXpump, NXquadric, NXquadrupole_magnet, NXreflections, NXregion, NXregistration, NXresolution, NXroi_process, NXroot, NXrotations, NXsample, NXsample_component, NXscan_controller, NXsensor, NXseparator, NXshape, NXsimilarity_grouping, NXslit, NXsolenoid_magnet, NXsolid_geometry, NXsource, NXspatial_filter, NXspectrum, NXspin_rotator, NXspindispersion, NXsubentry, NXsubsampling_filter, NXsubstance, NXtransformations, NXtranslation, NXunit_cell, NXuser, NXvelocity_selector, NXwaveplate, NXxraylens
All Known Implementing Classes:
GroupNodeImpl

public interface GroupNode extends Node, Iterable<NodeLink>
Node to group other nodes using node links
  • Method Details

    • isPopulated

      boolean isPopulated()
      Returns:
      true if it has been populated with any nodes
    • setGlobalPool

      void setGlobalPool(Map<Long,Node> globalPool)
      Set a reference to the global pool of nodes
      Parameters:
      globalPool -
    • getGlobalPool

      Map<Long,Node> getGlobalPool()
      Returns:
      global pool of cached nodes
    • getNumberOfNodelinks

      int getNumberOfNodelinks()
      Returns:
      number of node-links held in group
    • getNodeLink

      NodeLink getNodeLink(String name)
      Parameters:
      name -
      Returns:
      node link to child node of given name
    • addNodeLink

      void addNodeLink(NodeLink link)
      Add node link
      Parameters:
      link -
      Throws:
      IllegalArgumentException - if node link of same name already exists but is of different type
    • addNode

      void addNode(String name, Node node)
      Add given node with given path and name
      Parameters:
      name -
      node -
      Throws:
      IllegalArgumentException - if node of same name already exists but is of different type
    • getNode

      Node getNode(String name)
      Returns the child node of the given name, or null if no such node exists.
      Parameters:
      name - name of child node within this group node
      Returns:
      child node with given name if it exists, otherwise null
    • containsNode

      boolean containsNode(String name)
      Returns whether this group contains a child node with the given name
      Parameters:
      name - name
      Returns:
      true if this node contains a child node with the given name, false otherwise
    • getNumberOfGroupNodes

      int getNumberOfGroupNodes()
      Returns:
      number of child groups in group
    • containsGroupNode

      boolean containsGroupNode(String name)
      Parameters:
      name -
      Returns:
      true if group contains child group of given name
    • getGroupNode

      GroupNode getGroupNode(String name)
      Get (child) group node of given name. A SymbolicNode with the given name is resolved to its destination node.
      Parameters:
      name -
      Returns:
      group, or null if no such group exists
      Throws:
      IllegalArgumentException - if a node exists with the given name but is not a group node
    • getGroupNodes

      List<GroupNode> getGroupNodes()
      Get (child) group nodes. Any SymbolicNodes are resolved to their destination nodes.
      Returns:
      groups
    • getGroupNodeMap

      Map<String,GroupNode> getGroupNodeMap()
      Get (child) group nodes, as a map where the key is the name of that group node within this (parent) group node. Any SymbolicNode are resolved to their destination nodes.
      Returns:
      group node map
    • getGroupNodeNames

      Set<String> getGroupNodeNames()
      Get the set of names of group nodes. Includes the names of any SymbolicNode that resolves to a GroupNode.
      Returns:
      group node names
    • addGroupNode

      void addGroupNode(String name, GroupNode g)
      Add (child) group node with given path and name
      Parameters:
      name -
      g - group
      Throws:
      IllegalArgumentException - if a node of same name already exists that is not a group node
    • removeGroupNode

      void removeGroupNode(String name)
      Remove group node of given name
      Parameters:
      name -
      Throws:
      IllegalArgumentException - if named node does not exist or is not a group node
    • removeGroupNode

      void removeGroupNode(GroupNode g)
      Remove given group node
      Parameters:
      g - group node
      Throws:
      IllegalArgumentException - if no group node exists with the given name
    • getNumberOfDataNodes

      int getNumberOfDataNodes()
      Returns:
      number of data nodes held in group
    • containsDataNode

      boolean containsDataNode(String name)
      Parameters:
      name -
      Returns:
      true if group contains data node of given name
    • getDataNode

      DataNode getDataNode(String name)
      Get data node of given name. A SymbolicNode with the given name is resolved to its destination node.
      Parameters:
      name -
      Returns:
      datanode, or null if no such data node exists
      Throws:
      IllegalArgumentException - if a node with the given name exists that is not a data node
    • addDataNode

      void addDataNode(String name, DataNode d)
      Add given data node with given path and name
      Parameters:
      name -
      d - dataset
      Throws:
      IllegalArgumentException - if a node of same name already exists that is not a data node
    • getDataNodes

      List<DataNode> getDataNodes()
      Get all data nodes. Any SymbolicNodes are resolved to their destination nodes.
      Returns:
      data nodes
    • getDataNodeMap

      Map<String,DataNode> getDataNodeMap()
      Get all data nodes, keyed by name within this group node. Any SymbolicNodes are resolved to their destination nodes.
      Returns:
      data node map
    • removeDataNode

      void removeDataNode(String name)
      Remove the data node of given name.
      Parameters:
      name -
      Throws:
      IllegalArgumentException - if named node does not exist or is not a data node
    • getDataNodeNames

      Set<String> getDataNodeNames()
      Get the set of names of data nodes. Includes the names of any SymbolicNode that resolves to a DataNode.
      Returns:
      data node names
    • removeDataNode

      void removeDataNode(DataNode d)
      Remove the given data node from this group.
      Parameters:
      d - data node
      Throws:
      IllegalArgumentException - if node is not in group
    • addSymbolicNode

      void addSymbolicNode(String name, SymbolicNode s)
      Add linked node with given path and name
      Parameters:
      name -
      s - symbolic link
      Throws:
      IllegalArgumentException - if a node of same name already exists that is not a symbolic node
    • containsSymbolicNode

      boolean containsSymbolicNode(String name)
      Returns whether this group node contains a symbolic node of the given name.
      Parameters:
      name -
      Returns:
      true if group contains a symbolic node of given name, false otherwise
    • removeSymbolicNode

      void removeSymbolicNode(String name)
      Removes the symbolic node with the given name.
      Parameters:
      name - name of symbolic node to remove
      Throws:
      IllegalArgumentException - if named node does not exist or is not a symbolic node
    • removeSymbolicNode

      void removeSymbolicNode(SymbolicNode s)
      Removes the given symbolic node from this tree.
      Parameters:
      s - symbolic node
      Throws:
      IllegalArgumentException - if node is not in group
    • getSymbolicNode

      SymbolicNode getSymbolicNode(String name)
      Get (child) symbolic node of given name.
      Parameters:
      name -
      Returns:
      symbolic node, or null if no such node exists
      Throws:
      IllegalArgumentException - if a node exists with the given name that is not a symbolic node
    • getSymbolicNodeNames

      Set<String> getSymbolicNodeNames()
      Returns:
      the set of names of SymbolicNodes
    • findLinkedNodeName

      String findLinkedNodeName(Node node)
      Find name of node linked to this group
      Parameters:
      node -
      Returns:
      name (or null, if node is not in group)
    • getNodeNameIterator

      Iterator<String> getNodeNameIterator()
      Returns:
      iterator over child names in group
    • getDatasets

      List<org.eclipse.january.dataset.ILazyDataset> getDatasets(String name)
      Recursively find datasets of given name
      Parameters:
      name -
      Returns:
      list of (unique) datasets
    • findNodeLink

      NodeLink findNodeLink(String pathname)
      Recursively find link to node given by path name
      Parameters:
      pathname - which can include attribute (prefixed with Node.ATTRIBUTE)
      Returns:
      node or null if not found
      Throws:
      IllegalArgumentException - if only an attribute name is given
    • findNode

      Node findNode(String nodePath)
      Recursively find node at given path
      Parameters:
      pathname - which can include attribute (prefixed with Node.ATTRIBUTE)
      Returns:
      node or null if not found
      Throws:
      IllegalArgumentException - if only an attribute name is given
    • iterator

      Iterator<NodeLink> iterator()
      Specified by:
      iterator in interface Iterable<NodeLink>
      Returns:
      iterator over links to children in group
    • getNames

      Set<String> getNames()
      Returns:
      names of nodes