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:
- SPARQL INSERT DATA Query
-
-
Field Summary
Fields Modifier and Type Field Description protected Optional<GraphName>
graphName
protected TriplesTemplate
triplesTemplate
-
Constructor Summary
Constructors Constructor Description InsertDataQuery()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected T
addTriples(TriplePattern... triples)
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 queryString
getPrefix()
protected String
getQueryActionString()
String
getQueryString()
T
graph(GraphName graph)
InsertDataQuery
insertData(TriplesTemplate triplesTemplate)
Set this query's triples templateInsertDataQuery
insertData(TriplePattern... triples)
Add triples to be insertedInsertDataQuery
into(GraphName graph)
Specify a graph to insert the data 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 queryprotected T
setTriplesTemplate(TriplesTemplate triplesTemplate)
-
-
-
Field Detail
-
triplesTemplate
protected TriplesTemplate triplesTemplate
-
-
Method Detail
-
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
- theTriplesTemplate
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 T addTriples(TriplePattern... triples)
-
setTriplesTemplate
protected T setTriplesTemplate(TriplesTemplate triplesTemplate)
-
graph
public T graph(GraphName graph)
-
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)
-
-