ch.uzh.ifi.attempto.acewiki.owl
Class AceWikiOWLReasoner

java.lang.Object
  extended by ch.uzh.ifi.attempto.acewiki.owl.AceWikiOWLReasoner
All Implemented Interfaces:
AceWikiReasoner

public class AceWikiOWLReasoner
extends java.lang.Object
implements AceWikiReasoner

This is a reasoner implementation that connects to an OWL reasoner. At the moment, it can directly connect to HermiT and Pellet. Additionally, reasoners like FaCT++ can be accessed via the OWLlink interface.

Author:
Tobias Kuhn

Constructor Summary
AceWikiOWLReasoner()
          Creates a new reasoner object.
 
Method Summary
 org.semanticweb.owlapi.model.OWLOntology exportOWLOntology(boolean consistent)
          Returns a new OWL ontology object representing the full ontology or the consistent part of it.
 void flushElements()
          This method can finalize the loading or unloading of elements.
 java.util.List<AnswerElement> getAnswer(Question q)
          Should return a list of ontology elements that answer the given question.
 java.util.List<Concept> getConcepts(Individual ind)
          Should return all concepts the given individual belongs to.
 java.lang.String getGlobalRestrictionsPolicy()
          Returns a string representing the policy how to enforce the global restrictions on the axioms in OWL 2.
 java.util.List<Individual> getIndividuals(Concept concept)
          Should return all individuals that belong to the given concept.
 java.util.Map<java.lang.String,java.lang.String> getInfo()
          This method can return a map of name/value pairs with information about the reasoner.
 org.semanticweb.owlapi.model.OWLOntologyManager getOWLOntologyManager()
          Returns the OWL ontology manager.
 org.semanticweb.owlapi.profiles.OWLProfile getOWLProfile()
          Returns the OWL profile that defines which statements are used for reasoning, or null if the full language of OWL is used.
 java.lang.String getOWLProfileName()
          Returns the name of the current OWL profile.
 java.lang.String getReasonerName()
          Should return the name of the reasoner.
 java.lang.String getReasonerType()
          Should return the type of the reasoner.
 java.lang.String getReasonerVersion()
          Should return the version of the reasoner.
 java.util.List<Concept> getSubConcepts(Concept concept)
          Should return all the sub-concepts of the given concept.
 java.util.List<Concept> getSuperConcepts(Concept concept)
          Should return all super-concepts of the given concept.
 void init(Ontology ontology)
          This is the first method to be called and provides the ontology object.
 boolean isConsistent()
          Should return true if the ontology is consistent.
 boolean isSatisfiable(Concept concept)
          Should check if the given concept is satisfiable.
 void load()
          Loads the reasoner or reasoner interface.
 void loadElement(OntologyElement element)
          Loads the given ontology element.
 void loadSentence(Sentence s)
          Loads the given sentence.
 void unloadElement(OntologyElement element)
          Unloads the given ontology element.
 void unloadSentence(Sentence s)
          Unloads the given sentence.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AceWikiOWLReasoner

public AceWikiOWLReasoner()
Creates a new reasoner object.

Method Detail

init

public void init(Ontology ontology)
Description copied from interface: AceWikiReasoner
This is the first method to be called and provides the ontology object.

Specified by:
init in interface AceWikiReasoner
Parameters:
ontology - The ontology object.

getInfo

public java.util.Map<java.lang.String,java.lang.String> getInfo()
Description copied from interface: AceWikiReasoner
This method can return a map of name/value pairs with information about the reasoner. To retain the insertion order, a map implementation like LinkedHashMap should be used. It is allowed to return null for no information.

Specified by:
getInfo in interface AceWikiReasoner
Returns:
A map of name/value pairs with reasoner information.

getGlobalRestrictionsPolicy

public java.lang.String getGlobalRestrictionsPolicy()
Returns a string representing the policy how to enforce the global restrictions on the axioms in OWL 2.

Returns:
The global restrictions policy.

getOWLProfile

public org.semanticweb.owlapi.profiles.OWLProfile getOWLProfile()
Returns the OWL profile that defines which statements are used for reasoning, or null if the full language of OWL is used.

Returns:
The used OWL profile.

getOWLProfileName

public java.lang.String getOWLProfileName()
Returns the name of the current OWL profile.

Returns:
The OWL profile name.

exportOWLOntology

public org.semanticweb.owlapi.model.OWLOntology exportOWLOntology(boolean consistent)
Returns a new OWL ontology object representing the full ontology or the consistent part of it.

Parameters:
consistent - true if only the consistent part should be exported.
Returns:
An OWL ontology object of the full ontology.

getOWLOntologyManager

public org.semanticweb.owlapi.model.OWLOntologyManager getOWLOntologyManager()
Returns the OWL ontology manager.

Returns:
The OWL ontology manager.

getReasonerName

public java.lang.String getReasonerName()
Description copied from interface: AceWikiReasoner
Should return the name of the reasoner.

Specified by:
getReasonerName in interface AceWikiReasoner
Returns:
The name of the reasoner.

getReasonerVersion

public java.lang.String getReasonerVersion()
Description copied from interface: AceWikiReasoner
Should return the version of the reasoner.

Specified by:
getReasonerVersion in interface AceWikiReasoner
Returns:
The version of the reasoner.

getReasonerType

public java.lang.String getReasonerType()
Description copied from interface: AceWikiReasoner
Should return the type of the reasoner.

Specified by:
getReasonerType in interface AceWikiReasoner
Returns:
The reasoner type.

load

public void load()
Description copied from interface: AceWikiReasoner
Loads the reasoner or reasoner interface.

Specified by:
load in interface AceWikiReasoner

flushElements

public void flushElements()
Description copied from interface: AceWikiReasoner
This method can finalize the loading or unloading of elements. It is always called after a sequence of one or more loadElement- or unloadElement-calls.

Specified by:
flushElements in interface AceWikiReasoner

loadElement

public void loadElement(OntologyElement element)
Description copied from interface: AceWikiReasoner
Loads the given ontology element. The method flushElements is called after each sequence of one or more loadElement-calls.

Specified by:
loadElement in interface AceWikiReasoner
Parameters:
element - The ontology element.

unloadElement

public void unloadElement(OntologyElement element)
Description copied from interface: AceWikiReasoner
Unloads the given ontology element. The method flushElements is called after each sequence of one or more unloadElement-calls.

Specified by:
unloadElement in interface AceWikiReasoner
Parameters:
element - The ontology element.

getConcepts

public java.util.List<Concept> getConcepts(Individual ind)
Description copied from interface: AceWikiReasoner
Should return all concepts the given individual belongs to.

Specified by:
getConcepts in interface AceWikiReasoner
Parameters:
ind - The individual.
Returns:
A list of all concepts of the individual.

getIndividuals

public java.util.List<Individual> getIndividuals(Concept concept)
Description copied from interface: AceWikiReasoner
Should return all individuals that belong to the given concept.

Specified by:
getIndividuals in interface AceWikiReasoner
Parameters:
concept - The concept.
Returns:
A list of all individuals of the concept.

getSuperConcepts

public java.util.List<Concept> getSuperConcepts(Concept concept)
Description copied from interface: AceWikiReasoner
Should return all super-concepts of the given concept.

Specified by:
getSuperConcepts in interface AceWikiReasoner
Parameters:
concept - The concept for which all super-concepts should be returned.
Returns:
A list of all super-concepts.

getSubConcepts

public java.util.List<Concept> getSubConcepts(Concept concept)
Description copied from interface: AceWikiReasoner
Should return all the sub-concepts of the given concept.

Specified by:
getSubConcepts in interface AceWikiReasoner
Parameters:
concept - The concept for which all sub-concepts should be returned.
Returns:
A list of all sub-concepts.

getAnswer

public java.util.List<AnswerElement> getAnswer(Question q)
Description copied from interface: AceWikiReasoner
Should return a list of ontology elements that answer the given question.

Specified by:
getAnswer in interface AceWikiReasoner
Parameters:
q - The question to be answered.
Returns:
A list of ontology elements that are the answer to the question.

isConsistent

public boolean isConsistent()
Description copied from interface: AceWikiReasoner
Should return true if the ontology is consistent.

Specified by:
isConsistent in interface AceWikiReasoner
Returns:
true if the ontology is consistent.

isSatisfiable

public boolean isSatisfiable(Concept concept)
Description copied from interface: AceWikiReasoner
Should check if the given concept is satisfiable.

Specified by:
isSatisfiable in interface AceWikiReasoner
Parameters:
concept - The concept.
Returns:
true if the concept is satisfiable.

loadSentence

public void loadSentence(Sentence s)
Description copied from interface: AceWikiReasoner
Loads the given sentence.

Specified by:
loadSentence in interface AceWikiReasoner
Parameters:
s - The sentence.

unloadSentence

public void unloadSentence(Sentence s)
Description copied from interface: AceWikiReasoner
Unloads the given sentence.

Specified by:
unloadSentence in interface AceWikiReasoner
Parameters:
s - The sentence.


Copyright 2008-2012, AceWiki developers