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

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


    public GraphFactoryImpl(LongIndex[] newLongIndexes, NodePoolFactory newNodePoolFactory,
        IteratorTrackingCollectionFactory newCollectionFactory) {
        this.longIndexes = newLongIndexes;
        this.nodePool = newNodePoolFactory.createNewNodePool();
        this.graphHandlers = createGraphHandlers(newLongIndexes);
        Localizer localizer = new LocalizerImpl(nodePool, new StringNodeMapperFactoryImpl().createMapper());
        this.iteratorFactory = new CopyingLocalIteratorFactory(graphHandlers, localizer, newCollectionFactory);
        this.readWriteGraph = new ReadWriteGraphImpl(longIndexes, nodePool, iteratorFactory);
        GraphValueFactory valueFactory = new GraphValueFactoryImpl(nodePool, localizer);
        ResourceFactory resourceFactory = new ResourceFactoryImpl(readWriteGraph, valueFactory);
        this.elementFactory = new GraphElementFactoryImpl(resourceFactory, localizer, valueFactory);
View Full Code Here


    private final WritableGraph writableGraph;

    // TODO Take in Readable and Writable graphs instead??
    public ReadWriteGraphImpl(LongIndex[] newIndexes, NodePool newNodePool, IteratorFactory newIteratorFactory) {
        checkNotNull(newIndexes, newNodePool, newIteratorFactory);
        Localizer localizer = new LocalizerImpl(newNodePool, new StringNodeMapperFactoryImpl().createMapper());
        this.readableGraph = new ReadableGraphImpl(newIndexes, localizer, newIteratorFactory);
        this.writableGraph = new WritableGraphImpl(newIndexes, newNodePool, localizer);
    }
View Full Code Here

        LongIndex[] longIndexes = new LongIndex[]{new LongIndexAdapter(structureIndexes[0]),
            new LongIndexAdapter(structureIndexes[1]), new LongIndexAdapter(structureIndexes[2])};
        IteratorTrackingCollectionFactory collectionFactory = base.createCollectionFactory(graphNumber);
        Graph graph = new OrderedGraphFactoryImpl(longIndexes, nodePool, collectionFactory).getGraph();
        final long curMaxMoleculeId = readIndex.getMaxMoleculeId();
        Localizer localizer = new LocalizerImpl(nodePool, STRING_MAPPER);
        MoleculeLocalizer moleculeLocalizer = new MoleculeLocalizerImpl(localizer, curMaxMoleculeId);
        return new MoleculeGraphImpl(writeIndex, readIndex, moleculeLocalizer, graph, nodePool);
    }
View Full Code Here

        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();
        Graph graph = new OrderedGraphFactoryImpl(longIndexes, nodePool, collectionFactory).getGraph();
View Full Code Here

                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);
        Graph graph = new OrderedGraphFactoryImpl(longIndexes, nodePool, collectionFactory).getGraph();
View Full Code Here

        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);
        Graph graph = new OrderedGraphFactoryImpl(longIndexes, nodePool, collectionFactory).getGraph();
View Full Code Here

TOP

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

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.