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:
- SPARQL DELETE/INSERT Query
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
appendNamedTriplesTemplates(StringBuilder queryString, Optional<GraphName> graphName, TriplesTemplate triples)
T
base(IRI iri)
Set the base IRI of this queryT
base(Base base)
Set the Base clause of this queryT
base(Iri iri)
Set the base IRI of this queryModifyQuery
delete(TriplePattern... triples)
Specify triples to delete (or leave empty for DELETE WHERE shortcut)ModifyQuery
from(GraphName graphName)
Specify the graph to delete triples fromprotected String
getQueryActionString()
String
getQueryString()
ModifyQuery
insert(TriplePattern... triples)
Specify triples to insertModifyQuery
into(GraphName graphName)
Specify the graph to insert triples intoT
prefix(Namespace... namespaces)
Add prefix declarations to this queryT
prefix(Prefix... prefixes)
Add prefix declarations to this queryT
prefix(PrefixDeclarations prefixes)
Set the Prefix declarations of this queryModifyQuery
using(IRI iri)
Specify the graph used when evaluating the WHERE clauseModifyQuery
using(Iri iri)
Specify the graph used when evaluating the WHERE clauseModifyQuery
usingNamed(IRI iri)
Specify a named graph to use to when evaluating the WHERE clauseModifyQuery
usingNamed(Iri iri)
Specify a named graph to use to when evaluating the WHERE clauseModifyQuery
where(GraphPattern... patterns)
Add graph patterns to this query's query patternModifyQuery
with(IRI iri)
Define the graph that will be modified or matched against in the absence of more explicit graph definitionsModifyQuery
with(Iri iri)
Define the graph that will be modified or matched against in the absence of more explicit graph definitions
-
-
-
Method Detail
-
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:
- SPARQL DELETE WHERE shortcut
-
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 T base(Iri iri)
Set the base IRI of this query- Parameters:
iri
- the base IRI- Returns:
- this
-
base
public T base(IRI iri)
Set the base IRI of this query- Parameters:
iri
- the base IRI- Returns:
- this
-
base
public T base(Base base)
Set the Base clause of this query- Parameters:
base
- theBase
clause to set- Returns:
- this
-
prefix
public T prefix(Prefix... prefixes)
Add prefix declarations to this query- Parameters:
prefixes
- the prefixes to add- Returns:
- this
-
prefix
public T prefix(Namespace... namespaces)
Add prefix declarations to this query- Parameters:
namespaces
- the namespaces to use for prefixes- Returns:
-
prefix
public T prefix(PrefixDeclarations prefixes)
Set the Prefix declarations of this query- Parameters:
prefixes
- thePrefixDeclarations
to set- Returns:
- this
-
getQueryString
public String getQueryString()
- Specified by:
getQueryString
in interfaceQueryElement
- Returns:
- the String representing the SPARQL syntax of this element
-
appendNamedTriplesTemplates
protected void appendNamedTriplesTemplates(StringBuilder queryString, Optional<GraphName> graphName, TriplesTemplate triples)
-
-