You can subscribe to this list here.
| 2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(32) |
Aug
(65) |
Sep
(15) |
Oct
(35) |
Nov
|
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(5) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Elmer G. <ega...@us...> - 2005-05-06 17:55:49
|
Update of /cvsroot/javaowl/JOWLEditor/src/org/javaowl/editor/swing/pe In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14758/src/org/javaowl/editor/swing/pe Modified Files: DefaultPropertyEditorPagelet.java Log Message: Changed reasoner to new pellet reasoner Index: DefaultPropertyEditorPagelet.java =================================================================== RCS file: /cvsroot/javaowl/JOWLEditor/src/org/javaowl/editor/swing/pe/DefaultPropertyEditorPagelet.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** DefaultPropertyEditorPagelet.java 6 Oct 2004 13:15:16 -0000 1.1.1.1 --- DefaultPropertyEditorPagelet.java 6 May 2005 17:53:54 -0000 1.2 *************** *** 99,104 **** for (int i = 0; i < o.length; i++) comboBox.addItem(o[i]); ! } else comboBox.addItem(value); comboBox.setSelectedItem(value); component.remove(textPanel); --- 99,105 ---- for (int i = 0; i < o.length; i++) comboBox.addItem(o[i]); ! } else { comboBox.addItem(value); + } comboBox.setSelectedItem(value); component.remove(textPanel); |
|
From: Elmer G. <ega...@us...> - 2005-05-06 17:54:06
|
Update of /cvsroot/javaowl/JOWLEditor/src/org/javaowl/editor/reasoner In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14758/src/org/javaowl/editor/reasoner Removed Files: EditorReasoner.java Log Message: Changed reasoner to new pellet reasoner --- EditorReasoner.java DELETED --- |
|
From: Elmer G. <ega...@us...> - 2005-05-06 17:54:06
|
Update of /cvsroot/javaowl/JOWLEditor/src/org/javaowl/editor/swing In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14758/src/org/javaowl/editor/swing Modified Files: BrowsePage.java EditPage.java Log Message: Changed reasoner to new pellet reasoner Index: BrowsePage.java =================================================================== RCS file: /cvsroot/javaowl/JOWLEditor/src/org/javaowl/editor/swing/BrowsePage.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** BrowsePage.java 6 Oct 2004 13:15:16 -0000 1.1.1.1 --- BrowsePage.java 6 May 2005 17:53:54 -0000 1.2 *************** *** 86,90 **** if (e.getClickCount() == 2) { int index = instancesList.locationToIndex(e.getPoint()); ! ResourceEditorBean resource = (ResourceEditorBean) instances.elementAt(index); notifyEditResource(resource); } --- 86,91 ---- if (e.getClickCount() == 2) { int index = instancesList.locationToIndex(e.getPoint()); ! ResourceEditorBean resource = ! (ResourceEditorBean) instances.elementAt(index); notifyEditResource(resource); } *************** *** 95,99 **** public void keyReleased(KeyEvent e) { if (KeyEvent.VK_DELETE == e.getKeyCode()) { ! ResourceEditorBean resource = (ResourceEditorBean) instancesList.getSelectedValue(); instances.removeElement(resource); notifyRemoveResource(resource); --- 96,101 ---- public void keyReleased(KeyEvent e) { if (KeyEvent.VK_DELETE == e.getKeyCode()) { ! ResourceEditorBean resource = ! (ResourceEditorBean) instancesList.getSelectedValue(); instances.removeElement(resource); notifyRemoveResource(resource); *************** *** 169,171 **** } ! } \ No newline at end of file --- 171,173 ---- } ! } Index: EditPage.java =================================================================== RCS file: /cvsroot/javaowl/JOWLEditor/src/org/javaowl/editor/swing/EditPage.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** EditPage.java 6 Oct 2004 13:15:16 -0000 1.1.1.1 --- EditPage.java 6 May 2005 17:53:54 -0000 1.2 *************** *** 30,33 **** --- 30,34 ---- import java.util.Iterator; import java.util.Map; + import java.util.Arrays; import javax.swing.BoxLayout; *************** *** 77,83 **** private Editor e; ! private ResourceEditorBean resource; ! public EditPage(ModelEditor editor, Map propertyEditors, Editor e, ResourceEditorBean resource) { this.editor = editor; this.e = e; --- 78,85 ---- private Editor e; ! private ResourceEditorBean resource; ! public EditPage(ModelEditor editor, Map propertyEditors, Editor e, ! ResourceEditorBean resource) { this.editor = editor; this.e = e; *************** *** 105,113 **** propertiesList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); MouseListener mouseListener = new MouseAdapter() { ! public void mouseClicked(MouseEvent e) { ! int index = propertiesList.locationToIndex(e.getPoint()); ! editProperty((OntProperty) properties.elementAt(index)); ! } ! }; propertiesList.addMouseListener(mouseListener); propertiesList.setCellRenderer(renderer); --- 107,115 ---- propertiesList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); MouseListener mouseListener = new MouseAdapter() { ! public void mouseClicked(MouseEvent e) { ! int index = propertiesList.locationToIndex(e.getPoint()); ! editProperty((OntProperty) properties.elementAt(index)); ! } ! }; propertiesList.addMouseListener(mouseListener); propertiesList.setCellRenderer(renderer); *************** *** 116,154 **** table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); mouseListener = new MouseAdapter() { ! public void mouseClicked(MouseEvent e) { ! int index = table.getSelectedRow(); ! StatementEditorBean stmt = values.getRow(index); ! editProperty(stmt); ! } ! }; ! table.addMouseListener(mouseListener); ! table.addKeyListener(new KeyAdapter() { ! public void keyReleased(KeyEvent e) { ! if (KeyEvent.VK_DELETE == e.getKeyCode()) { int index = table.getSelectedRow(); ! StatementEditorBean stmt = values.removeRow(index); ! removeStatement(stmt); } ! } ! }); table.setDefaultRenderer(Object.class, new DefaultTableCellRenderer() { ! public void setValue(Object value) { ! if (value instanceof Property) { ! Property p = (Property) value; ! setText(p.getLocalName()); ! setToolTipText(value.toString()); ! } else if (value instanceof ResourceEditorBean) { ! setText(((ResourceEditorBean) value).getLabel(true)); ! setToolTipText(((ResourceEditorBean) value).getComment(false)); ! } else if (value instanceof Literal) { ! Literal literal = (Literal) value; ! setText(literal.getString()); ! setToolTipText(literal.getDatatypeURI()); ! } else { ! setText(value.toString()); } ! } ! }); JTextArea comment = new JTextArea(); comment.setLineWrap(true); --- 118,156 ---- table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); mouseListener = new MouseAdapter() { ! public void mouseClicked(MouseEvent e) { int index = table.getSelectedRow(); ! StatementEditorBean stmt = values.getRow(index); ! editProperty(stmt); } + }; + table.addMouseListener(mouseListener); + table.addKeyListener(new KeyAdapter() { + public void keyReleased(KeyEvent e) { + if (KeyEvent.VK_DELETE == e.getKeyCode()) { + int index = table.getSelectedRow(); + StatementEditorBean stmt = values.removeRow(index); + removeStatement(stmt); + } ! } ! }); table.setDefaultRenderer(Object.class, new DefaultTableCellRenderer() { ! public void setValue(Object value) { ! if (value instanceof Property) { ! Property p = (Property) value; ! setText(p.getLocalName()); ! setToolTipText(value.toString()); ! } else if (value instanceof ResourceEditorBean) { ! setText(((ResourceEditorBean) value).getLabel(true)); ! setToolTipText(((ResourceEditorBean) value).getComment(false)); ! } else if (value instanceof Literal) { ! Literal literal = (Literal) value; ! setText(literal.getString()); ! setToolTipText(literal.getDatatypeURI()); ! } else { ! setText(value.toString()); ! } } ! }); JTextArea comment = new JTextArea(); comment.setLineWrap(true); *************** *** 173,178 **** left.setDividerLocation(200); left.setResizeWeight(0.5); ! JSplitPane right = new JSplitPane(JSplitPane.VERTICAL_SPLIT, new JScrollPane( ! propertiesList), commentPane); right.setDividerLocation(400); right.setResizeWeight(0.5); --- 175,180 ---- left.setDividerLocation(200); left.setResizeWeight(0.5); ! JSplitPane right = new JSplitPane(JSplitPane.VERTICAL_SPLIT, ! new JScrollPane(propertiesList), commentPane); right.setDividerLocation(400); right.setResizeWeight(0.5); *************** *** 194,201 **** currentStatement = null; currentProperty = property; ! propertyEditor = (PropertyEditorPagelet) propertyEditors.get(currentProperty.getURI()); if (propertyEditor == null) { propertyEditor = (PropertyEditorPagelet) propertyEditors.get(""); } propertyEditor.setRangeType(editor.getPropertyRange(currentProperty.getURI())); OntClass ontClass = editor.getValidLeafClass(currentProperty); --- 196,205 ---- currentStatement = null; currentProperty = property; ! propertyEditor = ! (PropertyEditorPagelet) propertyEditors.get(currentProperty.getURI()); if (propertyEditor == null) { propertyEditor = (PropertyEditorPagelet) propertyEditors.get(""); } + propertyEditor.setRangeType(editor.getPropertyRange(currentProperty.getURI())); OntClass ontClass = editor.getValidLeafClass(currentProperty); |
|
From: Elmer G. <ega...@us...> - 2005-05-06 17:54:06
|
Update of /cvsroot/javaowl/JOWLEditor/src/org/javaowl/editor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14758/src/org/javaowl/editor Modified Files: ModelEditorBean.java Log Message: Changed reasoner to new pellet reasoner Index: ModelEditorBean.java =================================================================== RCS file: /cvsroot/javaowl/JOWLEditor/src/org/javaowl/editor/ModelEditorBean.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** ModelEditorBean.java 6 Oct 2004 13:15:16 -0000 1.1.1.1 --- ModelEditorBean.java 6 May 2005 17:53:53 -0000 1.2 *************** *** 30,34 **** import java.util.Vector; ! import org.javaowl.editor.reasoner.EditorReasoner; import com.hp.hpl.jena.ontology.DatatypeProperty; --- 30,34 ---- import java.util.Vector; ! import org.mindswap.pellet.jena.OWLReasoner; import com.hp.hpl.jena.ontology.DatatypeProperty; *************** *** 61,65 **** private OntClass[] classes; ! private EditorReasoner ontologyReasoner; public ModelEditorBean(String ontology, String data, String prefix) --- 61,65 ---- private OntClass[] classes; ! private OWLReasoner ontologyReasoner; public ModelEditorBean(String ontology, String data, String prefix) *************** *** 101,105 **** l.add(clazz.getURI()); if (all) ! l.addAll(ontologyReasoner.getSuperClasses(clazz, true)); Set props = new HashSet(); for (Iterator iter = l.iterator(); iter.hasNext(); ) { --- 101,105 ---- l.add(clazz.getURI()); if (all) ! l.addAll(ontologyReasoner.getSuperClasses(clazz, false)); Set props = new HashSet(); for (Iterator iter = l.iterator(); iter.hasNext(); ) { *************** *** 130,136 **** OntResource or = (OntResource) it.next(); OntClass oc = or.asClass(); ! Iterator it2 = oc.listSubClasses(); ! if (!it2.hasNext() && !or.getNameSpace().equals(XSD.xstring.getNameSpace())) list.add(oc); } if (list.size() > 0) --- 130,143 ---- OntResource or = (OntResource) it.next(); OntClass oc = or.asClass(); ! // TODO: what whith the list??? ! if (or.getNameSpace().equals(prefix)) { list.add(oc); + for (Iterator it2 = oc.listSubClasses(); it2.hasNext(); ) { + OntClass ioc = (OntClass) it2.next(); + if (ioc.getNameSpace().equals(prefix)) { + list.add(ioc); + } + } + } } if (list.size() > 0) *************** *** 195,204 **** List resources = new ArrayList(); if (all) { ! EditorReasoner reasoner = new EditorReasoner(); Model model = ModelFactory.createDefaultModel(); model.add(ontology); model.add(data); try { ! reasoner.loadOntology(model); } catch (Exception e) { e.printStackTrace(); --- 202,211 ---- List resources = new ArrayList(); if (all) { ! OWLReasoner reasoner = new OWLReasoner(); Model model = ModelFactory.createDefaultModel(); model.add(ontology); model.add(data); try { ! reasoner.load(model); } catch (Exception e) { e.printStackTrace(); *************** *** 243,252 **** private InstanceClassification getInstanceClassification(Resource instance) { ! EditorReasoner reasoner = new EditorReasoner(); Model model = ModelFactory.createDefaultModel(); model.add(ontology); model.add(data); try { ! reasoner.loadOntology(model); } catch (Exception e) { e.printStackTrace(); --- 250,259 ---- private InstanceClassification getInstanceClassification(Resource instance) { ! OWLReasoner reasoner = new OWLReasoner(); Model model = ModelFactory.createDefaultModel(); model.add(ontology); model.add(data); try { ! reasoner.load(model); } catch (Exception e) { e.printStackTrace(); *************** *** 264,268 **** result.addInferredClass(uri); if (result.isDeclaredClass(uri) || result.isInferredClass(uri) || ! reasoner.canBeInstanceOf(instance, oc)) result.addPossibleClass(uri); } --- 271,275 ---- result.addInferredClass(uri); if (result.isDeclaredClass(uri) || result.isInferredClass(uri) || ! reasoner.isInstanceOf(instance, oc)) result.addPossibleClass(uri); } *************** *** 295,305 **** } public OntClass[] getSubClasses(OntClass clazz) { List classes = new ArrayList(); ! Vector v = ontologyReasoner.getSubClasses(clazz, false); for (Iterator iter = v.iterator(); iter.hasNext(); ) { ! String uri = iter.next().toString(); ! if (uri.startsWith(prefix)) classes.add(ontModel.getOntClass(uri)); } return (OntClass[]) classes.toArray(new OntClass[0]); --- 302,320 ---- } + private Object getFirstElement(Set set) { + for (Iterator it = set.iterator(); it.hasNext();) { + return it.next(); + } + return null; + } + public OntClass[] getSubClasses(OntClass clazz) { List classes = new ArrayList(); ! Set v = ontologyReasoner.getSubClasses(clazz, true); for (Iterator iter = v.iterator(); iter.hasNext(); ) { ! String uri = getFirstElement((Set) iter.next()).toString(); ! if (uri.startsWith(prefix)) { classes.add(ontModel.getOntClass(uri)); + } } return (OntClass[]) classes.toArray(new OntClass[0]); *************** *** 347,353 **** private void init() { ! ontologyReasoner = new EditorReasoner(); try { ! ontologyReasoner.loadOntology(ontology); ontologyReasoner.classify(); } catch (Exception e) { --- 362,368 ---- private void init() { ! ontologyReasoner = new OWLReasoner(); try { ! ontologyReasoner.load(ontology); ontologyReasoner.classify(); } catch (Exception e) { |
|
From: Elmer G. <ega...@us...> - 2005-05-06 17:54:05
|
Update of /cvsroot/javaowl/JOWLEditor/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14758/lib Modified Files: pellet.jar Log Message: Changed reasoner to new pellet reasoner Index: pellet.jar =================================================================== RCS file: /cvsroot/javaowl/JOWLEditor/lib/pellet.jar,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 Binary files /tmp/cvso8mbiP and /tmp/cvsYfjdaH differ |
|
From: Elmer G. <ega...@us...> - 2004-10-19 06:55:57
|
Update of /cvsroot/javaowl/Reasoner In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7903 Modified Files: build.xml Log Message: Added Negation Conjunction and Disjunction Concepts. Index: build.xml =================================================================== RCS file: /cvsroot/javaowl/Reasoner/build.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** build.xml 13 Oct 2004 01:29:27 -0000 1.1 --- build.xml 19 Oct 2004 06:55:43 -0000 1.2 *************** *** 75,78 **** --- 75,79 ---- <target name="test" depends="compile, compile-tests"> <junit fork="yes" printsummary="yes"> + <!--formatter type="plain" usefile="false"/--> <classpath> <fileset dir="${lib}" includes="*.jar"/> |
|
From: Elmer G. <ega...@us...> - 2004-10-19 06:55:57
|
Update of /cvsroot/javaowl/Reasoner/src/org/javaowl/reasoner In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7903/src/org/javaowl/reasoner Modified Files: AtomicConcept.java Added Files: ConjunctionConcept.java DisjunctionConcept.java NegatedConcept.java Removed Files: AbstractConcept.java Log Message: Added Negation Conjunction and Disjunction Concepts. --- NEW FILE: ConjunctionConcept.java --- /* ConjunctionConcept.java Copyright (C) 2004 Gerardo Horvilleur Martinez, Elmer Garduno Hernandez This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package org.javaowl.reasoner; import java.util.Set; import java.util.HashSet; public class ConjunctionConcept implements Concept{ private Set concepts = new HashSet(); private boolean atomic = false; private boolean bottom = false; private ConjunctionConcept() { } public final static ConjunctionConcept getConcept() { return new ConjunctionConcept(); } public boolean isAtomic() { return atomic; } public boolean isNegated() { return false; } public boolean isTop() { return false; } public boolean isBottom() { return bottom; } public void addConcept(Concept concept) { if (concept.isTop()) { return; } if (concept.isBottom()) { bottom = true; atomic = true; } if (concepts.contains(NegatedConcept.getConcept(concept))) { bottom = true; atomic = true; } concepts.add(concept); } public boolean equals(Object o) { if (bottom) return AtomicConcept.BOTTOM.equals(o); if (! (o instanceof ConjunctionConcept)) return false; ConjunctionConcept cc = (ConjunctionConcept) o; return concepts.equals(cc.concepts); } public int hashCode() { if (bottom) return AtomicConcept.BOTTOM.hashCode(); int result = 17; result = 37 * result + concepts.hashCode(); return result; } } --- AbstractConcept.java DELETED --- --- NEW FILE: DisjunctionConcept.java --- /* DisjunctionConcept.java Copyright (C) 2004 Gerardo Horvilleur Martinez, Elmer Garduno Hernandez This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package org.javaowl.reasoner; import java.util.Set; import java.util.HashSet; public class DisjunctionConcept implements Concept{ private Set concepts = new HashSet(); private boolean atomic = false; private boolean top = false; private DisjunctionConcept() { } public final static DisjunctionConcept getConcept() { return new DisjunctionConcept(); } public boolean isAtomic() { return atomic; } public boolean isNegated() { return false; } public boolean isTop() { return top; } public boolean isBottom() { return false; } public void addConcept(Concept concept) { if (concept.isBottom()) { return; } if (concept.isTop()) { top = true; atomic = true; } if (concepts.contains(NegatedConcept.getConcept(concept))) { top = true; atomic = true; } concepts.add(concept); } public boolean equals(Object o) { if (top) return AtomicConcept.TOP.equals(o); if (! (o instanceof DisjunctionConcept)) return false; DisjunctionConcept dc = (DisjunctionConcept) o; return concepts.equals(dc.concepts); } public int hashCode() { if (top) return AtomicConcept.TOP.hashCode(); int result = 17; result = 37 * result + concepts.hashCode(); return result; } } Index: AtomicConcept.java =================================================================== RCS file: /cvsroot/javaowl/Reasoner/src/org/javaowl/reasoner/AtomicConcept.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AtomicConcept.java 13 Oct 2004 01:29:41 -0000 1.1 --- AtomicConcept.java 19 Oct 2004 06:55:44 -0000 1.2 *************** *** 23,55 **** import java.util.HashMap; ! public class AtomicConcept extends AbstractConcept{ ! private final String name; ! ! private final boolean negated; ! ! private final boolean top; ! ! private final boolean bottom; ! private final static Map map = new HashMap(); ! private final static Map negatedMap = new HashMap(); ! ! public final static AtomicConcept TOP; ! public final static AtomicConcept BOTTOM; ! static { ! TOP = new AtomicConcept("TOP", false, true, false); ! map.put("TOP", TOP); ! BOTTOM = new AtomicConcept("TOP", true, false, true); ! negatedMap.put("TOP", BOTTOM); ! } ! private AtomicConcept(String name, boolean negated, boolean top, boolean bottom) { this.name = name; ! this.negated = negated; ! this.top = top; ! this.bottom = bottom; } --- 23,46 ---- import java.util.HashMap; ! public class AtomicConcept implements Concept{ private final static Map map = new HashMap(); ! public static final AtomicConcept TOP = new AtomicConcept("TOP") { ! public boolean isTop() { ! return true; ! } ! }; ! public static final AtomicConcept BOTTOM = new AtomicConcept("BOTTOM") { ! public boolean isBottom() { ! return true; ! } ! }; ! private final String name; ! private AtomicConcept(String name) { this.name = name; ! map.put(name, this); } *************** *** 57,94 **** AtomicConcept concept = (AtomicConcept) map.get(name); if (concept == null) { ! concept = new AtomicConcept(name, false, false, false); ! map.put(name, concept); } return concept; } - public AtomicConcept getNegatedConcept() { - if (negated) { - AtomicConcept concept = (AtomicConcept) map.get(name); - if (concept == null) { - concept = new AtomicConcept(name, false, false, false); - negatedMap.put(name, concept); - } - return concept; - } - AtomicConcept concept = (AtomicConcept) negatedMap.get(name); - if (concept == null) { - concept = new AtomicConcept(name, true, false, false); - negatedMap.put(name, concept); - } - return concept; - } - - public boolean isTop() { ! return top; } public boolean isBottom() { ! return bottom; } public boolean isNegated() { ! return negated; } --- 48,66 ---- AtomicConcept concept = (AtomicConcept) map.get(name); if (concept == null) { ! concept = new AtomicConcept(name); } return concept; } public boolean isTop() { ! return false; } public boolean isBottom() { ! return false; } public boolean isNegated() { ! return false; } *************** *** 96,105 **** return true; } - - public boolean equals(Object o) { - if (! (o instanceof AtomicConcept)) - return false; - - return o == this; - } } --- 68,70 ---- --- NEW FILE: NegatedConcept.java --- /* AtomicConcept.java Copyright (C) 2004 Gerardo Horvilleur Martinez, Elmer Garduno Hernandez This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package org.javaowl.reasoner; import java.util.Map; import java.util.HashMap; public class NegatedConcept implements Concept{ private final Concept concept; private final static Map map = new HashMap(); private NegatedConcept(Concept concept) { this.concept = concept; } public final static Concept getConcept(Concept concept) { if (concept.isTop()) return AtomicConcept.BOTTOM; if (concept.isBottom()) return AtomicConcept.TOP; if (concept.isNegated()) return ((NegatedConcept) concept).concept; Concept negatedConcept = (Concept) map.get(concept); if (negatedConcept == null) { negatedConcept = new NegatedConcept(concept); map.put(concept, negatedConcept); } return negatedConcept; } public boolean isTop() { return false; } public boolean isBottom() { return false; } public boolean isNegated() { return true; } public boolean isAtomic() { return concept.isAtomic(); } } |
|
From: Elmer G. <ega...@us...> - 2004-10-19 06:55:57
|
Update of /cvsroot/javaowl/Reasoner/tests/org/javaowl/reasoner In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7903/tests/org/javaowl/reasoner Modified Files: TestReasoner.java Log Message: Added Negation Conjunction and Disjunction Concepts. Index: TestReasoner.java =================================================================== RCS file: /cvsroot/javaowl/Reasoner/tests/org/javaowl/reasoner/TestReasoner.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TestReasoner.java 13 Oct 2004 01:29:42 -0000 1.1 --- TestReasoner.java 19 Oct 2004 06:55:44 -0000 1.2 *************** *** 1,4 **** /* ! TestEditor.java Copyright (C) 2004 Gerardo Horvilleur Martinez, Elmer Garduno Hernandez --- 1,4 ---- /* ! TestReasoner.java Copyright (C) 2004 Gerardo Horvilleur Martinez, Elmer Garduno Hernandez *************** *** 52,73 **** private void testAtomicConcept() ! { assertTrue(AtomicConcept.TOP.isTop()); assertFalse(AtomicConcept.TOP.isBottom()); ! assertTrue(AtomicConcept.BOTTOM.isBottom()); assertFalse(AtomicConcept.BOTTOM.isTop()); ! assertTrue(AtomicConcept.BOTTOM.getNegatedConcept().isTop()); ! assertTrue(AtomicConcept.TOP.getNegatedConcept().isBottom()); ! assertTrue(AtomicConcept.BOTTOM.getNegatedConcept(). ! getNegatedConcept().isBottom()); ! assertTrue(AtomicConcept.TOP.getNegatedConcept(). ! getNegatedConcept().isTop()); AtomicConcept female = AtomicConcept.getConcept("female"); ! AtomicConcept male = female.getNegatedConcept(); ! assertTrue(male.isNegated()); ! assertFalse(male.isTop()); ! assertFalse(male.isBottom()); ! assertTrue(male.isAtomic()); ! assertTrue(female.equals(male.getNegatedConcept())); } } --- 52,118 ---- private void testAtomicConcept() ! { ! assertFalse(AtomicConcept.TOP.isNegated()); assertTrue(AtomicConcept.TOP.isTop()); assertFalse(AtomicConcept.TOP.isBottom()); ! assertTrue(AtomicConcept.TOP.isAtomic()); ! assertFalse(AtomicConcept.BOTTOM.isNegated()); assertFalse(AtomicConcept.BOTTOM.isTop()); ! assertTrue(AtomicConcept.BOTTOM.isBottom()); ! assertTrue(AtomicConcept.BOTTOM.isAtomic()); ! ! assertTrue(NegatedConcept.getConcept(AtomicConcept.BOTTOM).isTop()); ! assertTrue(NegatedConcept.getConcept(NegatedConcept. ! getConcept(AtomicConcept.BOTTOM)). ! isBottom()); ! AtomicConcept female = AtomicConcept.getConcept("female"); ! AtomicConcept female2 = AtomicConcept.getConcept("female"); ! assertFalse(female.isNegated()); ! assertFalse(female.isTop()); ! assertFalse(female.isBottom()); ! assertTrue(female.isAtomic()); ! assertEquals(female, female2); ! Concept notFemale = NegatedConcept.getConcept(female); ! Concept notFemale2 = NegatedConcept.getConcept(female); ! assertTrue(notFemale.isNegated()); ! assertFalse(notFemale.isTop()); ! assertFalse(notFemale.isBottom()); ! assertTrue(notFemale.isAtomic()); ! assertEquals(notFemale, notFemale2); ! Concept notNotFemale = NegatedConcept.getConcept(notFemale); ! assertFalse(notNotFemale.isNegated()); ! assertFalse(notNotFemale.isTop()); ! assertFalse(notNotFemale.isBottom()); ! assertTrue(notNotFemale.isAtomic()); ! assertEquals(notNotFemale, female); ! ! ConjunctionConcept c1 = ConjunctionConcept.getConcept(); ! ConjunctionConcept c2 = ConjunctionConcept.getConcept(); ! c1.addConcept(female); ! c2.addConcept(female); ! assertEquals(c1, c2); ! c1.addConcept(AtomicConcept.TOP); ! c2.addConcept(notNotFemale); ! assertEquals(c1, c2); ! c1.addConcept(notFemale); ! assertEquals(c1, AtomicConcept.BOTTOM); ! c2.addConcept(c1); ! assertEquals(c2, AtomicConcept.BOTTOM); ! ! DisjunctionConcept d1 = DisjunctionConcept.getConcept(); ! DisjunctionConcept d2 = DisjunctionConcept.getConcept(); ! d1.addConcept(female); ! d2.addConcept(female); ! assertEquals(d1, d2); ! d1.addConcept(AtomicConcept.BOTTOM); ! d2.addConcept(notNotFemale); ! assertEquals(d1, d2); ! d1.addConcept(notFemale); ! assertEquals(d1, AtomicConcept.TOP); ! d2.addConcept(d1); ! assertEquals(d2, AtomicConcept.TOP); ! ! assertEquals(AtomicConcept.BOTTOM, NegatedConcept.getConcept(d2)); } } |
|
From: Elmer G. <ega...@us...> - 2004-10-13 01:30:01
|
Update of /cvsroot/javaowl/Reasoner/src/org/javaowl/reasoner In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27952/src/org/javaowl/reasoner Added Files: AbstractConcept.java AtomicConcept.java Concept.java Log Message: Added new reasoner files. --- NEW FILE: AtomicConcept.java --- /* AtomicConcept.java Copyright (C) 2004 Gerardo Horvilleur Martinez, Elmer Garduno Hernandez This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package org.javaowl.reasoner; import java.util.Map; import java.util.HashMap; public class AtomicConcept extends AbstractConcept{ private final String name; private final boolean negated; private final boolean top; private final boolean bottom; private final static Map map = new HashMap(); private final static Map negatedMap = new HashMap(); public final static AtomicConcept TOP; public final static AtomicConcept BOTTOM; static { TOP = new AtomicConcept("TOP", false, true, false); map.put("TOP", TOP); BOTTOM = new AtomicConcept("TOP", true, false, true); negatedMap.put("TOP", BOTTOM); } private AtomicConcept(String name, boolean negated, boolean top, boolean bottom) { this.name = name; this.negated = negated; this.top = top; this.bottom = bottom; } public final static AtomicConcept getConcept(String name) { AtomicConcept concept = (AtomicConcept) map.get(name); if (concept == null) { concept = new AtomicConcept(name, false, false, false); map.put(name, concept); } return concept; } public AtomicConcept getNegatedConcept() { if (negated) { AtomicConcept concept = (AtomicConcept) map.get(name); if (concept == null) { concept = new AtomicConcept(name, false, false, false); negatedMap.put(name, concept); } return concept; } AtomicConcept concept = (AtomicConcept) negatedMap.get(name); if (concept == null) { concept = new AtomicConcept(name, true, false, false); negatedMap.put(name, concept); } return concept; } public boolean isTop() { return top; } public boolean isBottom() { return bottom; } public boolean isNegated() { return negated; } public boolean isAtomic() { return true; } public boolean equals(Object o) { if (! (o instanceof AtomicConcept)) return false; return o == this; } } --- NEW FILE: AbstractConcept.java --- /* AbstractConcept.java Copyright (C) 2004 Gerardo Horvilleur Martinez, Elmer Garduno Hernandez This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package org.javaowl.reasoner; public abstract class AbstractConcept implements Concept{ public boolean isTop() { return false; } public boolean isBottom() { return false; } } --- NEW FILE: Concept.java --- /* Concept.java Copyright (C) 2004 Gerardo Horvilleur Martinez, Elmer Garduno Hernandez This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package org.javaowl.reasoner; public interface Concept { boolean isAtomic(); boolean isTop(); boolean isBottom(); boolean isNegated(); } |
|
From: Elmer G. <ega...@us...> - 2004-10-13 01:30:01
|
Update of /cvsroot/javaowl/Reasoner/tests/org/javaowl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27952/tests/org/javaowl Added Files: TestPackage.java Log Message: Added new reasoner files. --- NEW FILE: TestPackage.java --- /* TestPackage.java Copyright (C) 2004 Gerardo Horvilleur Martinez, Elmer Garduno Hernandez This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package org.javaowl; import junit.framework.TestSuite; import junit.framework.Test; public class TestPackage extends TestSuite { static public Test suite() { return new TestPackage(); } private TestPackage() { super("javaowl"); addTest(org.javaowl.reasoner.TestReasoner.suite()); } } |
|
From: Elmer G. <ega...@us...> - 2004-10-13 01:30:01
|
Update of /cvsroot/javaowl/Reasoner/tests/org/javaowl/reasoner In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27952/tests/org/javaowl/reasoner Added Files: TestReasoner.java Log Message: Added new reasoner files. --- NEW FILE: TestReasoner.java --- /* TestEditor.java Copyright (C) 2004 Gerardo Horvilleur Martinez, Elmer Garduno Hernandez This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package org.javaowl.reasoner; import junit.framework.*; public class TestReasoner extends TestCase { public TestReasoner(String name) { super( name ); } public static TestSuite suite() { TestSuite suite = new TestSuite("reasoner"); suite.addTest(new AtomicConceptTestCase()); return suite; } static class AtomicConceptTestCase extends TestCase { public AtomicConceptTestCase() { super(); } protected void runTest() { testAtomicConcept(); } private void testAtomicConcept() { assertTrue(AtomicConcept.TOP.isTop()); assertFalse(AtomicConcept.TOP.isBottom()); assertTrue(AtomicConcept.BOTTOM.isBottom()); assertFalse(AtomicConcept.BOTTOM.isTop()); assertTrue(AtomicConcept.BOTTOM.getNegatedConcept().isTop()); assertTrue(AtomicConcept.TOP.getNegatedConcept().isBottom()); assertTrue(AtomicConcept.BOTTOM.getNegatedConcept(). getNegatedConcept().isBottom()); assertTrue(AtomicConcept.TOP.getNegatedConcept(). getNegatedConcept().isTop()); AtomicConcept female = AtomicConcept.getConcept("female"); AtomicConcept male = female.getNegatedConcept(); assertTrue(male.isNegated()); assertFalse(male.isTop()); assertFalse(male.isBottom()); assertTrue(male.isAtomic()); assertTrue(female.equals(male.getNegatedConcept())); } } } |
|
From: Elmer G. <ega...@us...> - 2004-10-13 01:29:59
|
Update of /cvsroot/javaowl/Reasoner/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27952/lib Added Files: junit.jar Log Message: Added new reasoner files. --- NEW FILE: junit.jar --- (This appears to be a binary file; contents omitted.) |
|
From: Elmer G. <ega...@us...> - 2004-10-13 01:29:38
|
Update of /cvsroot/javaowl/Reasoner In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27952 Added Files: build.xml Log Message: Added new reasoner files. --- NEW FILE: build.xml --- <project name="Reasoner" default="compile" basedir="."> <!-- set global properties for this build --> <property file="build.properties"/> <property name="tests" location="tests"/> <property name="src" location="src"/> <property name="lib" location="lib"/> <property name="build" location="build"/> <property name="build.tests" location="build.tests"/> <property name="doc" location="doc"/> <property name="dist" location="dist"/> <target name="init"> <!-- Create the time stamp --> <tstamp/> <!-- Create the build directory structure used by compile --> <mkdir dir="${build}"/> <mkdir dir="${build.tests}"/> <mkdir dir="${doc}"/> <mkdir dir="${dist}"/> </target> <path id="project.class.path"> <fileset dir="lib"> <include name="**/*.jar"/> </fileset> </path> <target name="compile" depends="init" description="compile the source " > <!-- Compile the java code from ${src} into ${build} --> <javac srcdir="${src}" destdir="${build}" source="1.4" debug="on"> <classpath refid="project.class.path"/> </javac> </target> <target name="compile-tests" depends="init" description="compile the tests"> <javac srcdir="${tests}" destdir="${build.tests}" source="1.4" debug="on"> <classpath> <fileset dir="${lib}" includes="*.jar"/> <pathelement location="${build}"/> </classpath> </javac> </target> <target name="javadoc" depends="compile" description="generate documentation"> <!-- Generate the API documentation from ${src} into ${doc} --> <javadoc sourcepath="${src}" destdir="${doc}" source="1.4" /> </target> <target name="jar" depends="compile"> <jar jarfile="dist/model-editor.jar" basedir="build" includes="**"/> </target> <target name="run" depends="compile"> <java fork="yes" classname="org.javaowl.editor.swing.Editor"> <jvmarg value="-Xmx128m"/> <jvmarg value="-Xms128m"/> <jvmarg value="-verbose:gc"/> <arg value="testdata/pru6o.n3"/> <arg value="testdata/pru6d.prevayler"/> <arg value="uri:pru6:o#"/> <classpath> <fileset dir="${lib}" includes="*.jar"/> <pathelement location="${build}"/> </classpath> </java> </target> <target name="test" depends="compile, compile-tests"> <junit fork="yes" printsummary="yes"> <classpath> <fileset dir="${lib}" includes="*.jar"/> <pathelement location="${build}"/> <pathelement location="${build.tests}"/> </classpath> <test name="org.javaowl.TestPackage"/> </junit> </target> <target name="clean" description="clean up" > <!-- Delete the ${build}, ${doc} and ${dist} directory trees --> <delete dir="${build.tests}"/> <delete dir="${build}"/> <delete dir="${doc}"/> <delete dir="${dist}"/> </target> </project> |
|
From: Elmer G. <ega...@us...> - 2004-10-13 01:28:30
|
Update of /cvsroot/javaowl/Reasoner/tests/org/javaowl/reasoner In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27810/tests/org/javaowl/reasoner Log Message: Directory /cvsroot/javaowl/Reasoner/tests/org/javaowl/reasoner added to the repository |
|
From: Elmer G. <ega...@us...> - 2004-10-13 01:28:12
|
Update of /cvsroot/javaowl/Reasoner/tests/org/javaowl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27712/tests/org/javaowl Log Message: Directory /cvsroot/javaowl/Reasoner/tests/org/javaowl added to the repository |
|
From: Elmer G. <ega...@us...> - 2004-10-13 01:28:11
|
Update of /cvsroot/javaowl/Reasoner/tests/org In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27675/tests/org Log Message: Directory /cvsroot/javaowl/Reasoner/tests/org added to the repository |
|
From: Elmer G. <ega...@us...> - 2004-10-13 01:27:55
|
Update of /cvsroot/javaowl/Reasoner/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27644/tests Log Message: Directory /cvsroot/javaowl/Reasoner/tests added to the repository |
|
From: Elmer G. <ega...@us...> - 2004-10-13 01:27:10
|
Update of /cvsroot/javaowl/Reasoner/src/org/javaowl/reasoner In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27414/src/org/javaowl/reasoner Log Message: Directory /cvsroot/javaowl/Reasoner/src/org/javaowl/reasoner added to the repository |
|
From: Elmer G. <ega...@us...> - 2004-10-13 01:27:08
|
Update of /cvsroot/javaowl/Reasoner/src/org/javaowl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27380/src/org/javaowl Log Message: Directory /cvsroot/javaowl/Reasoner/src/org/javaowl added to the repository |
|
From: Elmer G. <ega...@us...> - 2004-10-13 01:26:52
|
Update of /cvsroot/javaowl/Reasoner/src/org In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27349/src/org Log Message: Directory /cvsroot/javaowl/Reasoner/src/org added to the repository |
|
From: Elmer G. <ega...@us...> - 2004-10-13 01:26:48
|
Update of /cvsroot/javaowl/Reasoner/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27318/src Log Message: Directory /cvsroot/javaowl/Reasoner/src added to the repository |
|
From: Elmer G. <ega...@us...> - 2004-10-13 01:26:04
|
Update of /cvsroot/javaowl/Reasoner/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27202/lib Log Message: Directory /cvsroot/javaowl/Reasoner/lib added to the repository |
|
From: Elmer G. <ega...@us...> - 2004-10-06 15:53:12
|
Update of /cvsroot/javaowl/JavaOWL/src/org/javaowl/editor/swing/icons In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24058/src/org/javaowl/editor/swing/icons Removed Files: rdf_flyer.24.gif Log Message: Removed files to create JavaOWL Project --- rdf_flyer.24.gif DELETED --- |
Update of /cvsroot/javaowl/JavaOWL/src/org/javaowl/editor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24058/src/org/javaowl/editor Removed Files: InstanceClassification.java ModelEditor.java ModelEditorBean.java ResourceEditorBean.java StatementEditorBean.java Log Message: Removed files to create JavaOWL Project --- ModelEditorBean.java DELETED --- --- StatementEditorBean.java DELETED --- --- ModelEditor.java DELETED --- --- ResourceEditorBean.java DELETED --- --- InstanceClassification.java DELETED --- |
|
From: Elmer G. <ega...@us...> - 2004-10-06 13:45:49
|
Update of /cvsroot/javaowl/JavaOWL/src/org/javaowl/editor/reasoner In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24058/src/org/javaowl/editor/reasoner Removed Files: EditorReasoner.java Log Message: Removed files to create JavaOWL Project --- EditorReasoner.java DELETED --- |