/** Create an HttpEntity for the dataset */ protected HttpEntity datasetToHttpEntity(DatasetGraph dataset) { return datasetToHttpEntity(dataset, outputQuads); }
/** Create an HttpEntity for the dataset */ protected HttpEntity datasetToHttpEntity(DatasetGraph dataset) { return datasetToHttpEntity(dataset, outputQuads); }
/** Do a PUT or POST to a dataset, sending the contents of a daatsets. * The Content-Type is {@code application/n-quads}. * <p> * "Replace" implies PUT, otherwise a POST is used. */ protected void doPutPostDataset(Dataset dataset, boolean replace) { exec(()->{ DatasetGraph dsg = dataset.asDatasetGraph(); if ( replace ) HttpOp.execHttpPut(destination, datasetToHttpEntity(dsg), httpClient, null); else HttpOp.execHttpPost(destination, datasetToHttpEntity(dsg), httpClient, null); }); }
/** Do a PUT or POST to a dataset, sending the contents of a daatsets. * The Content-Type is {@code application/n-quads}. * <p> * "Replace" implies PUT, otherwise a POST is used. */ protected void doPutPostDataset(Dataset dataset, boolean replace) { exec(()->{ DatasetGraph dsg = dataset.asDatasetGraph(); if ( replace ) HttpOp.execHttpPut(destination, datasetToHttpEntity(dsg), httpClient, null); else HttpOp.execHttpPost(destination, datasetToHttpEntity(dsg), httpClient, null); }); }