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

java.lang.Object
  extended by de.cau.cs.kieler.keg.importer.AbstractImporter
All Implemented Interfaces:
IImporter
Direct Known Subclasses:
DotImporter, GraphMLImporter, KGraphImporter, OGMLImporter

public abstract class AbstractImporter
extends Object
implements IImporter

The base class for a KEG importer.

Rating red

Constructor Summary
AbstractImporter()
           
 
Method Summary
<T> void
addOption(ImporterOption<T> option)
          Adds an option to the importer.
 void doDiagramPostProcess(IPath diagramPath, IPropertyHolder theOptions)
          Performs a post process on the created KEG diagram file using the given options; is only called when a diagram file is created automatically in the import process.
 void doModelPostProcess(IPath modelPath, IPropertyHolder theOptions)
          Performs a post processing on the created KEG model instance file using the given options.
abstract  String getDefaultExtension()
          Returns the default file extension for this exporter.
abstract  String[] getExtensions()
          Returns the importers supported file extensions.
abstract  String getName()
          Returns the name of the file format the exporter is exporting to.
 List<ImporterOption<?>> getOptions()
          Returns the options that are available for this importer.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface de.cau.cs.kieler.keg.importer.IImporter
doImport
 

Constructor Detail

AbstractImporter

public AbstractImporter()
Method Detail

getName

public abstract String getName()
Returns the name of the file format the exporter is exporting to.

Returns:
the name of the file format

getDefaultExtension

public abstract String getDefaultExtension()
Returns the default file extension for this exporter.

Returns:
the default file extension

getExtensions

public abstract String[] getExtensions()
Returns the importers supported file extensions.

Returns:
the supported file extensions

getOptions

public List<ImporterOption<?>> getOptions()
Returns the options that are available for this importer.

Returns:
the exporters options

addOption

public <T> void addOption(ImporterOption<T> option)
Adds an option to the importer. This option with the chosen values can be received from the configuration that is passed to the import method.

Type Parameters:
T - the option value type
Parameters:
option - the option

toString

public String toString()

Overrides:
toString in class Object

doModelPostProcess

public void doModelPostProcess(IPath modelPath,
                               IPropertyHolder theOptions)
Performs a post processing on the created KEG model instance file using the given options.

Specified by:
doModelPostProcess in interface IImporter
Parameters:
modelPath - the model file path
theOptions - the options

doDiagramPostProcess

public void doDiagramPostProcess(IPath diagramPath,
                                 IPropertyHolder theOptions)
Performs a post process on the created KEG diagram file using the given options; is only called when a diagram file is created automatically in the import process.

Specified by:
doDiagramPostProcess in interface IImporter
Parameters:
diagramPath - the diagram file path
theOptions - the options