|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.sintef.mofscript.runtime.ExecutionManager
public class ExecutionManager
Field Summary | |
---|---|
protected org.eclipse.emf.ecore.EcoreFactory |
_ecoreFactory
|
protected org.eclipse.emf.ecore.EcorePackage |
_ecorePackage
|
protected RuleExecutionStack |
_executionStack
|
protected org.modelware.modelbus.adapter.frm.FileResourcesType |
_filUML2eModel
|
protected MOFScriptModelFactory |
_mttModelFactory
|
protected ExecutionEnvironment |
_rootEnv
|
protected java.util.Hashtable |
_sourceMetaModels
|
protected org.eclipse.emf.ecore.EObject |
_sourceModel
|
protected org.eclipse.emf.ecore.EPackage |
_targetMetaModel
|
protected org.eclipse.emf.ecore.EObject |
_targetModel
|
protected TransformationProxy |
_transformationProxy
|
protected boolean |
_useFileModel
|
protected boolean |
_useTraceability
|
Constructor Summary | |
---|---|
protected |
ExecutionManager()
|
Method Summary | |
---|---|
protected boolean |
checkRSAAvailability()
Checks availability of IBM RSA |
void |
clearSourceMetaModels()
|
void |
clearTransformationModel()
|
org.eclipse.emf.ecore.EObject |
createFeatureFromName(java.lang.String featureName,
org.eclipse.emf.ecore.EPackage metamodel)
|
void |
executeTransformation()
executes a transformation |
org.eclipse.emf.ecore.EStructuralFeature |
findFeatureForEcoreConcept(java.lang.String ecoreConcept,
java.lang.String feature)
|
org.eclipse.emf.ecore.EStructuralFeature |
findFeatureForSourceConcept(java.lang.String metamodelconcept,
java.lang.String feature)
Locates a feature for a given metamodel concept in the source metamodel |
org.eclipse.emf.ecore.EStructuralFeature |
findFeatureForSourceRootConcept(java.lang.String metamodelName,
java.lang.String feature)
|
org.eclipse.emf.ecore.EStructuralFeature |
findFeatureForTargetConcept(java.lang.String metamodelconcept,
java.lang.String feature)
Locates a feature for a given metamodel concept in the target metamodel |
org.eclipse.emf.ecore.EClass |
findSourceMetaModelConcept(java.lang.String concept)
|
org.eclipse.emf.ecore.EClass |
findTargetMetaModelConcept(java.lang.String concept)
|
java.util.List |
getAllClassifiersForPackage(org.eclipse.emf.ecore.EPackage pkg)
|
java.util.List |
getAllClassifiersForSourceMetaModel()
|
static java.util.Set |
getAllSuperRuleNames(MOFScriptTransformation transformation)
|
static java.util.Set |
getAllSuperRules(MOFScriptTransformation transformation)
|
org.eclipse.emf.ecore.EClassifier |
getClassifierForPackage(org.eclipse.emf.ecore.EPackage pkg,
java.lang.String clazzifierName)
|
org.eclipse.emf.ecore.EPackage |
getEcoreMetaModel()
|
static ExecutionManager |
getExecutionManager()
|
RuleExecutionStack |
getExecutionStack()
|
static org.eclipse.emf.ecore.EStructuralFeature |
getFeatureForClass(org.eclipse.emf.ecore.EClass clazz,
java.lang.String feature)
Retrieves a named features for a class. |
org.eclipse.emf.ecore.EObject |
getFeatureForName(java.lang.String featureName)
Retrieves a feature object from the source metamodel (or one of the meta models) Currently uses the sourceMetaModel |
static java.util.List |
getFeaturesForClass(org.eclipse.emf.ecore.EClass clazz)
Fetches all features (structural features) of a class, including inherited ones Also fetches features of un |
org.modelware.modelbus.adapter.frm.FileResourcesType |
getFileModel()
The file model is only populated when the "useFileModel" property is set. |
java.util.logging.Logger |
getLog()
Gets the value of log usage |
org.eclipse.emf.ecore.EClassifier |
getMetaModelReference(java.lang.String refName)
|
static java.util.List |
getMMTokens(org.eclipse.emf.ecore.EPackage metaModel)
Returns a list of strings containing the names of the concepts defined in the metamodel given in the input parameter |
MOFScriptModelFactory |
getModelFactory()
|
static java.lang.String |
getObjectAttributeValue(org.eclipse.emf.ecore.EObject object,
java.lang.String featureName)
Returns the value of a given attribute for a specific object |
static java.lang.String |
getObjectNameValue(org.eclipse.emf.ecore.EObject object)
Returns the value of the 'name' attribute for a specific object |
protected java.util.Collection |
getObjectsByType(org.eclipse.emf.common.util.TreeIterator treeIt,
org.eclipse.emf.ecore.EClass type)
|
java.util.Vector |
getProducedResources()
|
java.lang.Object |
getRealObject(java.lang.Object mightBeProxy)
checks if an object is a proxy and resolves it |
org.eclipse.emf.ecore.resource.Resource |
getResource(org.eclipse.emf.common.util.URI uri)
|
org.eclipse.emf.ecore.resource.ResourceSet |
getResourceSet()
|
java.util.Map |
getRulesForConcept(java.lang.String concept)
|
java.util.List |
getRulesForConcept2(java.lang.String concept)
|
org.eclipse.emf.ecore.EPackage |
getSourceMetaModel()
|
org.eclipse.emf.ecore.EPackage |
getSourceMetaModel(java.lang.String name)
|
java.util.List |
getSourceMMTokens()
|
org.eclipse.emf.ecore.EObject |
getSourceModel()
|
org.eclipse.emf.ecore.EPackage |
getTargetMetaModel()
|
java.util.List |
getTargetMMTokens()
|
TransformationProxy |
getTransformationProxy()
|
TransformationRule |
getTransformationRule2(java.lang.String name,
java.lang.String possibleScope,
java.lang.String ownerTransformation)
Deprecated. |
java.util.Collection |
getTransformationRules(java.lang.String name,
java.lang.String possibleScope,
java.lang.String ownerTransformation)
Returns all rules with the same name |
MOFScriptSpecification |
getTransformationSpecification()
|
boolean |
getUMLIsAvailable()
Gets the property for UML2 availability |
boolean |
getUseTraceability()
|
protected org.eclipse.emf.ecore.EObject |
loadRSAModel(java.io.File srcFile)
RSA extension for loading RSA models |
void |
loadSourceMetaModel_111(java.io.File sourceFile)
Loads the source meta model from a file into the set of models |
void |
loadSourceMetaModel(java.lang.String uri)
|
void |
loadSourceModel(java.io.File sourceFile)
Loads the source model from a file into the set of models needed to perform a transformation The source model needs to be in accordance with the source meta model |
void |
loadTransformationModel(java.io.File sourcefile)
Loads a transformation model from a file |
org.eclipse.emf.ecore.EPackage |
lookupAndSetSourceMetaModel(java.lang.String mmName)
|
java.util.Hashtable |
lookupMetaModels()
Looks up metamodels |
org.eclipse.emf.ecore.EPackage |
lookupPackageRegistry_111(java.lang.String name)
Looks up a package name from the package registry |
org.eclipse.emf.ecore.EPackage |
lookupResourceMetaModel(java.lang.String mmUri)
|
org.eclipse.emf.ecore.EPackage |
lookupResourceMetaModelByName(java.lang.String name)
|
void |
messageEvent(java.lang.String message)
|
protected void |
registerAnonymousPackage(java.lang.Class toRegister)
Dynamically registry a package, based on the class |
protected void |
registerExternalResources()
Registers resources which might not be available, such as UML2 |
protected void |
registerNotationPackages()
RSA-specific variabilities |
protected void |
registerUML2Resources()
UML 2-specific variability |
protected boolean |
ruleIsForConcept(TransformationRule r,
java.lang.String concept)
|
void |
saveTargetModel(java.io.File targetFile)
Saves the target model to the file given as parameter The file is saved in XMI for the target meta model (or rather the chosen root element of that meta model) |
void |
setFileMetaModelRepository(java.lang.String directory)
|
void |
setRootDirectory(java.lang.String rootDir)
Sets the root directory for output generation |
void |
setSourceModel(org.eclipse.emf.ecore.EObject model)
|
protected void |
setSourceModelResource(org.eclipse.emf.ecore.resource.Resource res)
Fetches the model object from a resource and sets the sourceModel |
void |
setTransformationModel(MOFScriptTransformation transformation)
|
void |
setTransformationProxy(TransformationProxy trProxy)
|
void |
setTransformationSpecification(MOFScriptSpecification transformationSpec)
|
void |
setUMLIsAvailable(boolean umlIsAvailable)
Sets the property for UML2 availability |
void |
setUseFileModel(boolean useFileModel)
|
void |
setUseLog(boolean useLog)
Turns on/off the usage of logging in MOFScript |
void |
setUseTraceability(boolean useIt)
Turns traceability functionality on / off |
protected void |
updatePackageRegistry()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected org.eclipse.emf.ecore.EcorePackage _ecorePackage
protected org.eclipse.emf.ecore.EcoreFactory _ecoreFactory
protected java.util.Hashtable _sourceMetaModels
protected org.eclipse.emf.ecore.EPackage _targetMetaModel
protected org.eclipse.emf.ecore.EObject _sourceModel
protected org.eclipse.emf.ecore.EObject _targetModel
protected boolean _useTraceability
protected ExecutionEnvironment _rootEnv
protected RuleExecutionStack _executionStack
protected MOFScriptModelFactory _mttModelFactory
protected TransformationProxy _transformationProxy
protected boolean _useFileModel
protected org.modelware.modelbus.adapter.frm.FileResourcesType _filUML2eModel
Constructor Detail |
---|
protected ExecutionManager()
Method Detail |
---|
public static ExecutionManager getExecutionManager()
protected void updatePackageRegistry()
public java.util.Hashtable lookupMetaModels()
public void setFileMetaModelRepository(java.lang.String directory)
public void setUseTraceability(boolean useIt)
useIt
- public boolean getUseTraceability()
public void setUMLIsAvailable(boolean umlIsAvailable)
umlIsAvailable
- public boolean getUMLIsAvailable()
public void setUseLog(boolean useLog)
useLog
- public java.util.logging.Logger getLog()
public org.eclipse.emf.ecore.resource.Resource getResource(org.eclipse.emf.common.util.URI uri)
public TransformationRule getTransformationRule2(java.lang.String name, java.lang.String possibleScope, java.lang.String ownerTransformation)
name
- possibleScope
- ownerTransformation
-
public java.util.Collection getTransformationRules(java.lang.String name, java.lang.String possibleScope, java.lang.String ownerTransformation)
name
- possibleScope
- ownerTransformation
-
public org.eclipse.emf.ecore.EPackage getEcoreMetaModel()
public void clearTransformationModel()
public void setTransformationProxy(TransformationProxy trProxy)
trProxy
- public TransformationProxy getTransformationProxy()
public void setTransformationModel(MOFScriptTransformation transformation)
transformation
- public void setTransformationSpecification(MOFScriptSpecification transformationSpec)
transformationSpec
- public MOFScriptSpecification getTransformationSpecification()
public void setUseFileModel(boolean useFileModel)
useFileModel
- public void setRootDirectory(java.lang.String rootDir)
rootDir
- public MOFScriptModelFactory getModelFactory()
public org.eclipse.emf.ecore.resource.ResourceSet getResourceSet()
public RuleExecutionStack getExecutionStack()
public void loadTransformationModel(java.io.File sourcefile)
public void loadSourceMetaModel_111(java.io.File sourceFile)
sourceFile
- the file to load the metamodel frompublic void loadSourceMetaModel(java.lang.String uri)
uri
- public org.eclipse.emf.ecore.EPackage lookupPackageRegistry_111(java.lang.String name)
name
-
public void clearSourceMetaModels()
public void loadSourceModel(java.io.File sourceFile)
sourceFile
- the file to load the metamodel frompublic org.eclipse.emf.ecore.EPackage lookupResourceMetaModel(java.lang.String mmUri)
mmUri
-
public org.eclipse.emf.ecore.EPackage lookupResourceMetaModelByName(java.lang.String name)
name
-
public org.eclipse.emf.ecore.EPackage lookupAndSetSourceMetaModel(java.lang.String mmName)
protected void setSourceModelResource(org.eclipse.emf.ecore.resource.Resource res)
res
- public void setSourceModel(org.eclipse.emf.ecore.EObject model)
public void saveTargetModel(java.io.File targetFile)
targetFile
- the file to store the model topublic org.eclipse.emf.ecore.EPackage getSourceMetaModel()
public org.eclipse.emf.ecore.EPackage getSourceMetaModel(java.lang.String name)
public org.eclipse.emf.ecore.EPackage getTargetMetaModel()
public org.eclipse.emf.ecore.EObject getSourceModel()
public void executeTransformation() throws MofScriptExecutionException
MofScriptExecutionException
public org.modelware.modelbus.adapter.frm.FileResourcesType getFileModel()
public java.util.Vector getProducedResources()
protected java.util.Collection getObjectsByType(org.eclipse.emf.common.util.TreeIterator treeIt, org.eclipse.emf.ecore.EClass type)
public static java.lang.String getObjectAttributeValue(org.eclipse.emf.ecore.EObject object, java.lang.String featureName)
object
- featureName
-
public static java.lang.String getObjectNameValue(org.eclipse.emf.ecore.EObject object)
object
- the object to find the name attribute value for
public org.eclipse.emf.ecore.EObject getFeatureForName(java.lang.String featureName)
featureName
-
public org.eclipse.emf.ecore.EObject createFeatureFromName(java.lang.String featureName, org.eclipse.emf.ecore.EPackage metamodel)
public static java.util.List getMMTokens(org.eclipse.emf.ecore.EPackage metaModel)
metaModel
- the metamodel to find the tokens for
public java.util.List getSourceMMTokens()
public java.util.List getTargetMMTokens()
public org.eclipse.emf.ecore.EClass findSourceMetaModelConcept(java.lang.String concept)
concept
- a string containing the name og the concept to receive
public org.eclipse.emf.ecore.EClass findTargetMetaModelConcept(java.lang.String concept)
concept
- a string containing the name og the concept to receive
public org.eclipse.emf.ecore.EStructuralFeature findFeatureForSourceConcept(java.lang.String metamodelconcept, java.lang.String feature)
public org.eclipse.emf.ecore.EStructuralFeature findFeatureForEcoreConcept(java.lang.String ecoreConcept, java.lang.String feature)
public org.eclipse.emf.ecore.EStructuralFeature findFeatureForSourceRootConcept(java.lang.String metamodelName, java.lang.String feature)
public org.eclipse.emf.ecore.EStructuralFeature findFeatureForTargetConcept(java.lang.String metamodelconcept, java.lang.String feature)
public java.util.Map getRulesForConcept(java.lang.String concept)
public java.util.List getRulesForConcept2(java.lang.String concept)
protected boolean ruleIsForConcept(TransformationRule r, java.lang.String concept)
public org.eclipse.emf.ecore.EClassifier getMetaModelReference(java.lang.String refName)
refName
-
public static java.util.List getFeaturesForClass(org.eclipse.emf.ecore.EClass clazz)
public static org.eclipse.emf.ecore.EStructuralFeature getFeatureForClass(org.eclipse.emf.ecore.EClass clazz, java.lang.String feature)
clazz
- feature
-
public java.util.List getAllClassifiersForSourceMetaModel()
public java.util.List getAllClassifiersForPackage(org.eclipse.emf.ecore.EPackage pkg)
pkg
-
public org.eclipse.emf.ecore.EClassifier getClassifierForPackage(org.eclipse.emf.ecore.EPackage pkg, java.lang.String clazzifierName)
pkg
- clazzifierName
-
public java.lang.Object getRealObject(java.lang.Object mightBeProxy)
mightBeProxy
-
public static java.util.Set getAllSuperRules(MOFScriptTransformation transformation)
transformation
-
public static java.util.Set getAllSuperRuleNames(MOFScriptTransformation transformation)
transformation
-
protected void registerExternalResources()
protected void registerUML2Resources()
protected void registerNotationPackages()
protected void registerAnonymousPackage(java.lang.Class toRegister)
toRegister
- protected boolean checkRSAAvailability()
protected org.eclipse.emf.ecore.EObject loadRSAModel(java.io.File srcFile)
modelRef
-
public void messageEvent(java.lang.String message)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |