Class SailUpdateExecutor
java.lang.Object
org.eclipse.rdf4j.repository.sail.helpers.SailUpdateExecutor
Implementation of
SailUpdate.execute()
using
SailConnection.evaluate(TupleExpr, Dataset, BindingSet, boolean)
and other SailConnection
methods.
LOAD is handled at the Repository API level because it requires access to the Rio parser.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final SailConnection
private final RDFLoader
private final org.slf4j.Logger
private final ValueFactory
-
Constructor Summary
ConstructorsConstructorDescriptionSailUpdateExecutor
(SailConnection con, ValueFactory vf, ParserConfig loadConfig) Implementation ofSailUpdate.execute()
usingSailConnection.evaluate(TupleExpr, Dataset, BindingSet, boolean)
and otherSailConnection
methods. -
Method Summary
Modifier and TypeMethodDescriptionprivate Statement
createStatementFromPattern
(StatementPattern pattern, BindingSet sourceBinding, MapBindingSet bnodeMapping) private void
deleteBoundTriples
(BindingSet whereBinding, TupleExpr deleteClause, UpdateContext uc) private CloseableIteration
<? extends BindingSet, QueryEvaluationException> evaluateWhereClause
(TupleExpr whereClause, UpdateContext uc, int maxExecutionTime) protected void
executeAdd
(Add add, UpdateContext uc, int maxExecTime) protected void
executeClear
(Clear clearExpr, UpdateContext uc, int maxExecutionTime) protected void
executeCopy
(Copy copy, UpdateContext uc, int maxExecutionTime) protected void
executeCreate
(Create create, UpdateContext uc) protected void
executeDeleteData
(DeleteData deleteDataExpr, UpdateContext uc, int maxExecutionTime) protected void
executeInsertData
(InsertData insertDataExpr, UpdateContext uc, int maxExecutionTime) protected void
executeLoad
(Load load, UpdateContext uc) protected void
executeModify
(Modify modify, UpdateContext uc, int maxExecutionTime) protected void
executeMove
(Move move, UpdateContext uc, int maxExecutionTime) void
executeUpdate
(UpdateExpr updateExpr, Dataset dataset, BindingSet bindings, boolean includeInferred, int maxExecutionTime) private IRI[]
getDefaultRemoveGraphs
(Dataset dataset) private Value
getValueForVar
(Var var, BindingSet bindings) private void
insertBoundTriples
(BindingSet whereBinding, TupleExpr insertClause, UpdateContext uc)
-
Field Details
-
logger
private final org.slf4j.Logger logger -
con
-
vf
-
loader
-
-
Constructor Details
-
SailUpdateExecutor
Implementation ofSailUpdate.execute()
usingSailConnection.evaluate(TupleExpr, Dataset, BindingSet, boolean)
and otherSailConnection
methods.- Parameters:
con
- Used to read data from and write data to.vf
- Used to createBNode
sloadConfig
-
-
-
Method Details
-
executeUpdate
public void executeUpdate(UpdateExpr updateExpr, Dataset dataset, BindingSet bindings, boolean includeInferred, int maxExecutionTime) throws SailException, RDFParseException, IOException - Parameters:
maxExecutionTime
- in seconds.- Throws:
SailException
RDFParseException
IOException
-
executeLoad
protected void executeLoad(Load load, UpdateContext uc) throws IOException, RDFParseException, SailException -
executeCreate
- Throws:
SailException
-
executeCopy
- Parameters:
copy
-uc
-- Throws:
SailException
-
executeAdd
- Parameters:
add
-uc
-- Throws:
SailException
-
executeMove
- Parameters:
move
-uc
-- Throws:
SailException
-
executeClear
protected void executeClear(Clear clearExpr, UpdateContext uc, int maxExecutionTime) throws SailException - Parameters:
clearExpr
-uc
-- Throws:
SailException
-
executeInsertData
protected void executeInsertData(InsertData insertDataExpr, UpdateContext uc, int maxExecutionTime) throws SailException - Parameters:
insertDataExpr
-uc
-- Throws:
SailException
-
executeDeleteData
protected void executeDeleteData(DeleteData deleteDataExpr, UpdateContext uc, int maxExecutionTime) throws SailException - Parameters:
deleteDataExpr
-uc
-- Throws:
SailException
-
executeModify
protected void executeModify(Modify modify, UpdateContext uc, int maxExecutionTime) throws SailException - Throws:
SailException
-
getDefaultRemoveGraphs
-
evaluateWhereClause
private CloseableIteration<? extends BindingSet,QueryEvaluationException> evaluateWhereClause(TupleExpr whereClause, UpdateContext uc, int maxExecutionTime) throws SailException, QueryEvaluationException -
deleteBoundTriples
private void deleteBoundTriples(BindingSet whereBinding, TupleExpr deleteClause, UpdateContext uc) throws SailException - Parameters:
whereBinding
-deleteClause
-- Throws:
SailException
-
insertBoundTriples
private void insertBoundTriples(BindingSet whereBinding, TupleExpr insertClause, UpdateContext uc) throws SailException - Parameters:
whereBinding
-insertClause
-- Throws:
SailException
-
createStatementFromPattern
private Statement createStatementFromPattern(StatementPattern pattern, BindingSet sourceBinding, MapBindingSet bnodeMapping) throws SailException - Throws:
SailException
-
getValueForVar
- Throws:
SailException
-