Package org.jrdf.graph.local.index.nodepool

Examples of org.jrdf.graph.local.index.nodepool.NodePool


        this.handler = newHandler;
        this.graphNumber = newGraphNumber;
    }

    public NodePool createNewNodePool() {
        final NodePool pool = openExistingNodePool();
        pool.clear();
        return pool;
    }
View Full Code Here


        }
        openStructureIndexes.clear();
    }

    private MoleculeGraph getGraph(long graphNumber) {
        final NodePool nodePool = base.createNodePool(graphNumber);
        MoleculeStructureIndex<Long>[] structureIndexes = createMoleculeStructureIndexes(graphNumber);
        ReadableIndex<Long> readIndex = new ReadableIndexImpl(structureIndexes);
        WritableIndex<Long> writeIndex = new WritableIndexImpl(structureIndexes);
        LongIndex[] longIndexes = new LongIndex[]{new LongIndexAdapter(structureIndexes[0]),
            new LongIndexAdapter(structureIndexes[1]), new LongIndexAdapter(structureIndexes[2])};
View Full Code Here

        return new SparqlConnectionImpl(BUILDER, QUERY_ENGINE);
    }

    public NodePool createNodePool(long graphNumber) {
        NodePoolFactory nodePoolFactory = new BdbNodePoolFactory(bdbHandler, graphNumber);
        final NodePool nodePool = nodePoolFactory.openExistingNodePool();
        openNodePoolFactories.add(nodePoolFactory);
        return nodePool;
    }
View Full Code Here

        openIndexes.clear();
    }

    private Graph getGraph(long graphNumber) {
        LongIndex[] indexes = createIndexes(graphNumber);
        final NodePool nodePool = base.createNodePool(graphNumber);
        IteratorTrackingCollectionFactory collectionFactory = base.createCollectionFactory(graphNumber);
        return new OrderedGraphFactoryImpl(indexes, nodePool, collectionFactory).getGraph();
    }
View Full Code Here

    public MoleculeGraph getNewGraph() {
        MoleculeStructureIndex<Long>[] structureIndexes = createMoleculeStructureIndexes();
        ReadableIndex<Long> readIndex = new ReadableIndexImpl(structureIndexes);
        WritableIndex<Long> writeIndex = new WritableIndexImpl(structureIndexes);
        NodePoolFactory nodePoolFactory = new MemNodePoolFactory();
        NodePool nodePool = nodePoolFactory.createNewNodePool();
        Localizer localizer = new LocalizerImpl(nodePool, STRING_MAPPER);
        MoleculeLocalizer moleculeLocalizer = new MoleculeLocalizerImpl(localizer);
        LongIndex[] longIndexes = new LongIndex[]{new LongIndexAdapter(structureIndexes[0]),
            new LongIndexAdapter(structureIndexes[1]), new LongIndexAdapter(structureIndexes[2])};
        IteratorTrackingCollectionFactory collectionFactory = new MemCollectionFactory();
View Full Code Here

        NodePoolFactory nodePoolFactory = new BdbNodePoolFactory(
                new BdbEnvironmentHandlerImpl(new TempDirectoryHandler()), graphNumber);
        MoleculeStructureIndex<Long>[] structureIndexes = createMoleculeStructureIndexes();
        ReadableIndex<Long> readIndex = new ReadableIndexImpl(structureIndexes);
        WritableIndex<Long> writeIndex = new WritableIndexImpl(structureIndexes);
        NodePool nodePool = nodePoolFactory.createNewNodePool();
        Localizer localizer = new LocalizerImpl(nodePool, STRING_MAPPER);
        MoleculeLocalizer moleculeLocalizer = new MoleculeLocalizerImpl(localizer);
        LongIndex[] longIndexes = new LongIndex[]{new LongIndexAdapter(structureIndexes[0]),
            new LongIndexAdapter(structureIndexes[1]), new LongIndexAdapter(structureIndexes[2])};
        collectionFactory = new BdbCollectionFactory(BDB_HANDLER, "collection" + graphNumber);
View Full Code Here

        MapFactory factory = new BdbMapFactory(BDB_HANDLER, "database" + graphNumber);
        NodePoolFactory nodePoolFactory = new BdbNodePoolFactory(BDB_HANDLER, graphNumber);
        MoleculeStructureIndex<Long>[] structureIndexes = createMoleculeStructureIndexes();
        ReadableIndex<Long> readIndex = new ReadableIndexImpl(structureIndexes);
        WritableIndex<Long> writeIndex = new WritableIndexImpl(structureIndexes);
        NodePool nodePool = nodePoolFactory.createNewNodePool();
        Localizer localizer = new LocalizerImpl(nodePool, STRING_MAPPER);
        MoleculeLocalizer moleculeLocalizer = new MoleculeLocalizerImpl(localizer);
        LongIndex[] longIndexes = new LongIndex[]{new LongIndexAdapter(structureIndexes[0]),
            new LongIndexAdapter(structureIndexes[1]), new LongIndexAdapter(structureIndexes[2])};
        collectionFactory = new BdbCollectionFactory(BDB_HANDLER, "collection" + graphNumber);
View Full Code Here

TOP

Related Classes of org.jrdf.graph.local.index.nodepool.NodePool

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.