Package com.hp.hpl.jena.sparql.engine.http

Examples of com.hp.hpl.jena.sparql.engine.http.Params


     * Gets the parameters for the execution
     *
     * @return Parameters
     */
    public Params getParams() {
        Params ps = this.params != null ? new Params(this.params) : new Params();
        if (this.defaultGraphURIs != null) {
            for (String defaultGraph : this.defaultGraphURIs) {
                ps.addParam(HttpParams.pUsingGraph, defaultGraph);
            }
        }
        if (this.namedGraphURIs != null) {
            for (String namedGraph : this.namedGraphURIs) {
                ps.addParam(HttpParams.pUsingNamedGraph, namedGraph);
            }
        }
        return ps;
    }
View Full Code Here


     * @param value
     *            Value
     */
    public void addParam(String field, String value) {
        if (this.params == null)
            this.params = new Params();
        this.params.addParam(field, value);
    }
View Full Code Here

        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);
        HttpOp.execHttpPostForm(this.getEndpoint(), ps, null, HttpResponseLib.nullResponse, null, getHttpContext(),
                getAuthenticator());
    }
View Full Code Here

     * Gets the parameters for the execution
     *
     * @return Parameters
     */
    public Params getParams() {
        Params ps = new Params();
        if (this.defaultGraphURIs != null) {
            for (String defaultGraph : this.defaultGraphURIs) {
                ps.addParam(HttpParams.pUsingGraph, defaultGraph);
            }
        }
        if (this.namedGraphURIs != null) {
            for (String namedGraph : this.namedGraphURIs) {
                ps.addParam(HttpParams.pUsingNamedGraph, namedGraph);
            }
        }
        return ps;
    }
View Full Code Here

    /**
     * Gets the parameters for the execution
     * @return Parameters
     */
    public Params getParams() {
        Params ps = new Params();
        if (this.defaultGraphURIs != null) {
            for (String defaultGraph : this.defaultGraphURIs) {
                ps.addParam(HttpParams.pUsingGraph, defaultGraph);
            }
        }
        if (this.namedGraphURIs != null) {
            for (String namedGraph : this.namedGraphURIs) {
                ps.addParam(HttpParams.pUsingNamedGraph, namedGraph);
            }
        }
        return ps;
    }
View Full Code Here

        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);
        Map<String, HttpResponseHandler> handlers = new HashMap<String, HttpResponseHandler>() ;
        handlers.put("*", HttpResponseLib.nullResponse) ;
        HttpOp.execHttpPostForm(this.getEndpoint(), ps, handlers, getHttpContext()) ;
    }
View Full Code Here

     * Gets the parameters for the execution
     *
     * @return Parameters
     */
    public Params getParams() {
        Params ps = this.params != null ? new Params(this.params) : new Params();
        if (this.defaultGraphURIs != null) {
            for (String defaultGraph : this.defaultGraphURIs) {
                ps.addParam(HttpParams.pUsingGraph, defaultGraph);
            }
        }
        if (this.namedGraphURIs != null) {
            for (String namedGraph : this.namedGraphURIs) {
                ps.addParam(HttpParams.pUsingNamedGraph, namedGraph);
            }
        }
        return ps;
    }
View Full Code Here

     * @param value
     *            Value
     */
    public void addParam(String field, String value) {
        if (this.params == null)
            this.params = new Params();
        this.params.addParam(field, value);
    }
View Full Code Here

            throw ex ;
        }
    }
       
    @Test public void httpPost_04() {
        Params params = new Params() ;
        params.addParam("query", "ASK{}") ;
        TypedInputStream in = HttpOp.execHttpPostFormStream(queryURL, params, WebContent.contentTypeResultsJSON) ;
        IO.close(in) ;
    }
View Full Code Here

        IO.close(in) ;
    }
   
    @Test(expected=HttpException.class)
    public void httpPost_05() {
        Params params = new Params() ;
        params.addParam("query", "ASK{}") ;
        TypedInputStream in = null ;
        try {
            // Query to Update
            in = HttpOp.execHttpPostFormStream(updateURL, params, WebContent.contentTypeResultsJSON) ;
        } catch (HttpException ex) {
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.sparql.engine.http.Params

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.