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

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


            while (! eof() && ! lookingAt(DOT) )
            {
                Token t = nextToken() ;
                if ( ! t.hasType(TokenType.VAR) )
                    exception(t, "VARS requires a list of variables (found '"+t+"')") ;
                Var v = Var.alloc(t.getImage()) ;
                vars.add(v) ;
            }
            nextToken() ;   // DOT
        }
View Full Code Here


            if ( Var.isVar(opGraph.getNode()) )
            {
                // This is the join of the graph node variable to the sub-pattern solution.
                // Do after the subpattern so that the variable is not visible to the
                // subpattern.
                Var v = Var.alloc(opGraph.getNode()) ;
                qIter = new QueryIterAssignVarValue(qIter, v, gn, getExecContext()) ;
            }
           
            return qIter ;
        }
View Full Code Here

            throw new ExprEvalException("Object list must contain exactly two arguments, the string to split and a regular expression") ;

        String s = object.getArg(0).getLiteralLexicalForm() ;
        String regex = object.getArg(1).getLiteralLexicalForm() ;
       
        final Var subjectVar = Var.alloc(subject);
       
        // StrUtils will also trim whitespace
        String[] tokens = StrUtils.split(s, regex);
        Iterator<Binding> it = Iter.map(Arrays.asList(tokens).iterator(), new Transform<String,Binding>() {
            @Override
View Full Code Here

       
        if ( currentColumn >= variables.size() )
            // Exception will be thrown later when we have the complete row count.
            return ;
       
        Var v = variables.get(currentColumn) ;
        if ( n != null )
            currentValueRow().add(v, n) ;
       
    }
View Full Code Here

            c = findContainers(graph, typeNode) ;
        else
            c = findContainingContainers(graph, typeNode, member) ;
       
        QueryIterConcat cIter = new QueryIterConcat(execCxt) ;
        Var cVar = Var.alloc(containerNode) ;
        for ( Iterator<Node> iter = c.iterator() ; iter.hasNext() ; )
        {
            Node cn = iter.next() ;
            //Binding the container node.
            Binding b = BindingFactory.binding(binding, cVar, cn) ;
View Full Code Here

                    FmtLog.warn(log, "Row %d: Length=%d: expected=%d", count, row.size(), vars.size()) ;
               
                BindingMap binding = BindingFactory.create() ;
                // Check.
                for (int i = 0 ; i < vars.size() ; i++ ) {
                    Var v = vars.get(i) ;
                    String field = (i<row.size()) ? row.get(i) : "" ;
                    Node n = NodeFactory.createLiteral(field) ;
                    binding.add(v, n);
                }
                count++ ;
View Full Code Here

{
    public static void main (String[] argv)
    {
        String BASE = "http://example/" ;
        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 ") ;
View Full Code Here

                // and copy over, getting NodeIds.
                Iterator<Var> vars = binding.vars() ;
   
                for ( ; vars.hasNext() ; )
                {
                    Var v = vars.next() ;
                    Node n = binding.get(v)
                    if ( n == null )
                        // Variable mentioned in the binding but not actually defined.
                        // Can occur with BindingProject
                        continue ;
View Full Code Here

        Iterator<NodeId> iter3 = Iter.distinct(iter2) ;
        iter3 = makeAbortable(iter3, killList) ;

        Iterator<Node> iter4 = NodeLib.nodes(ds.getQuadTable().getNodeTupleTable().getNodeTable(), iter3) ;

        final Var var = Var.alloc(graphNode) ;
        Transform<Node, Binding> bindGraphName = new Transform<Node, Binding>() {
            @Override
            public Binding convert(Node node) {
                return BindingFactory.binding(var, node) ;
            }
View Full Code Here

            public BindingNodeId convert(Tuple<NodeId> tuple)
            {
                BindingNodeId output = new BindingNodeId(input) ;
                for ( int i = 0 ; i < var.length ; i++ )
                {
                    Var v = var[i] ;
                    if ( v == null )
                        continue ;
                    NodeId id = tuple.get(i) ;
                    if ( reject(output, v, id) )
                        return null ;
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.