Search in sources :

Example 1 with SunburstContainer

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));
}
Also used : TraverseCompareTree(org.sirix.gui.view.model.TraverseCompareTree) SunburstContainer(org.sirix.gui.view.sunburst.SunburstContainer)

Example 2 with SunburstContainer

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);
}
Also used : SunburstContainer(org.sirix.gui.view.sunburst.SunburstContainer)

Example 3 with SunburstContainer

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);
}
Also used : ExecutorService(java.util.concurrent.ExecutorService) SirixException(org.sirix.exception.SirixException) SunburstContainer(org.sirix.gui.view.sunburst.SunburstContainer)

Aggregations

SunburstContainer (org.sirix.gui.view.sunburst.SunburstContainer)3 ExecutorService (java.util.concurrent.ExecutorService)1 SirixException (org.sirix.exception.SirixException)1 TraverseCompareTree (org.sirix.gui.view.model.TraverseCompareTree)1