Class InsertDataQuery

java.lang.Object
org.eclipse.rdf4j.sparqlbuilder.core.query.InsertDataQuery
All Implemented Interfaces:
QueryElement

public class InsertDataQuery extends Object
The SPARQL Insert Data Query
See Also:
  • Field Details

  • Constructor Details

    • InsertDataQuery

      public InsertDataQuery()
  • Method Details

    • insertData

      public InsertDataQuery insertData(TriplePattern... triples)
      Add triples to be inserted
      Parameters:
      triples - the triples to add to this insert data query
      Returns:
      this Insert Data query instance
    • insertData

      public InsertDataQuery insertData(TriplesTemplate triplesTemplate)
      Set this query's triples template
      Parameters:
      triplesTemplate - the TriplesTemplate instance to set
      Returns:
      this instance
    • into

      public InsertDataQuery into(GraphName graph)
      Specify a graph to insert the data into
      Parameters:
      graph - the identifier of the graph
      Returns:
      this Insert Data query instance
    • getPrefix

      public String getPrefix()
    • addTriples

      protected InsertDataQuery addTriples(TriplePattern... triples)
    • setTriplesTemplate

      protected InsertDataQuery setTriplesTemplate(TriplesTemplate triplesTemplate)
    • graph

      public InsertDataQuery graph(GraphName graph)
    • getQueryActionString

      protected String getQueryActionString()
    • base

      public InsertDataQuery base(Iri iri)
      Set the base IRI of this query
      Parameters:
      iri - the base IRI
      Returns:
      this
    • base

      public InsertDataQuery base(IRI iri)
      Set the base IRI of this query
      Parameters:
      iri - the base IRI
      Returns:
      this
    • base

      public InsertDataQuery base(Base base)
      Set the Base clause of this query
      Parameters:
      base - the Base clause to set
      Returns:
      this
    • prefix

      public InsertDataQuery prefix(Prefix... prefixes)
      Add prefix declarations to this query
      Parameters:
      prefixes - the prefixes to add
      Returns:
      this
    • prefix

      public InsertDataQuery prefix(Namespace... namespaces)
      Add prefix declarations to this query
      Parameters:
      namespaces - the namespaces to use for prefixes
      Returns:
    • prefix

      public InsertDataQuery prefix(PrefixDeclarations prefixes)
      Set the Prefix declarations of this query
      Parameters:
      prefixes - the PrefixDeclarations to set
      Returns:
      this
    • getQueryString

      public String getQueryString()
      Specified by:
      getQueryString in interface QueryElement
      Returns:
      the String representing the SPARQL syntax of this element
    • appendNamedTriplesTemplates

      protected void appendNamedTriplesTemplates(StringBuilder queryString, Optional<GraphName> graphName, TriplesTemplate triples)