Package com.hp.hpl.jena.query

Examples of com.hp.hpl.jena.query.QueryParseException


    {
        if ( Var.isVar(t.getGraph()) ||
             Var.isVar(t.getSubject()) ||
             Var.isVar(t.getPredicate()) ||
             Var.isVar(t.getObject()))
            throw new QueryParseException("Variables not permitted in data quad", -1, -1) ;  
    }
View Full Code Here


       
        if ( currentColumn+1 != variables.size() )
        {
            String msg = String.format("Mismatch: %d variables but %d values",variables.size(), currentColumn+1) ;
            msg = QueryParseException.formatMessage(msg, line, col) ;
            throw new QueryParseException(msg, line , col) ;
        }
    }
View Full Code Here

       
        if ( currentColumn+1 != variables.size() )
        {
            String msg = String.format("Mismatch: %d variables but %d values",variables.size(), currentColumn+1) ;
            msg = QueryParseException.formatMessage(msg, line, col) ;
            throw new QueryParseException(msg, line , col) ;
        }
    }
View Full Code Here

        return node ;
    }
   
    private static QueryParseException makeException(String msg, int line, int column)
    {
        return new QueryParseException(msg, line, column) ;
    }
View Full Code Here

            try {
                // Possible too large for a long.
                BigInteger integer = new BigInteger(s) ;
                throwParseException("Number '"+s+"' is a valid number but can't not be stored in a long") ;
            } catch (NumberFormatException ex2) {}
            throw new QueryParseException(ex, -1, -1) ;
        }
    }
View Full Code Here

        Log.warn(this, msg) ;
    }
   
    public static void throwParseException(String msg, int line, int column)
    {
        throw new QueryParseException("Line " + line + ", column " + column + ": " + msg,
                                      line, column) ;
    }
View Full Code Here

                                      line, column) ;
    }
   
    public static void throwParseException(String msg)
    {
        throw new QueryParseException(msg, -1, -1) ;
    }
View Full Code Here

        // Check for SELECT * GROUP BY
        // Legal in ARQ, not in SPARQL 1.1
        if ( ! Syntax.syntaxARQ.equals(query.getSyntax()) )
        {
            if ( query.isQueryResultStar() && query.hasGroupBy() )
                throw new QueryParseException("SELECT * not legal with GROUP BY", -1 , -1) ;
        }
       
        // Check any variable in an expression is in scope (if GROUP BY)
        checkExprVarUse(query) ;
       
View Full Code Here

                Var v = iter.next();
                Expr e = exprList.getExpr(v) ;
                if ( e == null )
                {
                    if ( ! groupVars.contains(v) )
                        throw new QueryParseException("Non-group key variable in SELECT: "+v, -1 , -1) ;
                }
                else
                {
                    Set<Var> eVars = e.getVarsMentioned() ;
                    for ( Var v2 : eVars )
                    {
                        if ( ! groupVars.contains(v2) )
                            throw new QueryParseException("Non-group key variable in SELECT: "+v2+" in expression "+e , -1 , -1) ;
                    }
                }
            }
        }
    }
View Full Code Here

        if ( expr == null )
            return ;
       
        // expr not null
        if ( scope.contains(var) )
            throw new QueryParseException("Variable used when already in-scope: "+var+" in "+fmtAssignment(expr, var), -1 , -1) ;

        // test for impossible variables - bound() is a bit odd.
        if ( false )
        {
            Set<Var> vars = expr.getVarsMentioned() ;
            for ( Var v : vars )
            {
                if ( !scope.contains(v) )
                    throw new QueryParseException("Variable used in expression is not in-scope: "+v+" in "+expr, -1 , -1) ;
            }
        }
    }
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.query.QueryParseException

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.