/** * Creates a new instance of {@code ConfigurationAttributePointer}. * * @param parent the parent node pointer * @param attrName the name of the managed attribute */ public ConfigurationAttributePointer(final ConfigurationNodePointer<T> parent, final String attrName) { super(parent); attributeResult = QueryResult.createAttributeResult( parent.getConfigurationNode(), attrName); }
/** * Helper method for checking whether an attribute is defined and adding it * to the list of attributes to iterate over. * * @param parent the parent node pointer * @param result the result list * @param name the name of the current attribute */ private void addAttributeData(final ConfigurationNodePointer<T> parent, final List<String> result, final String name) { if (parent.getNodeHandler().getAttributeValue( parent.getConfigurationNode(), name) != null) { result.add(name); } } }
/** * Creates a new instance of {@code ConfigurationNodeIteratorChildren} and * initializes it. * * @param parent the parent pointer * @param nodeTest the test selecting the sub nodes * @param reverse the reverse flag * @param startsWith the first element of the iteration */ public ConfigurationNodeIteratorChildren( final ConfigurationNodePointer<T> parent, final NodeTest nodeTest, final boolean reverse, final ConfigurationNodePointer<T> startsWith) { super(parent, reverse); final T root = parent.getConfigurationNode(); subNodes = createSubNodeList(root, nodeTest); if (startsWith != null) { setStartOffset(findStartIndex(subNodes, startsWith.getConfigurationNode())); } else { if (reverse) { setStartOffset(size()); } } }
.getAttributes(parent.getConfigurationNode())); final String prefix = (name.getPrefix() != null) ? prefixName(name.getPrefix(),