/** * Helper method for fetching a list of all nodes that are addressed by the * specified key. * * @param key the key * @return a list with all affected nodes (never <b>null </b>) */ protected List<ConfigurationNode> fetchNodeList(String key) { return getExpressionEngine().query(getRootNode(), key); }
/** * Visits the specified node. If this node has a value, its key is added * to the internal list. * * @param node the node to be visited */ @Override public void visitBeforeChildren(ConfigurationNode node) { String parentKey = parentKeys.isEmpty() ? null : (String) parentKeys.peek(); String key = getExpressionEngine().nodeKey(node, parentKey); parentKeys.push(key); if (node.getValue() != null) { keyList.add(key); } } }
/** * Adds the property with the specified key. This task will be delegated to * the associated {@code ExpressionEngine}, so the passed in key * must match the requirements of this implementation. * * @param key the key of the new property * @param obj the value of the new property */ @Override protected void addPropertyDirect(String key, Object obj) { NodeAddData data = getExpressionEngine().prepareAdd(getRootNode(), key); ConfigurationNode node = processNodeAddData(data); node.setValue(obj); }
/** * Adds the property with the specified key. This task will be delegated to * the associated {@code ExpressionEngine}, so the passed in key * must match the requirements of this implementation. * * @param key the key of the new property * @param obj the value of the new property */ @Override protected void addPropertyDirect(String key, Object obj) { NodeAddData data = getExpressionEngine().prepareAdd(getRootNode(), key); ConfigurationNode node = processNodeAddData(data); node.setValue(obj); }
/** * Helper method for fetching a list of all nodes that are addressed by the * specified key. * * @param key the key * @return a list with all affected nodes (never <b>null </b>) */ protected List<ConfigurationNode> fetchNodeList(String key) { return getExpressionEngine().query(getRootNode(), key); }
parent = processNodeAddData(getExpressionEngine().prepareAdd( getRootNode(), key));
/** * Visits the specified node. If this node has a value, its key is added * to the internal list. * * @param node the node to be visited */ @Override public void visitBeforeChildren(ConfigurationNode node) { String parentKey = parentKeys.isEmpty() ? null : (String) parentKeys.peek(); String key = getExpressionEngine().nodeKey(node, parentKey); parentKeys.push(key); if (node.getValue() != null) { keyList.add(key); } } }
/** * Obtains a list with the nodes referred to by the specified key. This * method queries the expression engine of the wrapped configuration to * resolve the key. * * @param key the configuration key * @return a list with the configuration nodes this key points to */ private List<ConfigurationNode> nodesForKey(String key) { return getConfiguration().getExpressionEngine().query( getConfiguration().getRootNode(), key); }
parent = processNodeAddData(getExpressionEngine().prepareAdd( getRootNode(), key));
for (ConfigurationNode pathNode : lstPathToRoot) key = getParent().getExpressionEngine().nodeKey(pathNode, key);
for (ConfigurationNode pathNode : lstPathToRoot) key = getParent().getExpressionEngine().nodeKey(pathNode, key);