public class DSP extends StoreProtocol<DSP>
Client for dataset operations over HTTP.

for graph operations, see GSP which is the client-side of SPARQL 1.1 Graph Store Protocol.

This class provided GET, POST, PUT and clear() on datasets. DELETE is not supported. HTTP DELETE means "remove resource", not "clear resource".

Examples:

   // Get the dataset.
   DatasetGraph graph = DSP.service("http://example/dataset").GET();
 
   // POST (add) to a dataset
   DatasetGraph myData = ...;
   GSP.service("http://example/dataset").POST(myData);
 
  • Method Details

    • service

      public static DSP service(String service)
      Create a request to the remote service.
    • request

      public static DSP request()
      Create a request to the remote service (without GSP naming). Call StoreProtocol.endpoint(java.lang.String) to set the target.
    • GET

      public DatasetGraph GET()
      GET dataset.

      If the remote end is a graph, the result is a dataset with that graph data in the default graph of the dataset.

    • POST

      public void POST(String file)
      POST the contents of a file using the filename extension to determine the Content-Type to use if not already set.

      This operation does not parse the file.

    • POST

      public void POST(DatasetGraph dataset)
      POST a dataset
    • PUT

      public void PUT(String file)
      PUT the contents of a file using the filename extension to determine the Content-Type to use if not already set.

      This operation does not parse the file.

    • PUT

      public void PUT(DatasetGraph dataset)
      PUT a dataset
    • clear

      public void clear()
      Clear - delete named graphs, empty the default graph - similar to SPARQL "CLEAR ALL"