Class RDF4JBodyPublishers

java.lang.Object
com.inrupt.client.rdf4j.RDF4JBodyPublishers

public final class RDF4JBodyPublishers extends Object
Request.BodyPublisher implementations for use with RDF4J types.
  • Method Details

    • ofModel

      public static Request.BodyPublisher ofModel(Model model)
      Serialize a RDF4J Model as an HTTP request body.

      This method uses the default (TURTLE) serialization.

      Parameters:
      model - the model
      Returns:
      the body publisher
    • ofModel

      public static Request.BodyPublisher ofModel(Model model, RDFFormat format)
      Serialize a RDF4J Model as an HTTP request body.
      Parameters:
      model - the model
      format - the serialization language
      Returns:
      the body publisher
    • ofRepository

      public static Request.BodyPublisher ofRepository(Repository repository)
      Serialize a RDF4J Repository as an HTTP request body.

      This method uses the default (TRIG) serialization.

      Parameters:
      repository - the Repository
      Returns:
      the body publisher
    • ofRepository

      public static Request.BodyPublisher ofRepository(Repository repository, RDFFormat format)
      Serialize a RDF4J Repository as an HTTP request body.
      Parameters:
      repository - the Repository
      format - the serialization language
      Returns:
      the body publisher
    • ofSparqlUpdate

      public static Request.BodyPublisher ofSparqlUpdate(SPARQLUpdate sparql)
      Serialize a RDF4J SPARQLUpdate (SPARQL-Update) as an HTTP request body.
      Parameters:
      sparql - the SPARQL Update request
      Returns:
      the body publisher