Search in sources :

Example 11 with UpdateRequest

use of it.unibo.arces.wot.sepa.commons.request.UpdateRequest in project SEPA by arces-wot.

the class Producer method update.

public final Response update(long timeout, long nRetry) throws SEPASecurityException, SEPAPropertiesException, SEPABindingsException, SEPAProtocolException {
    UpdateRequest req = new UpdateRequest(appProfile.getUpdateMethod(SPARQL_ID), appProfile.getUpdateProtocolScheme(SPARQL_ID), appProfile.getUpdateHost(SPARQL_ID), appProfile.getUpdatePort(SPARQL_ID), appProfile.getUpdatePath(SPARQL_ID), appProfile.addPrefixesAndReplaceBindings(sparqlUpdate, addDefaultDatatype(forcedBindings, SPARQL_ID, false)), appProfile.getUsingGraphURI(SPARQL_ID), appProfile.getUsingNamedGraphURI(SPARQL_ID), (appProfile.isSecure() ? appProfile.getAuthenticationProperties().getBearerAuthorizationHeader() : null), timeout, nRetry);
    logger.debug(req);
    Response retResponse = client.update(req);
    logger.debug(retResponse);
    return retResponse;
}
Also used : Response(it.unibo.arces.wot.sepa.commons.response.Response) UpdateRequest(it.unibo.arces.wot.sepa.commons.request.UpdateRequest)

Aggregations

UpdateRequest (it.unibo.arces.wot.sepa.commons.request.UpdateRequest)11 Response (it.unibo.arces.wot.sepa.commons.response.Response)5 ErrorResponse (it.unibo.arces.wot.sepa.commons.response.ErrorResponse)4 QueryRequest (it.unibo.arces.wot.sepa.commons.request.QueryRequest)2 SubscribeRequest (it.unibo.arces.wot.sepa.commons.request.SubscribeRequest)2 UnsubscribeRequest (it.unibo.arces.wot.sepa.commons.request.UnsubscribeRequest)2 IOException (java.io.IOException)2 UnsupportedEncodingException (java.io.UnsupportedEncodingException)2 HttpEntity (org.apache.http.HttpEntity)2 ParseException (org.apache.http.ParseException)2 JsonParseException (com.google.gson.JsonParseException)1 SEPASecurityException (it.unibo.arces.wot.sepa.commons.exceptions.SEPASecurityException)1 SPARQL11Properties (it.unibo.arces.wot.sepa.commons.protocol.SPARQL11Properties)1 SSLSecurityManager (it.unibo.arces.wot.sepa.commons.protocol.SSLSecurityManager)1 RegistrationRequest (it.unibo.arces.wot.sepa.commons.request.RegistrationRequest)1 Request (it.unibo.arces.wot.sepa.commons.request.Request)1 QueryResponse (it.unibo.arces.wot.sepa.commons.response.QueryResponse)1 SubscribeResponse (it.unibo.arces.wot.sepa.commons.response.SubscribeResponse)1 UpdateResponse (it.unibo.arces.wot.sepa.commons.response.UpdateResponse)1 EngineProperties (it.unibo.arces.wot.sepa.engine.core.EngineProperties)1