org.sintef.mofscript.runtime
Class TransformationProxy

java.lang.Object
  extended by org.sintef.mofscript.runtime.TransformationProxy

public class TransformationProxy
extends java.lang.Object


Constructor Summary
TransformationProxy(MOFScriptSpecification trSpec)
           
TransformationProxy(MOFScriptTransformation realTrans)
           
 
Method Summary
 void addImportedTransformation(java.lang.String importName, java.lang.String importUri, MOFScriptTransformation importedTransformation)
           
 java.lang.Object[] checkImportedRules(java.lang.String ruleName)
          Checks imported rules agains a rule name.
 java.util.Collection getAllImportedTransformationRules()
           
 java.util.List getAllImportedVariables()
          Gets all the imported variables.
 java.util.Collection getAllTransformationRules(java.lang.String name)
           
 MOFScriptTransformation getClosestSuperWithRule(TransformationRule rule)
           
protected  java.util.Hashtable getCompleteRuleCache(java.lang.String ruleName)
           
 TransformationRule getEntryPoint()
           
 MOFScriptTransformation getImportedTransformation(java.lang.String name)
           
 java.util.Collection getImportedTransformationRule(java.lang.String name)
           
 TransformationRule getImportedTransformationRule(java.lang.String name, java.lang.String possibleScoping, java.lang.String ownerTransformation)
           
 java.util.Collection getImportedTransformations()
           
 java.lang.String getName()
           
protected  TransformationRule getNearestTransformation(java.util.Collection importedRules)
           
 MOFScriptTransformation getTransformation()
           
 TransformationRule getTransformationRule(java.lang.String name)
           
 TransformationRule getTransformationRuleForType(FunctionCall f, java.lang.String name, java.lang.String ownerTransformation, java.lang.String possibleScope, java.lang.Object contextObject)
           
 java.util.Collection getTransformationRules()
           
 MOFScriptSpecification getTransformationSpecification()
           
 boolean hasOtherRuleWithName(TransformationRule rule)
           
 boolean hasRuleWithName(java.lang.String ruleName)
           
 boolean isSuperTransformation(MOFScriptTransformation transformation)
           
protected  boolean isSuperTypeOf(MOFScriptTransformation potentialSuper, MOFScriptTransformation potentialSub)
           
protected  boolean ownedByThisOrSuper(java.lang.String ownerTransformation)
           
 void setTransformationSpecification(MOFScriptSpecification trSpec)
           
 boolean superHasRule(java.lang.String ruleName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransformationProxy

public TransformationProxy(MOFScriptTransformation realTrans)
Parameters:
realTrans -

TransformationProxy

public TransformationProxy(MOFScriptSpecification trSpec)
Parameters:
trSpec -
Method Detail

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)