Package org.jrdf.graph

Examples of org.jrdf.graph.Graph


    private ApplicationWindowAwareCommand tryLoadModel(File file) {
        try {
            URL fileUrl = tryGetURL(file);
            long startTime = System.currentTimeMillis();
            Graph graph = jrdfModel.loadModel(fileUrl);
            long numberOfTriples = tryGetNumberOfTriples(graph);
            RdfLoadedCommand actionCommand = getRdfLoadedCommand();
            actionCommand.setTriplesLoaded(numberOfTriples);
            actionCommand.setTimeTaken(System.currentTimeMillis() - startTime);
            return actionCommand;
View Full Code Here


     * @throws Exception
     */
    private void runExample() throws Exception {
        System.out.println("Running example.");
        System.out.println("Creating Graph...");
        Graph graph = JRDF_FACTORY.getNewGraph();
        System.out.println("Creating Graph Elements...");
        populateGraph(graph);
        searchGraph(graph);
        performReification(graph);
        removeStatement(graph);
View Full Code Here

        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();
        graph.clear();
        openMapFactories.add(factory);
        openFactories.add(nodePoolFactory);
        return new MoleculeGraphImpl(writeIndex, readIndex, moleculeLocalizer, graph, nodePool);
    }
View Full Code Here

        LongIndex[] indexes = createIndexes(factory);
        collectionFactory = new BdbCollectionFactory(BDB_HANDLER, "collection" + graphNumber);
        openIndexes.addAll(asList(indexes));
        openMapFactories.add(factory);
        openFactories.add(nodePoolFactory);
        final Graph graph = new OrderedGraphFactoryImpl(indexes, nodePoolFactory, collectionFactory).getGraph();
        graph.clear();
        return graph;
    }
View Full Code Here

        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();
        graph.clear();
        openMapFactories.add(factory);
        openFactories.add(nodePoolFactory);
        return new MoleculeGraphImpl(writeIndex, readIndex, moleculeLocalizer, graph, nodePool);
    }
View Full Code Here

TOP

Related Classes of org.jrdf.graph.Graph

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.