/** * Evaluates the given key and returns all matching nodes. This method * supports the syntax as described in the class comment. * * @param root the root node * @param key the key * @return a list with the matching nodes */ public List<ConfigurationNode> query(ConfigurationNode root, String key) { List<ConfigurationNode> nodes = new LinkedList<ConfigurationNode>(); findNodesForKey(new DefaultConfigurationKey(this, key).iterator(), root, nodes); return nodes; }
/** * Evaluates the given key and returns all matching nodes. This method * supports the syntax as described in the class comment. * * @param root the root node * @param key the key * @return a list with the matching nodes */ public List<ConfigurationNode> query(ConfigurationNode root, String key) { List<ConfigurationNode> nodes = new LinkedList<ConfigurationNode>(); findNodesForKey(new DefaultConfigurationKey(this, key).iterator(), root, nodes); return nodes; }
/** * Splits the at path into its components. * * @param at the at string * @return a collection with the names of the single components */ private Collection<String> parseAt(String at) { if (at == null) { return null; } Collection<String> result = new ArrayList<String>(); DefaultConfigurationKey.KeyIterator it = new DefaultConfigurationKey( AT_ENGINE, at).iterator(); while (it.hasNext()) { result.add(it.nextKey()); } return result; } }
/** * Splits the at path into its components. * * @param at the at string * @return a collection with the names of the single components */ private Collection<String> parseAt(String at) { if (at == null) { return null; } Collection<String> result = new ArrayList<String>(); DefaultConfigurationKey.KeyIterator it = new DefaultConfigurationKey( AT_ENGINE, at).iterator(); while (it.hasNext()) { result.add(it.nextKey()); } return result; } }
DefaultConfigurationKey key = new DefaultConfigurationKey(this, parentKey); if (node.isAttribute())
DefaultConfigurationKey key = new DefaultConfigurationKey(this, parentKey); if (node.isAttribute())
DefaultConfigurationKey.KeyIterator it = new DefaultConfigurationKey( this, key).iterator(); if (!it.hasNext())
DefaultConfigurationKey.KeyIterator it = new DefaultConfigurationKey( this, key).iterator(); if (!it.hasNext())