de.cau.cs.kieler.keg.importer
Class ImportManager

java.lang.Object
  extended by de.cau.cs.kieler.keg.importer.ImportManager

public final class ImportManager
extends Object

A singleton class for accessing KEG graph import functionality.

Rating red

Field Summary
static ImporterOption<Boolean> OPTION_OPEN_DIAGRAM
          the option for the automatic opening of the diagram file.
 
Method Summary
 void addImporter(AbstractImporter imp)
          Registers a graph importer.
 String[] getExtensions()
          Returns all registered extensions.
 List<AbstractImporter> getImporter()
          Returns all registered importers.
 AbstractImporter getImporterByExtension(String extension)
          Returns an importer which supports the given file extension or null if no such importer is registered.
 AbstractImporter getImporterByName(String name)
          Returns the importer with the given name or null if no such importer exists.
 String[] getImporterNames()
          Returns an array containing the names of all registered importers.
static ImportManager getInstance()
          Returns the singleton instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OPTION_OPEN_DIAGRAM

public static final ImporterOption<Boolean> OPTION_OPEN_DIAGRAM
the option for the automatic opening of the diagram file.

Method Detail

getInstance

public static ImportManager getInstance()
Returns the singleton instance.

Returns:
the singleton instance

addImporter

public void addImporter(AbstractImporter imp)
Registers a graph importer.

Parameters:
imp - the importer

getImporter

public List<AbstractImporter> getImporter()
Returns all registered importers.

Returns:
a list of registered importer

getImporterNames

public String[] getImporterNames()
Returns an array containing the names of all registered importers.

Returns:
an array containing the names of registered importers

getImporterByName

public AbstractImporter getImporterByName(String name)
Returns the importer with the given name or null if no such importer exists.

Parameters:
name - the importers name
Returns:
the importer or null if no importer with the given name exists

getExtensions

public String[] getExtensions()
Returns all registered extensions.

Returns:
the extensions

getImporterByExtension

public AbstractImporter getImporterByExtension(String extension)
Returns an importer which supports the given file extension or null if no such importer is registered.

Parameters:
extension - the extension
Returns:
the importer or null if no matching importer is registered