diff --git a/bundles/sirix-core/src/main/java/io/sirix/access/trx/TransactionGroupCommitter.java b/bundles/sirix-core/src/main/java/io/sirix/access/trx/TransactionGroupCommitter.java deleted file mode 100644 index e665bcf4c..000000000 --- a/bundles/sirix-core/src/main/java/io/sirix/access/trx/TransactionGroupCommitter.java +++ /dev/null @@ -1,16 +0,0 @@ -package io.sirix.access.trx; - -import io.sirix.api.NodeTrx; - -import java.util.Set; - -public final class TransactionGroupCommitter { - - private final Set transactions; - - public TransactionGroupCommitter(Set transactions) { - this.transactions = transactions; - } - - -} diff --git a/bundles/sirix-core/src/main/java/io/sirix/access/trx/node/AbstractResourceSession.java b/bundles/sirix-core/src/main/java/io/sirix/access/trx/node/AbstractResourceSession.java index 9641f2de5..99aabaed0 100644 --- a/bundles/sirix-core/src/main/java/io/sirix/access/trx/node/AbstractResourceSession.java +++ b/bundles/sirix-core/src/main/java/io/sirix/access/trx/node/AbstractResourceSession.java @@ -136,6 +136,11 @@ public abstract class AbstractResourceSession serializeJsonFragmentIfNeeded(final List getUpdateOperationsInSubtreeOfNode(final SirixDeweyID ro private Comparator sortByDeweyID() { return Comparator.comparing(updateOperation -> { - if (updateOperation.has("insert")) { - return getDeweyID(updateOperation, "insert"); - } else if (updateOperation.has("delete")) { - return getDeweyID(updateOperation, "delete"); - } else if (updateOperation.has("update")) { - return getDeweyID(updateOperation, "update"); - } else if (updateOperation.has("replace")) { - return getDeweyID(updateOperation, "replace"); + if (updateOperation.has(INSERT)) { + return getDeweyID(updateOperation, INSERT); + } else if (updateOperation.has(DELETE)) { + return getDeweyID(updateOperation, DELETE); + } else if (updateOperation.has(UPDATE)) { + return getDeweyID(updateOperation, UPDATE); + } else if (updateOperation.has(REPLACE)) { + return getDeweyID(updateOperation, REPLACE); } throw new IllegalStateException(updateOperation + " not known."); }); @@ -161,14 +166,14 @@ private Comparator sortByDeweyID() { private Predicate filterAncestorOperations(SirixDeweyID rootDeweyId, long maxDepth) { return updateOperation -> { - if (updateOperation.has("insert")) { - return isDescendatOrSelfOf(rootDeweyId, updateOperation, "insert", maxDepth); - } else if (updateOperation.has("delete")) { - return isDescendatOrSelfOf(rootDeweyId, updateOperation, "delete", maxDepth); - } else if (updateOperation.has("update")) { - return isDescendatOrSelfOf(rootDeweyId, updateOperation, "update", maxDepth); - } else if (updateOperation.has("replace")) { - return isDescendatOrSelfOf(rootDeweyId, updateOperation, "replace", maxDepth); + if (updateOperation.has(INSERT)) { + return isDescendatOrSelfOf(rootDeweyId, updateOperation, INSERT, maxDepth); + } else if (updateOperation.has(DELETE)) { + return isDescendatOrSelfOf(rootDeweyId, updateOperation, DELETE, maxDepth); + } else if (updateOperation.has(UPDATE)) { + return isDescendatOrSelfOf(rootDeweyId, updateOperation, UPDATE, maxDepth); + } else if (updateOperation.has(REPLACE)) { + return isDescendatOrSelfOf(rootDeweyId, updateOperation, REPLACE, maxDepth); } else { throw new IllegalStateException(updateOperation + " not known."); } diff --git a/bundles/sirix-core/src/main/java/io/sirix/access/trx/node/json/JsonNodeTrxImpl.java b/bundles/sirix-core/src/main/java/io/sirix/access/trx/node/json/JsonNodeTrxImpl.java index e43e4c3cf..5363b95ea 100644 --- a/bundles/sirix-core/src/main/java/io/sirix/access/trx/node/json/JsonNodeTrxImpl.java +++ b/bundles/sirix-core/src/main/java/io/sirix/access/trx/node/json/JsonNodeTrxImpl.java @@ -378,9 +378,6 @@ private JsonNodeTrx insertSubtree(final JsonReader reader, final InsertPosition commit(); } - // for (final long unused : new DescendantAxis(nodeReadOnlyTrx)) { - // System.out.println(nodeReadOnlyTrx.getDeweyID()); - // } } catch (final IOException e) { throw new UncheckedIOException(e); } @@ -553,9 +550,6 @@ private JsonNodeTrx insertSubtree(final Item item, final InsertPosition insertio commit(); } - // for (final long unused : new DescendantAxis(nodeReadOnlyTrx)) { - // System.out.println(nodeReadOnlyTrx.getDeweyID()); - // } }); return this; }