|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.stanbol.reasoners.owlapi.AbstractOWLApiReasoningService
public abstract class AbstractOWLApiReasoningService
This abstract class implements basic methods for a reasoning service based on OWLApi
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.apache.stanbol.reasoners.servicesapi.ReasoningService |
|---|
ReasoningService.Tasks |
| Field Summary |
|---|
| Fields inherited from interface org.apache.stanbol.reasoners.servicesapi.ReasoningService |
|---|
SERVICE_PATH |
| Constructor Summary | |
|---|---|
AbstractOWLApiReasoningService()
|
|
| Method Summary | |
|---|---|
protected java.util.Set<org.semanticweb.owlapi.model.OWLAxiom> |
classify(org.semanticweb.owlapi.model.OWLOntology ontology)
Classify, returns only axioms about classes and instances This is the default implementation of task ReasoningService.Tasks.CLASSIFY. |
protected java.util.Set<org.semanticweb.owlapi.model.OWLAxiom> |
classify(org.semanticweb.owlapi.model.OWLOntology ontology,
java.util.List<org.semanticweb.owlapi.model.SWRLRule> rules)
Classify, merge SWRL rules in the input ontology, before This is the default implementation of task ReasoningService.Tasks.CLASSIFY when rules are given. |
protected org.semanticweb.owlapi.model.OWLOntologyManager |
createOWLOntologyManager()
An OWLOntologyManager to be used to place a target ontology. |
protected java.util.Set<org.semanticweb.owlapi.model.OWLAxiom> |
enrich(org.semanticweb.owlapi.model.OWLOntology ontology)
Enrich, return all inferences. |
protected java.util.Set<org.semanticweb.owlapi.model.OWLAxiom> |
enrich(org.semanticweb.owlapi.model.OWLOntology ontology,
boolean filtered)
Enrich, return all inferences. |
protected java.util.Set<org.semanticweb.owlapi.model.OWLAxiom> |
enrich(org.semanticweb.owlapi.model.OWLOntology ontology,
java.util.List<org.semanticweb.owlapi.model.SWRLRule> rules)
Enrich, merge SWRL rules and return all inferences. |
protected java.util.Set<org.semanticweb.owlapi.model.OWLAxiom> |
enrich(org.semanticweb.owlapi.model.OWLOntology ontology,
java.util.List<org.semanticweb.owlapi.model.SWRLRule> rules,
boolean filtered)
Enrich, merge SWRL rules and return all inferences. |
protected java.util.List<org.semanticweb.owlapi.util.InferredAxiomGenerator<? extends org.semanticweb.owlapi.model.OWLAxiom>> |
getClassifyAxiomGenerators()
InferredAxiomGenerators to use for the classify() reasoning method. |
protected java.util.List<org.semanticweb.owlapi.util.InferredAxiomGenerator<? extends org.semanticweb.owlapi.model.OWLAxiom>> |
getEnrichAxiomGenerators()
InferredAxiomGenerators to use for the enrich() reasoning method. |
java.lang.Class<org.semanticweb.owlapi.model.OWLOntology> |
getModelType()
OWLApi based reasoning services have type OWLOntology as input type |
protected abstract org.semanticweb.owlapi.reasoner.OWLReasoner |
getReasoner(org.semanticweb.owlapi.model.OWLOntology ontology)
Method to be implemented by subclasses. |
java.lang.Class<org.semanticweb.owlapi.model.SWRLRule> |
getRuleType()
OWLApi based reasoning services have type SWRLRule as rule type |
java.lang.Class<org.semanticweb.owlapi.model.OWLAxiom> |
getStatementType()
OWLApi based reasoning services have type OWLAxiom as statement type |
java.util.List<java.lang.String> |
getSupportedTasks()
The abstract implementation of an OWLApi based reasoning service supports all default ReasoningService.Tasks. |
boolean |
isConsistent(org.semanticweb.owlapi.model.OWLOntology ontology)
Only check consistency. |
boolean |
isConsistent(org.semanticweb.owlapi.model.OWLOntology ontology,
java.util.List<org.semanticweb.owlapi.model.SWRLRule> rules)
Only check consistency. |
java.util.Set<org.semanticweb.owlapi.model.OWLAxiom> |
run(org.semanticweb.owlapi.model.OWLOntology input,
java.util.List<org.semanticweb.owlapi.util.InferredAxiomGenerator<? extends org.semanticweb.owlapi.model.OWLAxiom>> generators)
Generic method for running the reasoner |
java.util.Set<org.semanticweb.owlapi.model.OWLAxiom> |
run(org.semanticweb.owlapi.model.OWLOntology ontology,
java.util.List<org.semanticweb.owlapi.model.SWRLRule> rules,
java.util.List<org.semanticweb.owlapi.util.InferredAxiomGenerator<? extends org.semanticweb.owlapi.model.OWLAxiom>> generators)
Merges the SWRL rules in the input ontology, then calls run(OWLOntology,List |
java.util.Set<org.semanticweb.owlapi.model.OWLAxiom> |
runTask(java.lang.String taskID,
org.semanticweb.owlapi.model.OWLOntology data)
This method provides the default implementation for executing one of the default tasks with no additional arguments. |
java.util.Set<org.semanticweb.owlapi.model.OWLAxiom> |
runTask(java.lang.String taskID,
org.semanticweb.owlapi.model.OWLOntology data,
java.util.List<org.semanticweb.owlapi.model.SWRLRule> rules,
boolean filtered,
java.util.Map<java.lang.String,java.util.List<java.lang.String>> parameters)
This method provides the default implementation for executing one of the default tasks. |
boolean |
supportsTask(java.lang.String taskID)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.stanbol.reasoners.servicesapi.ReasoningService |
|---|
getPath |
| Constructor Detail |
|---|
public AbstractOWLApiReasoningService()
| Method Detail |
|---|
protected org.semanticweb.owlapi.model.OWLOntologyManager createOWLOntologyManager()
OWLApiReasoningServices may want to change this.
protected abstract org.semanticweb.owlapi.reasoner.OWLReasoner getReasoner(org.semanticweb.owlapi.model.OWLOntology ontology)
ontology -
public java.util.Set<org.semanticweb.owlapi.model.OWLAxiom> run(org.semanticweb.owlapi.model.OWLOntology input,
java.util.List<org.semanticweb.owlapi.util.InferredAxiomGenerator<? extends org.semanticweb.owlapi.model.OWLAxiom>> generators)
throws ReasoningServiceException,
InconsistentInputException
run in interface OWLApiReasoningServiceinput - generators -
ReasoningServiceException
InconsistentInputException
public java.util.Set<org.semanticweb.owlapi.model.OWLAxiom> run(org.semanticweb.owlapi.model.OWLOntology ontology,
java.util.List<org.semanticweb.owlapi.model.SWRLRule> rules,
java.util.List<org.semanticweb.owlapi.util.InferredAxiomGenerator<? extends org.semanticweb.owlapi.model.OWLAxiom>> generators)
throws ReasoningServiceException,
InconsistentInputException
run in interface OWLApiReasoningServiceontology - rules - generators -
ReasoningServiceException
InconsistentInputException
public java.util.Set<org.semanticweb.owlapi.model.OWLAxiom> runTask(java.lang.String taskID,
org.semanticweb.owlapi.model.OWLOntology data)
throws UnsupportedTaskException,
ReasoningServiceException,
InconsistentInputException
runTask in interface ReasoningService<org.semanticweb.owlapi.model.OWLOntology,org.semanticweb.owlapi.model.SWRLRule,org.semanticweb.owlapi.model.OWLAxiom>UnsupportedTaskException
ReasoningServiceException
InconsistentInputException
public java.util.Set<org.semanticweb.owlapi.model.OWLAxiom> runTask(java.lang.String taskID,
org.semanticweb.owlapi.model.OWLOntology data,
java.util.List<org.semanticweb.owlapi.model.SWRLRule> rules,
boolean filtered,
java.util.Map<java.lang.String,java.util.List<java.lang.String>> parameters)
throws UnsupportedTaskException,
ReasoningServiceException,
InconsistentInputException
runTask in interface ReasoningService<org.semanticweb.owlapi.model.OWLOntology,org.semanticweb.owlapi.model.SWRLRule,org.semanticweb.owlapi.model.OWLAxiom>UnsupportedTaskException
ReasoningServiceException
InconsistentInputExceptionprotected java.util.List<org.semanticweb.owlapi.util.InferredAxiomGenerator<? extends org.semanticweb.owlapi.model.OWLAxiom>> getClassifyAxiomGenerators()
InferredAxiomGenerators to use for the classify() reasoning method.
Subclasses may want to change this.
protected java.util.List<org.semanticweb.owlapi.util.InferredAxiomGenerator<? extends org.semanticweb.owlapi.model.OWLAxiom>> getEnrichAxiomGenerators()
InferredAxiomGenerators to use for the enrich() reasoning method.
Subclasses may want to change this.
protected java.util.Set<org.semanticweb.owlapi.model.OWLAxiom> classify(org.semanticweb.owlapi.model.OWLOntology ontology)
throws ReasoningServiceException,
InconsistentInputException
ReasoningService.Tasks.CLASSIFY. Subclasses may want
to change it.
ontology -
ReasoningServiceException
InconsistentInputException
protected java.util.Set<org.semanticweb.owlapi.model.OWLAxiom> classify(org.semanticweb.owlapi.model.OWLOntology ontology,
java.util.List<org.semanticweb.owlapi.model.SWRLRule> rules)
throws ReasoningServiceException,
InconsistentInputException
ReasoningService.Tasks.CLASSIFY when rules are given.
Subclasses may want to change it.
ontology - rules -
InconsistentInputException
ReasoningServiceException
protected java.util.Set<org.semanticweb.owlapi.model.OWLAxiom> enrich(org.semanticweb.owlapi.model.OWLOntology ontology)
throws ReasoningServiceException,
InconsistentInputException
ReasoningService.Tasks.ENRICH. Subclasses may want to
change it.
ontology -
ReasoningServiceException
InconsistentInputException
protected java.util.Set<org.semanticweb.owlapi.model.OWLAxiom> enrich(org.semanticweb.owlapi.model.OWLOntology ontology,
boolean filtered)
throws ReasoningServiceException,
InconsistentInputException
ReasoningService.Tasks.ENRICH. Subclasses may want to
change it.
ontology - filtered -
ReasoningServiceException
InconsistentInputException
protected java.util.Set<org.semanticweb.owlapi.model.OWLAxiom> enrich(org.semanticweb.owlapi.model.OWLOntology ontology,
java.util.List<org.semanticweb.owlapi.model.SWRLRule> rules)
throws ReasoningServiceException,
InconsistentInputException
ReasoningService.Tasks.ENRICH. Subclasses may want to
change it.
ontology - rules -
ReasoningServiceException
InconsistentInputException
protected java.util.Set<org.semanticweb.owlapi.model.OWLAxiom> enrich(org.semanticweb.owlapi.model.OWLOntology ontology,
java.util.List<org.semanticweb.owlapi.model.SWRLRule> rules,
boolean filtered)
throws ReasoningServiceException,
InconsistentInputException
ReasoningService.Tasks.ENRICH. Subclasses may want to
change it.
ontology - rules - filtered -
ReasoningServiceException
InconsistentInputException
public boolean isConsistent(org.semanticweb.owlapi.model.OWLOntology ontology)
throws ReasoningServiceException
isConsistent in interface ReasoningService<org.semanticweb.owlapi.model.OWLOntology,org.semanticweb.owlapi.model.SWRLRule,org.semanticweb.owlapi.model.OWLAxiom>ontology -
ReasoningServiceException
public boolean isConsistent(org.semanticweb.owlapi.model.OWLOntology ontology,
java.util.List<org.semanticweb.owlapi.model.SWRLRule> rules)
throws ReasoningServiceException
isConsistent in interface ReasoningService<org.semanticweb.owlapi.model.OWLOntology,org.semanticweb.owlapi.model.SWRLRule,org.semanticweb.owlapi.model.OWLAxiom>ontology - rules -
ReasoningServiceExceptionpublic java.util.List<java.lang.String> getSupportedTasks()
ReasoningService.Tasks. Subclasses may want to extend this.
getSupportedTasks in interface ReasoningService<org.semanticweb.owlapi.model.OWLOntology,org.semanticweb.owlapi.model.SWRLRule,org.semanticweb.owlapi.model.OWLAxiom>public boolean supportsTask(java.lang.String taskID)
supportsTask in interface ReasoningService<org.semanticweb.owlapi.model.OWLOntology,org.semanticweb.owlapi.model.SWRLRule,org.semanticweb.owlapi.model.OWLAxiom>public java.lang.Class<org.semanticweb.owlapi.model.OWLOntology> getModelType()
OWLOntology as input type
getModelType in interface ReasoningService<org.semanticweb.owlapi.model.OWLOntology,org.semanticweb.owlapi.model.SWRLRule,org.semanticweb.owlapi.model.OWLAxiom>public java.lang.Class<org.semanticweb.owlapi.model.SWRLRule> getRuleType()
SWRLRule as rule type
getRuleType in interface ReasoningService<org.semanticweb.owlapi.model.OWLOntology,org.semanticweb.owlapi.model.SWRLRule,org.semanticweb.owlapi.model.OWLAxiom>public java.lang.Class<org.semanticweb.owlapi.model.OWLAxiom> getStatementType()
OWLAxiom as statement type
getStatementType in interface ReasoningService<org.semanticweb.owlapi.model.OWLOntology,org.semanticweb.owlapi.model.SWRLRule,org.semanticweb.owlapi.model.OWLAxiom>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||