From: <ton...@us...> - 2008-02-11 15:00:59
|
Revision: 538 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=538&view=rev Author: tonytacker Date: 2008-02-11 07:00:55 -0800 (Mon, 11 Feb 2008) Log Message: ----------- special option for positiveExamples, negativeExamples, allowedConcepts, ignoredConcepts, allowedRoles, ignoredRoles for StringSet Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/gui/WidgetPanelStringSet.java Modified: trunk/src/dl-learner/org/dllearner/gui/WidgetPanelStringSet.java =================================================================== --- trunk/src/dl-learner/org/dllearner/gui/WidgetPanelStringSet.java 2008-02-11 14:30:50 UTC (rev 537) +++ trunk/src/dl-learner/org/dllearner/gui/WidgetPanelStringSet.java 2008-02-11 15:00:55 UTC (rev 538) @@ -42,6 +42,8 @@ import org.dllearner.core.config.ConfigOption; import org.dllearner.core.config.StringSetConfigOption; import org.dllearner.core.config.InvalidConfigOptionValueException; +import org.dllearner.core.dl.AtomicConcept; +import org.dllearner.core.dl.AtomicRole; import org.dllearner.core.dl.Individual; /** @@ -224,6 +226,31 @@ for (Individual ind : individuals) cBL.add(ind.getName()); } + // allowedConcepts or ignoredConcepts + if (configOption.getName().equalsIgnoreCase( + "allowedConcepts") + || configOption.getName().equalsIgnoreCase( + "ignoredConcepts")) { + // fill lists + Set<AtomicConcept> atomicsSet = config + .getReasoningService().getAtomicConcepts(); + LinkedList<AtomicConcept> atomicConcepts = new LinkedList<AtomicConcept>( + atomicsSet); + for (AtomicConcept ind : atomicConcepts) + cBL.add(ind.getName()); + } + // allowedRoles or ignoredRoles + if (configOption.getName().equalsIgnoreCase("allowedRoles") + || configOption.getName().equalsIgnoreCase( + "ignoredRoles")) { + // fill lists + Set<AtomicRole> atomicsSet = config + .getReasoningService().getAtomicRoles(); + LinkedList<AtomicRole> atomicRoles = new LinkedList<AtomicRole>( + atomicsSet); + for (AtomicRole ind : atomicRoles) + cBL.add(ind.getName()); + } } } // UNKNOWN @@ -279,7 +306,11 @@ */ private boolean isSpecial() { if (configOption.getName().equalsIgnoreCase("positiveExamples") - || configOption.getName().equalsIgnoreCase("negativeExamples")) + || configOption.getName().equalsIgnoreCase("negativeExamples") + || configOption.getName().equalsIgnoreCase("allowedConcepts") + || configOption.getName().equalsIgnoreCase("ignoredConcepts") + || configOption.getName().equalsIgnoreCase("allowedRoles") + || configOption.getName().equalsIgnoreCase("ignoredRoles")) return true; else return false; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |