Adding plugin to disable sameAs in SimpleReasoner. VIVO-110
This commit is contained in:
parent
446df7c094
commit
3431e64ae8
1 changed files with 54 additions and 0 deletions
|
@ -0,0 +1,54 @@
|
||||||
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
|
|
||||||
|
package edu.cornell.mannlib.vitro.webapp.reasoner.plugin;
|
||||||
|
|
||||||
|
import org.apache.commons.logging.Log;
|
||||||
|
import org.apache.commons.logging.LogFactory;
|
||||||
|
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.reasoner.ReasonerPlugin;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.reasoner.SimpleReasoner;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Disables sameAs in associated SimpleReasoner.
|
||||||
|
*/
|
||||||
|
public abstract class DisableSameAs implements ReasonerPlugin {
|
||||||
|
|
||||||
|
private static final Log log = LogFactory.getLog(DisableSameAs.class);
|
||||||
|
|
||||||
|
private SimpleReasoner simpleReasoner;
|
||||||
|
|
||||||
|
public void setSimpleReasoner(SimpleReasoner simpleReasoner) {
|
||||||
|
this.simpleReasoner = simpleReasoner;
|
||||||
|
this.simpleReasoner.setSameAsEnabled( false );
|
||||||
|
log.info("owl:sameAs disabled in SimpleReasoner.");
|
||||||
|
}
|
||||||
|
|
||||||
|
public SimpleReasoner getSimpleReasoner() {
|
||||||
|
return this.simpleReasoner;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isInterestedInAddedStatement(Statement stmt) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isInterestedInRemovedStatement(Statement stmt) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void addedABoxStatement(Statement stmt,
|
||||||
|
Model aboxAssertionsModel,
|
||||||
|
Model aboxInferencesModel,
|
||||||
|
OntModel TBoxInferencesModel) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void removedABoxStatement(Statement stmt,
|
||||||
|
Model aboxAssertionsModel,
|
||||||
|
Model aboxInferencesModel,
|
||||||
|
OntModel TBoxInferencesModel) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue