use of org.sirix.gui.view.sunburst.SunburstContainer in project sirix by sirixdb.
the class SunburstCompareModel method traverseTree.
@Override
public synchronized void traverseTree(final Container<SunburstContainer> pContainer) {
// Cast guaranteed to work.
mContainer = (SunburstContainer) checkNotNull(pContainer);
final SunburstContainer container = (SunburstContainer) pContainer;
if (container.getOldRevision() == -1) {
container.setOldRevision(getDb().getRevisionNumber());
}
mPool.submit(new TraverseCompareTree(container));
}
use of org.sirix.gui.view.sunburst.SunburstContainer in project sirix by sirixdb.
the class SmallmultipleControl method traverse.
/**
* Invoke model to traverse the tree.
*
* @param pNewRevision
* new revision
* @param pOldRevision
* old revision
* @param pCompare
* determines how to compare (but basically just discriminates
* between a hybrid diff and incremental/differential)
*/
private void traverse(final int pOldRevision, final int pNewRevision, final ECompare pCompare) {
assert pOldRevision >= 0;
assert pNewRevision > 0;
assert pCompare != null;
mContainer = new SunburstContainer(mSmallMultiplesGUI, mModel);
mContainer.setLock(mLock).setNewStartKey(mDb.getNodeKey()).setModWeight(mSmallMultiplesGUI.getModificationWeight()).setOldRevision(pOldRevision).setRevision(pNewRevision).setDepth(0).setCompare(pCompare).setMoveDetection(true);
if (mGUI.getUsePruning()) {
mContainer.setPruning(Pruning.DIFF_WITHOUT_SAMEHASHES);
}
mModel.traverseTree(mContainer);
}
use of org.sirix.gui.view.sunburst.SunburstContainer in project sirix by sirixdb.
the class SunburstModel method traverseTree.
@Override
public void traverseTree(@Nonnull final Container<SunburstContainer> pContainer) {
final SunburstContainer container = (SunburstContainer) checkNotNull(pContainer);
checkArgument(container.getNewStartKey() >= 0);
checkArgument(container.getOldStartKey() >= 0);
final ExecutorService executor = Executors.newSingleThreadExecutor();
try {
executor.submit(new TraverseTree(container.getNewStartKey(), container.getPruning(), container.getGUI(), this));
} catch (final SirixException e) {
LOGWRAPPER.error(e.getMessage(), e);
}
shutdown(executor);
}
Aggregations