Class ConfiguredReasonerListener
- java.lang.Object
-
- edu.cornell.mannlib.vitro.webapp.tboxreasoner.ConfiguredReasonerListener
-
- All Implemented Interfaces:
org.apache.jena.rdf.model.ModelChangedListener
public class ConfiguredReasonerListener extends Object implements org.apache.jena.rdf.model.ModelChangedListener
Listens for changes on a model. When a change is announced, it is checked for worthiness. If worthy, it is added to a change set. When an ending EditEvent is received, the current change set is passed along to the reasoner driver, and a new change set is begun. Among the criteria for deciding on worthiness is the driving pattern set. In the constructor, a map is made from this set, to reduce the number of tests made against each statement. I don't know whether this optimization is justified. It is possible to "suspend" the listener, so it will ignore any changes. This is useful when the reasoner itself makes changes to the models, so those changes do not trigger additional reasoning.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classConfiguredReasonerListener.DrivingPatternMapLists of patterns, mapped by their predicates.classConfiguredReasonerListener.Suspension
-
Constructor Summary
Constructors Constructor Description ConfiguredReasonerListener(ReasonerConfiguration reasonerConfiguration, TBoxReasonerDriver reasonerDriver)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddedStatement(org.apache.jena.rdf.model.Statement s)voidaddedStatements(List<org.apache.jena.rdf.model.Statement> statements)voidaddedStatements(org.apache.jena.rdf.model.Model m)voidaddedStatements(org.apache.jena.rdf.model.Statement[] statements)voidaddedStatements(org.apache.jena.rdf.model.StmtIterator statements)voidnotifyEvent(org.apache.jena.rdf.model.Model m, Object event)voidremovedStatement(org.apache.jena.rdf.model.Statement s)voidremovedStatements(List<org.apache.jena.rdf.model.Statement> statements)voidremovedStatements(org.apache.jena.rdf.model.Model m)voidremovedStatements(org.apache.jena.rdf.model.Statement[] statements)voidremovedStatements(org.apache.jena.rdf.model.StmtIterator statements)ConfiguredReasonerListener.Suspensionsuspend()voidtryAdd(org.apache.jena.rdf.model.Statement stmt)voidtryRemove(org.apache.jena.rdf.model.Statement stmt)
-
-
-
Constructor Detail
-
ConfiguredReasonerListener
public ConfiguredReasonerListener(ReasonerConfiguration reasonerConfiguration, TBoxReasonerDriver reasonerDriver)
-
-
Method Detail
-
suspend
public ConfiguredReasonerListener.Suspension suspend()
-
addedStatement
public void addedStatement(org.apache.jena.rdf.model.Statement s)
- Specified by:
addedStatementin interfaceorg.apache.jena.rdf.model.ModelChangedListener
-
addedStatements
public void addedStatements(org.apache.jena.rdf.model.Statement[] statements)
- Specified by:
addedStatementsin interfaceorg.apache.jena.rdf.model.ModelChangedListener
-
addedStatements
public void addedStatements(List<org.apache.jena.rdf.model.Statement> statements)
- Specified by:
addedStatementsin interfaceorg.apache.jena.rdf.model.ModelChangedListener
-
addedStatements
public void addedStatements(org.apache.jena.rdf.model.StmtIterator statements)
- Specified by:
addedStatementsin interfaceorg.apache.jena.rdf.model.ModelChangedListener
-
addedStatements
public void addedStatements(org.apache.jena.rdf.model.Model m)
- Specified by:
addedStatementsin interfaceorg.apache.jena.rdf.model.ModelChangedListener
-
removedStatement
public void removedStatement(org.apache.jena.rdf.model.Statement s)
- Specified by:
removedStatementin interfaceorg.apache.jena.rdf.model.ModelChangedListener
-
removedStatements
public void removedStatements(org.apache.jena.rdf.model.Statement[] statements)
- Specified by:
removedStatementsin interfaceorg.apache.jena.rdf.model.ModelChangedListener
-
removedStatements
public void removedStatements(List<org.apache.jena.rdf.model.Statement> statements)
- Specified by:
removedStatementsin interfaceorg.apache.jena.rdf.model.ModelChangedListener
-
removedStatements
public void removedStatements(org.apache.jena.rdf.model.StmtIterator statements)
- Specified by:
removedStatementsin interfaceorg.apache.jena.rdf.model.ModelChangedListener
-
removedStatements
public void removedStatements(org.apache.jena.rdf.model.Model m)
- Specified by:
removedStatementsin interfaceorg.apache.jena.rdf.model.ModelChangedListener
-
notifyEvent
public void notifyEvent(org.apache.jena.rdf.model.Model m, Object event)- Specified by:
notifyEventin interfaceorg.apache.jena.rdf.model.ModelChangedListener
-
tryAdd
public void tryAdd(org.apache.jena.rdf.model.Statement stmt)
-
tryRemove
public void tryRemove(org.apache.jena.rdf.model.Statement stmt)
-
-