Client for the
SPARQL 1.1 Graph Store Protocol.
This is extended to include operations GET, POST and PUT on datasets.
Examples:
// Get the default graph. Graph graph = GSP.service("http://example/dataset").defaultGraph().GET();
// Get a named graph. Graph graph = GSP.service("http://example/dataset").namedGraph("http://my/graph").GET();
// POST (add) to a named graph. Graph myData = ...; GSP.service("http://example/dataset").namedGraph("http://my/graph").POST(myData);
See DSP
for operations on datasets.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Deprecated.dataset()
Deprecated.UseDSP
.Send request for the default graph (that is,?default
)void
DELETE()
Delete a graph.GET()
Get a graphDeprecated.UseDSP.GET()
Send request for a named graph (that is,?graph=
)Send request for a named graph (that is,?graph=
)void
POST the contents of a file using the filename extension to determine the Content-Type to use if it is not already set.void
POST a graph.void
postDataset
(String file) Deprecated.UseDSP.POST(String)
void
postDataset
(DatasetGraph dataset) Deprecated.void
PUT the contents of a file using the filename extension to determine the Content-Type to use if it is not already set.void
PUT a graph.void
putDataset
(String file) Deprecated.UseDSP.PUT(String)
void
putDataset
(DatasetGraph dataset) Deprecated.static GSP
request()
Create a request to the remote service (without GSP naming).static GSP
Create a request to the remote serviceURL (without a URL query string).Methods inherited from class org.apache.jena.sparql.exec.http.StoreProtocol
accept, acceptHeader, contentType, contentTypeHeader, copySetup, endpoint, httpClient, httpHeader
-
Method Details
-
service
Create a request to the remote serviceURL (without a URL query string). CalldefaultGraph()
orgraphName(String)
to select the target graph. SeeDSP
for dataset operations.- Parameters:
service
-
-
request
Create a request to the remote service (without GSP naming). CallStoreProtocol.endpoint(java.lang.String)
to set the target. CalldefaultGraph()
orgraphName(String)
to select the target graph. SeeDSP
for dataset operations. -
graphName
Send request for a named graph (that is,?graph=
) -
graphName
Send request for a named graph (that is,?graph=
) -
defaultGraph
Send request for the default graph (that is,?default
) -
dataset
Deprecated.UseDSP
.Send request for the dataset. This is "no GSP naming". -
GET
Get a graph -
POST
POST the contents of a file using the filename extension to determine the Content-Type to use if it is not already set.This operation does not parse the file.
-
POST
POST a graph. -
PUT
PUT the contents of a file using the filename extension to determine the Content-Type to use if it is not already set.This operation does not parse the file.
If the data may have quads (named graphs), use
putDataset(String)
. -
PUT
PUT a graph. -
DELETE
public void DELETE()Delete a graph. -
getDataset
Deprecated.UseDSP.GET()
-
postDataset
Deprecated.UseDSP.POST(String)
-
postDataset
Deprecated. -
putDataset
Deprecated.UseDSP.PUT(String)
-
putDataset
Deprecated. -
clearDataset
Deprecated.UseDSP.clear()
-
DSP.clear()