Class ModifyQuery

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

public class ModifyQuery extends Object
The SPARQL Modify Queries
See Also:
  • Method Details

    • with

      public ModifyQuery with(Iri iri)
      Define the graph that will be modified or matched against in the absence of more explicit graph definitions
      Parameters:
      iri - the IRI identifying the desired graph
      Returns:
      this modify query instance
    • with

      public ModifyQuery with(IRI iri)
      Define the graph that will be modified or matched against in the absence of more explicit graph definitions
      Parameters:
      iri - the IRI identifying the desired graph
      Returns:
      this modify query instance
    • delete

      public ModifyQuery delete(TriplePattern... triples)
      Specify triples to delete (or leave empty for DELETE WHERE shortcut)
      Parameters:
      triples - the triples to delete
      Returns:
      this modify query instance
      See Also:
    • from

      public ModifyQuery from(GraphName graphName)
      Specify the graph to delete triples from
      Parameters:
      graphName - the identifier of the graph
      Returns:
      this modify query instance
    • insert

      public ModifyQuery insert(TriplePattern... triples)
      Specify triples to insert
      Parameters:
      triples - the triples to insert
      Returns:
      this modify query instance
    • into

      public ModifyQuery into(GraphName graphName)
      Specify the graph to insert triples into
      Parameters:
      graphName - the identifier of the graph
      Returns:
      this modify query instance
    • using

      public ModifyQuery using(Iri iri)
      Specify the graph used when evaluating the WHERE clause
      Parameters:
      iri - the IRI identifying the desired graph
      Returns:
      this modify query instance
    • using

      public ModifyQuery using(IRI iri)
      Specify the graph used when evaluating the WHERE clause
      Parameters:
      iri - the IRI identifying the desired graph
      Returns:
      this modify query instance
    • usingNamed

      public ModifyQuery usingNamed(Iri iri)
      Specify a named graph to use to when evaluating the WHERE clause
      Parameters:
      iri - the IRI identifying the desired graph
      Returns:
      this modify query instance
    • usingNamed

      public ModifyQuery usingNamed(IRI iri)
      Specify a named graph to use to when evaluating the WHERE clause
      Parameters:
      iri - the IRI identifying the desired graph
      Returns:
      this modify query instance
    • where

      public ModifyQuery where(GraphPattern... patterns)
      Add graph patterns to this query's query pattern
      Parameters:
      patterns - the patterns to add
      Returns:
      this modify query instance
    • getQueryActionString

      protected String getQueryActionString()
    • base

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

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

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

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

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

      public ModifyQuery 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)