org.dllearner.tools.protege
Class DLLearnerModel

java.lang.Object
  extended by org.dllearner.tools.protege.DLLearnerModel
All Implemented Interfaces:
Runnable

public class DLLearnerModel
extends Object
implements Runnable

This Class provides the necessary methods to learn Concepts from the DL-Learner.

Author:
Christian Koetteritzsch

Constructor Summary
DLLearnerModel(org.protege.editor.owl.OWLEditorKit editorKit, DLLearnerView view)
          This is the constructor for DL-Learner model.
 
Method Summary
 void changeDLLearnerDescriptionsToOWLDescriptions(Description descript)
          This method stores the new concept learned by the DL-Learner in the Ontology.
 boolean getAlreadyLearned()
          This method gets the status if the DL-Learner has already learned.
 NamedClass getCurrentConcept()
          This method returns the current concept.
 List<? extends EvaluatedDescription> getEvaluatedDescriptionList()
          This Method returns a List of evaluated descriptions suggested by the DL-Learner.
 String getID()
           
 Set<Individual> getIndividual()
          This method returns a set of individuals belonging to the currently selected class.
 LearningAlgorithm getLearningAlgorithm()
          This method returns the current learning algorithm that is used to learn new concepts.
 Set<org.semanticweb.owl.model.OWLDescription> getNewOWLDescription()
          This method returns a set of concepts that are learned by the DL-Learner.
 org.semanticweb.owl.model.OWLDescription getOldConceptOWLAPI()
          This method returns the old concept which is chosen in protege in OWLDescription format.
 boolean getOntologyConsistent()
          This method returns a boolean if an ontology is inconsistent.
 Set<String> getOntologyURIString()
          This method returns the Strings of the Ontology uri's that are currently used.
 FastInstanceChecker getReasoner()
          This method returns the fast instance checker reasoner.
 org.semanticweb.owl.model.OWLDescription getSolution()
          This method returns the currently learned description in OWLDescription format.
 DefaultListModel getSuggestModel()
          This methode returns the Model for the suggested Concepts.
 boolean hasIndividuals()
          This Method checks if the selected class has any individuals.
 void initReasoner()
          This method initializes the SimpleSuggestionLearningAlgorithm and adds the suggestions to the suggest panel model.
 boolean isConsistent(EvaluatedDescription eDescription)
          This Method checks if after inserting of this concept the ontology is still consistent.
 void run()
          Starts the learning algorithm.
 void setCurrentConcept(NamedClass current)
          This sets the current concept.
 void setHasIndividuals(boolean has)
          Sets if the ontology has individuals.
 void setID(String d)
           
 void setIndividuals(Set<Individual> ind)
          This method sets the positive examples for learning.
 void setInstancesCount(int i)
          This method sets the number of instances.
 void setKnowledgeSource()
          This method sets the knowledge source for the learning process.
 void setLearningAlgorithm()
          This method sets the learning algorithm for the learning process.
 void setLearningProblem()
          This method sets the Learning problem for the learning process.
 void setOntologyURIString(Set<String> uri)
          This method sets the uri sting for the currently used for learning.
 void setReasoner()
          This method sets the reasoner.
 void setSuggestList(List<? extends EvaluatedDescription> list)
          This method sets the suggestion list.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DLLearnerModel

public DLLearnerModel(org.protege.editor.owl.OWLEditorKit editorKit,
                      DLLearnerView view)
This is the constructor for DL-Learner model.

Parameters:
editorKit - Editor Kit to get the currently loaded Ontology
id - String if it learns a subclass or a superclass.
view - current view of the DL-Learner tab
Method Detail

setID

public void setID(String d)

initReasoner

public void initReasoner()
This method initializes the SimpleSuggestionLearningAlgorithm and adds the suggestions to the suggest panel model.


getEvaluatedDescriptionList

public List<? extends EvaluatedDescription> getEvaluatedDescriptionList()
This Method returns a List of evaluated descriptions suggested by the DL-Learner.

Returns:
list of evaluated descriptions

setKnowledgeSource

public void setKnowledgeSource()
This method sets the knowledge source for the learning process. Only OWLAPIOntology will be available.


setReasoner

public void setReasoner()
This method sets the reasoner. Only FastInstanceChecker is available.


getReasoner

public FastInstanceChecker getReasoner()
This method returns the fast instance checker reasoner.

Returns:
fast instance checker reasoner

getCurrentConcept

public NamedClass getCurrentConcept()
This method returns the current concept.

Returns:
current concept

setLearningProblem

public void setLearningProblem()
This method sets the Learning problem for the learning process. PosNegDefinitonLp for equivalent classes and PosNegInclusionLP for super classes.


setLearningAlgorithm

public void setLearningAlgorithm()
This method sets the learning algorithm for the learning process.


run

public void run()
Starts the learning algorithm.

Specified by:
run in interface Runnable

setIndividuals

public void setIndividuals(Set<Individual> ind)
This method sets the positive examples for learning.

Parameters:
ind - Set of Individuals

setOntologyURIString

public void setOntologyURIString(Set<String> uri)
This method sets the uri sting for the currently used for learning.

Parameters:
uri - Set of uris

hasIndividuals

public boolean hasIndividuals()
This Method checks if the selected class has any individuals.

Returns:
boolean hasIndividuals

setHasIndividuals

public void setHasIndividuals(boolean has)
Sets if the ontology has individuals.

Parameters:
has - boolean if concept has Individuals

getLearningAlgorithm

public LearningAlgorithm getLearningAlgorithm()
This method returns the current learning algorithm that is used to learn new concepts.

Returns:
Learning algorithm that is used for learning concepts.

getNewOWLDescription

public Set<org.semanticweb.owl.model.OWLDescription> getNewOWLDescription()
This method returns a set of concepts that are learned by the DL-Learner. They are already converted into the OWLDescription format.

Returns:
Set of learned concepts in OWLDescription format

getOldConceptOWLAPI

public org.semanticweb.owl.model.OWLDescription getOldConceptOWLAPI()
This method returns the old concept which is chosen in protege in OWLDescription format.

Returns:
Old Concept in OWLDescription format.

getSolution

public org.semanticweb.owl.model.OWLDescription getSolution()
This method returns the currently learned description in OWLDescription format.

Returns:
currently used description in OWLDescription format

getSuggestModel

public DefaultListModel getSuggestModel()
This methode returns the Model for the suggested Concepts.

Returns:
DefaultListModel

changeDLLearnerDescriptionsToOWLDescriptions

public void changeDLLearnerDescriptionsToOWLDescriptions(Description descript)
This method stores the new concept learned by the DL-Learner in the Ontology.

Parameters:
descript - Description learn by the DL-Learner

getAlreadyLearned

public boolean getAlreadyLearned()
This method gets the status if the DL-Learner has already learned. It is only for reseting the suggest panel.

Returns:
boolean if the learner has already learned

isConsistent

public boolean isConsistent(EvaluatedDescription eDescription)
This Method checks if after inserting of this concept the ontology is still consistent.

Parameters:
eDescription - EvauatedDescription
Returns:
isConsistent boolean

setSuggestList

public void setSuggestList(List<? extends EvaluatedDescription> list)
This method sets the suggestion list.

Parameters:
list - List(EvaluatedDescription)

getOntologyURIString

public Set<String> getOntologyURIString()
This method returns the Strings of the Ontology uri's that are currently used.

Returns:
ontologieURI

getOntologyConsistent

public boolean getOntologyConsistent()
This method returns a boolean if an ontology is inconsistent.

Returns:
ontologyInconsistent

setCurrentConcept

public void setCurrentConcept(NamedClass current)
This sets the current concept.

Parameters:
current - currently selected class

getIndividual

public Set<Individual> getIndividual()
This method returns a set of individuals belonging to the currently selected class.

Returns:
the individual

setInstancesCount

public void setInstancesCount(int i)
This method sets the number of instances.

Parameters:
i - number of instances

getID

public String getID()


SourceForge.net Logo DL-Learner is licenced under the terms of the GNU General Public License.
Copyright © 2007-2008 Jens Lehmann