From: <hee...@us...> - 2008-11-02 12:53:37
|
Revision: 1488 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1488&view=rev Author: heeroyuy Date: 2008-11-02 12:53:29 +0000 (Sun, 02 Nov 2008) Log Message: ----------- -bugfixes Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/tools/protege/ActionHandler.java trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerModel.java trunk/src/dl-learner/org/dllearner/tools/protege/OWLClassDescriptionEditorWithDLLearnerTab.java trunk/src/dl-learner/org/dllearner/tools/protege/OWLEquivalentClassesAxiomFrameSection.java trunk/src/dl-learner/org/dllearner/tools/protege/ProtegePlugin.java Modified: trunk/src/dl-learner/org/dllearner/tools/protege/ActionHandler.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/ActionHandler.java 2008-10-28 15:32:03 UTC (rev 1487) +++ trunk/src/dl-learner/org/dllearner/tools/protege/ActionHandler.java 2008-11-02 12:53:29 UTC (rev 1488) @@ -117,17 +117,13 @@ if (z.getActionCommand().equals("ADD")) { if (evaluatedDescription != null) { - model - .changeDLLearnerDescriptionsToOWLDescriptions(evaluatedDescription - .getDescription()); + model.changeDLLearnerDescriptionsToOWLDescriptions(evaluatedDescription.getDescription()); } else { - model - .changeDLLearnerDescriptionsToOWLDescriptions((Description) view - .getSuggestClassPanel().getSuggestList() - .getSelectedValue()); + model.changeDLLearnerDescriptionsToOWLDescriptions((Description) view.getSuggestClassPanel().getSuggestList().getSelectedValue()); } String message = "Concept added"; view.renderErrorMessage(message); + view.updateWindow(); } if (z.getActionCommand().equals("?")) { Modified: trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerModel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerModel.java 2008-10-28 15:32:03 UTC (rev 1487) +++ trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerModel.java 2008-11-02 12:53:29 UTC (rev 1488) @@ -249,7 +249,6 @@ .getPosAndNegSelectPanel().getMaxNrOfResultsModelData(), view .getPosAndNegSelectPanel().getMinAccuracyModelData(), true); for (int j = 0; j < evalDescriptions.size(); j++) { - System.out.println("KLICKEN: "+ evalDescriptions.get(j).getNotCoveredPositives()); if (isConsistent(evalDescriptions.get(j))) { suggestModel.add(j, new SuggestListItem(Color.GREEN, evalDescriptions.get(j).getDescription() @@ -490,8 +489,10 @@ public void unsetNewConcepts() { while (owlDescription.iterator().hasNext()) { owlDescription.remove(owlDescription.iterator().next()); + } } + /** * This method sets the individuals that belong to the concept which is @@ -738,6 +739,7 @@ .hasNext();) { OWLDescription oldOWLAPI = OWLAPIDescriptionConvertVisitor .getOWLDescription(k.next()); + oldConceptOWLAPI = oldOWLAPI; ds.add(oldOWLAPI); } @@ -763,8 +765,8 @@ if (id.equals("Equivalent classes")) { axiomOWLAPI = factory.getOWLEquivalentClassesAxiom(ds); } else { - axiomOWLAPI = factory.getOWLSubClassAxiom(oldConceptOWLAPI, - newConceptOWLAPI); + axiomOWLAPI = factory.getOWLSubClassAxiom(newConceptOWLAPI, + oldConceptOWLAPI); } OWLOntology onto = editor.getModelManager().getActiveOntology(); AddAxiom axiom = new AddAxiom(onto, axiomOWLAPI); Modified: trunk/src/dl-learner/org/dllearner/tools/protege/OWLClassDescriptionEditorWithDLLearnerTab.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/OWLClassDescriptionEditorWithDLLearnerTab.java 2008-10-28 15:32:03 UTC (rev 1487) +++ trunk/src/dl-learner/org/dllearner/tools/protege/OWLClassDescriptionEditorWithDLLearnerTab.java 2008-11-02 12:53:29 UTC (rev 1488) @@ -82,8 +82,6 @@ private OWLEditorKit editorKit; - //private OWLDescriptionChecker checker; - private ExpressionEditor<OWLDescription> editor; private JComponent editingComponent; @@ -120,7 +118,7 @@ //checker = new OWLDescriptionChecker(editorKit); editor = new ExpressionEditor<OWLDescription>(editorKit, editorKit.getModelManager().getOWLExpressionCheckerFactory().getOWLDescriptionChecker()); editor.setExpressionObject(description); - dllearner = new DLLearnerView(frame, label); + dllearner = new DLLearnerView(frame, label, this); action = new ActionHandler(this.action, null, dllearner, null, editorKit); tabbedPane = new JTabbedPane(); @@ -136,6 +134,7 @@ tabbedPane.add(SUGGEST_SUBCLASS_LABEL, dllearner); } } + // tabbedPane.add(CLASS_EXPRESSION_EDITOR_LABEL, new JScrollPane(editor)); if (description == null || !description.isAnonymous()) { classSelectorPanel = new OWLClassSelectorPanel(editorKit); @@ -154,6 +153,7 @@ tabbedPane.addChangeListener(changeListener); } + } private void handleVerifyEditorContents() { @@ -205,6 +205,7 @@ public void clear() { dllearner.unsetEverything(); dllearner.makeView(); + handleVerifyEditorContents(); // initialDescription = null; editor.setText(""); @@ -285,10 +286,12 @@ */ public void removeStatusChangedListener( InputVerificationStatusChangedListener listener) { + //TODO: Suchen + //System.out.println("Comp: "+editorKit.getWorkspace().getComponents()); listeners.remove(listener); editor.removeStatusChangedListener(listener); } - + /** * This class is responsible for the view of the dllearner. It renders the * output for the user and is the graphical component of the plugin. @@ -363,9 +366,11 @@ * * @param current OWLFrame * @param label String + * @param dlLearner OWLClassDescriptionEditorWithDLLearnerTab */ - public DLLearnerView(OWLFrame<OWLClass> current, String label) { + public DLLearnerView(OWLFrame<OWLClass> current, String label, OWLClassDescriptionEditorWithDLLearnerTab dlLearner) { classSelectorPanel = new OWLClassSelectorPanel(editorKit); + mainWindow = dlLearner; classSelectorPanel.firePropertyChange("test", false, true); URL iconUrl = this.getClass().getResource("arrow.gif"); icon = new ImageIcon(iconUrl); @@ -397,6 +402,7 @@ addAcceptButtonListener(this.action); addRunButtonListener(this.action); addAdvancedButtonListener(this.action); + } /** @@ -504,8 +510,14 @@ public JButton getAddButton() { return accept; } - /** + * This Method updates the the view of protege after + * adding a new concept. + */ + public void updateWindow() { + mainWindow.getHandler().handleEditingFinished(mainWindow.getEditedObjects()); + } + /** * Returns all added descriptions. * @return Set(OWLDescription) */ @@ -569,7 +581,6 @@ * Destroys the view after the plugin is closed. */ public void dispose() { - System.out.println("dispose"); } /** Modified: trunk/src/dl-learner/org/dllearner/tools/protege/OWLEquivalentClassesAxiomFrameSection.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/OWLEquivalentClassesAxiomFrameSection.java 2008-10-28 15:32:03 UTC (rev 1487) +++ trunk/src/dl-learner/org/dllearner/tools/protege/OWLEquivalentClassesAxiomFrameSection.java 2008-11-02 12:53:29 UTC (rev 1488) @@ -73,6 +73,7 @@ @Override protected void clear() { + added.clear(); } /** Modified: trunk/src/dl-learner/org/dllearner/tools/protege/ProtegePlugin.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/ProtegePlugin.java 2008-10-28 15:32:03 UTC (rev 1487) +++ trunk/src/dl-learner/org/dllearner/tools/protege/ProtegePlugin.java 2008-11-02 12:53:29 UTC (rev 1488) @@ -45,8 +45,8 @@ public void initialiseClassView() throws Exception { list = new OWLFrameList2<OWLClass>(getOWLEditorKit(), new ButtonList(getOWLEditorKit())); setLayout(new BorderLayout()); - JScrollPane hallo = new JScrollPane(list); - add(hallo); + JScrollPane dlLearner = new JScrollPane(list); + add(dlLearner); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |