From: <jen...@us...> - 2007-12-02 15:19:42
|
Revision: 305 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=305&view=rev Author: jenslehmann Date: 2007-12-02 07:19:26 -0800 (Sun, 02 Dec 2007) Log Message: ----------- improved documentation Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/core/dl/AtomicConcept.java trunk/src/dl-learner/org/dllearner/core/dl/AtomicRole.java trunk/src/dl-learner/org/dllearner/core/dl/ConceptAssertion.java trunk/src/dl-learner/org/dllearner/core/dl/Individual.java trunk/src/dl-learner/org/dllearner/core/dl/RoleAssertion.java Modified: trunk/src/dl-learner/org/dllearner/core/dl/AtomicConcept.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/dl/AtomicConcept.java 2007-12-02 14:44:58 UTC (rev 304) +++ trunk/src/dl-learner/org/dllearner/core/dl/AtomicConcept.java 2007-12-02 15:19:26 UTC (rev 305) @@ -1,3 +1,22 @@ +/** + * Copyright (C) 2007, Jens Lehmann + * + * This file is part of DL-Learner. + * + * DL-Learner is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * DL-Learner is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ package org.dllearner.core.dl; import java.util.Map; @@ -4,12 +23,16 @@ import org.dllearner.utilities.Helper; - - +/** + * Represents an atomic concept in a knowledge base / ontology, + * e.g. "car", "person". + * + * @author Jens Lehmann + * + */ public class AtomicConcept extends Concept { String name; - // List<String> subs public AtomicConcept(String name) { this.name = name; @@ -19,31 +42,6 @@ return name; } - /* - @Override - protected void calculateSets(FlatABox abox, SortedSet<String> adcPosSet, SortedSet<String> adcNegSet) { - posSet = abox.atomicConceptsPos.get(conceptName); - negSet = abox.atomicConceptsNeg.get(conceptName); - - if(posSet == null) - posSet = new TreeSet<String>(); - if(negSet == null) - negSet = new TreeSet<String>(); - } - */ - - @Override - public String toString() { - // es soll ein Prefix ausgeblendet werden um Konzepte - // lesbarer zu machen (z.B. http://blabla.org/bla/bla#eigentlicher Name -// String prefixToHide = Helper.findPrefixToHide(name); -// -// if(prefixToHide != null) -// return name.substring(prefixToHide.length()); -// else - return name; - } - public int getLength() { return 1; } @@ -53,6 +51,11 @@ return 0; } + @Override + public String toString() { + return name; + } + public String toString(String baseURI, Map<String,String> prefixes) { return Helper.getAbbreviatedString(name, baseURI, prefixes); } Modified: trunk/src/dl-learner/org/dllearner/core/dl/AtomicRole.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/dl/AtomicRole.java 2007-12-02 14:44:58 UTC (rev 304) +++ trunk/src/dl-learner/org/dllearner/core/dl/AtomicRole.java 2007-12-02 15:19:26 UTC (rev 305) @@ -1,3 +1,22 @@ +/** + * Copyright (C) 2007, Jens Lehmann + * + * This file is part of DL-Learner. + * + * DL-Learner is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * DL-Learner is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ package org.dllearner.core.dl; import java.util.Map; @@ -4,6 +23,13 @@ import org.dllearner.utilities.Helper; +/** + * Represents an atomic concept in a knowledge base / ontology, + * e.g. "hasChild". + * + * @author Jens Lehmann + * + */ public class AtomicRole extends Role { public AtomicRole(String name) { @@ -11,18 +37,11 @@ } public int getLength() { - // TODO Auto-generated method stub return 1; } @Override public String toString() { -// String name = getName(); -// String prefixToHide = Helper.findPrefixToHide(name); -// -// if(prefixToHide != null) -// return name.substring(prefixToHide.length()); -// else return name; } Modified: trunk/src/dl-learner/org/dllearner/core/dl/ConceptAssertion.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/dl/ConceptAssertion.java 2007-12-02 14:44:58 UTC (rev 304) +++ trunk/src/dl-learner/org/dllearner/core/dl/ConceptAssertion.java 2007-12-02 15:19:26 UTC (rev 305) @@ -1,3 +1,22 @@ +/** + * Copyright (C) 2007, Jens Lehmann + * + * This file is part of DL-Learner. + * + * DL-Learner is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * DL-Learner is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ package org.dllearner.core.dl; import java.util.Map; @@ -2,2 +21,9 @@ +/** + * Represents an concept assertion in a knowledge base / ontology, + * e.g. "heiko is a person", "heiko is a male person having one child". + * + * @author Jens Lehmann + * + */ public class ConceptAssertion extends AssertionalAxiom { Modified: trunk/src/dl-learner/org/dllearner/core/dl/Individual.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/dl/Individual.java 2007-12-02 14:44:58 UTC (rev 304) +++ trunk/src/dl-learner/org/dllearner/core/dl/Individual.java 2007-12-02 15:19:26 UTC (rev 305) @@ -1,3 +1,22 @@ +/** + * Copyright (C) 2007, Jens Lehmann + * + * This file is part of DL-Learner. + * + * DL-Learner is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * DL-Learner is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ package org.dllearner.core.dl; import java.util.Map; @@ -5,25 +24,13 @@ import org.dllearner.utilities.Helper; /** - * Indiviualklasse soll ein Mapping von Namen auf Zahlen sein, so - * dass compare-Methoden schneller werden. + * Represents an invididual in a knowledge base / ontology. * - * Wenn man individuals nur als Strings repräsentiert, dann funktioniert - * auch die Kurzdarstellung mit hidePrefix nicht (obwohl das keine so - * hohe Priorität hat und man an geeigneten Stellen auch anders lösen - * kann). - * - * => das sollte man erst nach den ersten Papers im Februar einbinden um - * größere Änderungen im System zu vermeiden - * - * @author jl + * @author Jens Lehmann * */ public class Individual implements KBElement, Comparable<Individual> { - // public static int idCounter = 0; - - // private int id; private String name; public String getName() { @@ -32,24 +39,12 @@ public Individual(String name) { this.name = name; - // id = idCounter; - // idCounter++; } public int getLength() { return 1; } - @Override - public String toString() { -// String prefixToHide = Helper.findPrefixToHide(name); -// -// if(prefixToHide != null) -// return name.substring(prefixToHide.length()); -// else - return name; - } - public int compareTo(Individual o) { return name.compareTo(o.name); } @@ -59,6 +54,11 @@ return (compareTo((Individual)o)==0); } + @Override + public String toString() { + return name; + } + public String toString(String baseURI, Map<String,String> prefixes) { return Helper.getAbbreviatedString(name, baseURI, prefixes); } Modified: trunk/src/dl-learner/org/dllearner/core/dl/RoleAssertion.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/dl/RoleAssertion.java 2007-12-02 14:44:58 UTC (rev 304) +++ trunk/src/dl-learner/org/dllearner/core/dl/RoleAssertion.java 2007-12-02 15:19:26 UTC (rev 305) @@ -1,3 +1,22 @@ +/** + * Copyright (C) 2007, Jens Lehmann + * + * This file is part of DL-Learner. + * + * DL-Learner is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * DL-Learner is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ package org.dllearner.core.dl; import java.util.Map; @@ -2,2 +21,9 @@ +/** + * Represents an role assertion in a knowledge base / ontology, + * e.g. "heiko is brother of stefan". + * + * @author Jens Lehmann + * + */ public class RoleAssertion extends AssertionalAxiom { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |