Protégé-OWL 3.4.1

edu.stanford.smi.protegex.owl.model.util
Class ImportHelper

java.lang.Object
  extended by edu.stanford.smi.protegex.owl.model.util.ImportHelper

public class ImportHelper
extends Object

User: matthewhorridge
The University Of Manchester
Medical Informatics Group
Date: Jan 18, 2006

matthew.horridge@cs.man.ac.uk
www.cs.man.ac.uk/~horridgm


Constructor Summary
ImportHelper(OWLModel owlModel)
          Creates an import helper that will import ontologies into the specified OWLModel.
 
Method Summary
 void addImport(InputStream is)
          Adds the ontology in an input stream to the set of ontologies that will be imported.
 void addImport(URI ontologyURI)
          Adds an ontology to the set of ontologies that will be imported.
 void importOntologies()
          Imports the ontologies that this helper was asked to import.
 void importOntologies(boolean reloadGUI)
          Alternative method that allows the caller to block the GUI reload (for example when initialising TabPlugins)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImportHelper

public ImportHelper(OWLModel owlModel)
Creates an import helper that will import ontologies into the specified OWLModel. The pattern of usage is:
  1. Create an instance specifying the OWLModel to be used in the constructor
  2. Add the ontology URIs of the ontologies to be imported using the addImport method.
  3. Finally call the importOntologies method, which will do the actual importing (and reloading of the UI if necessary).

Method Detail

addImport

public void addImport(URI ontologyURI)
Adds an ontology to the set of ontologies that will be imported. Note that this does not actually import the ontologies - it merely adds them to the list of ontologies to be imported. To perform the actual imports, use the importOntologies() method.

Parameters:
ontologyURI - The URI of the ontology to import

addImport

public void addImport(InputStream is)
Adds the ontology in an input stream to the set of ontologies that will be imported. Note that this does not actually import the ontology - it merely adds it to the list of ontologies to be imported. To perform the actual imports use the importOntologes() method.


importOntologies

public void importOntologies()
                      throws edu.stanford.smi.protege.exception.OntologyLoadException
Imports the ontologies that this helper was asked to import. If the Protege-OWL Application GUI is being used, then the UI is reloaded. Use the alternative reloadGUI(boolean) in TabWidget initialisation code to prevent the GUI being reloaded

Throws:
edu.stanford.smi.protege.exception.OntologyLoadException

importOntologies

public void importOntologies(boolean reloadGUI)
                      throws edu.stanford.smi.protege.exception.OntologyLoadException
Alternative method that allows the caller to block the GUI reload (for example when initialising TabPlugins)

Parameters:
reloadGUI - - false if no GUI reload is desired
Throws:
edu.stanford.smi.protege.exception.OntologyLoadException

Protégé-OWL 3.4.1

Submit a bug report or feature request
Copyright (c) 1998-2009 Stanford University.