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

Examples of com.hp.hpl.jena.sparql.core.Var$NotAVariableException


        {
            String s = nv.getVarName() ;
            if ( Var.isBlankNodeVarName(s) )
            {
                // Return to a bNode via the bNode mapping of a variable.
                Var v = Var.alloc(s) ;
                out.print(context.getBNodeMap().asString(v) ) ;
            }
            else
            {
                // Print in variable form or as an aggregator expression
View Full Code Here


    }

    private static void output(Binding binding, IndentedWriter out, SerializationContext sCxt) {
        out.print("(row") ;
        for (Iterator<Var> iter = binding.vars(); iter.hasNext();) {
            Var v = iter.next() ;
            Node n = binding.get(v) ;
            out.print(" ") ;
            out.print(Plan.startMarker2) ;
            out.print(FmtUtils.stringForNode(v)) ;
            out.print(" ") ;
View Full Code Here

    {
        String sep = "" ;
        for ( Iterator<Var> iter = vars1() ; iter.hasNext() ; )
        {
            Object obj = iter.next() ;
            Var var = (Var)obj ;
           
            sbuff.append(sep) ;
            sep = " " ;
            format(sbuff, var) ;
        }
View Full Code Here

    public static int hashCode(Binding bind)
    {
        int hash = 0xC0 ;
        for ( Iterator<Var> iter = bind.vars() ; iter.hasNext() ; )
        {
            Var var = iter.next() ;
            Node node = bind.get(var) ;
            hash ^= var.hashCode() ;
            hash ^= node.hashCode() ;
        }
        return hash ;
    }
View Full Code Here

        for (Pair<Var, Var> implicitJoin : joins) {
            // Which variable do we want to substitute out?
            // We don't need to deal with the case of neither variable being on
            // the RHS
            Var lVar = implicitJoin.getLeft();
            Var rVar = implicitJoin.getRight();

            if (lhsVars.contains(lVar) && lhsVars.contains(rVar)) {
                // Both vars are on LHS

                if (rhsVars.contains(lVar) && rhsVars.contains(rVar)) {
View Full Code Here

        if ( bind1.size() != bind2.size() )
            return false ;

        for ( Iterator<Var> iter1 = bind1.vars() ; iter1.hasNext() ; )
        {
            Var var = iter1.next() ;
            Node node1 = bind1.get(var) ;
            Node node2 = bind2.get(var) ;
            if ( ! Lib.equal(node1, node2) )
                return false ;
        }
View Full Code Here

    void appendVarList(Query query, IndentedWriter sb, List<String> vars)
    {
        boolean first = true ;
        for ( String varName : vars )
        {
            Var var = Var.alloc(varName) ;
            if ( ! first )
                sb.print(" ") ;
            sb.print(var.toString()) ;
            first = false ;
        }

    }
View Full Code Here

    }

    @Override
    public void addBinding(Binding binding) {
        for (Iterator<Var> names = binding.vars(); names.hasNext();) {
            Var v = names.next() ;
            if ( !vars.contains(v) )
                vars.add(v) ;
        }
        rows.add(binding) ;
    }
View Full Code Here

   
    public static Binding transform(Binding b, NodeTransform transform) {
        BindingMap b2 = BindingFactory.create() ;
        List<Var> vars = Iter.toList(b.vars()) ;
        for ( Var v : vars ) {
            Var v2 = (Var)transform.convert(v) ;
            b2.add(v2, b.get(v));
        }
        return b2 ;
    }
View Full Code Here

        VarExprList varExprList2 = new VarExprList() ;
        boolean changed = false ;
        for ( Var v : varExprList.getVars() )
        {
            Expr expr = varExprList.getExpr(v) ;
            Var v2 = (Var)nodeTransform.convert(v) ;
            Expr expr2 = ( expr != null ) ? transform(nodeTransform, expr) : null ;
           
            if ( ! equal(v, v2) || ! equal(expr, expr2) )
                changed = true ;
            varExprList2.add(v2, expr2) ;
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.sparql.core.Var$NotAVariableException

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.