|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.basex.query.up.primitives.Operation
org.basex.query.up.primitives.UpdatePrimitive
org.basex.query.up.primitives.ReplaceValue
public final class ReplaceValue
ReplaceValue primitive. Replaces the value of a node.
If the target T is an element node this primitive represents a replaceElementContent
expression (see XQUF). The children of T are deleted and a single (optional) text node
is inserted as the only child of T. The primitive for replaceElementContent is
substituted by
After the end of the snapshot, T has either no child node at all (if the given text node has been empty), or the given (non-empty) text node as a single child. Attributes of T are not affected by a replaceElementContent expression.
If T is a text node and the new text value is empty, T is deleted.
Field Summary | |
---|---|
boolean |
rec
States if this primitive represents a replaceElementContent expression. |
byte[] |
value
New value. |
Fields inherited from class org.basex.query.up.primitives.UpdatePrimitive |
---|
targetPre, type |
Fields inherited from class org.basex.query.up.primitives.Operation |
---|
data, info |
Constructor Summary | |
---|---|
ReplaceValue(int p,
Data d,
InputInfo i,
byte[] v)
Constructor. |
Method Summary | |
---|---|
void |
addAtomics(AtomicUpdateList l)
Adds the atomic update operations for this update primitive to the given list. |
void |
merge(UpdatePrimitive p)
Merges two update primitives, as they have the same target node. |
int |
size()
Returns the total number of node operations. |
UpdatePrimitive[] |
substitute(MemData tmp)
Substitutes the update primitive if necessary. |
java.lang.String |
toString()
|
void |
update(NamePool pool)
Updates the name pool, which is used to find duplicate attributes and namespace conflicts. |
Methods inherited from class org.basex.query.up.primitives.UpdatePrimitive |
---|
getData, getInfo, getTargetNode |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final byte[] value
public final boolean rec
Constructor Detail |
---|
public ReplaceValue(int p, Data d, InputInfo i, byte[] v)
p
- target node PRE valued
- target data referencei
- input infov
- new valueMethod Detail |
---|
public void merge(UpdatePrimitive p) throws QueryException
UpdatePrimitive
merge
in class UpdatePrimitive
p
- primitive to merge with
QueryException
- exceptionpublic int size()
Operation
size
in class Operation
public java.lang.String toString()
toString
in class java.lang.Object
public void addAtomics(AtomicUpdateList l)
UpdatePrimitive
addAtomics
in class UpdatePrimitive
l
- list of atomic updatespublic UpdatePrimitive[] substitute(MemData tmp)
UpdatePrimitive
substitute
in class UpdatePrimitive
tmp
- temporary mem data
public void update(NamePool pool)
UpdatePrimitive
update
in class UpdatePrimitive
pool
- name pool
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |