/** * Create a new path from this path with any value filters removed. * * @return A new path from this path with any value filters removed. */ public Path withoutFilters() { ArrayList<Element> newElements = new ArrayList<Element>(elements.size()); for(Element element : elements) { newElements.add(new Element(element.getAttribute(), null)); } return new Path(schemaUrn, newElements); }
/** * Create a new path to a sub-set of values of a sub-attribute of the * attribute referenced by this path. * * @param attribute The name of the sub-attribute. * @param valueFilter The value filter. * * @return A new path to a sub-attribute of the attribute referenced by this * path. */ public Path attribute(final String attribute, final Filter valueFilter) { List<Element> newElements = new ArrayList<Element>(this.elements); newElements.add(new Element(attribute, valueFilter)); return new Path(schemaUrn, newElements); }
/** * Create a new path from this path with any value filters removed. * * @return A new path from this path with any value filters removed. */ public Path withoutFilters() { ArrayList<Element> newElements = new ArrayList<Element>(elements.size()); for(Element element : elements) { newElements.add(new Element(element.getAttribute(), null)); } return new Path(schemaUrn, newElements); }
/** * Create a new path where the attribute and filter at the specified index * is replaced with those provided. * * @param index The index of the element to replace. * @param attribute The replacement attribute. * @param valueFilter The replacement value filter. * @return The new path. */ public Path replace(final int index, final String attribute, final Filter valueFilter) { List<Element> newElements = new ArrayList<Element>(this.elements); newElements.set(index, new Element(attribute, valueFilter)); return new Path(schemaUrn, newElements); }
/** * Create a new path where the attribute and filter at the specified index * is replaced with those provided. * * @param index The index of the element to replace. * @param attribute The replacement attribute. * @param valueFilter The replacement value filter. * @return The new path. */ public Path replace(final int index, final String attribute, final Filter valueFilter) { List<Element> newElements = new ArrayList<Element>(this.elements); newElements.set(index, new Element(attribute, valueFilter)); return new Path(schemaUrn, newElements); }
/** * Create a new path to a sub-set of values of a sub-attribute of the * attribute referenced by this path. * * @param attribute The name of the sub-attribute. * @param valueFilter The value filter. * * @return A new path to a sub-attribute of the attribute referenced by this * path. */ public Path attribute(final String attribute, final Filter valueFilter) { List<Element> newElements = new ArrayList<Element>(this.elements); newElements.add(new Element(attribute, valueFilter)); return new Path(schemaUrn, newElements); }
/** * Create a new path where the filter at the specified index is replaced with * the one provided. * * @param index The index of the element to replace. * @param valueFilter The replacement value filter. * @return The new path. */ public Path replace(final int index, final Filter valueFilter) { List<Element> newElements = new ArrayList<Element>(this.elements); newElements.set(index, new Element(this.elements.get(index).getAttribute(), valueFilter)); return new Path(schemaUrn, newElements); }
/** * Create a new path where the attribute at the specified index is replaced * with the one provided. * * @param index The index of the element to replace. * @param attribute The replacement attribute. * @return The new path. */ public Path replace(final int index, final String attribute) { List<Element> newElements = new ArrayList<Element>(this.elements); newElements.set(index, new Element(attribute, this.elements.get(index).getValueFilter())); return new Path(schemaUrn, newElements); }
/** * Create a new path to a sub-attribute of the attribute referenced by this * path. * * @param attribute The name of the sub-attribute. * * @return A new path to a sub-attribute of the attribute referenced by this * path. */ public Path attribute(final String attribute) { List<Element> newElements = new ArrayList<Element>(this.elements); newElements.add(new Element(attribute, null)); return new Path(schemaUrn, newElements); }
/** * Create a new path where the attribute at the specified index is replaced * with the one provided. * * @param index The index of the element to replace. * @param attribute The replacement attribute. * @return The new path. */ public Path replace(final int index, final String attribute) { List<Element> newElements = new ArrayList<Element>(this.elements); newElements.set(index, new Element(attribute, this.elements.get(index).getValueFilter())); return new Path(schemaUrn, newElements); }
/** * Create a new path where the filter at the specified index is replaced with * the one provided. * * @param index The index of the element to replace. * @param valueFilter The replacement value filter. * @return The new path. */ public Path replace(final int index, final Filter valueFilter) { List<Element> newElements = new ArrayList<Element>(this.elements); newElements.set(index, new Element(this.elements.get(index).getAttribute(), valueFilter)); return new Path(schemaUrn, newElements); }
/** * Create a new path to a sub-attribute of the attribute referenced by this * path. * * @param attribute The name of the sub-attribute. * * @return A new path to a sub-attribute of the attribute referenced by this * path. */ public Path attribute(final String attribute) { List<Element> newElements = new ArrayList<Element>(this.elements); newElements.add(new Element(attribute, null)); return new Path(schemaUrn, newElements); }