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 voidappendNamedTriplesTemplates(StringBuilder queryString, Optional<GraphName> graphName, TriplesTemplate triples)Tbase(IRI iri)Set the base IRI of this queryTbase(Base base)Set the Base clause of this queryTbase(Iri iri)Set the base IRI of this queryModifyQuerydelete(TriplePattern... triples)Specify triples to delete (or leave empty for DELETE WHERE shortcut)ModifyQueryfrom(GraphName graphName)Specify the graph to delete triples fromprotected StringgetQueryActionString()StringgetQueryString()ModifyQueryinsert(TriplePattern... triples)Specify triples to insertModifyQueryinto(GraphName graphName)Specify the graph to insert triples intoTprefix(Namespace... namespaces)Add prefix declarations to this queryTprefix(Prefix... prefixes)Add prefix declarations to this queryTprefix(PrefixDeclarations prefixes)Set the Prefix declarations of this queryModifyQueryusing(IRI iri)Specify the graph used when evaluating the WHERE clauseModifyQueryusing(Iri iri)Specify the graph used when evaluating the WHERE clauseModifyQueryusingNamed(IRI iri)Specify a named graph to use to when evaluating the WHERE clauseModifyQueryusingNamed(Iri iri)Specify a named graph to use to when evaluating the WHERE clauseModifyQuerywhere(GraphPattern... patterns)Add graph patterns to this query's query patternModifyQuerywith(IRI iri)Define the graph that will be modified or matched against in the absence of more explicit graph definitionsModifyQuerywith(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- theBaseclause 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- thePrefixDeclarationsto set- Returns:
- this
-
getQueryString
public String getQueryString()
- Specified by:
getQueryStringin interfaceQueryElement- Returns:
- the String representing the SPARQL syntax of this element
-
appendNamedTriplesTemplates
protected void appendNamedTriplesTemplates(StringBuilder queryString, Optional<GraphName> graphName, TriplesTemplate triples)
-
-