org.openrdf.sesame.omm
Interface VersionManagement

All Superinterfaces:
Sail
All Known Implementing Classes:
SecuritySail, VersioningRdbmsSail

public interface VersionManagement
extends Sail

The interface of provides the basic oprationsto manage the distinct versions and states of the repository. Locking/Unlocking of the statements in the repository can be applyed.


Method Summary
 String branchState(long stateUID)
          branch the repository at given state for further operations.
 void continueCounterIncrement()
          Coninue with the normal increment of the update counter on each modification made in the repository.
 Map getMetaInfo(String subj, String pred, String obj)
          Retrieves the meta info associated with a statement.
 Iterator getUpdateIds()
          Retrive list of all Updates of the repository.
 Map getUpdateMetaInfo(String updateId)
          Retrieves the meta info associated with an update.
 Iterator getVersionIds()
          Retrieves an iterator over the version ids.
 Map getVersionMetaInfo(String versionId)
          Retrieves the meta info associated with a version .
 Iterator getVersions()
          Retrive list of all labeled states of the repository.
 boolean isPausedCounterIncrement()
          Check if the update couter ss paused
 void labelCurrentState(String label)
          Create a labeled version of the curent repository state.
 void labelState(long stateUID, String label)
          Create a labeled version for a state of the repository assigning the necessary mata-information about that operation.
 void lockStatements(Iterator statementsList)
          Perform locking of statements in the repository
 void pauseCounterIncrement()
          Stop the increment of the update counter.
 void revertToState(long stateUID)
          Restore the repository to previous state removing all statements added after the value of the update counter and revive all remover ones.
 void unlockStatements(Iterator statementsList)
          Perform unlocking of statements in the repository
 void workWithState(long stateUID)
          Sets the repository to given statete for further read operations.
 
Methods inherited from interface org.openrdf.sesame.sail.Sail
initialize, shutDown
 

Method Detail

labelState

public void labelState(long stateUID,
                       String label)
Create a labeled version for a state of the repository assigning the necessary mata-information about that operation.

Parameters:
stateUID - the update counter of a particular repository state
label - the label to assign NOTE: This method can throw a security exception if the request is made on behalf of the user with insufficent rights to create versions

labelCurrentState

public void labelCurrentState(String label)
Create a labeled version of the curent repository state. NOTE: This method can throw a security exception if the request is made on behalf of the user with insufficent rights to create versions


revertToState

public void revertToState(long stateUID)
Restore the repository to previous state removing all statements added after the value of the update counter and revive all remover ones.

Parameters:
stateUID - the update counter of a particular repository state NOTE: This method can throw a security exception if the request is made on behalf of the user with insufficent rights to revert the repository

workWithState

public void workWithState(long stateUID)
Sets the repository to given statete for further read operations.

Parameters:
stateUID - the update counter of a particular repository state

branchState

public String branchState(long stateUID)
branch the repository at given state for further operations.

Parameters:
stateUID - the update counter of a particular repository state
Returns:
the id of the repository

getVersions

public Iterator getVersions()
Retrive list of all labeled states of the repository.

Returns:
a list of Versin interfaces for each labeled state of the repository

lockStatements

public void lockStatements(Iterator statementsList)
Perform locking of statements in the repository

Parameters:
statementsList - list of statemensts to lock

unlockStatements

public void unlockStatements(Iterator statementsList)
Perform unlocking of statements in the repository

Parameters:
statementsList - list of statemensts to unlock

getUpdateIds

public Iterator getUpdateIds()
Retrive list of all Updates of the repository.

Returns:
a list of Updates of the repository

pauseCounterIncrement

public void pauseCounterIncrement()
Stop the increment of the update counter. Usefull for a kind of batch updates or adding a distinct daml coinstructs at once.


continueCounterIncrement

public void continueCounterIncrement()
Coninue with the normal increment of the update counter on each modification made in the repository.


isPausedCounterIncrement

public boolean isPausedCounterIncrement()
Check if the update couter ss paused

Returns:
true if the updateCouter is paused, flase otherwise

getVersionIds

public Iterator getVersionIds()
Retrieves an iterator over the version ids.

Returns:
an iterator over the version ids

getMetaInfo

public Map getMetaInfo(String subj,
                       String pred,
                       String obj)
Retrieves the meta info associated with a statement.

Parameters:
subj - the subject of the statement
pred - the predicate of the statement
obj - the object of the statement
Returns:
a map of meta info keys vs meta info values

getUpdateMetaInfo

public Map getUpdateMetaInfo(String updateId)
Retrieves the meta info associated with an update.

Parameters:
updateId - the id of the update
Returns:
a map of meta info keys vs meta info values

getVersionMetaInfo

public Map getVersionMetaInfo(String versionId)
Retrieves the meta info associated with a version .

Parameters:
versionId - the id of the update
Returns:
a map of meta info keys vs meta info values


Copyright © 2002-2006 Aduna BV, GNU LGPL License applies.