From: <hee...@us...> - 2009-05-28 12:40:17
|
Revision: 1778 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1778&view=rev Author: heeroyuy Date: 2009-05-28 12:28:40 +0000 (Thu, 28 May 2009) Log Message: ----------- -changed config option "classToDescribe" to URL Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerModel.java Modified: trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerModel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerModel.java 2009-05-28 06:23:15 UTC (rev 1777) +++ trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerModel.java 2009-05-28 12:28:40 UTC (rev 1778) @@ -20,6 +20,8 @@ package org.dllearner.tools.protege; +import java.net.MalformedURLException; +import java.net.URL; import java.util.HashSet; import java.util.List; import java.util.Set; @@ -231,11 +233,9 @@ view.setIsInconsistent(false); isReasonerSet = true; }catch (ComponentInitException e) { - System.out.println("testen"); view.setIsInconsistent(true); //e.printStackTrace(); } catch (InconsistentOntologyException incon) { - System.out.println("test"); view.setIsInconsistent(true); } } @@ -262,7 +262,16 @@ */ public void setLearningProblem() { lp = cm.learningProblem(ClassLearningProblem.class, reasoner); - cm.applyConfigEntry(lp, "classToDescribe", currentConcept.toString()); + URL currentConceptURL = null; + try { + currentConceptURL = new URL(currentConcept.toString()); + } catch (MalformedURLException e1) { + // TODO Auto-generated catch block + String error = "Cannot convert to URL."; + view.renderErrorMessage(error); + e1.printStackTrace(); + } + cm.applyConfigEntry(lp, "classToDescribe", currentConceptURL); if (id.equals(EQUIVALENT_CLASS_AXIOM_STRING)) { // sets the learning problem to PosNegDefinitionLP when the // dllearner should suggest an equivalent class This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |