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

Examples of com.hp.hpl.jena.sparql.core.Quad.asTriple()


        public Triple next() {
            Quad q = iter.next() ;
            if ( graphNode != null && !q.getGraph().equals(graphNode) )
                throw new InternalError("ProjectQuadsToTriples: Quads from unexpected graph (expected=" + graphNode
                                        + ", got=" + q.getGraph() + ")") ;
            return q.asTriple() ;
        }

        @Override
        public void remove() {
            iter.remove() ;
View Full Code Here


       
        if ( quads.size() == 1 )
        {
            Quad q = quads.get(0) ;
            BasicPattern bgp = new BasicPattern() ;
            bgp.add(q.asTriple()) ;
            return new OpQuadPattern(q.getGraph(), bgp) ;
        }

        List<OpQuadPattern> x = convert() ;
        OpSequence ops = OpSequence.create() ;
View Full Code Here

        @Override
        public Triple next() {
            Quad q = iter.next();
            if ( graphNode != null && ! q.getGraph().equals(graphNode))
                throw new InternalError("ProjectQuadsToTriples: Quads from unexpected graph (expected="+graphNode+", got="+q.getGraph()+")") ;
            return q.asTriple() ;
        }
        @Override
        public void remove() { iter.remove(); }
    }
   
View Full Code Here

        public Triple next()
        {
            Quad q = iter.next();
            if ( graphNode != null && ! q.getGraph().equals(graphNode))
                throw new InternalError("ProjectQuadsToTriples: Quads from unexpected graph (expected="+graphNode+", got="+q.getGraph()+")") ;
            return q.asTriple() ;
        }
        @Override
        public void remove() { iter.remove(); }
    }
   
View Full Code Here

        if ( ! q.isConcrete() )
        {
            Log.warn(TemplateLib.class, "Unbound quad: "+FmtUtils.stringForQuad(quad)) ;
            return ;
        }
        acc.put(q.getGraph(), q.asTriple()) ;
    }
   
    /** Substitute into quad patterns */
    public static Iterator<Quad> calcQuads(final List<Quad> quads, Iterator<Binding> bindings)
    {
View Full Code Here

        public Triple next()
        {
            Quad q = iter.next();
            if ( graphNode != null && ! q.getGraph().equals(graphNode))
                throw new InternalError("ProjectQuadsToTriples: Quads from unexpected graph (expected="+graphNode+", got="+q.getGraph()+")") ;
            return q.asTriple() ;
        }
        @Override
        public void remove() { iter.remove(); }
    }
   
View Full Code Here

       
        if ( quads.size() == 1 )
        {
            Quad q = quads.get(0) ;
            BasicPattern bgp = new BasicPattern() ;
            bgp.add(q.asTriple()) ;
            return new OpQuadPattern(q.getGraph(), bgp) ;
        }

        List<OpQuadPattern> x = convert() ;
        OpSequence ops = OpSequence.create() ;
View Full Code Here

            if ( !iter.hasNext() )
                return null ;
            Quad q = iter.next() ;
            if ( iter.hasNext() )
                return null ;
            return q.asTriple() ;
    }

    public static boolean strSafeFor(String str, char ch) {
        return str.indexOf(ch) == -1 ;
    }
View Full Code Here

            if ( !iter.hasNext() )
                return null ;
            Quad q = iter.next() ;
            if ( iter.hasNext() )
                return null ;
            return q.asTriple() ;
        }

        private long countTriples(Node s, Node p, Node o) {
            if ( dsg != null )
                return RiotLib.countTriples(dsg, s, p, o) ;
View Full Code Here

        public Triple next()
        {
            Quad q = iter.next();
            if ( graphNode != null && ! q.getGraph().equals(graphNode))
                throw new InternalError("ProjectQuadsToTriples: Quads from unexpected graph") ;
            return q.asTriple() ;
        }
        @Override
        public void remove() { iter.remove(); }
    }
   
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.