Package com.hp.hpl.jena.query

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


               
            // Check is already has a value; if so, must be sameValueAs
            if ( b.contains(v) )
            {
                if ( mustBeNewVar )
                    throw new QueryExecException("Already set: "+v) ;
               
                Node n2 = b.get(v) ;
                if ( ! n2.sameValueAs(n) )
                    //throw new QueryExecException("Already set: "+v) ;
                    // Error in single assignment.
View Full Code Here


   
    @Override
    public ResultSet execSelect()
    {
        if ( ! query.isSelectType() )
            throw new QueryExecException("Attempt to have ResultSet from a "+labelForQuery(query)+" query") ;
        return execResultSet() ;
    }
View Full Code Here

 
    @Override
    public Model execConstruct(Model model)
    {
        if ( ! query.isConstructType() )
            throw new QueryExecException("Attempt to get a CONSTRUCT model from a "+labelForQuery(query)+" query") ;
        // This causes there to be no PROJECT around the pattern.
        // That in turn, exposes the initial bindings. 
        query.setQueryResultStar(true) ;

        startQueryIterator() ;
View Full Code Here

    @Override
    public Model execDescribe(Model model)
    {
        if ( ! query.isDescribeType() )
            throw new QueryExecException("Attempt to get a DESCRIBE result from a "+labelForQuery(query)+" query") ;
        //Was: query.setQueryResultStar(true) ; but why?
        query.setResultVars() ;
        // If there was no WhereClause, use an empty pattern (one solution, no columns).
        if ( query.getQueryPattern() == null )
            query.setQueryPattern(new ElementGroup()) ;
View Full Code Here

    @Override
    public boolean execAsk()
    {
        if ( ! query.isAskType() )
            throw new QueryExecException("Attempt to have boolean from a "+labelForQuery(query)+" query") ;

        startQueryIterator() ;
        boolean r = queryIterator.hasNext() ;
        this.close() ;
        return r ;
View Full Code Here

        if ( dataset != null )
            return dataset.asDatasetGraph() ;
       
        if ( ! query.hasDatasetDescription() )
            //Query.Log.warn(this, "No data for query (no URL, no model)");
            throw new QueryExecException("No dataset description for query");
       
        String baseURI = query.getBaseURI() ;
        if ( baseURI == null )
            baseURI = IRIResolver.chooseBaseURI() ;
       
View Full Code Here

public class Service
{
    public static QueryIterator exec(OpService op, Context context)
    {
        if ( ! op.getService().isURI() )
            throw new QueryExecException("Service URI not bound: "+op.getService()) ;
       
       
        // This relies on the observation that the query was originally correct,
        // so reversing the scope renaming is safe (it merely restores the algebra expression).
        // Any variables that reappear should be internal ones that were hidden by renaming
View Full Code Here

        push(opTable.getTable()) ;
    }

    @Override
    public void visit(OpExt opExt)
    { throw new QueryExecException("Encountered OpExt during execution of reference engine") ; }
View Full Code Here

    public static final Symbol queryTimeout = ARQConstants.allocSymbol(base, "queryTimeout");

    public static QueryIterator exec(OpService op, Context context)
    {
        if ( ! op.getService().isURI() )
            throw new QueryExecException("Service URI not bound: "+op.getService()) ;
       
        // This relies on the observation that the query was originally correct,
        // so reversing the scope renaming is safe (it merely restores the algebra expression).
        // Any variables that reappear should be internal ones that were hidden by renaming
        // in the first place.
View Full Code Here

              query.setConnectTimeout(x);
            }
          }
          catch (NumberFormatException ex)
          {
            throw new QueryExecException("Can't interpret string for timeout: " + obj);
          }
        }
        else
        {
          throw new QueryExecException("Can't interpret timeout: " + obj);
        }
      }
    }
View Full Code Here

TOP

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

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.