Package com.hp.hpl.jena.sparql.core

Examples of com.hp.hpl.jena.sparql.core.Quad


        parser.parse();
        assertEquals(1, sink.startCalled) ;
        assertEquals(1, sink.finishCalled) ;
        assertEquals(0, sink.triples.size()) ;
        assertEquals(1, sink.quads.size()) ;
        Quad q = SSE.parseQuad("(<g> <x> <p> <q>)") ;
        assertEquals(q, last(sink.quads)) ;
    }
View Full Code Here


        assertEquals(1, sink.finishCalled) ;
        assertEquals(0, sink.triples.size()) ;
        assertEquals(1, sink.quads.size()) ;
       
        Triple t = SSE.parseTriple("(<http://base/x> <http://base/p> <http://base/q>)") ;
        Quad q = new Quad(Quad.tripleInQuad, t) ;
        assertEquals(q, last(sink.quads)) ;
    }
View Full Code Here

        assertEquals(1, sink.startCalled) ;
        assertEquals(1, sink.finishCalled) ;
        assertEquals(0, sink.triples.size()) ;
        assertEquals(1, sink.quads.size()) ;
       
        Quad q = SSE.parseQuad("(<http://base/g> <http://base/x> <http://base/p> <http://base/q>)") ;
        assertEquals(q, last(sink.quads)) ;
    }
View Full Code Here

    @Test
    public void stringForQuad_WithPrefixMapping() {
        Node n1 = NodeFactory.createURI("q1") ;

        Quad quad = new Quad(n1, getPrefixedTriple()) ;
        assertEquals("<q1> zz:abs <n2> \"l3\"", stringForQuad(quad, getPrefixMapping())) ;
    }
View Full Code Here

    {
        dsg.begin(ReadWrite.READ);
        Iterator<Quad> iter = dsg.find() ;
        for ( ; iter.hasNext() ; )
        {
            Quad q = iter.next() ;
            System.out.println(q) ;
        }
        //RiotWriter.writeNQuads(System.out, dsg) ;
        dsg.commit();
        dsg.end();
View Full Code Here

        dsg.end();
    }

    public static void one()
  {
      Quad q1 = SSE.parseQuad("(<g1> <s1> <p1> '1')") ;
      Quad q2 = SSE.parseQuad("(<g2> <s2> <p2> '2')") ;
        Quad q3 = SSE.parseQuad("(<g3> <s3> <p3> '3')") ;

        DatasetGraphTransaction dsg = (DatasetGraphTransaction)TDBFactory.createDatasetGraph(location);
        System.out.println("Start") ;
        dump(dsg) ;
       
View Full Code Here

    @Test
    public void connection_statement_query_select_02() throws SQLException {
        // Prepare a dataset
        Dataset ds = DatasetFactory.createMem();
        ds.asDatasetGraph().add(
                new Quad(NodeFactory.createURI("http://example/graph"), NodeFactory.createURI("http://example/subject"),
                        NodeFactory.createURI("http://example/predicate"), NodeFactory.createURI("http://example/object")));

        // Work with the connection
        JenaConnection conn = this.getConnection(ds);
        Statement stmt = conn.createStatement();
View Full Code Here

    @Test
    public void connection_statement_query_select_03() throws SQLException {
        // Prepare a dataset
        Dataset ds = DatasetFactory.createMem();
        ds.asDatasetGraph().add(
                new Quad(NodeFactory.createURI("http://example/graph"), NodeFactory.createURI("http://example/subject"),
                        NodeFactory.createURI("http://example/predicate"), NodeFactory.createURI("http://example/object")));

        // Work with the connection
        JenaConnection conn = this.getConnection(ds);
        Statement stmt = conn.createStatement();
View Full Code Here

    @Test
    public void connection_statement_query_select_04() throws SQLException {
        // Prepare a dataset
        Dataset ds = DatasetFactory.createMem();
        ds.asDatasetGraph().add(
                new Quad(NodeFactory.createURI("http://example/graph"), NodeFactory.createURI("http://example/subject"),
                        NodeFactory.createURI("http://example/predicate"), NodeFactory.createURI("http://example/object")));

        // Work with the connection
        JenaConnection conn = this.getConnection(ds);
        conn.setJdbcCompatibilityLevel(JdbcCompatibility.HIGH);
View Full Code Here

    @Test
    public void connection_prepared_statement_select_01() throws SQLException, MalformedURLException {
        // Prepare a dataset
        Dataset ds = DatasetFactory.createMem();
        ds.asDatasetGraph().add(
                new Quad(NodeFactory.createURI("http://example/graph"), NodeFactory.createURI("http://example/subject"),
                        NodeFactory.createURI("http://example/predicate"), NodeFactory.createURI("http://example/object")));

        // Work with the connection
        JenaConnection conn = this.getConnection(ds);
        conn.setJdbcCompatibilityLevel(JdbcCompatibility.HIGH);
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.sparql.core.Quad

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.