Package com.hp.hpl.jena.graph

Examples of com.hp.hpl.jena.graph.Triple


        @Override
        public void visit(OpPropFunc opPropFunc)
        {
            Node s = processPropFuncArg(opPropFunc.getSubjectArgs()) ;
            Node o = processPropFuncArg(opPropFunc.getObjectArgs()) ;
            Triple t = new Triple(s, opPropFunc.getProperty(), o) ;
            currentGroup().addElement(process(t)) ;
        }
View Full Code Here


        acc.setGraph(gn) ;
    }
   
    protected void insert(TripleCollector acc, Node s, Node p, Node o)
    {
        acc.addTriple(new Triple(s, p, o)) ;
    }
View Full Code Here

        acc.addTriple(new Triple(s, p, o)) ;
    }
   
    protected void insert(TripleCollectorMark acc, int index, Node s, Node p, Node o)
    {
        acc.addTriple(index, new Triple(s, p, o)) ;
    }
View Full Code Here

    protected void insert(TripleCollector acc, Node s, Node p, Path path, Node o)
    {
        if ( p == null )
            acc.addTriplePath(new TriplePath(s, path, o)) ;
        else
            acc.addTriple(new Triple(s, p, o)) ;
    }
View Full Code Here

    protected void insert(TripleCollectorMark acc, int index, Node s, Node p, Path path, Node o)
    {
        if ( p == null )
            acc.addTriplePath(index, new TriplePath(s, path, o)) ;
        else
            acc.addTriple(index, new Triple(s, p, o)) ;
    }
View Full Code Here

        List<Triple> list2 = tg2.bgp.getList() ;
        if ( list1.size() != list2.size() ) return false ;
       
        for ( int i = 0 ; i < list1.size() ; i++ )
        {
            Triple t1 = list1.get(i) ;
            Triple t2 = list2.get(i) ;
            Iso.tripleIso(t1, t2, labelMap) ;
        }
        return true ;
    }
View Full Code Here

        Graph graph = execCxt.getActiveGraph() ;
       
        ExtendedIterator<Triple>iter = graph.find(Node.ANY, Node.ANY, Node.ANY) ;
        for ( ; iter.hasNext() ; )
        {
            Triple t = iter.next() ;
            slot(bindings, input, t.getSubject(),   subjVar, nodeLocalname) ;
            slot(bindings, input, t.getPredicate(), subjVar, nodeLocalname) ;
            slot(bindings, input, t.getObject(),    subjVar, nodeLocalname) ;
        }
        return new QueryIterPlainWrapper(bindings.iterator(), execCxt) ;
    }
View Full Code Here

        // We will consume the input on the main thread here

        // We can now iterate over data as it is parsed, parsing only runs as
        // far ahead of our consumption as the buffer size allows
        while (iter.hasNext()) {
            Triple next = iter.next();
            // Do something with each triple
        }
    }
View Full Code Here

        BasicPattern bp = new BasicPattern() ;
        Var var_x = Var.alloc("x") ;
        Var var_z = Var.alloc("z") ;
       
        // ---- Build expression
        bp.add(new Triple(var_x, NodeFactory.createURI(BASE+"p"), var_z)) ;
        Op op = new OpBGP(bp) ;
        //Expr expr = ExprUtils.parse("?z < 2 ") ;
        Expr expr = new E_LessThan(new ExprVar(var_z), NodeValue.makeNodeInteger(2)) ;
        op = OpFilter.filter(expr, op) ;
View Full Code Here

        ElementGroup elg = new ElementGroup() ;
       
        Var varTitle = Var.alloc("title") ;
        Var varX = Var.alloc("x") ;
       
        Triple t1 = new Triple(varX, DC.title.asNode(),  varTitle) ;
        elg.addTriplePattern(t1) ;
       
        // Adds a filter.  Need to wrap variable in a NodeVar.
        Expr expr = new E_Regex(new ExprVar(varTitle), "sparql", "i") ;
        ElementFilter filter = new  ElementFilter(expr) ;
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.graph.Triple

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.