Uses of Class
org.apache.commons.configuration2.tree.ImmutableNode
-
Packages that use ImmutableNode Package Description org.apache.commons.configuration2 The Configuration main package.org.apache.commons.configuration2.plist Configuration classes supporting NeXT / OpenStep /GNUStep style configuration.org.apache.commons.configuration2.tree A package with helper and utility classes used by hierarchical configurations. -
-
Uses of ImmutableNode in org.apache.commons.configuration2
Fields in org.apache.commons.configuration2 declared as ImmutableNode Modifier and Type Field Description private static ImmutableNode
CombinedConfiguration. EMPTY_ROOT
Constant for a root node for an empty configuration.private ImmutableNode
BaseHierarchicalConfiguration.InterpolatedVisitor. interpolatedRoot
The resulting root node.private ImmutableNode
CombinedConfiguration.ConfigData. rootNode
Stores the root node for this child configuration.Fields in org.apache.commons.configuration2 with type parameters of type ImmutableNode Modifier and Type Field Description private HierarchicalConfiguration<ImmutableNode>
PatternSubtreeConfigurationWrapper. config
The wrapped configurationprivate java.util.Map<ImmutableNode,org.w3c.dom.Element>
XMLConfiguration.XMLBuilderVisitor. newElements
A mapping for the references for new nodes.Methods in org.apache.commons.configuration2 that return ImmutableNode Modifier and Type Method Description private ImmutableNode
CombinedConfiguration. constructCombinedNode()
Creates the root node of this combined configuration.private ImmutableNode
XMLConfiguration. createChildNodeWithValue(ImmutableNode.Builder parent, ImmutableNode.Builder child, org.w3c.dom.Element elem, java.lang.String value, boolean trim, java.util.Map<java.lang.String,java.lang.String> attrmap, java.util.Map<ImmutableNode,java.lang.Object> elemRefs)
Creates a new child node, assigns its value, and adds it to its parent.private static ImmutableNode
INIConfiguration. createNewRootNode(ImmutableNode.Builder rootBuilder, java.util.Map<java.lang.String,ImmutableNode.Builder> sectionBuilders)
Creates a new root node from the builders constructed while reading the configuration file.private ImmutableNode
BaseHierarchicalConfiguration. createSubsetRootNode(java.util.Collection<QueryResult<ImmutableNode>> results)
Creates a root node for a subset configuration based on the passed in query results.ImmutableNode
BaseHierarchicalConfiguration.InterpolatedVisitor. getInterpolatedRoot()
Gets the result of this builder: the root node of the interpolated nodes hierarchy.ImmutableNode
CombinedConfiguration.ConfigData. getRootNode()
Gets the root node for this child configuration.private ImmutableNode
CombinedConfiguration.ConfigData. getRootNodeOfConfiguration()
Obtains the root node of the wrapped configuration.ImmutableNode
CombinedConfiguration.ConfigData. getTransformedRoot()
Gets the transformed root node of the stored configuration.private static ImmutableNode
BaseHierarchicalConfiguration. obtainRootNode(HierarchicalConfiguration<ImmutableNode> c)
Obtains the root node from a configuration whose data is to be copied.private ImmutableNode
CombinedConfiguration.ConfigData. prependAtPath(ImmutableNode node)
Prepends the at path to the given node.Methods in org.apache.commons.configuration2 that return types with arguments of type ImmutableNode Modifier and Type Method Description java.util.List<HierarchicalConfiguration<ImmutableNode>>
BaseHierarchicalConfiguration. childConfigurationsAt(java.lang.String key)
Returns a list with sub configurations for all child nodes of the node selected by the given key.java.util.List<HierarchicalConfiguration<ImmutableNode>>
BaseHierarchicalConfiguration. childConfigurationsAt(java.lang.String key, boolean supportUpdates)
Returns a list with sub configurations for all child nodes of the node selected by the given key allowing the caller to specify thesupportUpdates
flag.protected NodeModel<ImmutableNode>
BaseHierarchicalConfiguration. cloneNodeModel()
Creates a clone of the node model.protected NodeModel<ImmutableNode>
SubnodeConfiguration. cloneNodeModel()
Creates a clone of the node model.HierarchicalConfiguration<ImmutableNode>
BaseHierarchicalConfiguration. configurationAt(java.lang.String key)
Returns a hierarchical subnode configuration for the node specified by the given key.HierarchicalConfiguration<ImmutableNode>
BaseHierarchicalConfiguration. configurationAt(java.lang.String key, boolean supportUpdates)
Returns a hierarchical sub configuration object that wraps the configuration node specified by the given key.HierarchicalConfiguration<ImmutableNode>
DynamicCombinedConfiguration. configurationAt(java.lang.String key)
HierarchicalConfiguration<ImmutableNode>
DynamicCombinedConfiguration. configurationAt(java.lang.String key, boolean supportUpdates)
HierarchicalConfiguration<ImmutableNode>
PatternSubtreeConfigurationWrapper. configurationAt(java.lang.String key)
HierarchicalConfiguration<ImmutableNode>
PatternSubtreeConfigurationWrapper. configurationAt(java.lang.String key, boolean supportUpdates)
java.util.List<HierarchicalConfiguration<ImmutableNode>>
BaseHierarchicalConfiguration. configurationsAt(java.lang.String key)
Returns a list of sub configurations for all configuration nodes selected by the given key.java.util.List<HierarchicalConfiguration<ImmutableNode>>
BaseHierarchicalConfiguration. configurationsAt(java.lang.String key, boolean supportUpdates)
Returns a list of sub configurations for all configuration nodes selected by the given key allowing the caller to specify thesupportUpdates
flag.java.util.List<HierarchicalConfiguration<ImmutableNode>>
DynamicCombinedConfiguration. configurationsAt(java.lang.String key)
java.util.List<HierarchicalConfiguration<ImmutableNode>>
PatternSubtreeConfigurationWrapper. configurationsAt(java.lang.String key)
private static java.util.List<ImmutableNode>
AbstractYAMLBasedConfiguration. constructHierarchy(java.lang.String key, java.lang.Object elem)
Creates a part of the hierarchical nodes structure of the resulting configuration.private java.util.List<HierarchicalConfiguration<ImmutableNode>>
BaseHierarchicalConfiguration. createConnectedSubConfigurations(InMemoryNodeModelSupport parentModelSupport, java.util.Collection<NodeSelector> selectors)
Creates a list of connected sub configurations based on a passed in list of node selectors.private static NodeModel<ImmutableNode>
BaseHierarchicalConfiguration. createNodeModel(HierarchicalConfiguration<ImmutableNode> c)
Creates theNodeModel
for this configuration based on a passed in source configuration.private java.util.List<ImmutableNode>
BaseHierarchicalConfiguration. fetchFilteredNodeResults(java.lang.String key)
Executes a query on the specified key and filters it for node results.NodeHandler<ImmutableNode>
INIConfiguration.GlobalSectionNodeModel. getNodeHandler()
private static java.util.List<ImmutableNode>
AbstractYAMLBasedConfiguration. parseCollection(java.util.Collection<java.lang.Object> col, java.lang.String key)
Parses a collection structure.private static java.util.List<ImmutableNode>
AbstractYAMLBasedConfiguration. parseMap(java.util.Map<java.lang.String,java.lang.Object> map, java.lang.String key)
Parses a map structure.Methods in org.apache.commons.configuration2 with parameters of type ImmutableNode Modifier and Type Method Description static void
XMLListReference. assignListReference(java.util.Map<ImmutableNode,java.lang.Object> refs, ImmutableNode node, org.w3c.dom.Element elem)
Assigns an instance of this class as reference to the specified configuration node.protected java.util.Map<java.lang.String,java.lang.Object>
AbstractYAMLBasedConfiguration. constructMap(ImmutableNode node)
Constructs a YAML map, i.e.private BaseHierarchicalConfiguration
BaseHierarchicalConfiguration. createIndependentSubConfigurationForNode(ImmutableNode node)
Returns an initialized sub configuration for this configuration that is based on anotherBaseHierarchicalConfiguration
.private java.util.Set<Configuration>
CombinedConfiguration. findSourceConfigurations(ImmutableNode node)
Determines the configurations to which the specified node belongs.private org.w3c.dom.Element
XMLConfiguration.XMLBuilderVisitor. getElement(ImmutableNode node, ReferenceNodeHandler refHandler)
Helper method for accessing the element of the specified node.private void
BaseHierarchicalConfiguration.InterpolatedVisitor. handleLeafNode(ImmutableNode node, NodeHandler<ImmutableNode> handler)
Handles interpolation for a node with no children.private static boolean
XMLListReference. hasListReference(ImmutableNode node, ReferenceNodeHandler handler)
Checks whether the specified node has an associated list reference.protected abstract void
BaseHierarchicalConfiguration.BuilderVisitor. insert(ImmutableNode newNode, ImmutableNode parent, ImmutableNode sibling1, ImmutableNode sibling2, ReferenceNodeHandler refHandler)
Inserts a new node into the structure constructed by this builder.protected void
XMLConfiguration.XMLBuilderVisitor. insert(ImmutableNode newNode, ImmutableNode parent, ImmutableNode sibling1, ImmutableNode sibling2, ReferenceNodeHandler refHandler)
Inserts a new node into the structure constructed by this builder.private void
BaseHierarchicalConfiguration.BuilderVisitor. insertNewChildNodes(ImmutableNode node, ReferenceNodeHandler refHandler)
Inserts new children that have been added to the specified node.private java.util.Map<java.lang.String,java.lang.Object>
BaseHierarchicalConfiguration.InterpolatedVisitor. interpolateAttributes(ImmutableNode node, NodeHandler<ImmutableNode> handler)
Returns a map with interpolated attributes of the passed in node.private boolean
BaseHierarchicalConfiguration.InterpolatedVisitor. interpolateAttributes(ImmutableNode node, NodeHandler<ImmutableNode> handler, java.util.Map<java.lang.String,java.lang.Object> interpolatedAttributes)
Populates a map with interpolated attributes of the passed in node.static boolean
XMLListReference. isFirstListItem(ImmutableNode node, ReferenceNodeHandler handler)
Checks whether the specified node is the first node of a list.private boolean
BaseHierarchicalConfiguration.InterpolatedVisitor. isLeafNode(ImmutableNode node, NodeHandler<ImmutableNode> handler)
Returns a flag whether the given node is a leaf.static boolean
XMLListReference. isListNode(ImmutableNode node, ReferenceNodeHandler handler)
Checks whether the specified configuration node has to be taken into account for list handling.private static boolean
INIConfiguration. isSectionNode(ImmutableNode node)
Checks whether the specified configuration node represents a section.static java.lang.String
XMLListReference. listValue(ImmutableNode node, ReferenceNodeHandler nodeHandler, ListDelimiterHandler delimiterHandler)
Constructs the concatenated string value of all items comprising the list the specified node belongs to.private static boolean
XMLListReference. nameEquals(ImmutableNode n1, ImmutableNode n2)
Helper method for comparing the names of two nodes.private ImmutableNode
CombinedConfiguration.ConfigData. prependAtPath(ImmutableNode node)
Prepends the at path to the given node.private void
CombinedConfiguration.ConfigData. prependAtPathComponent(ImmutableNode.Builder builder, java.lang.String currentComponent, java.util.Iterator<java.lang.String> components, ImmutableNode orgRoot)
Handles a single component of the at path.private void
BaseHierarchicalConfiguration.InterpolatedVisitor. storeInterpolatedNode(ImmutableNode node)
Stores a processed node.protected abstract void
BaseHierarchicalConfiguration.BuilderVisitor. update(ImmutableNode node, java.lang.Object reference, ReferenceNodeHandler refHandler)
Updates a node that already existed in the original hierarchy.protected void
XMLConfiguration.XMLBuilderVisitor. update(ImmutableNode node, java.lang.Object reference, ReferenceNodeHandler refHandler)
Updates a node that already existed in the original hierarchy.private static void
XMLConfiguration.XMLBuilderVisitor. updateAttributes(ImmutableNode node, org.w3c.dom.Element elem)
Helper method for updating the values of all attributes of the specified node.private void
XMLConfiguration.XMLBuilderVisitor. updateElement(ImmutableNode node, ReferenceNodeHandler refHandler, java.lang.Object value)
private void
BaseHierarchicalConfiguration.BuilderVisitor. updateNode(ImmutableNode node, ReferenceNodeHandler refHandler)
Updates the value of a node.void
BaseHierarchicalConfiguration.InterpolatedVisitor. visitAfterChildren(ImmutableNode node, NodeHandler<ImmutableNode> handler)
void
BaseHierarchicalConfiguration.BuilderVisitor. visitBeforeChildren(ImmutableNode node, NodeHandler<ImmutableNode> handler)
void
BaseHierarchicalConfiguration.InterpolatedVisitor. visitBeforeChildren(ImmutableNode node, NodeHandler<ImmutableNode> handler)
Method parameters in org.apache.commons.configuration2 with type arguments of type ImmutableNode Modifier and Type Method Description protected void
DynamicCombinedConfiguration. addNodesInternal(java.lang.String key, java.util.Collection<? extends ImmutableNode> nodes)
protected void
PatternSubtreeConfigurationWrapper. addNodesInternal(java.lang.String key, java.util.Collection<? extends ImmutableNode> nodes)
static void
XMLListReference. assignListReference(java.util.Map<ImmutableNode,java.lang.Object> refs, ImmutableNode node, org.w3c.dom.Element elem)
Assigns an instance of this class as reference to the specified configuration node.private java.util.Map<java.lang.String,java.lang.String>
XMLConfiguration. constructHierarchy(ImmutableNode.Builder node, org.apache.commons.lang3.mutable.MutableObject<java.lang.String> refValue, org.w3c.dom.Element element, java.util.Map<ImmutableNode,java.lang.Object> elemRefs, boolean trim, int level)
Helper method for building the internal storage hierarchy.private static NodeModel<ImmutableNode>
BaseHierarchicalConfiguration. createNodeModel(HierarchicalConfiguration<ImmutableNode> c)
Creates theNodeModel
for this configuration based on a passed in source configuration.private ImmutableNode
BaseHierarchicalConfiguration. createSubsetRootNode(java.util.Collection<QueryResult<ImmutableNode>> results)
Creates a root node for a subset configuration based on the passed in query results.private void
BaseHierarchicalConfiguration.InterpolatedVisitor. handleLeafNode(ImmutableNode node, NodeHandler<ImmutableNode> handler)
Handles interpolation for a node with no children.private java.util.Map<java.lang.String,java.lang.Object>
BaseHierarchicalConfiguration.InterpolatedVisitor. interpolateAttributes(ImmutableNode node, NodeHandler<ImmutableNode> handler)
Returns a map with interpolated attributes of the passed in node.private boolean
BaseHierarchicalConfiguration.InterpolatedVisitor. interpolateAttributes(ImmutableNode node, NodeHandler<ImmutableNode> handler, java.util.Map<java.lang.String,java.lang.Object> interpolatedAttributes)
Populates a map with interpolated attributes of the passed in node.private boolean
BaseHierarchicalConfiguration.InterpolatedVisitor. isLeafNode(ImmutableNode node, NodeHandler<ImmutableNode> handler)
Returns a flag whether the given node is a leaf.private static ImmutableNode
BaseHierarchicalConfiguration. obtainRootNode(HierarchicalConfiguration<ImmutableNode> c)
Obtains the root node from a configuration whose data is to be copied.void
BaseHierarchicalConfiguration.InterpolatedVisitor. visitAfterChildren(ImmutableNode node, NodeHandler<ImmutableNode> handler)
void
BaseHierarchicalConfiguration.BuilderVisitor. visitBeforeChildren(ImmutableNode node, NodeHandler<ImmutableNode> handler)
void
BaseHierarchicalConfiguration.InterpolatedVisitor. visitBeforeChildren(ImmutableNode node, NodeHandler<ImmutableNode> handler)
Constructor parameters in org.apache.commons.configuration2 with type arguments of type ImmutableNode Constructor Description AbstractYAMLBasedConfiguration(HierarchicalConfiguration<ImmutableNode> c)
Creates a new instance ofAbstractYAMLBasedConfiguration
as a copy of the specified configuration.BaseHierarchicalConfiguration(HierarchicalConfiguration<ImmutableNode> c)
Creates a new instance ofBaseHierarchicalConfiguration
and copies all data contained in the specified configuration into the new one.BaseHierarchicalConfiguration(NodeModel<ImmutableNode> model)
Creates a new instance ofBaseHierarchicalConfiguration
and initializes it with the givenNodeModel
.INIConfiguration(HierarchicalConfiguration<ImmutableNode> c)
Creates a new instance ofINIConfiguration
with the content of the specifiedHierarchicalConfiguration
.JSONConfiguration(HierarchicalConfiguration<ImmutableNode> c)
Creates a new instance ofJSONConfiguration
as a copy of the specified configuration.PatternSubtreeConfigurationWrapper(HierarchicalConfiguration<ImmutableNode> config, java.lang.String path)
ConstructorXMLConfiguration(HierarchicalConfiguration<ImmutableNode> c)
Creates a new instance ofXMLConfiguration
and copies the content of the passed in configuration into this object. -
Uses of ImmutableNode in org.apache.commons.configuration2.plist
Methods in org.apache.commons.configuration2.plist that return ImmutableNode Modifier and Type Method Description ImmutableNode
XMLPropertyListConfiguration.PListNodeBuilder. createNode()
Creates the configuration node defined by this builder.ImmutableNode
PropertyListParser. Property()
Methods in org.apache.commons.configuration2.plist with parameters of type ImmutableNode Modifier and Type Method Description private void
PropertyListConfiguration. printNode(java.io.PrintWriter out, int indentLevel, ImmutableNode node, NodeHandler<ImmutableNode> handler)
Append a node to the writer, indented according to a specific level.private void
XMLPropertyListConfiguration. printNode(java.io.PrintWriter out, int indentLevel, ImmutableNode node)
Append a node to the writer, indented according to a specific level.Method parameters in org.apache.commons.configuration2.plist with type arguments of type ImmutableNode Modifier and Type Method Description private void
PropertyListConfiguration. printNode(java.io.PrintWriter out, int indentLevel, ImmutableNode node, NodeHandler<ImmutableNode> handler)
Append a node to the writer, indented according to a specific level.Constructors in org.apache.commons.configuration2.plist with parameters of type ImmutableNode Constructor Description PropertyListConfiguration(ImmutableNode root)
Creates a new instance ofPropertyListConfiguration
with the given root node.XMLPropertyListConfiguration(ImmutableNode root)
Creates a new instance ofXMLPropertyConfiguration
with the given root node.Constructor parameters in org.apache.commons.configuration2.plist with type arguments of type ImmutableNode Constructor Description PropertyListConfiguration(HierarchicalConfiguration<ImmutableNode> c)
Creates a new instance ofPropertyListConfiguration
and copies the content of the specified configuration into this object.XMLPropertyListConfiguration(HierarchicalConfiguration<ImmutableNode> configuration)
Creates a new instance ofXMLPropertyListConfiguration
and copies the content of the specified configuration into this object. -
Uses of ImmutableNode in org.apache.commons.configuration2.tree
Fields in org.apache.commons.configuration2.tree declared as ImmutableNode Modifier and Type Field Description private ImmutableNode
ModelTransaction. newRoot
The new root node.private ImmutableNode
NodeTracker.TrackedNodeData. node
The current instance of the tracked node.private ImmutableNode
ModelTransaction. queryRoot
The root node for query operations.private ImmutableNode
TreeData. root
The root node of the tree.private ImmutableNode
TrackedNodeHandler. rootNode
The root node.Fields in org.apache.commons.configuration2.tree with type parameters of type ImmutableNode Modifier and Type Field Description private java.util.Collection<ImmutableNode>
ModelTransaction. addedNodes
A collection with nodes which have been added.private java.util.Collection<ImmutableNode>
ModelTransaction.Operations. addedNodesInOperation
A collection with nodes added by an operation.private java.util.Collection<ImmutableNode>
ModelTransaction. allRemovedNodes
Stores all nodes which have been removed in this transaction (not only the root nodes of removed trees).private java.util.List<ImmutableNode>
ImmutableNode.Builder. children
A list for the children of the new node.private java.util.List<ImmutableNode>
ImmutableNode. children
A collection with the child nodes of this node.private java.util.List<ImmutableNode>
ImmutableNode.Builder. directChildren
The direct list of children of the new node.private static NodeHandler<ImmutableNode>
InMemoryNodeModel. DUMMY_HANDLER
A dummy node handler instance used in operations which require only a limited functionality.protected static NodeHandler<ImmutableNode>
NodeCombiner. HANDLER
A default handler object for immutable nodes.private java.util.Map<ImmutableNode,ImmutableNode>
TreeData. inverseReplacementMapping
An inverse replacement mapping.private java.util.Map<ImmutableNode,ImmutableNode>
TreeData. inverseReplacementMapping
An inverse replacement mapping.private java.util.Collection<ImmutableNode>
ModelTransaction.ChildrenUpdateOperation. newNodes
A collection with new nodes to be added.private java.util.Map<ImmutableNode,java.lang.Object>
ModelTransaction. newReferences
A map with reference objects to be added during this transaction.private java.util.Set<ImmutableNode>
ModelTransaction.ChildrenUpdateOperation. nodesToRemove
A collection with nodes to be removed.private java.util.Map<ImmutableNode,ImmutableNode>
ModelTransaction.ChildrenUpdateOperation. nodesToReplace
A map with nodes to be replaced by others.private java.util.Map<ImmutableNode,ImmutableNode>
ModelTransaction.ChildrenUpdateOperation. nodesToReplace
A map with nodes to be replaced by others.private java.util.SortedMap<java.lang.Integer,java.util.Map<ImmutableNode,ModelTransaction.Operations>>
ModelTransaction. operations
Stores the operations to be executed during this transaction.private NodeHandler<ImmutableNode>
TrackedNodeHandler. parentHandler
The handler for querying the parent mapping.private java.util.Map<ImmutableNode,ImmutableNode>
ModelTransaction. parentMapping
A new parent mapping.private java.util.Map<ImmutableNode,ImmutableNode>
ModelTransaction. parentMapping
A new parent mapping.private java.util.Map<ImmutableNode,ImmutableNode>
TreeData. parentMapping
A map that associates the parent node to each node.private java.util.Map<ImmutableNode,ImmutableNode>
TreeData. parentMapping
A map that associates the parent node to each node.private java.util.Map<ImmutableNode,java.lang.Object>
ReferenceTracker. references
A map with reference data.private java.util.Collection<ImmutableNode>
ModelTransaction. removedNodes
A collection with nodes which have been removed.private java.util.Map<ImmutableNode,ImmutableNode>
ModelTransaction. replacedNodes
The nodes replaced in this transaction.private java.util.Map<ImmutableNode,ImmutableNode>
ModelTransaction. replacedNodes
The nodes replaced in this transaction.private java.util.Map<ImmutableNode,ImmutableNode>
ModelTransaction. replacementMapping
A new replacement mapping.private java.util.Map<ImmutableNode,ImmutableNode>
ModelTransaction. replacementMapping
A new replacement mapping.private java.util.Map<ImmutableNode,ImmutableNode>
TreeData. replacementMapping
Stores information about nodes which have been replaced by manipulations of the structure.private java.util.Map<ImmutableNode,ImmutableNode>
TreeData. replacementMapping
Stores information about nodes which have been replaced by manipulations of the structure.private NodeKeyResolver<ImmutableNode>
ModelTransaction. resolver
TheNodeKeyResolver
to be used for this transaction.Methods in org.apache.commons.configuration2.tree that return ImmutableNode Modifier and Type Method Description ImmutableNode
ImmutableNode. addChild(ImmutableNode child)
Creates a newImmutableNode
instance which is a copy of this object, but has the given child node added.protected ImmutableNode
ModelTransaction.AddAttributeOperation. apply(ImmutableNode target, ModelTransaction.Operations operations)
protected ImmutableNode
ModelTransaction.AddAttributesOperation. apply(ImmutableNode target, ModelTransaction.Operations operations)
protected ImmutableNode
ModelTransaction.ChangeNodeNameOperation. apply(ImmutableNode target, ModelTransaction.Operations operations)
protected ImmutableNode
ModelTransaction.ChangeNodeValueOperation. apply(ImmutableNode target, ModelTransaction.Operations operations)
protected ImmutableNode
ModelTransaction.ChildrenUpdateOperation. apply(ImmutableNode target, ModelTransaction.Operations operations)
Executes this operation on the provided target node returning the result.protected abstract ImmutableNode
ModelTransaction.Operation. apply(ImmutableNode target, ModelTransaction.Operations operations)
Executes this operation on the provided target node returning the result.protected ImmutableNode
ModelTransaction.RemoveAttributeOperation. apply(ImmutableNode target, ModelTransaction.Operations operations)
protected ImmutableNode
MergeCombiner. canCombine(ImmutableNode node2, ImmutableNode child, java.util.List<ImmutableNode> children2)
Tests if the first node can be combined with the second node.protected ImmutableNode
OverrideCombiner. canCombine(ImmutableNode node1, ImmutableNode node2, ImmutableNode child)
Tests if a child node of the second node can be combined with the given child node of the first node.ImmutableNode
MergeCombiner. combine(ImmutableNode node1, ImmutableNode node2)
Combines the given nodes to a new union node.abstract ImmutableNode
NodeCombiner. combine(ImmutableNode node1, ImmutableNode node2)
Combines the hierarchies represented by the given root nodes.ImmutableNode
OverrideCombiner. combine(ImmutableNode node1, ImmutableNode node2)
Constructs an override combination for the passed in node structures.ImmutableNode
UnionCombiner. combine(ImmutableNode node1, ImmutableNode node2)
Combines the given nodes to a new union node.ImmutableNode
ImmutableNode.Builder. create()
Creates a newImmutableNode
instance based on the properties set for this builder.private static ImmutableNode
NodeTracker. createEmptyTrackedNode(NodeTracker.TrackedNodeData data)
Creates an empty node derived from the passed inTrackedNodeData
object.private static ImmutableNode
InMemoryNodeModel. createNodeOnPath(java.util.Iterator<java.lang.String> it, java.util.Collection<ImmutableNode> newNodes)
Recursive helper method for creating a path node for an add operation.private static ImmutableNode
InMemoryNodeModel. createNodeToAddWithPath(NodeAddData<ImmutableNode> addData, java.util.Collection<ImmutableNode> newNodes)
Creates a node structure consisting of the path nodes defined by the passed inNodeAddData
instance and all new child nodes.private ImmutableNode
ImmutableNode. createWithBasicProperties(ImmutableNode.Builder builder)
Initializes the given builder with basic properties (node name and value) and returns the newly created node.private ImmutableNode
ImmutableNode. createWithNewAttributes(java.util.Map<java.lang.String,java.lang.Object> newAttrs)
Creates a newImmutableNode
instance with the same properties as this object, but with the given new attributes.protected ImmutableNode
UnionCombiner. findCombineNode(ImmutableNode node1, ImmutableNode node2, ImmutableNode child)
Tries to find a child node of the second source node, with which a child of the first source node can be combined.ImmutableNode
AbstractImmutableNodeHandler. getChild(ImmutableNode node, int index)
ImmutableNode
InMemoryNodeModel. getInMemoryRepresentation()
Gets a representation of the data stored in this model in form of a nodes hierarchy ofImmutableNode
objects.ImmutableNode
NodeModel. getInMemoryRepresentation()
Gets a representation of the data stored in this model in form of a nodes hierarchy ofImmutableNode
objects.ImmutableNode
TrackedNodeModel. getInMemoryRepresentation()
Gets a representation of the data stored in this model in form of a nodes hierarchy ofImmutableNode
objects.ImmutableNode
NodeTracker.TrackedNodeData. getNode()
Gets the tracked node.(package private) ImmutableNode
ModelTransaction. getParent(ImmutableNode node)
Gets the parent node of the given node.ImmutableNode
TrackedNodeHandler. getParent(ImmutableNode node)
Gets the parent of the specified node.ImmutableNode
TreeData. getParent(ImmutableNode node)
Gets the parent node of the specified node.ImmutableNode
ModelTransaction. getQueryRoot()
Gets the root node to be used within queries.ImmutableNode
InMemoryNodeModel. getRootNode()
Gets the root node of this mode.ImmutableNode
TrackedNodeHandler. getRootNode()
Gets the root node of the underlying hierarchy.ImmutableNode
TreeData. getRootNode()
ImmutableNode
InMemoryNodeModel. getTrackedNode(NodeSelector selector)
Gets the currentImmutableNode
instance associated with the givenNodeSelector
.ImmutableNode
NodeTracker. getTrackedNode(NodeSelector selector)
Gets the currentImmutableNode
instance associated with the given selector.private static ImmutableNode
TreeData. handleReplacements(ImmutableNode replace, java.util.Map<ImmutableNode,ImmutableNode> mapping)
Checks whether the passed in node is subject of a replacement by another one.private static ImmutableNode
InMemoryNodeModel. initialRootNode(ImmutableNode providedRoot)
Determines the initial root node of this model.private ImmutableNode
ModelTransaction. initQueryRoot(TreeData treeData, NodeSelector selector)
Initializes the root node to be used within queries.ImmutableNode
ImmutableNode. removeAttribute(java.lang.String name)
Returns a newImmutableNode
instance which is a copy of this object, but with the specified attribute removed.ImmutableNode
ImmutableNode. removeChild(ImmutableNode child)
Returns a newImmutableNode
instance which is a copy of this object, but with the given child node removed.ImmutableNode
ImmutableNode. replaceChild(ImmutableNode oldChild, ImmutableNode newChild)
Returns a newImmutableNode
instance which is a copy of this object, but with the given child replaced by the new one.ImmutableNode
ImmutableNode. replaceChildren(java.util.Collection<ImmutableNode> newChildren)
Returns a newImmutableNode
instance which is a copy of this object, but with the children replaced by the ones in the passed in collection.ImmutableNode
NodeSelector. select(ImmutableNode root, NodeKeyResolver<ImmutableNode> resolver, NodeHandler<ImmutableNode> handler)
Applies thisNodeSelector
on the specified root node.ImmutableNode
ImmutableNode. setAttribute(java.lang.String name, java.lang.Object value)
Returns a newImmutableNode
instance which is a copy of this object, but with the specified attribute set to the given value.ImmutableNode
ImmutableNode. setAttributes(java.util.Map<java.lang.String,?> newAttributes)
Returns a newImmutableNode
instance which is a copy of this object, but with all attributes added defined by the given map.ImmutableNode
ImmutableNode. setName(java.lang.String name)
Creates a newImmutableNode
instance which is a copy of this object with the name changed to the passed in value.ImmutableNode
ImmutableNode. setValue(java.lang.Object newValue)
Creates a newImmutableNode
instance which is a copy of this object with the value changed to the passed in value.Methods in org.apache.commons.configuration2.tree that return types with arguments of type ImmutableNode Modifier and Type Method Description java.util.List<QueryResult<ImmutableNode>>
InMemoryNodeModel. clearTree(java.lang.String key, NodeKeyResolver<ImmutableNode> resolver)
Removes the sub trees defined by the given key from this model.java.util.List<QueryResult<ImmutableNode>>
InMemoryNodeModel. clearTree(java.lang.String key, NodeSelector selector, NodeKeyResolver<ImmutableNode> resolver)
Clears a whole sub tree using a tracked node as root node.java.util.List<QueryResult<ImmutableNode>>
TrackedNodeModel. clearTree(java.lang.String key, NodeKeyResolver<ImmutableNode> resolver)
java.util.Map<ImmutableNode,ImmutableNode>
TreeData. copyParentMapping()
Returns a copy of the mapping from nodes to their parents.java.util.Map<ImmutableNode,ImmutableNode>
TreeData. copyParentMapping()
Returns a copy of the mapping from nodes to their parents.java.util.Map<ImmutableNode,ImmutableNode>
TreeData. copyReplacementMapping()
Returns a copy of the map storing the replaced nodes.java.util.Map<ImmutableNode,ImmutableNode>
TreeData. copyReplacementMapping()
Returns a copy of the map storing the replaced nodes.(package private) java.util.List<ImmutableNode>
ImmutableNode.Builder. createChildren()
Creates a list with the children of the newly created node.private java.util.Map<ImmutableNode,ImmutableNode>
TreeData. createInverseMapping(java.util.Map<ImmutableNode,ImmutableNode> replacements)
Creates the inverse replacement mapping.private java.util.Map<ImmutableNode,ImmutableNode>
TreeData. createInverseMapping(java.util.Map<ImmutableNode,ImmutableNode> replacements)
Creates the inverse replacement mapping.private static NodeHandler<ImmutableNode>
NodeCombiner. createNodeHandler()
Creates a node handler object for immutable nodes which can be used by sub classes to perform advanced operations on nodes.private static java.util.Collection<ImmutableNode>
InMemoryNodeModel. createNodesToAdd(java.lang.String newNodeName, java.lang.Iterable<?> values)
Creates a collection with new nodes with a given name and a value from a given collection.private java.util.Map<ImmutableNode,ImmutableNode>
InMemoryNodeModel. createParentMapping(ImmutableNode root)
Creates the mapping to parent nodes for the nodes structured represented by the passed in root node.private java.util.Map<ImmutableNode,ImmutableNode>
InMemoryNodeModel. createParentMapping(ImmutableNode root)
Creates the mapping to parent nodes for the nodes structured represented by the passed in root node.private java.util.Map<ImmutableNode,java.lang.Object>
ModelTransaction. fetchReferenceMap()
Returns the map with new reference objects.private java.util.Set<ImmutableNode>
ModelTransaction.ChildrenUpdateOperation. fetchRemovalSet()
Returns a set with nodes to be removed.private java.util.Map<ImmutableNode,ImmutableNode>
ModelTransaction.ChildrenUpdateOperation. fetchReplacementMap()
Obtains the map with replacement nodes.private java.util.Map<ImmutableNode,ImmutableNode>
ModelTransaction.ChildrenUpdateOperation. fetchReplacementMap()
Obtains the map with replacement nodes.private static java.util.Collection<? extends ImmutableNode>
ImmutableNode.Builder. filterNull(java.util.Collection<? extends ImmutableNode> children)
Filters null entries from the passed in collection with child nodes.java.util.List<ImmutableNode>
AbstractImmutableNodeHandler. getChildren(ImmutableNode node)
java.util.List<ImmutableNode>
AbstractImmutableNodeHandler. getChildren(ImmutableNode node, java.lang.String name)
Gets an unmodifiable list of all children of the specified node with the given name.java.util.List<ImmutableNode>
ImmutableNode. getChildren()
Gets a list with the children of this node.java.util.List<ImmutableNode>
ImmutableNode. getChildren(java.lang.String name)
Returns a list with the children of this node.<C> java.util.List<ImmutableNode>
AbstractImmutableNodeHandler. getMatchingChildren(ImmutableNode node, NodeMatcher<C> matcher, C criterion)
Gets an unmodifiable list of all children of the specified node which are matched by the passed inNodeMatcher
against the provided criterion.NodeHandler<ImmutableNode>
InMemoryNodeModel. getNodeHandler()
Gets aNodeHandler
for dealing with the nodes managed by this model.NodeHandler<ImmutableNode>
TrackedNodeModel. getNodeHandler()
NodeHandler<ImmutableNode>
TrackedNodeHandler. getParentHandler()
Gets the parent handler.NodeKeyResolver<ImmutableNode>
ModelTransaction. getResolver()
Gets theNodeKeyResolver
used by this transaction.NodeHandler<ImmutableNode>
InMemoryNodeModel. getTrackedNodeHandler(NodeSelector selector)
Gets aNodeHandler
for a tracked node.java.util.Iterator<ImmutableNode>
ImmutableNode. iterator()
java.util.stream.Stream<ImmutableNode>
ImmutableNode. stream()
Returns a sequentialStream
with this node as its source.Methods in org.apache.commons.configuration2.tree with parameters of type ImmutableNode Modifier and Type Method Description void
ModelTransaction. addAddNodeOperation(ImmutableNode parent, ImmutableNode newChild)
Adds an operation for adding a new child to a given parent node.void
ModelTransaction. addAddNodesOperation(ImmutableNode parent, java.util.Collection<? extends ImmutableNode> newNodes)
Adds an operation for adding a number of new children to a given parent node.void
ModelTransaction. addAttributeOperation(ImmutableNode target, java.lang.String name, java.lang.Object value)
Adds an operation for adding an attribute to a target node.protected void
MergeCombiner. addAttributes(ImmutableNode.Builder result, ImmutableNode node1, ImmutableNode node2)
Handles the attributes during a combination process.protected void
OverrideCombiner. addAttributes(ImmutableNode.Builder result, ImmutableNode node1, ImmutableNode node2)
Handles the attributes during a combination process.void
ModelTransaction. addAttributesOperation(ImmutableNode target, java.util.Map<java.lang.String,java.lang.Object> attributes)
Adds an operation for adding multiple attributes to a target node.void
ModelTransaction. addChangeNodeNameOperation(ImmutableNode target, java.lang.String newName)
Adds an operation for changing the name of a target node.void
ModelTransaction. addChangeNodeValueOperation(ImmutableNode target, java.lang.Object newValue)
Adds an operation for changing the value of a target node.ImmutableNode
ImmutableNode. addChild(ImmutableNode child)
Creates a newImmutableNode
instance which is a copy of this object, but has the given child node added.ImmutableNode.Builder
ImmutableNode.Builder. addChild(ImmutableNode c)
Adds a child node to this builder.void
ModelTransaction. addClearNodeValueOperation(ImmutableNode target)
Adds an operation for clearing the value of a target node.void
ModelTransaction.ChildrenUpdateOperation. addNewNode(ImmutableNode node)
Adds a node to be added to the target of the operation.void
ModelTransaction. addNewReference(ImmutableNode node, java.lang.Object ref)
Adds a new reference object for the given node.void
ModelTransaction.ChildrenUpdateOperation. addNodeToRemove(ImmutableNode node)
Adds a node for a remove operation.void
ModelTransaction.ChildrenUpdateOperation. addNodeToReplace(ImmutableNode org, ImmutableNode replacement)
Adds a node for a replacement operation.void
ModelTransaction. addRemoveAttributeOperation(ImmutableNode target, java.lang.String name)
Adds an operation for removing an attribute from a target node.void
ModelTransaction. addRemoveNodeOperation(ImmutableNode parent, ImmutableNode node)
Adds an operation for removing a child node of a given node.protected ImmutableNode
ModelTransaction.AddAttributeOperation. apply(ImmutableNode target, ModelTransaction.Operations operations)
protected ImmutableNode
ModelTransaction.AddAttributesOperation. apply(ImmutableNode target, ModelTransaction.Operations operations)
protected ImmutableNode
ModelTransaction.ChangeNodeNameOperation. apply(ImmutableNode target, ModelTransaction.Operations operations)
protected ImmutableNode
ModelTransaction.ChangeNodeValueOperation. apply(ImmutableNode target, ModelTransaction.Operations operations)
protected ImmutableNode
ModelTransaction.ChildrenUpdateOperation. apply(ImmutableNode target, ModelTransaction.Operations operations)
Executes this operation on the provided target node returning the result.protected abstract ImmutableNode
ModelTransaction.Operation. apply(ImmutableNode target, ModelTransaction.Operations operations)
Executes this operation on the provided target node returning the result.void
ModelTransaction.Operations. apply(ImmutableNode target, int level)
Executes all operations stored in this object on the given target node.protected ImmutableNode
ModelTransaction.RemoveAttributeOperation. apply(ImmutableNode target, ModelTransaction.Operations operations)
protected ImmutableNode
MergeCombiner. canCombine(ImmutableNode node2, ImmutableNode child, java.util.List<ImmutableNode> children2)
Tests if the first node can be combined with the second node.protected ImmutableNode
OverrideCombiner. canCombine(ImmutableNode node1, ImmutableNode node2, ImmutableNode child)
Tests if a child node of the second node can be combined with the given child node of the first node.private static void
ImmutableNode. checkChildNode(ImmutableNode child)
Checks whether the given child node is not null.(package private) static boolean
AbstractImmutableNodeHandler. checkIfNodeDefined(ImmutableNode node)
Checks if the passed in node is defined.(package private) static boolean
InMemoryNodeModel. checkIfNodeDefined(ImmutableNode node)
Checks if the passed in node is defined.ImmutableNode
MergeCombiner. combine(ImmutableNode node1, ImmutableNode node2)
Combines the given nodes to a new union node.abstract ImmutableNode
NodeCombiner. combine(ImmutableNode node1, ImmutableNode node2)
Combines the hierarchies represented by the given root nodes.ImmutableNode
OverrideCombiner. combine(ImmutableNode node1, ImmutableNode node2)
Constructs an override combination for the passed in node structures.ImmutableNode
UnionCombiner. combine(ImmutableNode node1, ImmutableNode node2)
Combines the given nodes to a new union node.private static TreeData
InMemoryNodeModel. createDataWithTrackedChildNode(TreeData current, ImmutableNode parent, java.lang.String childName, NodeKeyResolver<ImmutableNode> resolver, org.apache.commons.lang3.mutable.MutableObject<NodeSelector> refSelector)
Creates a new data object with a tracked child node of the given parent node.private java.util.Map<ImmutableNode,ImmutableNode>
InMemoryNodeModel. createParentMapping(ImmutableNode root)
Creates the mapping to parent nodes for the nodes structured represented by the passed in root node.private TreeData
InMemoryNodeModel. createTreeData(ImmutableNode root, TreeData current)
Creates aTreeData
object for the specified root node.private TreeData
InMemoryNodeModel. createTreeDataForRootAndTracker(ImmutableNode root, NodeTracker newTracker)
Creates aTreeData
object for the specified root node andNodeTracker
.NodeTracker.TrackedNodeData
NodeTracker.TrackedNodeData. detach(ImmutableNode newNode)
Returns an instance with the detached flag set to true.private static java.lang.String
InMemoryNodeModel. determineRootName(ImmutableNode rootNode, ImmutableNode node, java.lang.String rootName)
Determines the name of the root node for a merge operation.private static NodeTracker.TrackedNodeData
NodeTracker. determineUpdatedTrackedNodeData(ImmutableNode root, NodeSelector txTarget, NodeKeyResolver<ImmutableNode> resolver, NodeHandler<ImmutableNode> handler, java.util.Map.Entry<NodeSelector,NodeTracker.TrackedNodeData> e)
Returns aTrackedNodeData
object for an update operation.(package private) ModelTransaction.Operations
ModelTransaction. fetchOperations(ImmutableNode target, int level)
Obtains theOperations
object for manipulating the specified node.protected ImmutableNode
UnionCombiner. findCombineNode(ImmutableNode node1, ImmutableNode node2, ImmutableNode child)
Tries to find a child node of the second source node, with which a child of the first source node can be combined.java.util.Set<java.lang.String>
AbstractImmutableNodeHandler. getAttributes(ImmutableNode node)
java.lang.Object
AbstractImmutableNodeHandler. getAttributeValue(ImmutableNode node, java.lang.String name)
ImmutableNode
AbstractImmutableNodeHandler. getChild(ImmutableNode node, int index)
java.util.List<ImmutableNode>
AbstractImmutableNodeHandler. getChildren(ImmutableNode node)
java.util.List<ImmutableNode>
AbstractImmutableNodeHandler. getChildren(ImmutableNode node, java.lang.String name)
Gets an unmodifiable list of all children of the specified node with the given name.int
AbstractImmutableNodeHandler. getChildrenCount(ImmutableNode node, java.lang.String name)
private void
NodeSelector. getFilteredResults(ImmutableNode root, NodeKeyResolver<ImmutableNode> resolver, NodeHandler<ImmutableNode> handler, java.lang.String key, java.util.List<ImmutableNode> nodes)
Executes a query for a given key and filters the results for nodes only.<C> java.util.List<ImmutableNode>
AbstractImmutableNodeHandler. getMatchingChildren(ImmutableNode node, NodeMatcher<C> matcher, C criterion)
Gets an unmodifiable list of all children of the specified node which are matched by the passed inNodeMatcher
against the provided criterion.<C> int
AbstractImmutableNodeHandler. getMatchingChildrenCount(ImmutableNode node, NodeMatcher<C> matcher, C criterion)
(package private) ImmutableNode
ModelTransaction. getParent(ImmutableNode node)
Gets the parent node of the given node.ImmutableNode
TrackedNodeHandler. getParent(ImmutableNode node)
Gets the parent of the specified node.ImmutableNode
TreeData. getParent(ImmutableNode node)
Gets the parent node of the specified node.java.lang.Object
ReferenceNodeHandler. getReference(ImmutableNode node)
Gets the reference object associated with the specified node.java.lang.Object
ReferenceTracker. getReference(ImmutableNode node)
Gets the reference object associated with the given node.java.lang.Object
TreeData. getReference(ImmutableNode node)
Gets the reference object associated with the specified node.java.lang.Object
AbstractImmutableNodeHandler. getValue(ImmutableNode node)
private void
ModelTransaction.Operations. handleAddedNodes(ImmutableNode node)
Checks whether new nodes have been added during operation execution.private static ImmutableNode
TreeData. handleReplacements(ImmutableNode replace, java.util.Map<ImmutableNode,ImmutableNode> mapping)
Checks whether the passed in node is subject of a replacement by another one.boolean
AbstractImmutableNodeHandler. hasAttributes(ImmutableNode node)
int
AbstractImmutableNodeHandler. indexOfChild(ImmutableNode parent, ImmutableNode child)
private static ImmutableNode
InMemoryNodeModel. initialRootNode(ImmutableNode providedRoot)
Determines the initial root node of this model.boolean
AbstractImmutableNodeHandler. isDefined(ImmutableNode node)
Checks whether the specified node is defined.boolean
NodeCombiner. isListNode(ImmutableNode node)
Checks if a node is a list node.private int
ModelTransaction. level(ImmutableNode node)
Determines the level of the specified node in the current hierarchy.private static boolean
MergeCombiner. matchAttributes(java.util.Map<java.lang.String,java.lang.Object> attrs1, ImmutableNode node)
Checks whether the attributes of the passed in node are compatible.void
InMemoryNodeModel. mergeRoot(ImmutableNode node, java.lang.String rootName, java.util.Map<ImmutableNode,?> references, java.lang.Object rootRef, NodeKeyResolver<ImmutableNode> resolver)
Merges the root node of this model with the specified node.java.lang.String
AbstractImmutableNodeHandler. nodeName(ImmutableNode node)
private static void
TreeUtils. printTree(java.io.PrintStream stream, java.lang.String indent, ImmutableNode result)
static void
TreeUtils. printTree(java.io.PrintStream stream, ImmutableNode result)
Print out the data in the configuration.private void
ModelTransaction.Operations. propagateChange(ImmutableNode target, ImmutableNode node, int level)
Propagates the changes on the target node to the next level above of the hierarchy.ImmutableNode
ImmutableNode. removeChild(ImmutableNode child)
Returns a newImmutableNode
instance which is a copy of this object, but with the given child node removed.private void
ModelTransaction. removeNodeFromReplacementMapping(ImmutableNode node)
Removes the specified node completely from the replacement mapping.private void
ModelTransaction. removeNodesFromParentAndReplacementMapping(ImmutableNode root)
Removes a node and its children (recursively) from the parent and the replacement mappings.private boolean
InMemoryNodeModel. replaceActiveTrackedNode(TreeData currentData, NodeSelector selector, ImmutableNode newNode)
Replaces an active tracked node.NodeTracker
NodeTracker. replaceAndDetachTrackedNode(NodeSelector selector, ImmutableNode newNode)
Replaces a tracked node by another one.ImmutableNode
ImmutableNode. replaceChild(ImmutableNode oldChild, ImmutableNode newChild)
Returns a newImmutableNode
instance which is a copy of this object, but with the given child replaced by the new one.private boolean
InMemoryNodeModel. replaceDetachedTrackedNode(TreeData currentData, NodeSelector selector, ImmutableNode newNode)
Replaces a tracked node if it is already detached.void
InMemoryNodeModel. replaceRoot(ImmutableNode newRoot, NodeKeyResolver<ImmutableNode> resolver)
Replaces the root node of this model.void
InMemoryNodeModel. replaceTrackedNode(NodeSelector selector, ImmutableNode newNode)
Replaces a tracked node by another node.ImmutableNode
NodeSelector. select(ImmutableNode root, NodeKeyResolver<ImmutableNode> resolver, NodeHandler<ImmutableNode> handler)
Applies thisNodeSelector
on the specified root node.void
InMemoryNodeModel. setRootNode(ImmutableNode newRoot)
Sets a new root node for this model.void
TrackedNodeModel. setRootNode(ImmutableNode newRoot)
private static NodeTracker.TrackedNodeData
NodeTracker. trackDataForAddedObserver(ImmutableNode root, NodeSelector selector, NodeKeyResolver<ImmutableNode> resolver, NodeHandler<ImmutableNode> handler, NodeTracker.TrackedNodeData trackData)
Creates aTrackedNodeData
object for a newly added observer for the specified node selector.NodeTracker
NodeTracker. trackNode(ImmutableNode root, NodeSelector selector, NodeKeyResolver<ImmutableNode> resolver, NodeHandler<ImmutableNode> handler)
Adds a node to be tracked.NodeTracker
NodeTracker. update(ImmutableNode root, NodeSelector txTarget, NodeKeyResolver<ImmutableNode> resolver, NodeHandler<ImmutableNode> handler)
Updates tracking information after the node structure has been changed.private static TreeData
InMemoryNodeModel. updateDataWithNewTrackedNode(TreeData current, ImmutableNode node, NodeKeyResolver<ImmutableNode> resolver, org.apache.commons.lang3.mutable.MutableObject<NodeSelector> refSelector)
Adds a tracked node that has already been resolved to the specified data object.NodeTracker.TrackedNodeData
NodeTracker.TrackedNodeData. updateNode(ImmutableNode newNode)
Updates the node reference.(package private) static void
InMemoryNodeModel. updateParentMapping(java.util.Map<ImmutableNode,ImmutableNode> parents, ImmutableNode root)
Updates the mapping from nodes to their parents for the passed in hierarchy of nodes.Method parameters in org.apache.commons.configuration2.tree with type arguments of type ImmutableNode Modifier and Type Method Description void
ModelTransaction. addAddNodesOperation(ImmutableNode parent, java.util.Collection<? extends ImmutableNode> newNodes)
Adds an operation for adding a number of new children to a given parent node.private static void
InMemoryNodeModel. addAttributeProperty(ModelTransaction tx, NodeAddData<ImmutableNode> addData, java.lang.Iterable<?> values)
Handles an add property operation if the property to be added is an attribute.ImmutableNode.Builder
ImmutableNode.Builder. addChildren(java.util.Collection<? extends ImmutableNode> children)
Adds multiple child nodes to this builder.void
ModelTransaction.ChildrenUpdateOperation. addNewNodes(java.util.Collection<? extends ImmutableNode> nodes)
Adds a collection of nodes to be added to the target of the operation.void
ModelTransaction. addNewReferences(java.util.Map<ImmutableNode,?> refs)
Adds a map with new reference objects.private static void
InMemoryNodeModel. addNodeProperty(ModelTransaction tx, NodeAddData<ImmutableNode> addData, java.lang.Iterable<?> values)
Handles an add property operation if the property to be added is a node.void
InMemoryNodeModel. addNodes(java.lang.String key, java.util.Collection<? extends ImmutableNode> nodes, NodeKeyResolver<ImmutableNode> resolver)
void
InMemoryNodeModel. addNodes(java.lang.String key, java.util.Collection<? extends ImmutableNode> nodes, NodeKeyResolver<ImmutableNode> resolver)
void
InMemoryNodeModel. addNodes(java.lang.String key, NodeSelector selector, java.util.Collection<? extends ImmutableNode> nodes, NodeKeyResolver<ImmutableNode> resolver)
Adds new nodes using a tracked node as root node.void
InMemoryNodeModel. addNodes(java.lang.String key, NodeSelector selector, java.util.Collection<? extends ImmutableNode> nodes, NodeKeyResolver<ImmutableNode> resolver)
Adds new nodes using a tracked node as root node.void
TrackedNodeModel. addNodes(java.lang.String key, java.util.Collection<? extends ImmutableNode> nodes, NodeKeyResolver<ImmutableNode> resolver)
void
TrackedNodeModel. addNodes(java.lang.String key, java.util.Collection<? extends ImmutableNode> nodes, NodeKeyResolver<ImmutableNode> resolver)
private static void
InMemoryNodeModel. addNodesByAddData(ModelTransaction tx, NodeAddData<ImmutableNode> addData, java.util.Collection<ImmutableNode> newNodes)
Initializes a transaction to add a collection of nodes as described by aNodeAddData
object.private static void
InMemoryNodeModel. addNodesByAddData(ModelTransaction tx, NodeAddData<ImmutableNode> addData, java.util.Collection<ImmutableNode> newNodes)
Initializes a transaction to add a collection of nodes as described by aNodeAddData
object.void
InMemoryNodeModel. addProperty(java.lang.String key, java.lang.Iterable<?> values, NodeKeyResolver<ImmutableNode> resolver)
void
InMemoryNodeModel. addProperty(java.lang.String key, NodeSelector selector, java.lang.Iterable<?> values, NodeKeyResolver<ImmutableNode> resolver)
Adds new property values using a tracked node as root node.void
TrackedNodeModel. addProperty(java.lang.String key, java.lang.Iterable<?> values, NodeKeyResolver<ImmutableNode> resolver)
ReferenceTracker
ReferenceTracker. addReferences(java.util.Map<ImmutableNode,?> refs)
Adds all references stored in the passed in map to the managed references.protected ImmutableNode
MergeCombiner. canCombine(ImmutableNode node2, ImmutableNode child, java.util.List<ImmutableNode> children2)
Tests if the first node can be combined with the second node.void
InMemoryNodeModel. clear(NodeKeyResolver<ImmutableNode> resolver)
Removes all data from this model.void
TrackedNodeModel. clear(NodeKeyResolver<ImmutableNode> resolver)
Removes all data from this model.void
InMemoryNodeModel. clearProperty(java.lang.String key, NodeKeyResolver<ImmutableNode> resolver)
Clears the value of a property.void
InMemoryNodeModel. clearProperty(java.lang.String key, NodeSelector selector, NodeKeyResolver<ImmutableNode> resolver)
Clears a property using a tracked node as root node.void
TrackedNodeModel. clearProperty(java.lang.String key, NodeKeyResolver<ImmutableNode> resolver)
java.util.List<QueryResult<ImmutableNode>>
InMemoryNodeModel. clearTree(java.lang.String key, NodeKeyResolver<ImmutableNode> resolver)
Removes the sub trees defined by the given key from this model.java.util.List<QueryResult<ImmutableNode>>
InMemoryNodeModel. clearTree(java.lang.String key, NodeSelector selector, NodeKeyResolver<ImmutableNode> resolver)
Clears a whole sub tree using a tracked node as root node.java.util.List<QueryResult<ImmutableNode>>
TrackedNodeModel. clearTree(java.lang.String key, NodeKeyResolver<ImmutableNode> resolver)
private static TreeData
InMemoryNodeModel. createDataWithTrackedChildNode(TreeData current, ImmutableNode parent, java.lang.String childName, NodeKeyResolver<ImmutableNode> resolver, org.apache.commons.lang3.mutable.MutableObject<NodeSelector> refSelector)
Creates a new data object with a tracked child node of the given parent node.private java.util.Map<ImmutableNode,ImmutableNode>
TreeData. createInverseMapping(java.util.Map<ImmutableNode,ImmutableNode> replacements)
Creates the inverse replacement mapping.private java.util.Map<ImmutableNode,ImmutableNode>
TreeData. createInverseMapping(java.util.Map<ImmutableNode,ImmutableNode> replacements)
Creates the inverse replacement mapping.private static ImmutableNode
InMemoryNodeModel. createNodeOnPath(java.util.Iterator<java.lang.String> it, java.util.Collection<ImmutableNode> newNodes)
Recursive helper method for creating a path node for an add operation.private static ImmutableNode
InMemoryNodeModel. createNodeToAddWithPath(NodeAddData<ImmutableNode> addData, java.util.Collection<ImmutableNode> newNodes)
Creates a node structure consisting of the path nodes defined by the passed inNodeAddData
instance and all new child nodes.private static ImmutableNode
InMemoryNodeModel. createNodeToAddWithPath(NodeAddData<ImmutableNode> addData, java.util.Collection<ImmutableNode> newNodes)
Creates a node structure consisting of the path nodes defined by the passed inNodeAddData
instance and all new child nodes.private static TreeData
InMemoryNodeModel. createSelectorsForTrackedNodes(org.apache.commons.lang3.mutable.Mutable<java.util.Collection<NodeSelector>> refSelectors, java.util.List<ImmutableNode> nodes, TreeData current, NodeKeyResolver<ImmutableNode> resolver)
Creates tracked node entries for the specified nodes and creates the corresponding selectors.private static TreeData
InMemoryNodeModel. createSelectorsForTrackedNodes(org.apache.commons.lang3.mutable.Mutable<java.util.Collection<NodeSelector>> refSelectors, java.util.List<ImmutableNode> nodes, TreeData current, NodeKeyResolver<ImmutableNode> resolver)
Creates tracked node entries for the specified nodes and creates the corresponding selectors.private static NodeTracker.TrackedNodeData
NodeTracker. determineUpdatedTrackedNodeData(ImmutableNode root, NodeSelector txTarget, NodeKeyResolver<ImmutableNode> resolver, NodeHandler<ImmutableNode> handler, java.util.Map.Entry<NodeSelector,NodeTracker.TrackedNodeData> e)
Returns aTrackedNodeData
object for an update operation.private static NodeTracker.TrackedNodeData
NodeTracker. determineUpdatedTrackedNodeData(ImmutableNode root, NodeSelector txTarget, NodeKeyResolver<ImmutableNode> resolver, NodeHandler<ImmutableNode> handler, java.util.Map.Entry<NodeSelector,NodeTracker.TrackedNodeData> e)
Returns aTrackedNodeData
object for an update operation.private boolean
InMemoryNodeModel. executeTransactionOnCurrentStructure(InMemoryNodeModel.TransactionInitializer txInit, NodeSelector selector, TreeData currentData, NodeKeyResolver<ImmutableNode> resolver)
Executes a transaction on the current data of this model.private boolean
InMemoryNodeModel. executeTransactionOnDetachedTrackedNode(InMemoryNodeModel.TransactionInitializer txInit, NodeSelector selector, TreeData currentData, NodeKeyResolver<ImmutableNode> resolver)
Tries to execute a transaction on the model of a detached tracked node.private static java.util.Collection<? extends ImmutableNode>
ImmutableNode.Builder. filterNull(java.util.Collection<? extends ImmutableNode> children)
Filters null entries from the passed in collection with child nodes.private void
NodeSelector. getFilteredResults(ImmutableNode root, NodeKeyResolver<ImmutableNode> resolver, NodeHandler<ImmutableNode> handler, java.lang.String key, java.util.List<ImmutableNode> nodes)
Executes a query for a given key and filters the results for nodes only.private void
NodeSelector. getFilteredResults(ImmutableNode root, NodeKeyResolver<ImmutableNode> resolver, NodeHandler<ImmutableNode> handler, java.lang.String key, java.util.List<ImmutableNode> nodes)
Executes a query for a given key and filters the results for nodes only.private void
NodeSelector. getFilteredResults(ImmutableNode root, NodeKeyResolver<ImmutableNode> resolver, NodeHandler<ImmutableNode> handler, java.lang.String key, java.util.List<ImmutableNode> nodes)
Executes a query for a given key and filters the results for nodes only.private static ImmutableNode
TreeData. handleReplacements(ImmutableNode replace, java.util.Map<ImmutableNode,ImmutableNode> mapping)
Checks whether the passed in node is subject of a replacement by another one.private static ImmutableNode
TreeData. handleReplacements(ImmutableNode replace, java.util.Map<ImmutableNode,ImmutableNode> mapping)
Checks whether the passed in node is subject of a replacement by another one.private void
InMemoryNodeModel. initializeAddTransaction(ModelTransaction tx, java.lang.String key, java.lang.Iterable<?> values, NodeKeyResolver<ImmutableNode> resolver)
Initializes a transaction for an add operation.private static boolean
InMemoryNodeModel. initializeClearTransaction(ModelTransaction tx, java.util.Collection<QueryResult<ImmutableNode>> results)
Initializes a transaction to clear the values of a property based on the passed in collection of affected results.private static boolean
InMemoryNodeModel. initializeUpdateTransaction(ModelTransaction tx, java.util.Map<QueryResult<ImmutableNode>,java.lang.Object> changedValues)
Initializes a transaction to change the values of some query results based on the passed in map.void
InMemoryNodeModel. mergeRoot(ImmutableNode node, java.lang.String rootName, java.util.Map<ImmutableNode,?> references, java.lang.Object rootRef, NodeKeyResolver<ImmutableNode> resolver)
Merges the root node of this model with the specified node.void
InMemoryNodeModel. mergeRoot(ImmutableNode node, java.lang.String rootName, java.util.Map<ImmutableNode,?> references, java.lang.Object rootRef, NodeKeyResolver<ImmutableNode> resolver)
Merges the root node of this model with the specified node.void
ModelTransaction.Operations. newNodesAdded(java.util.Collection<ImmutableNode> newNodes)
Notifies this object that new nodes have been added by a sub operation.ImmutableNode
ImmutableNode. replaceChildren(java.util.Collection<ImmutableNode> newChildren)
Returns a newImmutableNode
instance which is a copy of this object, but with the children replaced by the ones in the passed in collection.void
InMemoryNodeModel. replaceRoot(ImmutableNode newRoot, NodeKeyResolver<ImmutableNode> resolver)
Replaces the root node of this model.ImmutableNode
NodeSelector. select(ImmutableNode root, NodeKeyResolver<ImmutableNode> resolver, NodeHandler<ImmutableNode> handler)
Applies thisNodeSelector
on the specified root node.ImmutableNode
NodeSelector. select(ImmutableNode root, NodeKeyResolver<ImmutableNode> resolver, NodeHandler<ImmutableNode> handler)
Applies thisNodeSelector
on the specified root node.java.util.Collection<NodeSelector>
InMemoryNodeModel. selectAndTrackNodes(java.lang.String key, NodeKeyResolver<ImmutableNode> resolver)
Allows tracking all nodes selected by a key.void
InMemoryNodeModel. setProperty(java.lang.String key, java.lang.Object value, NodeKeyResolver<ImmutableNode> resolver)
void
InMemoryNodeModel. setProperty(java.lang.String key, NodeSelector selector, java.lang.Object value, NodeKeyResolver<ImmutableNode> resolver)
Sets the value of a property using a tracked node as root node.void
TrackedNodeModel. setProperty(java.lang.String key, java.lang.Object value, NodeKeyResolver<ImmutableNode> resolver)
java.util.Collection<NodeSelector>
InMemoryNodeModel. trackChildNodes(java.lang.String key, NodeKeyResolver<ImmutableNode> resolver)
Tracks all nodes which are children of the node selected by the passed in key.NodeSelector
InMemoryNodeModel. trackChildNodeWithCreation(java.lang.String key, java.lang.String childName, NodeKeyResolver<ImmutableNode> resolver)
Tracks a node which is a child of another node selected by the passed in key.private static NodeTracker.TrackedNodeData
NodeTracker. trackDataForAddedObserver(ImmutableNode root, NodeSelector selector, NodeKeyResolver<ImmutableNode> resolver, NodeHandler<ImmutableNode> handler, NodeTracker.TrackedNodeData trackData)
Creates aTrackedNodeData
object for a newly added observer for the specified node selector.private static NodeTracker.TrackedNodeData
NodeTracker. trackDataForAddedObserver(ImmutableNode root, NodeSelector selector, NodeKeyResolver<ImmutableNode> resolver, NodeHandler<ImmutableNode> handler, NodeTracker.TrackedNodeData trackData)
Creates aTrackedNodeData
object for a newly added observer for the specified node selector.void
InMemoryNodeModel. trackNode(NodeSelector selector, NodeKeyResolver<ImmutableNode> resolver)
Adds a node to be tracked.NodeTracker
NodeTracker. trackNode(ImmutableNode root, NodeSelector selector, NodeKeyResolver<ImmutableNode> resolver, NodeHandler<ImmutableNode> handler)
Adds a node to be tracked.NodeTracker
NodeTracker. trackNode(ImmutableNode root, NodeSelector selector, NodeKeyResolver<ImmutableNode> resolver, NodeHandler<ImmutableNode> handler)
Adds a node to be tracked.NodeTracker
NodeTracker. update(ImmutableNode root, NodeSelector txTarget, NodeKeyResolver<ImmutableNode> resolver, NodeHandler<ImmutableNode> handler)
Updates tracking information after the node structure has been changed.NodeTracker
NodeTracker. update(ImmutableNode root, NodeSelector txTarget, NodeKeyResolver<ImmutableNode> resolver, NodeHandler<ImmutableNode> handler)
Updates tracking information after the node structure has been changed.private static TreeData
InMemoryNodeModel. updateDataWithNewTrackedNode(TreeData current, ImmutableNode node, NodeKeyResolver<ImmutableNode> resolver, org.apache.commons.lang3.mutable.MutableObject<NodeSelector> refSelector)
Adds a tracked node that has already been resolved to the specified data object.private void
InMemoryNodeModel. updateModel(InMemoryNodeModel.TransactionInitializer txInit, NodeSelector selector, NodeKeyResolver<ImmutableNode> resolver)
Performs a non-blocking, thread-safe update of this model based on a transaction initialized by the passed in initializer.(package private) static void
InMemoryNodeModel. updateParentMapping(java.util.Map<ImmutableNode,ImmutableNode> parents, ImmutableNode root)
Updates the mapping from nodes to their parents for the passed in hierarchy of nodes.(package private) static void
InMemoryNodeModel. updateParentMapping(java.util.Map<ImmutableNode,ImmutableNode> parents, ImmutableNode root)
Updates the mapping from nodes to their parents for the passed in hierarchy of nodes.ReferenceTracker
ReferenceTracker. updateReferences(java.util.Map<ImmutableNode,ImmutableNode> replacedNodes, java.util.Collection<ImmutableNode> removedNodes)
Updates the references managed by this object at the end of a model transaction.ReferenceTracker
ReferenceTracker. updateReferences(java.util.Map<ImmutableNode,ImmutableNode> replacedNodes, java.util.Collection<ImmutableNode> removedNodes)
Updates the references managed by this object at the end of a model transaction.ReferenceTracker
ReferenceTracker. updateReferences(java.util.Map<ImmutableNode,ImmutableNode> replacedNodes, java.util.Collection<ImmutableNode> removedNodes)
Updates the references managed by this object at the end of a model transaction.Constructors in org.apache.commons.configuration2.tree with parameters of type ImmutableNode Constructor Description InMemoryNodeModel(ImmutableNode root)
Creates a new instance ofInMemoryNodeModel
and initializes it from the given root node.TrackedNodeData(ImmutableNode nd)
Creates a new instance ofTrackedNodeData
and initializes it with the current reference to the tracked node.TrackedNodeData(ImmutableNode nd, int obsCount, InMemoryNodeModel detachedNodeModel)
Creates a new instance ofTrackedNodeData
and initializes its properties.TrackedNodeHandler(ImmutableNode root, NodeHandler<ImmutableNode> handler)
Creates a new instance ofTrackedNodeHandler
and initializes it with all required information.TreeData(ImmutableNode root, java.util.Map<ImmutableNode,ImmutableNode> parentMapping, java.util.Map<ImmutableNode,ImmutableNode> replacements, NodeTracker tracker, ReferenceTracker refTracker)
Creates a new instance ofTreeData
and initializes it with all data to be stored.Constructor parameters in org.apache.commons.configuration2.tree with type arguments of type ImmutableNode Constructor Description Builder(java.util.List<ImmutableNode> dirChildren, java.util.Map<java.lang.String,java.lang.Object> dirAttrs)
Creates a new instance ofBuilder
and initializes the children and attributes of the new node.ModelTransaction(TreeData treeData, NodeSelector selector, NodeKeyResolver<ImmutableNode> resolver)
Creates a new instance ofModelTransaction
for the current tree data.ReferenceTracker(java.util.Map<ImmutableNode,java.lang.Object> refs, java.util.List<java.lang.Object> removedRefs)
Creates a new instance ofReferenceTracker
and sets the data to be managed.TrackedNodeHandler(ImmutableNode root, NodeHandler<ImmutableNode> handler)
Creates a new instance ofTrackedNodeHandler
and initializes it with all required information.TreeData(ImmutableNode root, java.util.Map<ImmutableNode,ImmutableNode> parentMapping, java.util.Map<ImmutableNode,ImmutableNode> replacements, NodeTracker tracker, ReferenceTracker refTracker)
Creates a new instance ofTreeData
and initializes it with all data to be stored.TreeData(ImmutableNode root, java.util.Map<ImmutableNode,ImmutableNode> parentMapping, java.util.Map<ImmutableNode,ImmutableNode> replacements, NodeTracker tracker, ReferenceTracker refTracker)
Creates a new instance ofTreeData
and initializes it with all data to be stored.
-