Package org.apache.jena.http
Class HttpRDF
- java.lang.Object
-
- org.apache.jena.http.HttpRDF
-
public class HttpRDF extends java.lang.Object
A collection of convenience operations for HTTP level operations for RDF related tasks. This does not include GSP naming which is inGSP
. See alsoAsyncHttpRDF
.
-
-
Constructor Summary
Constructors Constructor Description HttpRDF()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
httpDeleteGraph(java.lang.String url)
static void
httpDeleteGraph(java.net.http.HttpClient httpClient, java.lang.String url)
static Graph
httpGetGraph(java.lang.String url)
GET a graph from a URLstatic Graph
httpGetGraph(java.lang.String url, java.lang.String acceptHeader)
GET a graph from a URL using the provided "Accept" header.static Graph
httpGetGraph(java.net.http.HttpClient httpClient, java.lang.String url)
GET a graph from a URL using theHttpClient
provided.static Graph
httpGetGraph(java.net.http.HttpClient httpClient, java.lang.String url, java.lang.String acceptHeader)
GET a graph from a URL using theHttpClient
provided and the "Accept" header.static void
httpGetToStream(java.lang.String url, java.lang.String acceptHeader, StreamRDF dest)
Send the RDF data from the resource at the URL to the StreamRDF.static void
httpGetToStream(java.net.http.HttpClient client, java.lang.String url, java.lang.String acceptHeader, StreamRDF dest)
Read the RDF data from the resource at the URL and send to the StreamRDF.static void
httpGetToStream(java.net.http.HttpClient client, java.lang.String url, java.util.Map<java.lang.String,java.lang.String> headers, StreamRDF dest)
Read the RDF data from the resource at the URL and send to the StreamRDF.static void
httpPostDataset(java.net.http.HttpClient httpClient, java.lang.String url, DatasetGraph dataset, RDFFormat format)
static void
httpPostDataset(java.net.http.HttpClient httpClient, java.lang.String url, DatasetGraph dataset, RDFFormat format, java.util.Map<java.lang.String,java.lang.String> httpHeaders)
static void
httpPostGraph(java.lang.String url, Graph graph)
static void
httpPostGraph(java.net.http.HttpClient httpClient, java.lang.String url, Graph graph, RDFFormat format)
static void
httpPostGraph(java.net.http.HttpClient httpClient, java.lang.String url, Graph graph, RDFFormat format, java.util.Map<java.lang.String,java.lang.String> httpHeaders)
static Graph
httpPostGraphRtn(java.lang.String url, Graph graph)
Post a graph and expect an RDF graph back as the result.static Graph
httpPostGraphRtn(java.net.http.HttpClient httpClient, java.lang.String url, Graph graph, RDFFormat format, java.util.Map<java.lang.String,java.lang.String> httpHeaders)
Post a graph and expect an RDF graph back as the result.static void
httpPutDataset(java.net.http.HttpClient httpClient, java.lang.String url, DatasetGraph dataset, RDFFormat format)
static void
httpPutDataset(java.net.http.HttpClient httpClient, java.lang.String url, DatasetGraph dataset, RDFFormat format, java.util.Map<java.lang.String,java.lang.String> httpHeaders)
static void
httpPutGraph(java.lang.String url, Graph graph)
static void
httpPutGraph(java.net.http.HttpClient httpClient, java.lang.String url, Graph graph, RDFFormat fmt)
static void
httpPutGraph(java.net.http.HttpClient httpClient, java.lang.String url, Graph graph, RDFFormat format, java.util.Map<java.lang.String,java.lang.String> httpHeaders)
-
-
-
Method Detail
-
httpGetGraph
public static Graph httpGetGraph(java.lang.String url)
GET a graph from a URL- Throws:
HttpException
-
httpGetGraph
public static Graph httpGetGraph(java.lang.String url, java.lang.String acceptHeader)
GET a graph from a URL using the provided "Accept" header.- Throws:
HttpException
-
httpGetGraph
public static Graph httpGetGraph(java.net.http.HttpClient httpClient, java.lang.String url)
GET a graph from a URL using theHttpClient
provided.- Throws:
HttpException
-
httpGetGraph
public static Graph httpGetGraph(java.net.http.HttpClient httpClient, java.lang.String url, java.lang.String acceptHeader)
GET a graph from a URL using theHttpClient
provided and the "Accept" header.- Throws:
HttpException
-
httpGetToStream
public static void httpGetToStream(java.lang.String url, java.lang.String acceptHeader, StreamRDF dest)
Send the RDF data from the resource at the URL to the StreamRDF. Beware of parse errors!- Throws:
HttpException
-
httpGetToStream
public static void httpGetToStream(java.net.http.HttpClient client, java.lang.String url, java.lang.String acceptHeader, StreamRDF dest)
Read the RDF data from the resource at the URL and send to the StreamRDF.Beware of parse errors!
- Throws:
HttpException
RiotException
-
httpGetToStream
public static void httpGetToStream(java.net.http.HttpClient client, java.lang.String url, java.util.Map<java.lang.String,java.lang.String> headers, StreamRDF dest)
Read the RDF data from the resource at the URL and send to the StreamRDF.Beware of parse errors!
- Throws:
HttpException
RiotException
-
httpPostGraph
public static void httpPostGraph(java.lang.String url, Graph graph)
-
httpPostGraph
public static void httpPostGraph(java.net.http.HttpClient httpClient, java.lang.String url, Graph graph, RDFFormat format)
-
httpPostGraph
public static void httpPostGraph(java.net.http.HttpClient httpClient, java.lang.String url, Graph graph, RDFFormat format, java.util.Map<java.lang.String,java.lang.String> httpHeaders)
-
httpPostGraphRtn
public static Graph httpPostGraphRtn(java.lang.String url, Graph graph)
Post a graph and expect an RDF graph back as the result.
-
httpPostGraphRtn
public static Graph httpPostGraphRtn(java.net.http.HttpClient httpClient, java.lang.String url, Graph graph, RDFFormat format, java.util.Map<java.lang.String,java.lang.String> httpHeaders)
Post a graph and expect an RDF graph back as the result.
-
httpPostDataset
public static void httpPostDataset(java.net.http.HttpClient httpClient, java.lang.String url, DatasetGraph dataset, RDFFormat format)
-
httpPostDataset
public static void httpPostDataset(java.net.http.HttpClient httpClient, java.lang.String url, DatasetGraph dataset, RDFFormat format, java.util.Map<java.lang.String,java.lang.String> httpHeaders)
-
httpPutGraph
public static void httpPutGraph(java.lang.String url, Graph graph)
-
httpPutGraph
public static void httpPutGraph(java.net.http.HttpClient httpClient, java.lang.String url, Graph graph, RDFFormat fmt)
-
httpPutGraph
public static void httpPutGraph(java.net.http.HttpClient httpClient, java.lang.String url, Graph graph, RDFFormat format, java.util.Map<java.lang.String,java.lang.String> httpHeaders)
-
httpPutDataset
public static void httpPutDataset(java.net.http.HttpClient httpClient, java.lang.String url, DatasetGraph dataset, RDFFormat format)
-
httpPutDataset
public static void httpPutDataset(java.net.http.HttpClient httpClient, java.lang.String url, DatasetGraph dataset, RDFFormat format, java.util.Map<java.lang.String,java.lang.String> httpHeaders)
-
httpDeleteGraph
public static void httpDeleteGraph(java.lang.String url)
-
httpDeleteGraph
public static void httpDeleteGraph(java.net.http.HttpClient httpClient, java.lang.String url)
-
-