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

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


    public IteratorFactory getIteratorFactory() {
        return iteratorFactory;
    }

    private void init(LongIndex[] newLongIndexes) {
        this.localizer = new LocalizerImpl(nodePool, new StringNodeMapperFactoryImpl().createMapper());
        this.graphHandlers = createGraphHandlers(newLongIndexes);
        this.iteratorFactory = new OrderedIteratorFactoryImpl(localizer, graphHandlers, collectionFactory);
        this.readWriteGraph = new ReadWriteGraphImpl(longIndexes, nodePool, iteratorFactory);
        GraphValueFactory valueFactory = new GraphValueFactoryImpl(nodePool, localizer);
        ResourceFactory resourceFactory = new ResourceFactoryImpl(readWriteGraph, valueFactory);
View Full Code Here


    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

    }

    public NodePool openExistingNodePool() {
        nodePoolMapFactory = new BdbMapFactory(handler, DB_NAME_NODEPOOL + graphNumber);
        stringPoolMapFactory = new BdbMapFactory(handler, DB_NAME_STRINGPOOL + graphNumber);
        StringNodeMapper mapper = new StringNodeMapperFactoryImpl().createMapper();
        final Map<Long, String> blankNodePool = nodePoolMapFactory.openExistingMap(Long.class, String.class, "bnp");
        final Map<Long, String> uriNodePool = nodePoolMapFactory.openExistingMap(Long.class, String.class, "npm");
        final Map<Long, String> literalNodePool = nodePoolMapFactory.openExistingMap(Long.class, String.class, "lnp");
        final Map<String, Long> stringPool = stringPoolMapFactory.openExistingMap(String.class, Long.class, "sp");
        final NodeTypePool nodeTypePool = new NodeTypePoolImpl(mapper, blankNodePool, uriNodePool, literalNodePool);
View Full Code Here

public class MemNodePoolFactory implements NodePoolFactory {
    private static final MapFactory MAP_FACTORY = new MemMapFactory();

    public NodePool createNewNodePool() {
        StringNodeMapper mapper = new StringNodeMapperFactoryImpl().createMapper();
        final Map<Long, String> blankNodePool = MAP_FACTORY.createMap(Long.class, String.class);
        final Map<Long, String> uriNodePool = MAP_FACTORY.createMap(Long.class, String.class);
        final Map<Long, String> literalNodePool = MAP_FACTORY.createMap(Long.class, String.class);
        final Map<String, Long> stringPool = MAP_FACTORY.createMap(String.class, Long.class);
        final NodeTypePool nodeTypePool = new NodeTypePoolImpl(mapper, blankNodePool, uriNodePool, literalNodePool);
View Full Code Here

        pool.clear();
        return pool;
    }

    public NodePool openExistingNodePool() {
        StringNodeMapper mapper = new StringNodeMapperFactoryImpl().createMapper();
        final Map<Long, String> blankNodePool = MAP_FACTORY.createMap(Long.class, String.class, "bnp");
        final Map<Long, String> uriNodePool = MAP_FACTORY.createMap(Long.class, String.class, "unp");
        final Map<Long, String> literalNodePool = MAP_FACTORY.createMap(Long.class, String.class, "lnp");
        final Map<String, Long> stringPool = MAP_FACTORY.createMap(String.class, Long.class, "sp");
        final NodeTypePool nodeTypePool = new NodeTypePoolImpl(mapper, blankNodePool, uriNodePool, literalNodePool);
View Full Code Here

TOP

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

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.