public final class MetaModelHandler
extends java.lang.Object
AnalysisController
, which manages the handling of the meta model instances.Modifier and Type | Class and Description |
---|---|
static class |
MetaModelHandler.PluginConnection |
static class |
MetaModelHandler.RepositoryConnection |
Modifier and Type | Method and Description |
---|---|
static void |
checkPorts(MIPlugin mPlugin,
AbstractPlugin plugin)
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)
Converts the given configuration into a list of
MIProperty s using the given factory. |
static MIInputPort |
findInputPort(MIFilter mPlugin,
java.lang.String name)
Searches for an input port within the given plugin with the given name.
|
static MIOutputPort |
findOutputPort(MIPlugin mPlugin,
java.lang.String name)
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)
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)
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)
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)
This method can be used to convert a given list of
MIProperty to a configuration object. |
static void |
saveProjectToFile(java.io.File file,
MIProject project)
Saves the given meta model project to the given file.
|
public static final void saveProjectToFile(java.io.File file, MIProject project) throws java.io.IOException
file
- The file in which the project will be stored.project
- The meta model project.java.io.IOException
- If something went wrong during the saving.public static final MIProject loadProjectFromFile(java.io.File file) throws java.io.IOException
file
- The file to load the model from.java.io.IOException
- If something went wrong during the loading.public static final Configuration modelPropertiesToConfiguration(org.eclipse.emf.common.util.EList<MIProperty> mProperties)
MIProperty
to a configuration object.mProperties
- The properties to be converted.public static void checkPorts(MIPlugin mPlugin, AbstractPlugin plugin) throws AnalysisConfigurationException
mPlugin
- The model instance of the plugin.plugin
- The corresponding "real" plugin.AnalysisConfigurationException
- If an invalid port has been detected.public static java.util.List<MIProperty> convertProperties(Configuration configuration, MAnalysisMetaModelFactory factory)
MIProperty
s using the given factory.configuration
- The configuration to be converted.factory
- The factory to be used to create the model instances.public static final MIInputPort findInputPort(MIFilter mPlugin, java.lang.String name)
mPlugin
- The plugin which will be searched through.name
- The name of the searched input port.public static final MIOutputPort findOutputPort(MIPlugin mPlugin, java.lang.String name)
mPlugin
- The plugin which will be searched through.name
- The name of the searched output port.public static final 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 AnalysisConfigurationException
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.AnalysisConfigurationException
- If the given analysis components are somehow invalid connected.public static final 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 AnalysisConfigurationException
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).AnalysisConfigurationException
- If the given meta model instance is somehow invalid configured.Copyright 2020 Kieker Project, http://kieker-monitoring.net