Package com.hp.hpl.jena.sparql.syntax

Examples of com.hp.hpl.jena.sparql.syntax.Element


    protected Element compressGroupOfOneGroup(ElementGroup elg)
    {
        // remove group of one group.
        if ( elg.getElements().size() == 1 )
        {
            Element e1 = elg.getElements().get(0) ;
            if ( e1 instanceof ElementGroup )
                return e1 ;
        }
        return elg ;
    }
View Full Code Here


        // Second: compile the consolidated group elements.
        // Asumes that filters moved to end.
        for (Iterator<Element> iter = groupElts.listIterator() ; iter.hasNext() ; )
        {
            Element elt = iter.next() ;
            current = compileOneInGroup(elt, current) ;
        }
           
        return current ;
    }
View Full Code Here

        return opUnion ;
    }

    protected Op compileElementOptional(ElementOptional eltOpt, Op current)
    {
        Element subElt = eltOpt.getOptionalElement() ;
        Op op = compileElement(subElt) ;
       
        ExprList exprs = null ;
        if ( op instanceof OpFilter )
        {
View Full Code Here

        {
            out.print("WHERE") ;
            out.incIndent(BLOCK_INDENT) ;
            out.newline() ;
           
            Element el = query.getQueryPattern() ;

            fmtElement.visitAsGroup(el) ;
            //el.visit(fmtElement) ;
            out.decIndent(BLOCK_INDENT) ;
            out.newline() ;
View Full Code Here

        public void visit(ExprFunctionOp funcOp)
        {
            FormatterElement fmtElt = new FormatterElement(out, context) ;
            out.print(funcOp.getFunctionName(context)) ;
            out.print(" ") ;
            Element el = funcOp.getElement() ;
            if ( el == null )
                el = OpAsQuery.asQuery(funcOp.getGraphPattern()).getQueryPattern() ;
            el.visit(fmtElt) ;
        }
View Full Code Here

                out.ensureStartOfLine() ;
                out.print("USING NAMED ") ;
                output(x) ;
            }
            
            Element el = update.getWherePattern() ;
            out.ensureStartOfLine() ;
            out.print("WHERE") ;
            out.incIndent(BLOCK_INDENT) ;
            out.newline() ;
View Full Code Here

        // Convert bNodes to named variables first.
//        if ( false )
//            // Removed from SPARQL
//            quads = convertBNodesToVariables(quads) ;
        // Convert quads to a pattern.
        Element el = elementFromQuads(quads) ;
       
        // Decided to serialize the bindings, but could also have decided to
        // serialize the quads after applying the template instead.
       
        ThresholdPolicy<Binding> policy = ThresholdPolicyFactory.policyFromContext(graphStore.getContext());
View Full Code Here

    protected Element compressGroupOfOneGroup(ElementGroup elg)
    {
        // remove group of one group.
        if ( elg.getElements().size() == 1 )
        {
            Element e1 = elg.getElements().get(0) ;
            if ( e1 instanceof ElementGroup )
                return e1 ;
        }
        return elg ;
    }
View Full Code Here

        // Convert bNodes to named variables first.
//        if ( false )
//            // Removed from SPARQL
//            quads = convertBNodesToVariables(quads) ;
        // Convert quads to a pattern.
        Element el = elementFromQuads(quads) ;
       
        // Decided to serialize the bindings, but could also have decided to
        // serialize the quads after applying the template instead.
       
        ThresholdPolicy<Binding> policy = ThresholdPolicyFactory.policyFromContext(graphStore.getContext());
View Full Code Here

        // Convert bNodes to named variables first.
//        if ( false )
//            // Removed from SPARQL
//            quads = convertBNodesToVariables(quads) ;
        // Convert quads to a pattern.
        Element el = elementFromQuads(quads) ;
       
        // Decided to serialize the bindings, but could also have decided to
        // serialize the quads after applying the template instead.
       
        ThresholdPolicy<Binding> policy = ThresholdPolicyFactory.policyFromContext(graphStore.getContext());
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.sparql.syntax.Element

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.