Ejemplo n.º 1
0
 /**
  * Adds a replace atomic to the list.
  *
  * @param pre PRE value of the target node/update location
  * @param d insertion sequence data reference
  */
 public void addReplace(final int pre, final Data d) {
   final int oldsize = data.size(pre, data.kind(pre));
   final int newsize = d.meta.size;
   add(new Replace(pre, newsize - oldsize, pre + oldsize, d), true);
 }
Ejemplo n.º 2
0
 /**
  * Adds an insert atomic to the list.
  *
  * @param pre PRE value of the target node/update location
  * @param par new parent of the inserted nodes
  * @param d insertion sequence data reference
  * @param attr insert attribute if true or a node of any other kind if false
  */
 public void addInsert(final int pre, final int par, final Data d, final boolean attr) {
   final int s = d.meta.size;
   if (attr) add(new InsertAttr(pre, s, pre, par, d), true);
   else add(new Insert(pre, s, pre, par, d), true);
 }
Ejemplo n.º 3
0
 /**
  * Adds an updateValue atomic to the list.
  *
  * @param pre PRE value of the target node/update location
  * @param k kind of the target node
  * @param v new value for the target node
  */
 public void addUpdateValue(final int pre, final int k, final byte[] v) {
   add(new UpdateValue(pre, 0, -1, k, v), false);
 }
Ejemplo n.º 4
0
 /**
  * Adds a delete atomic to the list.
  *
  * @param pre PRE value of the target node/update location
  */
 public void addDelete(final int pre) {
   final int k = data.kind(pre);
   final int s = data.size(pre, k);
   add(new Delete(pre, -s, pre + s), true);
 }
Ejemplo n.º 5
0
 /**
  * Adds a rename atomic to the list.
  *
  * @param pre PRE value of the target node/update location
  * @param k kind of the target node
  * @param n new name for the target node
  * @param u new uri for the target node
  */
 public void addRename(final int pre, final int k, final byte[] n, final byte[] u) {
   add(new Rename(pre, 0, -1, k, n, u), false);
 }