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 |
clear(Resource... contexts) |
void |
clearNamespaces() |
void |
close()
Close this write strategy (e.g.
|
void |
commit()
Commit a transaction.
|
void |
removeStatement(Resource subj,
IRI pred,
Value obj,
Resource... contexts)
Remove a statement
|
void |
rollback()
Rollback a transaction.
|
public RepositoryWriteStrategy(Repository writeRepository)
public void close() throws RepositoryException
WriteStrategy
RepositoryException
).close
in interface AutoCloseable
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
public void clear(Resource... contexts) throws RepositoryException
clear
in interface WriteStrategy
RepositoryException
public void clearNamespaces() throws RepositoryException
clearNamespaces
in interface WriteStrategy
RepositoryException
Copyright © 2015-2020 Eclipse Foundation. All Rights Reserved.