Interface GroupNode
- 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
Node to group other nodes using node links
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddDataNode(String name, DataNode d) Add given data node with given path and namevoidaddGroupNode(String name, GroupNode g) Add (child) group node with given path and namevoidAdd given node with given path and namevoidaddNodeLink(NodeLink link) Add node linkvoidaddSymbolicNode(String name, SymbolicNode s) Add linked node with given path and namebooleancontainsDataNode(String name) booleancontainsGroupNode(String name) booleancontainsNode(String name) Returns whether this group contains a child node with the given namebooleancontainsSymbolicNode(String name) Returns whether this group node contains a symbolic node of the given name.findLinkedNodeName(Node node) Find name of node linked to this groupRecursively find node at given pathfindNodeLink(String pathname) Recursively find link to node given by path namegetDataNode(String name) Get data node of given name.Get all data nodes, keyed by name within this group node.Get the set of names of data nodes.Get all data nodes.List<org.eclipse.january.dataset.ILazyDataset> getDatasets(String name) Recursively find datasets of given namegetGroupNode(String name) Get (child) group node of given name.Get (child) group nodes, as a map where the key is the name of that group node within this (parent) group node.Get the set of names of group nodes.Get (child) group nodes.getNames()Returns the child node of the given name, ornullif no such node exists.getNodeLink(String name) intintintgetSymbolicNode(String name) Get (child) symbolic node of given name.booleaniterator()voidremoveDataNode(String name) Remove the data node of given name.voidRemove the given data node from this group.voidremoveGroupNode(String name) Remove group node of given namevoidRemove given group nodevoidremoveSymbolicNode(String name) Removes the symbolic node with the given name.voidRemoves the given symbolic node from this tree.voidsetGlobalPool(Map<Long, Node> globalPool) Set a reference to the global pool of nodesMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface org.eclipse.dawnsci.analysis.api.tree.Node
addAttribute, containsAttribute, getAttribute, getAttributeIterator, getAttributeNameIterator, getAttributeNames, getID, getNumberOfAttributes, isDataNode, isGroupNode, isSymbolicNode, removeAttribute, removeAttribute
-
Method Details
-
isPopulated
boolean isPopulated()- Returns:
- true if it has been populated with any nodes
-
setGlobalPool
Set a reference to the global pool of nodes- Parameters:
globalPool-
-
getGlobalPool
- Returns:
- global pool of cached nodes
-
getNumberOfNodelinks
int getNumberOfNodelinks()- Returns:
- number of node-links held in group
-
getNodeLink
- Parameters:
name-- Returns:
- node link to child node of given name
-
addNodeLink
Add node link- Parameters:
link-- Throws:
IllegalArgumentException- if node link of same name already exists but is of different type
-
addNode
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
Returns the child node of the given name, ornullif 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
Returns whether this group contains a child node with the given name- Parameters:
name- name- Returns:
trueif this node contains a child node with the given name,falseotherwise
-
getNumberOfGroupNodes
int getNumberOfGroupNodes()- Returns:
- number of child groups in group
-
containsGroupNode
- Parameters:
name-- Returns:
- true if group contains child group of given name
-
getGroupNode
Get (child) group node of given name. ASymbolicNodewith the given name is resolved to its destination node.- Parameters:
name-- Returns:
- group, or
nullif no such group exists - Throws:
IllegalArgumentException- if a node exists with the given name but is not a group node
-
getGroupNodes
Get (child) group nodes. AnySymbolicNodes are resolved to their destination nodes.- Returns:
- groups
-
getGroupNodeMap
Get (child) group nodes, as a map where the key is the name of that group node within this (parent) group node. AnySymbolicNodeare resolved to their destination nodes.- Returns:
- group node map
-
getGroupNodeNames
Get the set of names of group nodes. Includes the names of anySymbolicNodethat resolves to aGroupNode.- Returns:
- group node names
-
addGroupNode
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
Remove group node of given name- Parameters:
name-- Throws:
IllegalArgumentException- if named node does not exist or is not a group node
-
removeGroupNode
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
- Parameters:
name-- Returns:
- true if group contains data node of given name
-
getDataNode
Get data node of given name. ASymbolicNodewith the given name is resolved to its destination node.- Parameters:
name-- Returns:
- datanode, or
nullif no such data node exists - Throws:
IllegalArgumentException- if a node with the given name exists that is not a data node
-
addDataNode
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
Get all data nodes. AnySymbolicNodes are resolved to their destination nodes.- Returns:
- data nodes
-
getDataNodeMap
Get all data nodes, keyed by name within this group node. AnySymbolicNodes are resolved to their destination nodes.- Returns:
- data node map
-
removeDataNode
Remove the data node of given name.- Parameters:
name-- Throws:
IllegalArgumentException- if named node does not exist or is not a data node
-
getDataNodeNames
Get the set of names of data nodes. Includes the names of anySymbolicNodethat resolves to aDataNode.- Returns:
- data node names
-
removeDataNode
Remove the given data node from this group.- Parameters:
d- data node- Throws:
IllegalArgumentException- if node is not in group
-
addSymbolicNode
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
Returns whether this group node contains a symbolic node of the given name.- Parameters:
name-- Returns:
trueif group contains a symbolic node of given name,falseotherwise
-
removeSymbolicNode
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
Removes the given symbolic node from this tree.- Parameters:
s- symbolic node- Throws:
IllegalArgumentException- if node is not in group
-
getSymbolicNode
Get (child) symbolic node of given name.- Parameters:
name-- Returns:
- symbolic node, or
nullif no such node exists - Throws:
IllegalArgumentException- if a node exists with the given name that is not a symbolic node
-
getSymbolicNodeNames
- Returns:
- the set of names of
SymbolicNodes
-
findLinkedNodeName
Find name of node linked to this group- Parameters:
node-- Returns:
- name (or null, if node is not in group)
-
getNodeNameIterator
- Returns:
- iterator over child names in group
-
getDatasets
Recursively find datasets of given name- Parameters:
name-- Returns:
- list of (unique) datasets
-
findNodeLink
Recursively find link to node given by path name- Parameters:
pathname- which can include attribute (prefixed withNode.ATTRIBUTE)- Returns:
- node or null if not found
- Throws:
IllegalArgumentException- if only an attribute name is given
-
findNode
Recursively find node at given path- Parameters:
pathname- which can include attribute (prefixed withNode.ATTRIBUTE)- Returns:
- node or null if not found
- Throws:
IllegalArgumentException- if only an attribute name is given
-
iterator
-
getNames
- Returns:
- names of nodes
-