public class DynamicPropertyPointer extends PropertyPointer
Type | Property and Description |
---|---|
protected boolean |
isActual
A dynamic property is always considered actual - all keys are apparently
existing with possibly the value of null.
|
bean, propertyIndex, UNSPECIFIED_PROPERTY
index, locale, parent, UNKNOWN_NAMESPACE, WHOLE_COLLECTION
Constructor and Description |
---|
DynamicPropertyPointer(NodePointer parent,
DynamicPropertyHandler handler)
Create a new DynamicPropertyPointer.
|
Modifier and Type | Method and Description |
---|---|
String |
asPath()
Returns an XPath that maps to this Pointer.
|
NodePointer |
createPath(JXPathContext context)
Called by a child pointer when it needs to create a parent object.
|
NodePointer |
createPath(JXPathContext context,
Object value)
Called directly by JXPathContext.
|
Object |
getBaseValue()
Returns the value of the property, not an element of the collection
represented by the property, if any.
|
Object |
getImmediateNode()
If index == WHOLE_COLLECTION, the value of the property, otherwise
the value of the index'th element of the collection represented by the
property.
|
int |
getPropertyCount()
Number of the DP object's properties.
|
int |
getPropertyIndex()
Index of the currently selected property in the list of all
properties sorted alphabetically.
|
String |
getPropertyName()
Returns the name of the currently selected property or "*"
if none has been selected.
|
String[] |
getPropertyNames()
Names of all properties, sorted alphabetically.
|
protected boolean |
isActualProperty()
A dynamic property is always considered actual - all keys are apparently
existing with possibly the value of null.
|
boolean |
isContainer()
This type of node is auxiliary.
|
void |
remove()
Remove the node of the object graph this pointer points to.
|
void |
setPropertyIndex(int index)
Index a property by its index in the list of all
properties sorted alphabetically.
|
void |
setPropertyName(String propertyName)
Select a property by name.
|
void |
setValue(Object value)
If index == WHOLE_COLLECTION, change the value of the property, otherwise
change the value of the index'th element of the collection
represented by the property.
|
compareChildNodePointers, createChild, createChild, equals, getBean, getImmediateValuePointer, getLength, getName, hashCode, isActual, isCollection, isLeaf
attributeIterator, childIterator, clone, compareTo, createAttribute, escape, getAbstractFactory, getDefaultNamespaceURI, getImmediateParentPointer, getIndex, getLocale, getNamespaceResolver, getNamespaceURI, getNamespaceURI, getNode, getNodeSetByKey, getNodeValue, getParent, getPointerByID, getPointerByKey, getRootNode, getValue, getValuePointer, handle, handle, isAttribute, isDefaultNamespace, isLanguage, isNode, isRoot, namespaceIterator, namespacePointer, newChildNodePointer, newNodePointer, printPointerChain, setAttribute, setExceptionHandler, setIndex, setNamespaceResolver, testNode, toString, verify
isActualProperty
in class PropertyPointer
public DynamicPropertyPointer(NodePointer parent, DynamicPropertyHandler handler)
parent
- pointerhandler
- DynamicPropertyHandlerpublic boolean isContainer()
isContainer
in class NodePointer
public int getPropertyCount()
getPropertyCount
in class PropertyPointer
public String[] getPropertyNames()
getPropertyNames
in class PropertyPointer
public String getPropertyName()
getPropertyName
in class PropertyPointer
public void setPropertyName(String propertyName)
setPropertyName
in class PropertyPointer
propertyName
- to setpublic int getPropertyIndex()
getPropertyIndex
in class PropertyPointer
public void setPropertyIndex(int index)
setPropertyIndex
in class PropertyPointer
index
- to setpublic Object getBaseValue()
getBaseValue
in class NodePointer
public Object getImmediateNode()
getImmediateNode
in class PropertyPointer
protected boolean isActualProperty()
isActualProperty
in class PropertyPointer
public void setValue(Object value)
setValue
in interface Pointer
setValue
in class NodePointer
value
- to setpublic NodePointer createPath(JXPathContext context)
NodePointer
createPath
in class PropertyPointer
context
- the owning JXPathContextpublic NodePointer createPath(JXPathContext context, Object value)
NodePointer
createPath
in class PropertyPointer
context
- the owning JXPathContextvalue
- the new value to setpublic void remove()
NodePointer
remove
in class NodePointer
public String asPath()
NodePointer
asPath
in interface Pointer
asPath
in class NodePointer
Copyright © 2001–2015 The Apache Software Foundation. All rights reserved.