org.sintef.mofscript.runtime
Class TransformationProxy
java.lang.Object
org.sintef.mofscript.runtime.TransformationProxy
public class TransformationProxy
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TransformationProxy
public TransformationProxy(MOFScriptTransformation realTrans)
- Parameters:
realTrans
-
TransformationProxy
public TransformationProxy(MOFScriptSpecification trSpec)
- Parameters:
trSpec
-
getTransformation
public MOFScriptTransformation getTransformation()
getTransformationSpecification
public MOFScriptSpecification getTransformationSpecification()
getName
public java.lang.String getName()
getEntryPoint
public TransformationRule getEntryPoint()
getCompleteRuleCache
protected java.util.Hashtable getCompleteRuleCache(java.lang.String ruleName)
setTransformationSpecification
public void setTransformationSpecification(MOFScriptSpecification trSpec)
hasRuleWithName
public boolean hasRuleWithName(java.lang.String ruleName)
hasOtherRuleWithName
public boolean hasOtherRuleWithName(TransformationRule rule)
getClosestSuperWithRule
public MOFScriptTransformation getClosestSuperWithRule(TransformationRule rule)
- Parameters:
transformation
- rule
-
- Returns:
- the first match of supertypes that contains the rule in question
getTransformationRules
public java.util.Collection getTransformationRules()
getTransformationRule
public TransformationRule getTransformationRule(java.lang.String name)
getAllTransformationRules
public java.util.Collection getAllTransformationRules(java.lang.String name)
getAllImportedTransformationRules
public java.util.Collection getAllImportedTransformationRules()
getImportedTransformationRule
public java.util.Collection getImportedTransformationRule(java.lang.String name)
getImportedTransformationRule
public TransformationRule getImportedTransformationRule(java.lang.String name,
java.lang.String possibleScoping,
java.lang.String ownerTransformation)
getImportedTransformation
public MOFScriptTransformation getImportedTransformation(java.lang.String name)
- Parameters:
name
-
- Returns:
getImportedTransformations
public java.util.Collection getImportedTransformations()
- Returns:
getAllImportedVariables
public java.util.List getAllImportedVariables()
- Gets all the imported variables.
Removes duplicate vars.
- Returns:
checkImportedRules
public java.lang.Object[] checkImportedRules(java.lang.String ruleName)
- Checks imported rules agains a rule name. If the rule name matches,
a value is returned containing the name of the rule and the rule itself
- Parameters:
ruleName
-
- Returns:
getTransformationRuleForType
public TransformationRule getTransformationRuleForType(FunctionCall f,
java.lang.String name,
java.lang.String ownerTransformation,
java.lang.String possibleScope,
java.lang.Object contextObject)
- Parameters:
name
- ownerTransformation
- possibleScope
- contextObject
-
- Returns:
ownedByThisOrSuper
protected boolean ownedByThisOrSuper(java.lang.String ownerTransformation)
getNearestTransformation
protected TransformationRule getNearestTransformation(java.util.Collection importedRules)
- Parameters:
importedRules
-
- Returns:
isSuperTypeOf
protected boolean isSuperTypeOf(MOFScriptTransformation potentialSuper,
MOFScriptTransformation potentialSub)
- Parameters:
potentialSuper
- potentialSub
-
- Returns:
isSuperTransformation
public boolean isSuperTransformation(MOFScriptTransformation transformation)
- Parameters:
transformation
-
- Returns:
superHasRule
public boolean superHasRule(java.lang.String ruleName)
addImportedTransformation
public void addImportedTransformation(java.lang.String importName,
java.lang.String importUri,
MOFScriptTransformation importedTransformation)