uk.ac.soton.ecs.grimoires.server.store
Class ModelChanges

java.lang.Object
  extended byuk.ac.soton.ecs.grimoires.server.store.ModelChanges

public class ModelChanges
extends Object

A temporary store to record all the changes made to be made to the registry model. The store contains two temporary model: one for the statements that are to be added, one for the statements that are to be removed. Clients should use getAdditionsModel () and getRemovalsModel () to add or otherwise manipulate these, then commit () to make the changes to the registry model.


Constructor Summary
ModelChanges(Configuration configuration)
          Creates a new instance of ModelChanges
 
Method Summary
 void commit()
          Remove the triples in the removals model from the given model, then add all the triples in the additions model.
 com.hp.hpl.jena.rdf.model.Model getAdditionsModel()
          Returns the model to which new statements should be added.
 com.hp.hpl.jena.rdf.model.Model getRemovalsModel()
          Returns the model to which statements to be removed should be added.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModelChanges

public ModelChanges(Configuration configuration)
Creates a new instance of ModelChanges

Method Detail

commit

public void commit()
Remove the triples in the removals model from the given model, then add all the triples in the additions model.


getAdditionsModel

public com.hp.hpl.jena.rdf.model.Model getAdditionsModel()
Returns the model to which new statements should be added.


getRemovalsModel

public com.hp.hpl.jena.rdf.model.Model getRemovalsModel()
Returns the model to which statements to be removed should be added.