All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.protege.editor.owl.ui.action.MergeOntologiesAction Maven / Gradle / Ivy

Go to download

OWL ontology editing infrastructure used by the Protege desktop application.

The newest version!
package org.protege.editor.owl.ui.action;

import org.protege.editor.core.ui.wizard.Wizard;
import org.protege.editor.owl.model.refactor.ontology.OntologyMerger;
import org.protege.editor.owl.ui.ontology.wizard.merge.MergeOntologiesWizard;
import org.semanticweb.owlapi.model.OWLOntology;

import java.awt.event.ActionEvent;
import java.util.Set;


/**
 * Author: Matthew Horridge
* The University Of Manchester
* Medical Informatics Group
* Date: 02-Jul-2006

* [email protected]
* www.cs.man.ac.uk/~horridgm

*/ public class MergeOntologiesAction extends ProtegeOWLAction { public void actionPerformed(ActionEvent e) { MergeOntologiesWizard wizard = new MergeOntologiesWizard(getOWLEditorKit()); if (wizard.showModalDialog() == Wizard.FINISH_RETURN_CODE) { Set ontologies = wizard.getOntologiesToMerge(); OWLOntology ont = wizard.getOntologyToMergeInto(); OntologyMerger merger = new OntologyMerger(getOWLModelManager().getOWLOntologyManager(), ontologies, ont); merger.mergeOntologies(); } } public void initialise() throws Exception { } public void dispose() { } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy