public class RepositoryWriteStrategy extends Object implements WriteStrategy
WriteStrategy
to write to a designated Repository
. This write strategy opens a fresh
RepositoryConnection
and keeps this until a call of close()
.
Note: this is an experimental feature which is subject to change in a future version.
WriteStrategy
Constructor and Description |
---|
RepositoryWriteStrategy(Repository writeRepository) |
Modifier and Type | Method and Description |
---|---|
void |
addStatement(Resource subj,
IRI pred,
Value obj,
Resource... contexts)
Add a statement
|
void |
begin()
Begin a transaction.
|
void |
close()
Close this write strategy (e.g.
|
void |
commit()
Commit a transaction.
|
void |
initialize()
Initialize the write strategy (e.g.
|
boolean |
isInitialized()
Returns true if this instance is initialized
|
void |
removeStatement(Resource subj,
IRI pred,
Value obj,
Resource... contexts)
Remove a statement
|
void |
rollback()
Rollback a transaction.
|
public RepositoryWriteStrategy(Repository writeRepository)
public void initialize() throws RepositoryException
WriteStrategy
RepositoryConnection
.initialize
in interface WriteStrategy
RepositoryException
public boolean isInitialized()
WriteStrategy
isInitialized
in interface WriteStrategy
public void close() throws RepositoryException
WriteStrategy
RepositoryException
).close
in interface WriteStrategy
RepositoryException
public void begin() throws RepositoryException
WriteStrategy
begin
in interface WriteStrategy
RepositoryException
public void commit() throws RepositoryException
WriteStrategy
commit
in interface WriteStrategy
RepositoryException
public void rollback() throws RepositoryException
WriteStrategy
rollback
in interface WriteStrategy
RepositoryException
public void addStatement(Resource subj, IRI pred, Value obj, Resource... contexts) throws RepositoryException
WriteStrategy
addStatement
in interface WriteStrategy
RepositoryException
public void removeStatement(Resource subj, IRI pred, Value obj, Resource... contexts) throws RepositoryException
WriteStrategy
removeStatement
in interface WriteStrategy
RepositoryException
Copyright © 2015-2020 Eclipse Foundation. All Rights Reserved.