/** Create an HttpEntity for the graph */ protected HttpEntity graphToHttpEntity(Graph graph) { return graphToHttpEntity(graph, outputTriples); }
/** Create an HttpEntity for the graph */ protected HttpEntity graphToHttpEntity(Graph graph) { return graphToHttpEntity(graph, outputTriples); }
/** Send a model to named graph (or "default" or null for the defaultl graph). * <p> * The Content-Type is taken from the given {@code Lang}. * <p> * "Replace" means overwrite existing data, othewise the date is added to the target. */ protected void doPutPost(Model model, String name, boolean replace) { String url = LibRDFConn.urlForGraph(svcGraphStore, name); exec(()->{ Graph graph = model.getGraph(); if ( replace ) HttpOp.execHttpPut(url, graphToHttpEntity(graph), httpClient, httpContext); else HttpOp.execHttpPost(url, graphToHttpEntity(graph), null, null, httpClient, httpContext); }); }
/** Send a model to named graph (or "default" or null for the defaultl graph). * <p> * The Content-Type is taken from the given {@code Lang}. * <p> * "Replace" means overwrite existing data, othewise the date is added to the target. */ protected void doPutPost(Model model, String name, boolean replace) { String url = LibRDFConn.urlForGraph(svcGraphStore, name); exec(()->{ Graph graph = model.getGraph(); if ( replace ) HttpOp.execHttpPut(url, graphToHttpEntity(graph), httpClient, httpContext); else HttpOp.execHttpPost(url, graphToHttpEntity(graph), null, null, httpClient, httpContext); }); }