Examples of JenaParserProvider


Examples of org.apache.clerezza.rdf.jena.parser.JenaParserProvider

    public static void reset() {
        // reset Clerezza objects
        tcManager = new TcManager();
        tcManager.addWeightedTcProvider(new SimpleTcProvider());
        parser = new Parser(); // add Jena-supported formats + RDF/JSON
        parser.bindParsingProvider(new JenaParserProvider());
        parser.bindParsingProvider(new RdfJsonParsingProvider());
        serializer = new Serializer(); // add Jena-supported formats + RDF/JSON
        serializer.bindSerializingProvider(new JenaSerializerProvider());
        serializer.bindSerializingProvider(new RdfJsonSerializingProvider());
View Full Code Here

Examples of org.apache.clerezza.rdf.jena.parser.JenaParserProvider

                return serializer;
            };
        };

        final Parser parser = new Parser();
        parser.bindParsingProvider(new JenaParserProvider());
        ciReader = new ContentItemReader(null){
            @Override
            protected Parser getParser() {
                return parser;
            }
View Full Code Here

Examples of org.apache.clerezza.rdf.jena.parser.JenaParserProvider

    private static Parser parser = new Parser();

    @BeforeClass
    public static void setupTests() throws Exception {
        TcManager.getInstance().addWeightedTcProvider(new SimpleTcProvider());
        parser.bindParsingProvider(new JenaParserProvider());
    }
View Full Code Here

Examples of org.apache.clerezza.rdf.jena.parser.JenaParserProvider

   
    private ClerezzaBackend backend;
    private LDPath<Resource> ldpath;
    @BeforeClass
    public static void readTestData() throws IOException {
        ParsingProvider parser = new JenaParserProvider();
        //NOTE(rw): the new third parameter is the base URI used to resolve relative paths
        graph = new IndexedMGraph();
        InputStream in = ClerezzaBackendTest.class.getClassLoader().getResourceAsStream("testdata.rdf.zip");
        assertNotNull(in);
        ZipInputStream zipIn = new ZipInputStream(new BufferedInputStream(in));
        InputStream uncloseable = new UncloseableStream(zipIn);
        ZipEntry entry;
        while((entry = zipIn.getNextEntry()) != null){
            if(entry.getName().endsWith(".rdf")){
                parser.parse(graph,uncloseable, SupportedFormat.RDF_XML,null);
            }
        }
        assertTrue(graph.size() > 0);
        zipIn.close();
       
View Full Code Here

Examples of org.apache.clerezza.rdf.jena.parser.JenaParserProvider

    public static void reset() {
        // reset Clerezza objects
        tcManager = new TcManager();
        tcManager.addWeightedTcProvider(new SimpleTcProvider());
        parser = new Parser(); // add Jena-supported formats + RDF/JSON
        parser.bindParsingProvider(new JenaParserProvider());
        parser.bindParsingProvider(new RdfJsonParsingProvider());
        serializer = new Serializer(); // add Jena-supported formats + RDF/JSON
        serializer.bindSerializingProvider(new JenaSerializerProvider());
        serializer.bindSerializingProvider(new RdfJsonSerializingProvider());
View Full Code Here

Examples of org.apache.clerezza.rdf.jena.parser.JenaParserProvider

    private ContentItemBackend backend;
    private LDPath<Resource> ldpath;
    @BeforeClass
    public static void readTestData() throws IOException {
        //add the metadata
        ParsingProvider parser = new JenaParserProvider();
        //create the content Item with the HTML content
        MGraph rdfData = parseRdfData(parser,"metadata.rdf.zip");
        UriRef contentItemId = null;
        Iterator<Triple> it = rdfData.filter(null, Properties.ENHANCER_EXTRACTED_FROM, null);
        while(it.hasNext()){
View Full Code Here

Examples of org.apache.clerezza.rdf.jena.parser.JenaParserProvider

    private static double indexingTime;
   
    @BeforeClass
    public static void readTestData() throws IOException {
        //add the metadata
        ParsingProvider parser = new JenaParserProvider();
        //create the content Item with the HTML content
        MGraph rdfData = parseRdfData(parser,"example.rdf.zip");
        UriRef contentItemId = null;
        Iterator<Triple> it = rdfData.filter(null, Properties.ENHANCER_EXTRACTED_FROM, null);
        while(it.hasNext()){
View Full Code Here

Examples of org.apache.clerezza.rdf.jena.parser.JenaParserProvider

   
    @BeforeClass
    public static void init() throws IOException {
        //init the RDF parser
        rdfParser = new Parser();
        rdfParser.bindParsingProvider(new JenaParserProvider());
        rdfParser.bindParsingProvider(new RdfJsonParsingProvider());
        //init theTestData
    }
View Full Code Here

Examples of org.apache.clerezza.rdf.jena.parser.JenaParserProvider

        serializer = new Serializer();
        serializer.bindSerializingProvider(new JenaSerializerProvider());
        serializer.bindSerializingProvider(new RdfJsonSerializingProvider());
       
        parser = new Parser();
        parser.bindParsingProvider(new JenaParserProvider());
        parser.bindParsingProvider(new RdfJsonParsingProvider());
    }
View Full Code Here

Examples of org.apache.clerezza.rdf.jena.parser.JenaParserProvider

    @Test
    public void testImportModelFromSKOS() throws Exception {
        log.info(" --- testImportModelFromSKOS --- ");
        Parser parser = Parser.getInstance();
        parser.bindParsingProvider(new JenaParserProvider());
        Graph graph = parser.parse(getClass().getResourceAsStream("/sample-scheme.skos.rdf.xml"),
            SupportedFormat.RDF_XML);
        int imported = classifier.importConceptsFromGraph(graph, OntologicalClasses.SKOS_CONCEPT,
            Properties.SKOS_BROADER);
        assertEquals(imported, 4);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.