Package org.apache.clerezza.rdf.core.access

Examples of org.apache.clerezza.rdf.core.access.TcManager


    static {
        reset();
    }

    public static void reset() {
        tcManager = new TcManager();
        tcManager.addWeightedTcProvider(new SimpleTcProvider());
       
        serializer = new Serializer();
        serializer.bindSerializingProvider(new JenaSerializerProvider());
        serializer.bindSerializingProvider(new RdfJsonSerializingProvider());
View Full Code Here


     * @param selectedUri the initial selected URI
     */
    public Tutorial1App(final String selectedUri) {
        this.selectedUri = selectedUri;
        //get the singleton instance of TcManager
        final TcManager tcManager = TcManager.getInstance();
        //the arbitrary name we use for our mutable graph
        final UriRef mGraphName = new UriRef("http://tutorial.example.org/");
        //the m-graph into which we'll put the triples we collect
        mGraph = tcManager.createMGraph(mGraphName);
        try {
            loadContextFromWeb();
        } catch (IOException ex) {
            System.err.println("Error retrieving " + selectedUri);
            ex.printStackTrace();
View Full Code Here

            }
        }

        QueryEngine qe = new JenaSparqlEngine();
        WeightedTcProvider wtcp = new SimpleTcProvider();
        TcManager tcm = new SpecialTcManager(qe, wtcp);


        Refactorer refactorer = new RefactorerImpl(null, new Serializer(), tcm, ruleStore,
                emptyConfig);
        try {
View Full Code Here

            }
        }

        QueryEngine qe = new JenaSparqlEngine();
        WeightedTcProvider wtcp = new SimpleTcProvider();
        TcManager tcm = new SpecialTcManager(qe, wtcp);

        String recipe = "rule[is(<http://kres.iks-project.eu/ontology.owl#Person>, ?x) -> is(<http://xmlns.com/foaf/0.1/Person>, ?x)]";

        KB kb = RuleParserImpl.parse(recipe);
        RuleList ruleList = kb.getkReSRuleList();
View Full Code Here

            }
        }

        QueryEngine qe = new JenaSparqlEngine();
        WeightedTcProvider wtcp = new SimpleTcProvider();
        TcManager tcm = new SpecialTcManager(qe, wtcp);

        // broken recipe
        String recipe = "rule[is(<http://kres.iks-project.eu/ontology.owl#Person>) -> is(<http://xmlns.com/foaf/0.1/Person>, ?x)]";

        KB kb = null;
View Full Code Here

        offline = new OfflineConfigurationImpl(new Hashtable<String,Object>());
        reset();
    }

    public static void reset() {
        tcManager = new TcManager();
        tcManager.addWeightedTcProvider(new SimpleTcProvider());

        parser = new Parser();
        parser.bindParsingProvider(new JenaParserProvider());
        parser.bindParsingProvider(new RdfJsonParsingProvider());
View Full Code Here

        }
        return result;
    }

    private static MGraph createClerezzaModel() {
        TcManager manager = TcManager.getInstance();
        UriRef graphUri = new UriRef(HTTP_EXAMPLE_COM);
        if (manager.listMGraphs().contains(graphUri)) {
            manager.deleteTripleCollection(graphUri);
        }
        return manager.createMGraph(graphUri);
    }
View Full Code Here

        }
        return result;
    }

    private static MGraph createClerezzaModel() {
        TcManager manager = TcManager.getInstance();
        UriRef graphUri = new UriRef(HTTP_EXAMPLE_COM);
        if (manager.listMGraphs().contains(graphUri)) {
            manager.deleteTripleCollection(graphUri);
        }
        return manager.createMGraph(graphUri);
    }
View Full Code Here

    public void init() {
        nTriplesParserTest = new NTriplesParserTest();
        nTriplesParserTest.init();

        UriRef graphUri = new UriRef("http://example.com/");
        TcManager tcManager = TcManager.getInstance();
        if (tcManager.listMGraphs().contains(graphUri)) {
            tcManager.deleteTripleCollection(graphUri);
        }
        graph = tcManager.createMGraph(graphUri);
        sp = new StreamProcessor(NTriplesParser.connect(ClerezzaSink.connect(graph)));
    }
View Full Code Here

    };

    @BeforeClass
    public void init() throws SAXException {
        UriRef graphUri = new UriRef("http://example.com/");
        TcManager MANAGER = TcManager.getInstance();
        if (MANAGER.listMGraphs().contains(graphUri)) {
            MANAGER.deleteTripleCollection(graphUri);
        }
        graph = MANAGER.createMGraph(graphUri);

        streamProcessor = new StreamProcessor(RdfaParser.connect(ClerezzaSink.connect(graph)));
        streamProcessor.setProperty(RdfaParser.ENABLE_VOCAB_EXPANSION, true);
    }
View Full Code Here

TOP

Related Classes of org.apache.clerezza.rdf.core.access.TcManager

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.