use of org.sirix.diff.DiffFactory.DiffType in project sirix by sirixdb.
the class DiffSunburstAxis method setTempKey.
/**
* Set temporal key which is the next following node of an {@code inserted},
* {@code deleted}, {@code updated} or {@code same} node.
*/
private void setTempKey() {
final int index = mIndex + mPrunedNodes + mDescendantCount;
final boolean isOldTransaction = (mDiff == DiffType.DELETED || mDiff == DiffType.MOVEDFROM || mDiff == DiffType.REPLACEDOLD);
final DiffDepth depthCont = mDiffCont.getDepth();
final int depth = isOldTransaction ? depthCont.getOldDepth() : depthCont.getNewDepth();
if (index < mSize) {
DiffTuple nextDiffCont = mDiffs.get(index);
DiffType nextDiff = nextDiffCont.getDiff();
boolean nextIsOldTransaction = (nextDiff == DiffType.DELETED || nextDiff == DiffType.MOVEDFROM || nextDiff == DiffType.REPLACEDOLD);
DiffDepth nextDepthCont = nextDiffCont.getDepth();
int nextDepth = nextIsOldTransaction ? nextDepthCont.getOldDepth() : nextDepthCont.getNewDepth();
assert nextDepth <= depth;
mTempKey = nextIsOldTransaction ? nextDiffCont.getOldNodeKey() : nextDiffCont.getNewNodeKey();
}
}
Aggregations