public NodePointer createPath(JXPathContext context) { if (getImmediateNode() == null) { super.createPath(context); baseValue = UNINITIALIZED; value = UNINITIALIZED; } return this; }
public boolean setPosition(int position) { this.position = position; if (includeXmlLang) { return position == 1 || super.setPosition(position - 1); } return super.setPosition(position); } }
public NodePointer getValuePointer() { return new NullPointer(this, getName()); }
public void setIndex(int index) { if (this.index == index) { return; } // When dealing with a scalar, index == 0 is equivalent to // WHOLE_COLLECTION, so do not change it. if (this.index != WHOLE_COLLECTION || index != 0 || isCollection()) { super.setIndex(index); value = UNINITIALIZED; } }
public NodePointer createPath(JXPathContext context, Object value) { // If neccessary, expand collection if (index != WHOLE_COLLECTION && index >= getLength()) { createPath(context); } setValue(value); return this; }
public NodePointer getNodePointer() { return includeXmlLang && position == 1 ? new LangAttributePointer(parent) : super.getNodePointer(); }
public boolean setPosition(int position) { return name == null ? setPositionAllProperties(position) : setPositionIndividualProperty(position); }
public NodeIterator childIterator(NodeTest test, boolean reverse, NodePointer startWith) { if (index == WHOLE_COLLECTION) { return new CollectionChildNodeIterator( this, test, reverse, startWith); } return getValuePointer().childIterator(test, reverse, startWith); }
/** * Index a property by its index in the list of all * properties sorted alphabetically. * @param index to set */ public void setPropertyIndex(int index) { if (propertyIndex != index) { super.setPropertyIndex(index); name = null; } }
/** * Create a NodeIterator. * @param property property name * @param reverse whether to iterate in reverse * @param startWith first pointer to return * @return NodeIterator */ public NodeIterator createNodeIterator(String property, boolean reverse, NodePointer startWith) { return new PropertyIterator(this, property, reverse, startWith); }
public boolean equals(Object object) { if (object == this) { return true; } if (!(object instanceof NullElementPointer)) { return false; } NullElementPointer other = (NullElementPointer) object; return getImmediateParentPointer() == other.getImmediateParentPointer() && index == other.index; }
/** * Set the property index. * @param index property index */ public void setPropertyIndex(int index) { if (propertyIndex != index) { propertyIndex = index; setIndex(WHOLE_COLLECTION); } }
public String asPath() { if (id != null) { return "id(" + id + ")"; } return parent == null ? "null()" : super.asPath(); }
/** * Select a property by name. * @param propertyName String name */ public void setPropertyName(String propertyName) { setPropertyIndex(UNSPECIFIED_PROPERTY); this.propertyName = propertyName; }
/** * Get the property pointer for this. * @return PropertyPointer */ public PropertyPointer getPropertyPointer() { return new NullPropertyPointer(this); }
public NodeIterator attributeIterator(QName name) { return new BeanAttributeIterator(this, name); }
public PropertyPointer getPropertyPointer() { return new BeanPropertyPointer(this, beanInfo); }
/** * Index a property by its index in the list of all * properties sorted alphabetically. * @param index to set */ public void setPropertyIndex(int index) { if (propertyIndex != index) { super.setPropertyIndex(index); name = null; } }
public NodeIterator createNodeIterator( String property, boolean reverse, NodePointer startWith) { return new PropertyIterator(this, property, reverse, startWith); }
/** * Selects a property by its offset in the alphabetically sorted list. * @param index property index */ public void setPropertyIndex(int index) { if (propertyIndex != index) { super.setPropertyIndex(index); propertyName = null; propertyDescriptor = null; baseValue = UNINITIALIZED; value = UNINITIALIZED; } }