MetaDone
metadone.client.functions.importer.Importer.AbstractImporter Class Reference
Inheritance diagram for metadone.client.functions.importer.Importer.AbstractImporter:
Collaboration diagram for metadone.client.functions.importer.Importer.AbstractImporter:

List of all members.

Public Member Functions

 AbstractImporter (String metamodelName, String[] extensions)
String getMetamodelName (String ext) throws BadPreCondition
ConcreteModel createConcreteModel (String ext, String source) throws BadPreCondition, IOException
MetaModel getMetamodel (String ext) throws BadPreCondition

Protected Member Functions

String getMetamodelName ()
abstract MetaModel createMetamodel (Workspace workspace) throws BadPreCondition

Static Protected Member Functions

static MetaModel findMetamodel (Workspace workspace, String name)

Private Attributes

final String[] extensions
final String metamodelName

Detailed Description

An importer that imports models using a single metamodel.


Constructor & Destructor Documentation

metadone.client.functions.importer.Importer.AbstractImporter.AbstractImporter ( String  metamodelName,
String[]  extensions 
)

Member Function Documentation

ConcreteModel metadone.client.functions.importer.Importer.AbstractImporter.createConcreteModel ( String  ext,
String  source 
) throws BadPreCondition, IOException

Creates a concrete model for a given extension and a source file.

Parameters:
extThe extension
sourceThe source file
Returns:
A concrete metamodel
Exceptions:
BadPreConditionwhen the model couldn't be created
IOExceptionwhen there was an exception while reading the file

Implements metadone.client.functions.importer.Importer.

Reimplemented in metadone.client.functions.importer.owl.OWLImporter.

abstract MetaModel metadone.client.functions.importer.Importer.AbstractImporter.createMetamodel ( Workspace  workspace) throws BadPreCondition [protected, pure virtual]

Creates a new metamodel.

Parameters:
workspaceThe workspace
Returns:
The created metamodel
Exceptions:
BadPreCondition

Implemented in metadone.client.functions.importer.GrasylaImporter, metadone.client.functions.importer.km3.KM3Importer, and metadone.client.functions.importer.owl.OWLImporter.

static MetaModel metadone.client.functions.importer.Importer.AbstractImporter.findMetamodel ( Workspace  workspace,
String  name 
) [static, protected]

Finds a metamodel by name using a workspace.

Parameters:
workspaceThe workspace
nameThe name of the metamodel
Returns:
The metamodel or null

References metadone.metabusiness.Workspace.getMainMetaModel(), metadone.metabusiness.MetaModel.getMOByName(), and metadone.metabusiness.WorkspaceObject.narrow2MetaModel().

Referenced by metadone.client.functions.importer.owl.OWLImporter.createMetamodel().

MetaModel metadone.client.functions.importer.Importer.AbstractImporter.getMetamodel ( String  ext) throws BadPreCondition

Creates a metamodel for the given extension.

Parameters:
extThe extension (may be null)
Returns:
A metamodel or null
Exceptions:
BadPreCondition

Implements metadone.client.functions.importer.Importer.

References metadone.client.MainClientMetadone.getSingleton(), and metadone.client.MainClientMetadone.getWorkspace().

Referenced by metadone.client.functions.importer.km3.KM3Importer.createConcreteModel().

String metadone.client.functions.importer.Importer.AbstractImporter.getMetamodelName ( ) [protected]

Gets the name of the metamodel created by this importer.

Returns:
The name of the metamodel

Referenced by metadone.client.functions.importer.km3.KM3Importer.createMetamodel().

String metadone.client.functions.importer.Importer.AbstractImporter.getMetamodelName ( String  ext) throws BadPreCondition

Returns the name of the metamodel for the given extension.

If the extension is supported, a name of the metamodel is returned. null is returned when the extension is not supported.

Parameters:
extThe extension (may be null)
Returns:
The name of a metamodel or null
Exceptions:
BadPreCondition

Implements metadone.client.functions.importer.Importer.


Member Data Documentation


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations