sameAs support in plugins
This commit is contained in:
parent
a62312245b
commit
cb9a6e1902
3 changed files with 10 additions and 1 deletions
|
@ -22,4 +22,7 @@ public interface ReasonerPlugin {
|
||||||
Model aboxInferencesModel,
|
Model aboxInferencesModel,
|
||||||
OntModel TBoxInferencesModel);
|
OntModel TBoxInferencesModel);
|
||||||
|
|
||||||
|
public void setSimpleReasoner(SimpleReasoner simpleReasoner);
|
||||||
|
|
||||||
|
public SimpleReasoner getSimpleReasoner();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1049,6 +1049,11 @@ public class SimpleReasoner extends StatementListener {
|
||||||
* Adds the inference to the inference model if it is not already in
|
* Adds the inference to the inference model if it is not already in
|
||||||
* the inference model and not in the abox model.
|
* the inference model and not in the abox model.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
public void addInference(Statement infStmt, Model inferenceModel) {
|
||||||
|
addInference(infStmt,inferenceModel,true);
|
||||||
|
}
|
||||||
|
|
||||||
protected void addInference(Statement infStmt, Model inferenceModel, boolean handleSameAs) {
|
protected void addInference(Statement infStmt, Model inferenceModel, boolean handleSameAs) {
|
||||||
|
|
||||||
aboxModel.enterCriticalSection(Lock.READ);
|
aboxModel.enterCriticalSection(Lock.READ);
|
||||||
|
@ -1092,7 +1097,7 @@ public class SimpleReasoner extends StatementListener {
|
||||||
* Removes the corresponding inference for each same individual
|
* Removes the corresponding inference for each same individual
|
||||||
* if that inference is not entailed by the abox model.
|
* if that inference is not entailed by the abox model.
|
||||||
*/
|
*/
|
||||||
protected void removeInference(Statement infStmt, Model inferenceModel) {
|
public void removeInference(Statement infStmt, Model inferenceModel) {
|
||||||
removeInference(infStmt,inferenceModel,true,true);
|
removeInference(infStmt,inferenceModel,true,true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -111,6 +111,7 @@ public class SimpleReasonerSetup implements ServletContextListener {
|
||||||
try {
|
try {
|
||||||
ReasonerPlugin plugin = (ReasonerPlugin) Class.forName(
|
ReasonerPlugin plugin = (ReasonerPlugin) Class.forName(
|
||||||
classname).getConstructors()[0].newInstance();
|
classname).getConstructors()[0].newInstance();
|
||||||
|
plugin.setSimpleReasoner(simpleReasoner);
|
||||||
pluginList.add(plugin);
|
pluginList.add(plugin);
|
||||||
} catch(Throwable t) {
|
} catch(Throwable t) {
|
||||||
ss.info(this, "Could not instantiate reasoner plugin " + classname);
|
ss.info(this, "Could not instantiate reasoner plugin " + classname);
|
||||||
|
|
Loading…
Add table
Reference in a new issue