Package kieker.analysis.stage.model
Class MetaModelHandler
java.lang.Object
kieker.analysis.stage.model.MetaModelHandler
@Deprecated
public final class MetaModelHandler
extends java.lang.Object
Deprecated.
since 1.15 can be removed with the old TraceAnalysis
This is a helper class for the
AnalysisController
, which manages the handling
of the meta model instances.- Since:
- 1.8
- Author:
- Andre van Hoorn, Nils Christian Ehmke, Jan Waller
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MetaModelHandler.PluginConnection
Deprecated.static class
MetaModelHandler.RepositoryConnection
Deprecated. -
Method Summary
Modifier and Type Method Description static void
checkPorts(MIPlugin mPlugin, AbstractPlugin plugin)
Deprecated.This method checks the ports of the given model plugin against the ports of the actual plugin.static java.util.List<MIProperty>
convertProperties(Configuration configuration, MAnalysisMetaModelFactory factory)
Deprecated.Converts the given configuration into a list ofMIProperty
s using the given factory.static MIInputPort
findInputPort(MIFilter mPlugin, java.lang.String name)
Deprecated.Searches for an input port within the given plugin with the given name.static MIOutputPort
findOutputPort(MIPlugin mPlugin, java.lang.String name)
Deprecated.Searches for an output port within the given plugin with the given name.static MIProject
javaToMetaModel(java.util.Collection<AbstractReaderPlugin> readers, java.util.Collection<AbstractFilterPlugin> filters, java.util.Collection<AbstractRepository> repositories, java.util.Collection<MIDependency> dependencies, java.lang.String projectName, Configuration globalConfiguration)
Deprecated.This method can be used to convert the current analysis configuration (which is represented by Java objects) into a meta model.static MIProject
loadProjectFromFile(java.io.File file)
Deprecated.Loads a meta model project instance from the given file.static void
metaModelToJava(MIProject mProject, AnalysisController ac, java.util.Collection<MetaModelHandler.PluginConnection> pluginConnections, java.util.Collection<MetaModelHandler.RepositoryConnection> repositoryConnections, java.util.Collection<MIDependency> dependencies, java.lang.ClassLoader classLoader, Configuration globalConfiguration, java.util.Map<MIRepository,AbstractRepository> repositoryMap, java.util.Map<MIPlugin,AbstractPlugin> pluginMap)
Deprecated.This method can be used to convert a given analysis meta model instance to the actual java instances.static Configuration
modelPropertiesToConfiguration(org.eclipse.emf.common.util.EList<MIProperty> mProperties)
Deprecated.This method can be used to convert a given list ofMIProperty
to a configuration object.static void
saveProjectToFile(java.io.File file, MIProject project)
Deprecated.Saves the given meta model project to the given file.
-
Method Details
-
saveProjectToFile
public static void saveProjectToFile(java.io.File file, MIProject project) throws java.io.IOExceptionDeprecated.Saves the given meta model project to the given file.- Parameters:
file
- The file in which the project will be stored.project
- The meta model project.- Throws:
java.io.IOException
- If something went wrong during the saving.
-
loadProjectFromFile
Deprecated.Loads a meta model project instance from the given file.- Parameters:
file
- The file to load the model from.- Returns:
- The meta model instance.
- Throws:
java.io.IOException
- If something went wrong during the loading.
-
modelPropertiesToConfiguration
public static Configuration modelPropertiesToConfiguration(org.eclipse.emf.common.util.EList<MIProperty> mProperties)Deprecated.This method can be used to convert a given list ofMIProperty
to a configuration object.- Parameters:
mProperties
- The properties to be converted.- Returns:
- A filled configuration object.
-
checkPorts
public static void checkPorts(MIPlugin mPlugin, AbstractPlugin plugin) throws AnalysisConfigurationExceptionDeprecated.This method checks the ports of the given model plugin against the ports of the actual plugin. If there are ports which are in the model instance, but not in the "real" plugin, an exception is thrown. This method should be called during the creation of an AnalysisController via a configuration file to find invalid (outdated) ports.- Parameters:
mPlugin
- The model instance of the plugin.plugin
- The corresponding "real" plugin.- Throws:
AnalysisConfigurationException
- If an invalid port has been detected.
-
convertProperties
public static java.util.List<MIProperty> convertProperties(Configuration configuration, MAnalysisMetaModelFactory factory)Deprecated.Converts the given configuration into a list ofMIProperty
s using the given factory.- Parameters:
configuration
- The configuration to be converted.factory
- The factory to be used to create the model instances.- Returns:
- A list of model instances.
-
findInputPort
Deprecated.Searches for an input port within the given plugin with the given name.- Parameters:
mPlugin
- The plugin which will be searched through.name
- The name of the searched input port.- Returns:
- The searched port or null, if it is not available.
-
findOutputPort
Deprecated.Searches for an output port within the given plugin with the given name.- Parameters:
mPlugin
- The plugin which will be searched through.name
- The name of the searched output port.- Returns:
- The searched port or null, if it is not available.
-
javaToMetaModel
public static MIProject javaToMetaModel(java.util.Collection<AbstractReaderPlugin> readers, java.util.Collection<AbstractFilterPlugin> filters, java.util.Collection<AbstractRepository> repositories, java.util.Collection<MIDependency> dependencies, java.lang.String projectName, Configuration globalConfiguration) throws AnalysisConfigurationExceptionDeprecated.This method can be used to convert the current analysis configuration (which is represented by Java objects) into a meta model.- Parameters:
readers
- The readers within the analysis.filters
- The filters within the analysis.repositories
- The repositories within the analysis.dependencies
- The dependencies of the analysis.projectName
- The name of the project.globalConfiguration
- The global project configuration.- Returns:
- A meta model instance, representing the given analysis.
- Throws:
AnalysisConfigurationException
- If the given analysis components are somehow invalid connected.
-
metaModelToJava
public static void metaModelToJava(MIProject mProject, AnalysisController ac, java.util.Collection<MetaModelHandler.PluginConnection> pluginConnections, java.util.Collection<MetaModelHandler.RepositoryConnection> repositoryConnections, java.util.Collection<MIDependency> dependencies, java.lang.ClassLoader classLoader, Configuration globalConfiguration, java.util.Map<MIRepository,AbstractRepository> repositoryMap, java.util.Map<MIPlugin,AbstractPlugin> pluginMap) throws AnalysisConfigurationExceptionDeprecated.This method can be used to convert a given analysis meta model instance to the actual java instances.- Parameters:
mProject
- The meta model project.ac
- The analysis controller which will be the parent of the new analysis.pluginConnections
- The connections between the plugins (this object will be filled by the method).repositoryConnections
- The connections between filters and repositories (this object will be filled by the method).dependencies
- The dependencies of the analysis (this object will be filled by the method).classLoader
- The class loader which will be used to create the analysis components.globalConfiguration
- The global project configuration (this object will be filled by the method).repositoryMap
- The mapping between the created repositories and the meta model instances (this object will be filled by the method).pluginMap
- The mapping between the created plugins and the meta model instances (this object will be filled by the method).- Throws:
AnalysisConfigurationException
- If the given meta model instance is somehow invalid configured.
-