public class TransformationUtil
extends java.lang.Object
Constructor and Description |
---|
TransformationUtil() |
Modifier and Type | Method and Description |
---|---|
void |
addToGlobalVars(java.lang.String name,
java.util.Set<java.lang.String> globalvars)
Adds the to global vars.
|
java.util.List<org.eclipse.uml2.uml.Transition> |
getActivities(org.eclipse.uml2.uml.Classifier block)
Gets the activities.
|
java.util.List<java.lang.String> |
getAllBlockAttacks(org.eclipse.uml2.uml.Classifier block)
Gets the all block attacks.
|
java.lang.Integer |
getAltOffset(java.lang.Integer index,
java.lang.Integer size)
Gets the alt offset.
|
java.util.List<org.eclipse.uml2.uml.Classifier> |
getAtomicBlocks()
Gets the atomic blocks.
|
java.util.List<org.eclipse.uml2.uml.Message> |
getAttacks()
Gets the attacks.
|
java.lang.String |
getAttackScenarioFrequency(org.eclipse.uml2.uml.Model model,
java.lang.String scenarioName)
Gets the attack scenario frequency.
|
java.lang.String |
getAttackScenarioProbSuccess(org.eclipse.uml2.uml.Model model,
java.lang.String scenarioName)
Gets the attack scenario prob success.
|
java.lang.String |
getAttackScenarioProbUnsuccess(org.eclipse.uml2.uml.Model model,
java.lang.String probSuccess)
Gets the attack scenario prob unsuccess.
|
java.util.List<org.eclipse.uml2.uml.Interaction> |
getAttackScenarios()
Gets the attack scenarios.
|
java.util.List<java.lang.String> |
getAttackSuccName(org.eclipse.uml2.uml.Transition tr)
Gets the attack succ name.
|
java.util.List<java.lang.String> |
getBlockAttacks(org.eclipse.uml2.uml.Classifier block,
java.lang.String scenarioName)
Gets the block attacks.
|
java.util.List<java.lang.String> |
getBlockAttackScenarios(org.eclipse.uml2.uml.Classifier block)
Gets the block attack scenarios.
|
org.eclipse.uml2.uml.Classifier |
getBlockFromQN(java.util.List<org.eclipse.uml2.uml.Classifier> blocks,
java.lang.String qualifiedName)
Gets the block from QN.
|
static org.eclipse.uml2.uml.CombinedFragment |
getCombinedFragment(org.eclipse.uml2.uml.Message message)
Gets the combined fragment.
|
java.util.List<org.eclipse.uml2.uml.Classifier> |
getComposedBlocks()
Gets the composed blocks.
|
static java.lang.String |
getDelay(org.eclipse.uml2.uml.DurationConstraint constraint)
Gets the delay.
|
java.util.Set<java.lang.String> |
getEmptyStringSet()
Gets the empty string set.
|
java.lang.String |
getLoopCounter(org.eclipse.uml2.uml.InteractionOperand operand)
Gets the loop counter.
|
static MobiusComponents |
getMobiusComponenents(org.polarsys.chess.chessmlprofile.Core.CHGaResourcePlatform platform)
Gets the mobius componenents.
|
static java.util.List<org.eclipse.uml2.uml.Message> |
getModelAttacks(org.eclipse.uml2.uml.Model model)
Gets the model attacks.
|
static java.util.List<org.eclipse.uml2.uml.Interaction> |
getModelAttackScenarios(org.eclipse.uml2.uml.Model model)
Gets the model attack scenarios.
|
org.polarsys.chess.mobius.model.SAN.Node |
getNodeFromQN(java.util.List<org.polarsys.chess.mobius.model.SAN.Node> nodes,
java.lang.String qualifiedName)
Gets the node from QN.
|
org.eclipse.uml2.uml.State |
getNormalState(org.eclipse.uml2.uml.Classifier block)
Gets the normal state.
|
static java.lang.Integer |
getOkX()
Gets the ok X.
|
static java.lang.Integer |
getOkY()
Gets the ok Y.
|
org.eclipse.uml2.uml.Message |
getOperandAttack(org.eclipse.uml2.uml.InteractionOperand operand)
Gets the operand attack.
|
java.util.List<org.eclipse.uml2.uml.NamedElement> |
getOrderedAttacksAndFragments(org.eclipse.uml2.uml.Interaction scenario)
Gets the ordered attacks and fragments.
|
java.util.List<org.eclipse.uml2.uml.State> |
getPlaces(org.eclipse.uml2.uml.Classifier block)
Gets the places.
|
java.lang.String |
getPredicate(org.eclipse.uml2.uml.InteractionOperand operand)
Gets the predicate.
|
java.lang.String |
getRate(org.eclipse.uml2.uml.Transition tr)
Gets the rate.
|
java.lang.String |
getReplication(org.eclipse.uml2.uml.Classifier block,
org.eclipse.uml2.uml.Classifier parent)
Gets the replication.
|
java.util.List<java.lang.String> |
getRewards(org.eclipse.uml2.uml.Classifier analysisContext)
Gets the rewards.
|
org.eclipse.uml2.uml.Interaction |
getScenario(org.eclipse.uml2.uml.Model model,
java.lang.String scenarioName)
Gets the scenario.
|
static java.lang.String |
getStartPlace()
Gets the start place.
|
static java.lang.Integer |
getStartX()
Gets the start X.
|
static java.lang.Integer |
getStartY()
Gets the start Y.
|
java.util.List<org.eclipse.uml2.uml.Classifier> |
getSubsystems(org.eclipse.uml2.uml.Classifier parent)
Gets the subsystems.
|
java.lang.String |
getVarType(org.eclipse.uml2.uml.Model model,
java.lang.String globalvar)
Gets the var type.
|
java.util.Set<org.eclipse.uml2.uml.Classifier> |
getVulnerableComponents()
Gets the vulnerable components.
|
static java.util.Map<org.eclipse.uml2.uml.Classifier,java.util.List<org.eclipse.uml2.uml.Message>> |
getVulnerableComponents(org.eclipse.uml2.uml.Model model)
Gets the vulnerable components.
|
boolean |
isReplicated(org.eclipse.uml2.uml.Classifier block,
org.eclipse.uml2.uml.Classifier parent)
Checks if is replicated.
|
void |
resetPredicateList()
Reset predicate list.
|
static void |
setCeiling2(org.eclipse.m2m.qvt.oml.util.IContext context,
org.eclipse.uml2.uml.Class self,
java.lang.String ceiling)
Sets the ceiling 2.
|
static void |
setOkX(java.lang.Integer okX)
Sets the ok X.
|
static void |
setOkY(java.lang.Integer okY)
Sets the ok Y.
|
static void |
setStartPlace(java.lang.String startPlace)
Sets the start place.
|
static void |
setStartX(java.lang.Integer startX)
Sets the start X.
|
static void |
setStartY(java.lang.Integer startY)
Sets the start Y.
|
public static MobiusComponents getMobiusComponenents(org.polarsys.chess.chessmlprofile.Core.CHGaResourcePlatform platform)
platform
- the platformpublic java.util.List<org.eclipse.uml2.uml.Classifier> getAtomicBlocks()
public java.util.List<org.eclipse.uml2.uml.Classifier> getComposedBlocks()
public static java.util.List<org.eclipse.uml2.uml.Interaction> getModelAttackScenarios(org.eclipse.uml2.uml.Model model)
model
- the modelpublic java.util.List<org.eclipse.uml2.uml.Interaction> getAttackScenarios()
public static java.util.List<org.eclipse.uml2.uml.Message> getModelAttacks(org.eclipse.uml2.uml.Model model)
model
- the modelpublic java.util.List<org.eclipse.uml2.uml.Message> getAttacks()
public java.util.List<java.lang.String> getAllBlockAttacks(org.eclipse.uml2.uml.Classifier block)
block
- the blockpublic java.util.List<java.lang.String> getBlockAttacks(org.eclipse.uml2.uml.Classifier block, java.lang.String scenarioName)
block
- the blockscenarioName
- the scenario namepublic java.util.List<java.lang.String> getBlockAttackScenarios(org.eclipse.uml2.uml.Classifier block)
block
- the blockpublic static java.util.Map<org.eclipse.uml2.uml.Classifier,java.util.List<org.eclipse.uml2.uml.Message>> getVulnerableComponents(org.eclipse.uml2.uml.Model model)
model
- the modelpublic java.util.Set<org.eclipse.uml2.uml.Classifier> getVulnerableComponents()
public org.eclipse.uml2.uml.Classifier getBlockFromQN(java.util.List<org.eclipse.uml2.uml.Classifier> blocks, java.lang.String qualifiedName)
blocks
- the blocksqualifiedName
- the qualified namepublic org.polarsys.chess.mobius.model.SAN.Node getNodeFromQN(java.util.List<org.polarsys.chess.mobius.model.SAN.Node> nodes, java.lang.String qualifiedName)
nodes
- the nodesqualifiedName
- the qualified namepublic org.eclipse.uml2.uml.State getNormalState(org.eclipse.uml2.uml.Classifier block)
block
- the blockpublic java.util.List<org.eclipse.uml2.uml.State> getPlaces(org.eclipse.uml2.uml.Classifier block)
block
- the blockpublic java.util.List<org.eclipse.uml2.uml.Transition> getActivities(org.eclipse.uml2.uml.Classifier block)
block
- the blockpublic java.lang.String getRate(org.eclipse.uml2.uml.Transition tr)
tr
- the trpublic java.util.List<org.eclipse.uml2.uml.Classifier> getSubsystems(org.eclipse.uml2.uml.Classifier parent)
parent
- the parentpublic boolean isReplicated(org.eclipse.uml2.uml.Classifier block, org.eclipse.uml2.uml.Classifier parent)
block
- the blockparent
- the parentpublic java.lang.String getReplication(org.eclipse.uml2.uml.Classifier block, org.eclipse.uml2.uml.Classifier parent)
block
- the blockparent
- the parentpublic java.util.Set<java.lang.String> getEmptyStringSet()
public void addToGlobalVars(java.lang.String name, java.util.Set<java.lang.String> globalvars)
name
- the nameglobalvars
- the globalvarspublic java.util.List<java.lang.String> getAttackSuccName(org.eclipse.uml2.uml.Transition tr)
tr
- the trpublic org.eclipse.uml2.uml.Interaction getScenario(org.eclipse.uml2.uml.Model model, java.lang.String scenarioName)
model
- the modelscenarioName
- the scenario namepublic static void setCeiling2(org.eclipse.m2m.qvt.oml.util.IContext context, org.eclipse.uml2.uml.Class self, java.lang.String ceiling)
context
- the contextself
- the selfceiling
- the ceilingpublic java.util.List<org.eclipse.uml2.uml.NamedElement> getOrderedAttacksAndFragments(org.eclipse.uml2.uml.Interaction scenario)
scenario
- the scenariopublic static org.eclipse.uml2.uml.CombinedFragment getCombinedFragment(org.eclipse.uml2.uml.Message message)
message
- the messagepublic static java.lang.String getDelay(org.eclipse.uml2.uml.DurationConstraint constraint)
constraint
- the constraintpublic java.lang.String getAttackScenarioFrequency(org.eclipse.uml2.uml.Model model, java.lang.String scenarioName)
model
- the modelscenarioName
- the scenario namepublic java.lang.String getAttackScenarioProbSuccess(org.eclipse.uml2.uml.Model model, java.lang.String scenarioName)
model
- the modelscenarioName
- the scenario namepublic java.lang.String getAttackScenarioProbUnsuccess(org.eclipse.uml2.uml.Model model, java.lang.String probSuccess)
model
- the modelprobSuccess
- the prob successpublic java.lang.String getPredicate(org.eclipse.uml2.uml.InteractionOperand operand)
operand
- the operandpublic void resetPredicateList()
public java.lang.Integer getAltOffset(java.lang.Integer index, java.lang.Integer size)
index
- the indexsize
- the sizepublic org.eclipse.uml2.uml.Message getOperandAttack(org.eclipse.uml2.uml.InteractionOperand operand)
operand
- the operandpublic java.lang.String getLoopCounter(org.eclipse.uml2.uml.InteractionOperand operand)
operand
- the operandpublic static java.lang.String getStartPlace()
public static void setStartPlace(java.lang.String startPlace)
startPlace
- the new start placepublic static java.lang.Integer getStartX()
public static void setStartX(java.lang.Integer startX)
startX
- the new start Xpublic static java.lang.Integer getStartY()
public static void setStartY(java.lang.Integer startY)
startY
- the new start Ypublic java.lang.String getVarType(org.eclipse.uml2.uml.Model model, java.lang.String globalvar)
model
- the modelglobalvar
- the globalvarpublic static java.lang.Integer getOkX()
public static void setOkX(java.lang.Integer okX)
okX
- the new ok Xpublic static java.lang.Integer getOkY()
public static void setOkY(java.lang.Integer okY)
okY
- the new ok Ypublic java.util.List<java.lang.String> getRewards(org.eclipse.uml2.uml.Classifier analysisContext)
analysisContext
- the analysis context