Package com.hp.hpl.jena.sparql

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


    // All non-streaming updates come through here.
    private static void execute$(UpdateRequest request, GraphStore graphStore, Binding inputBinding)
    {
        UpdateProcessor uProc = UpdateExecutionFactory.create(request, graphStore, inputBinding);
        if (uProc == null)
            throw new ARQException("No suitable update procesors are registered/able to execute your updates");
        uProc.execute();
    }
View Full Code Here


    {
        GraphStore graphStore = GraphStoreFactory.create(dataset);
       
        UpdateProcessorStreaming uProc = UpdateExecutionFactory.createStreaming(graphStore, inputBinding) ;
        if (uProc == null)
            throw new ARQException("No suitable update procesors are registered/able to execute your updates");
       
        uProc.startRequest();
        try
        {
            UpdateSink sink = new UsingUpdateSink(uProc.getUpdateSink(), usingList) ;
View Full Code Here

    @Override
    public void execute()
    {
        // Validation
        if ( this.getEndpoint() == null )
            throw new ARQException("Null endpoint for remote update") ;
        if ( this.getUpdateRequest() == null )
            throw new ARQException("Null update request for remote update") ;
       
        // Build endpoint URL
        String endpoint = this.getEndpoint();
        String querystring = this.getQueryString();
        endpoint = endpoint.contains("?") ? endpoint + "&" + querystring : endpoint + "?" + querystring;
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.merge(getServiceParams(service, context)) ;
        httpQuery.addParam(HttpParams.pQuery, queryString );
       
View Full Code Here

    @Override
    public void execute()
    {
        // Validation
        if ( this.getEndpoint() == null )
            throw new ARQException("Null endpoint for remote update by form") ;
        if ( this.getUpdateRequest() == null )
            throw new ARQException("Null update request for remote update") ;
       
        // Execution
        String reqStr = this.getUpdateRequest().toString() ;
        Params ps = new Params(this.getParams());
        ps.addParam(HttpParams.pUpdate, reqStr);
View Full Code Here

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

    /** Execute a query, expecting the result to be one row, one column.  Return that one RDFNode */
    public static RDFNode getExactlyOne(String qs, Dataset ds)
    {
        Query q = QueryFactory.create(qs) ;
        if ( q.getResultVars().size() != 1 )
            throw new ARQException("getExactlyOne: Must have exactly one result columns") ;
        String varname = q.getResultVars().get(0) ;
        QueryExecution qExec = QueryExecutionFactory.create(q, ds);
        return getExactlyOne(qExec, varname) ;
    }
View Full Code Here

    {
        try {
            ResultSet rs = qExec.execSelect() ;
           
            if ( ! rs.hasNext() )
                throw new ARQException("Not found: var ?"+varname) ;

            QuerySolution qs = rs.nextSolution() ;
            RDFNode r = qs.get(varname) ;
            if ( rs.hasNext() )
                throw new ARQException("More than one: var ?"+varname) ;
            return r ;
        } finally { qExec.close() ; }
    }
View Full Code Here

                return null ;

            QuerySolution qs = rs.nextSolution() ;
            RDFNode r = qs.get(varname) ;
            if ( rs.hasNext() )
                throw new ARQException("More than one: var ?"+varname) ;
            return r ;
        } finally { qExec.close() ; }
    }
View Full Code Here

        {
            URI uri;
            try {
                uri = new URI(endpoint);
            } catch (URISyntaxException e) {
                throw new ARQException("Invalid request URI", e);
            }
           
            // Be careful to scope credentials to the specific URI so that HttpClient won't try
            // and send them to other servers
            HttpHost host = new HttpHost(uri.getHost(), uri.getPort());
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.