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

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


            p1 = newBlank(p1, bNodeMap) ;
   
        if ( o1.isBlank() || Var.isBlankNodeVar(o1) )
            o1 = newBlank(o1, bNodeMap) ;
   
        Quad q = quad ;
        if ( s1 != s || p1 != p || o1 != o || g1 != g )
            q = new Quad(g1, s1, p1, o1) ;
       
        Quad q2 = Substitute.substitute(q, b) ;
        return q2 ;
    }
View Full Code Here


        Iterator<Quad> it = template(quads, dftGraph, bindings) ;
        if ( it == null ) return ;
       
        while (it.hasNext())
        {
            Quad q = it.next();
            graphStore.delete(q);
        }
       
       
        // Alternate implementation that can use the graph BulkUpdateHandler, but forces all quads into
View Full Code Here

        Iterator<Quad> it = template(quads, dftGraph, bindings) ;
        if ( it == null ) return ;
       
        while (it.hasNext())
        {
            Quad q = it.next();
            graphStore.add(q);
        }
    }
View Full Code Here

    }

    @Override
    public Quad createQuad(Node g, Node s, Node p, Node o, long line, long col)
    {
        return new Quad(g,s,p,o) ;
    }
View Full Code Here

        int count = 0 ;
        int maxN = 500 ;
        int N = RandomLib.qrandom.nextInt(maxN) ;
        for ( int j = 0 ; j < N; j++ )
        {
            Quad q = genQuad(id*maxN+j) ;
            if ( ! dsg.contains(q) )
            {
                dsg.add(q) ;
                count++ ;
            }
View Full Code Here

        Node g = Quad.defaultGraphNodeGenerated ; // urn:x-arq:DefaultGraphNode
        Node s = Node.createURI("S") ;
        Node p = Node.createURI("P"+value) ;
        // Integer - that gets inlined.
        Node o = Node.createLiteral(Integer.toString(value), null, XSDDatatype.XSDinteger) ;
        return new Quad(g,s,p,o) ;
    }
View Full Code Here

        // WRITE lots
        StoreConnection sConn = getStoreConnection() ;
        DatasetGraphTxn dsg = sConn.begin(ReadWrite.WRITE) ;
        for ( int i = 0 ; i < 600 ; i++ )
        {
            Quad q = SSE.parseQuad("(_ <s> <p> "+i+")") ;
            dsg.add(q) ;
        }
        dsg.commit() ;
        dsg.end() ;
    }
View Full Code Here

        for (Iterator<Node> propIter = properties.iterator(); propIter.hasNext();) {
            Node property = propIter.next() ;
            Iterator<Quad> quadIter = dataset.find(Node.ANY, Node.ANY, property, Node.ANY) ;
            for (; quadIter.hasNext();) {
                Quad quad = quadIter.next() ;
                Entity entity = TextQueryFuncs.entityFromQuad(entityDefinition, quad) ;
                if (entity != null) {
                    textIndex.addEntity(entity) ;
                    progressMonitor.progressByOne() ;
                }
View Full Code Here

        int count = 0 ;
        int maxN = 500 ;
        int N = RandomLib.qrandom.nextInt(maxN) ;
        for ( int j = 0 ; j < N; j++ )
        {
            Quad q = genQuad(id*maxN+j) ;
            if ( ! dsg.contains(q) )
            {
                dsg.add(q) ;
                count++ ;
            }
View Full Code Here

        Lib.sleep(x) ;
    }
   
    static Quad genQuad(int value)
    {
        Quad q1 = SSE.parseQuad("(_ <s> <p> <o>)") ;
        Node g1 = q.getGraph() ;
       
        Node g = Quad.defaultGraphNodeGenerated ; // urn:x-arq:DefaultGraphNode
        Node s = NodeFactory.createURI("S") ;
        Node p = NodeFactory.createURI("P") ;
        Node o = NodeFactory.createLiteral(Integer.toString(value), null, XSDDatatype.XSDinteger) ;
        return new Quad(g,s,p,o) ;
    }
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.