Package com.hp.hpl.jena.sparql

Examples of com.hp.hpl.jena.sparql.ARQException


            else
                out.write(noBytes) ;
            out.write(NLBytes) ;
        } catch (IOException ex)
        {
            throw new ARQException(ex) ;
        }
    }
View Full Code Here


   
    private HttpQuery makeHttpQuery()
    {
        // Also need to tie to ResultSet returned which is streamed back if StAX.
        if ( finished )
            throw new ARQException("HTTP execution already closed") ;
       
        HttpQuery httpQuery = new HttpQuery(service) ;
        httpQuery.addParam(HttpParams.pQuery, queryString );
       
        for ( Iterator<String> iter = defaultGraphURIs.iterator() ; iter.hasNext() ; )
View Full Code Here

    }

    @Override
    public void setInitialBinding(QuerySolution binding)
    {
        throw new ARQException("Initial bindings for a remote update execution request not supported") ;
    }
View Full Code Here

    @Override
    public void execute()
    {
        if ( endpoint == null )
            throw new ARQException("Null endpoint for remote update") ;
        String reqStr = request.toString() ;
        HttpOp.execHttpPost(endpoint, WebContent.contentTypeSPARQLUpdate, reqStr) ;
    }
View Full Code Here

    public Op transform(OpBGP op)
    {
        // Bad - assume we work on the quad form.
        // Otherwise need to know the active graph at this point
        // toQuadForm transformation.
        throw new ARQException("Unexpected use of BGP in for a dynamic dataset") ;
        //return super.transform(op) ;
    }
View Full Code Here

    }
   
    private static void checkGraphName(String uri)
    {
        if ( uri == null )
            throw new ARQException("null for graph name") ;
    }
View Full Code Here

        try
        {
            //Here we try to parse only the Header Row
            str = reader.readLine();
            if (str == null )
                throw new ARQException("CSV Results malformed, input is empty (no header row)") ;
           
            if ( ! str.isEmpty() )
            {
                String[] tokens = str.split(",") ;
                for ( String token : tokens )
                {
                    Var var = Var.alloc(token);
                    vars.add(var);
                    varNames.add(var.getName());
                }
            }
        }
        catch ( IOException ex )
        {
            throw new ARQException(ex) ;
        }

        //Generate an instance of ResultSetStream using TSVInputIterator
        //This will parse actual result rows as needed thus minimising memory usage
        return new ResultSetStream(varNames, null, new CSVInputIterator(reader, vars));
View Full Code Here

      String str = null;
      try
      {
        //First try to parse the header
        str = reader.readLine();
        if (str == null) throw new ARQException("CSV Boolean Results malformed, input is empty");
        str = str.trim(); //Remove extraneous white space
       
        //Expect a header row with single _askResult variable
        if (!str.equals("_askResult")) throw new ARQException("CSV Boolean Results malformed, did not get expected ?_askResult header row");
       
        //Then try to parse the boolean result
        str = reader.readLine();
        if (str == null) throw new ARQException("CSV Boolean Results malformed, unexpected end of input after header row");
        str = str.trim();
       
        if (str.toLowerCase().equals("true") || str.toLowerCase().equals("yes")) {
          return true;
        } else if (str.toLowerCase().equals("false") || str.toLowerCase().equals("no")) {
          return false;
        } else {
          throw new ARQException("CSV Boolean Results malformed, expected one of - true yes false no - but got " + str);
        }
      }
      catch (IOException ex)
      {
        throw new ARQException(ex);
      }
    }
View Full Code Here

                w.write(NL) ;
            }
            w.flush() ;
        } catch (IOException ex)
        {
            throw new ARQException(ex) ;
        }
    }
View Full Code Here

            else
                out.write(noBytes) ;
            out.write(NLBytes) ;
        } catch (IOException ex)
        {
            throw new ARQException(ex) ;
        }
    }
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.sparql.ARQException

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.