org.ontoware.rdf2go.model.impl
Class NotifyingModelSetLayer

java.lang.Object
  extended by org.ontoware.rdf2go.model.impl.AbstractModelSetImpl
      extended by org.ontoware.rdf2go.model.impl.DelegatingModelSet
          extended by org.ontoware.rdf2go.model.impl.NotifyingModelSetLayer
All Implemented Interfaces:
java.lang.Iterable<Statement>, ClosableIterable<Statement>, Commitable, FindableModelSet, Lockable, ModelSet, ModelSetAddRemove, ModelSetIO, ModelValueFactory, NamespaceSupport, NotifyingModelSet, ReificationSupport, Sparqlable

public class NotifyingModelSetLayer
extends DelegatingModelSet
implements NotifyingModelSet

Adds notifying capabilites to existing models. Reads from streams and readers are not detectable.

Author:
voelkel

Field Summary
 
Fields inherited from class org.ontoware.rdf2go.model.impl.DelegatingModelSet
baseModelSet
 
Constructor Summary
NotifyingModelSetLayer(ModelSet modelset)
           
 
Method Summary
 boolean addModel(Model model)
           
 void addModelSetChangedListener(ModelChangedListener listener)
           
 void addModelSetChangedListener(ModelChangedListener listener, QuadPattern pattern)
           
 void addStatement(Statement statement)
           
 Model getDefaultModel()
           
 Model getModel(URI contextURI)
           
 ClosableIterator<Model> getModels()
           
 void removeModelSetChangedListener(ModelChangedListener listener)
           
 void removeStatement(Statement statement)
           
 void update(DiffReader diff)
           
 
Methods inherited from class org.ontoware.rdf2go.model.impl.DelegatingModelSet
addModel, addModelSet, addReificationOf, addReificationOf, close, commit, containsModel, containsStatements, createBlankNode, createQuadPattern, createURI, deleteReification, findStatements, getAllReificationsOf, getDelegatedModelSet, getModelURIs, getNamespace, getNamespaces, getUnderlyingModelImplementation, getUnderlyingModelSetImplementation, hasReifications, isEmpty, isOpen, open, queryConstruct, querySelect, readFrom, readFrom, readFrom, readFrom, readFrom, readFrom, removeModel, removeNamespace, setAutocommit, setNamespace, size, sparqlAsk, sparqlConstruct, sparqlDescribe, sparqlSelect, writeTo, writeTo, writeTo, writeTo
 
Methods inherited from class org.ontoware.rdf2go.model.impl.AbstractModelSetImpl
addAll, addStatement, contains, countStatements, createBlankNode, createDatatypeLiteral, createLanguageTagLiteral, createPlainLiteral, createStatement, createStatement, dump, findStatements, isLocked, isValidURI, iterator, lock, newRandomUniqueURI, removeAll, removeAll, removeStatement, removeStatements, removeStatements, serialize, unlock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.ontoware.rdf2go.model.ModelSet
createStatement, dump, removeAll
 
Methods inherited from interface org.ontoware.rdf2go.model.ModelSetIO
serialize
 
Methods inherited from interface org.ontoware.rdf2go.model.FindableModelSet
contains, countStatements, findStatements
 
Methods inherited from interface org.ontoware.rdf2go.model.ModelSetAddRemove
addAll, addStatement, removeAll, removeStatement, removeStatements, removeStatements
 
Methods inherited from interface org.ontoware.aifbcommons.collection.ClosableIterable
iterator
 
Methods inherited from interface org.ontoware.rdf2go.model.Lockable
isLocked, lock, unlock
 
Methods inherited from interface org.ontoware.rdf2go.model.ModelValueFactory
createBlankNode, createDatatypeLiteral, createLanguageTagLiteral, createPlainLiteral, createStatement, isValidURI, newRandomUniqueURI
 

Constructor Detail

NotifyingModelSetLayer

public NotifyingModelSetLayer(ModelSet modelset)
Method Detail

addModelSetChangedListener

public void addModelSetChangedListener(ModelChangedListener listener)
Specified by:
addModelSetChangedListener in interface NotifyingModelSet

addModelSetChangedListener

public void addModelSetChangedListener(ModelChangedListener listener,
                                       QuadPattern pattern)
Specified by:
addModelSetChangedListener in interface NotifyingModelSet

removeModelSetChangedListener

public void removeModelSetChangedListener(ModelChangedListener listener)
Specified by:
removeModelSetChangedListener in interface NotifyingModelSet

addModel

public boolean addModel(Model model)
Specified by:
addModel in interface ModelSet
Overrides:
addModel in class DelegatingModelSet

addStatement

public void addStatement(Statement statement)
                  throws ModelRuntimeException
Specified by:
addStatement in interface ModelSetAddRemove
Overrides:
addStatement in class DelegatingModelSet
Throws:
ModelRuntimeException

getDefaultModel

public Model getDefaultModel()
Specified by:
getDefaultModel in interface ModelSet
Overrides:
getDefaultModel in class DelegatingModelSet

getModel

public Model getModel(URI contextURI)
Specified by:
getModel in interface ModelSet
Overrides:
getModel in class DelegatingModelSet

getModels

public ClosableIterator<Model> getModels()
Specified by:
getModels in interface ModelSet
Overrides:
getModels in class DelegatingModelSet

removeStatement

public void removeStatement(Statement statement)
                     throws ModelRuntimeException
Specified by:
removeStatement in interface ModelSetAddRemove
Overrides:
removeStatement in class DelegatingModelSet
Throws:
ModelRuntimeException

update

public void update(DiffReader diff)
            throws ModelRuntimeException
Specified by:
update in interface ModelSetAddRemove
Overrides:
update in class DelegatingModelSet
Throws:
ModelRuntimeException - if the ModelSet is locked


Copyright © 2005-2008 FZI - Forschungszentrum Informatik | Karlsruhe | Germany. All Rights Reserved.