Skip to content
Snippets Groups Projects
Commit 3cd602e7 authored by Stefano puri's avatar Stefano puri
Browse files

CyberSecurityAnalysis stereotype renamed to SANAnalysis


Bug: 561595
Signed-off-by: default avatarStefano Puri <stefano.puri@intecs.it>
parent dc26aa5b
No related branches found
No related tags found
No related merge requests found
Showing
with 134 additions and 79 deletions
......@@ -30,7 +30,7 @@ modeltype SysML uses "http://www.eclipse.org/papyrus/0.7.0/SysML/PortAndFlows";
transformation CHESS2SAN(in source : CHESS, out target : SAN);
// Qualified names of stereotypes
property CYBERSECURITYANALYSIS_STEREOTYPE = "CHESS::Dependability::StateBased::StateBasedAnalysis::CyberSecurityAnalysis";
property SANANALYSIS_STEREOTYPE = "CHESS::Dependability::StateBased::StateBasedAnalysis::SANAnalysis";
property ERRORMODEL_STEREOTYPE ="CHESS::Dependability::ThreatsPropagation::ErrorModel";
property NORMALSTATE_STEREOTYPE ="CHESS::Dependability::ThreatsPropagation::NormalState";
property INTERNALFAULT_STEREOTYPE = "CHESS::Dependability::ThreatsPropagation::InternalFault";
......@@ -1485,7 +1485,7 @@ mapping UMLInstance_Vertex2Place(in tup : Tuple(inst:InstanceSpecification , ver
//currently I use the 'condition' string property = <interaction1QN>;<Inteaction2QN>;...
query UML::Class::initAttackScenario_OLD(){
var analysis : CHESS::StateBasedAnalysis::CyberSecurityAnalysis := self.getStereotypeApplication(CYBERSECURITYANALYSIS_STEREOTYPE).oclAsType(CHESS::StateBasedAnalysis::CyberSecurityAnalysis);
var analysis : CHESS::StateBasedAnalysis::SANAnalysis := self.getStereotypeApplication(SANANALYSIS_STEREOTYPE).oclAsType(CHESS::StateBasedAnalysis::SANAnalysis);
--log("attack scenario QN : "+analysis.condition);
var interactions :Collection(String) := analysis.condition.oclAsType(String).trim().tokenize(";").trim();
interactions -> forEach(interactionQN){
......@@ -1497,9 +1497,9 @@ query UML::Class::initAttackScenario_OLD(){
query UML::Class::initAttackScenario(){
var analysis : CHESS::StateBasedAnalysis::CyberSecurityAnalysis := self.getStereotypeApplication(CYBERSECURITYANALYSIS_STEREOTYPE).oclAsType(CHESS::StateBasedAnalysis::CyberSecurityAnalysis);
var analysis : CHESS::StateBasedAnalysis::SANAnalysis := self.getStereotypeApplication(SANANALYSIS_STEREOTYPE).oclAsType(CHESS::StateBasedAnalysis::SANAnalysis);
--log("attack scenario QN : "+analysis.condition);
var workloads : Set(MARTE::MARTE_AnalysisModel::GQAM::GaWorkloadBehavior) := analysis.workload->asSet();
var workloads : Set(MARTE::GQAMMARTE_AnalysisModel::GQAM::GaWorkloadBehavior) := analysis.workload->asSet();
workloads -> forEach(workload){
var named :=workload.base_NamedElement;
......@@ -1514,7 +1514,7 @@ query UML::Class::initAttackScenario(){
query UML::Class::initRewards(){
var analysis : CHESS::StateBasedAnalysis::CyberSecurityAnalysis := self.getStereotypeApplication(CYBERSECURITYANALYSIS_STEREOTYPE).oclAsType(CHESS::StateBasedAnalysis::CyberSecurityAnalysis);
var analysis : CHESS::StateBasedAnalysis::SANAnalysis := self.getStereotypeApplication(SANANALYSIS_STEREOTYPE).oclAsType(CHESS::StateBasedAnalysis::SANAnalysis);
analysis.context-> forEach (reward){
if (reward.toString().startsWith('*.')){ //support for wildcard, e.g. *.ErrorState ->all instances having ErorState are interested by the reward
......
......@@ -623,8 +623,8 @@
<nestedGenPackages xsi:type="genmodel:GenPackage" prefix="StateBasedAnalysis"
basePackage="org.polarsys.chess.chessmlprofile.Dependability.StateBased"
resource="XML" disposableProviderFactory="true" ecorePackage="chessmlprofile.ecore#//Dependability/StateBased/StateBasedAnalysis">
<genClasses xsi:type="genmodel:GenClass" ecoreClass="chessmlprofile.ecore#//Dependability/StateBased/StateBasedAnalysis/CyberSecurityAnalysis">
<genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute chessmlprofile.ecore#//Dependability/StateBased/StateBasedAnalysis/CyberSecurityAnalysis/condition"/>
<genClasses xsi:type="genmodel:GenClass" ecoreClass="chessmlprofile.ecore#//Dependability/StateBased/StateBasedAnalysis/SANAnalysis">
<genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute chessmlprofile.ecore#//Dependability/StateBased/StateBasedAnalysis/SANAnalysis/condition"/>
</genClasses>
<genClasses xsi:type="genmodel:GenClass" ecoreClass="chessmlprofile.ecore#//Dependability/StateBased/StateBasedAnalysis/StateBasedAnalysis">
<genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute chessmlprofile.ecore#//Dependability/StateBased/StateBasedAnalysis/StateBasedAnalysis/measure"/>
......
......@@ -3214,7 +3214,7 @@ So a FailureModes applied to Slot (in place of the FPTCPortSlot) can refer the &
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_mFokUzbQEeW5DJdhCjCHFw" value="1"/>
</ownedEnd>
</packagedElement>
<packagedElement xmi:type="uml:Stereotype" xmi:id="_wPoGQFIWEembUrnKQet3ag" name="CyberSecurityAnalysis">
<packagedElement xmi:type="uml:Stereotype" xmi:id="_wPoGQFIWEembUrnKQet3ag" name="SANAnalysis">
<generalization xmi:type="uml:Generalization" xmi:id="_Utp0oFI6EemQ2drw1KcZ_Q">
<general xmi:type="uml:Stereotype" href="pathmap://Papyrus_PROFILES/MARTE.profile.uml#_9gc2ABKfEdyaWJN1BYon3A"/>
</generalization>
......
......@@ -728,7 +728,7 @@
</eSubpackages>
<eSubpackages name="StateBasedAnalysis" nsURI="http://CHESS/Dependability/StateBased/StateBasedAnalysis"
nsPrefix="StateBasedAnalysis">
<eClassifiers xsi:type="ecore:EClass" name="CyberSecurityAnalysis" eSuperTypes="../../org.eclipse.papyrus.marte.static.profile/resources/MARTE.ecore#//MARTE_AnalysisModel/GQAM/GaAnalysisContext">
<eClassifiers xsi:type="ecore:EClass" name="SANAnalysis" eSuperTypes="../../org.eclipse.papyrus.marte.static.profile/resources/MARTE.ecore#//MARTE_AnalysisModel/GQAM/GaAnalysisContext">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="tentative"/>
</eAnnotations>
......
/**
*/
package org.polarsys.chess.chessmlprofile.Dependability.StateBased.StateBasedAnalysis;
import org.eclipse.papyrus.MARTE.MARTE_AnalysisModel.GQAM.GaAnalysisContext;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>SAN Analysis</b></em>'.
* <!-- end-user-doc -->
*
* <!-- begin-model-doc -->
* tentative
* <!-- end-model-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link org.polarsys.chess.chessmlprofile.Dependability.StateBased.StateBasedAnalysis.SANAnalysis#getCondition <em>Condition</em>}</li>
* </ul>
*
* @see org.polarsys.chess.chessmlprofile.Dependability.StateBased.StateBasedAnalysis.StateBasedAnalysisPackage#getSANAnalysis()
* @model
* @generated
*/
public interface SANAnalysis extends GaAnalysisContext {
/**
* Returns the value of the '<em><b>Condition</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Condition</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Condition</em>' attribute.
* @see #setCondition(String)
* @see org.polarsys.chess.chessmlprofile.Dependability.StateBased.StateBasedAnalysis.StateBasedAnalysisPackage#getSANAnalysis_Condition()
* @model dataType="org.eclipse.uml2.types.String" required="true" ordered="false"
* @generated
*/
String getCondition();
/**
* Sets the value of the '{@link org.polarsys.chess.chessmlprofile.Dependability.StateBased.StateBasedAnalysis.SANAnalysis#getCondition <em>Condition</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Condition</em>' attribute.
* @see #getCondition()
* @generated
*/
void setCondition(String value);
} // SANAnalysis
......@@ -31,13 +31,13 @@ public interface StateBasedAnalysisFactory extends EFactory {
StateBasedAnalysisFactory eINSTANCE = org.polarsys.chess.chessmlprofile.Dependability.StateBased.StateBasedAnalysis.impl.StateBasedAnalysisFactoryImpl.init();
/**
* Returns a new object of class '<em>Cyber Security Analysis</em>'.
* Returns a new object of class '<em>SAN Analysis</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Cyber Security Analysis</em>'.
* @return a new object of class '<em>SAN Analysis</em>'.
* @generated
*/
CyberSecurityAnalysis createCyberSecurityAnalysis();
SANAnalysis createSANAnalysis();
/**
* Returns a new object of class '<em>State Based Analysis</em>'.
......
......@@ -67,14 +67,14 @@ public interface StateBasedAnalysisPackage extends EPackage {
StateBasedAnalysisPackage eINSTANCE = org.polarsys.chess.chessmlprofile.Dependability.StateBased.StateBasedAnalysis.impl.StateBasedAnalysisPackageImpl.init();
/**
* The meta object id for the '{@link org.polarsys.chess.chessmlprofile.Dependability.StateBased.StateBasedAnalysis.impl.CyberSecurityAnalysisImpl <em>Cyber Security Analysis</em>}' class.
* The meta object id for the '{@link org.polarsys.chess.chessmlprofile.Dependability.StateBased.StateBasedAnalysis.impl.SANAnalysisImpl <em>SAN Analysis</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.polarsys.chess.chessmlprofile.Dependability.StateBased.StateBasedAnalysis.impl.CyberSecurityAnalysisImpl
* @see org.polarsys.chess.chessmlprofile.Dependability.StateBased.StateBasedAnalysis.impl.StateBasedAnalysisPackageImpl#getCyberSecurityAnalysis()
* @see org.polarsys.chess.chessmlprofile.Dependability.StateBased.StateBasedAnalysis.impl.SANAnalysisImpl
* @see org.polarsys.chess.chessmlprofile.Dependability.StateBased.StateBasedAnalysis.impl.StateBasedAnalysisPackageImpl#getSANAnalysis()
* @generated
*/
int CYBER_SECURITY_ANALYSIS = 0;
int SAN_ANALYSIS = 0;
/**
* The feature id for the '<em><b>Base Structured Classifier</b></em>' reference.
......@@ -83,7 +83,7 @@ public interface StateBasedAnalysisPackage extends EPackage {
* @generated
* @ordered
*/
int CYBER_SECURITY_ANALYSIS__BASE_STRUCTURED_CLASSIFIER = GQAMPackage.GA_ANALYSIS_CONTEXT__BASE_STRUCTURED_CLASSIFIER;
int SAN_ANALYSIS__BASE_STRUCTURED_CLASSIFIER = GQAMPackage.GA_ANALYSIS_CONTEXT__BASE_STRUCTURED_CLASSIFIER;
/**
* The feature id for the '<em><b>Base Package</b></em>' reference.
......@@ -92,7 +92,7 @@ public interface StateBasedAnalysisPackage extends EPackage {
* @generated
* @ordered
*/
int CYBER_SECURITY_ANALYSIS__BASE_PACKAGE = GQAMPackage.GA_ANALYSIS_CONTEXT__BASE_PACKAGE;
int SAN_ANALYSIS__BASE_PACKAGE = GQAMPackage.GA_ANALYSIS_CONTEXT__BASE_PACKAGE;
/**
* The feature id for the '<em><b>Mode</b></em>' reference list.
......@@ -101,7 +101,7 @@ public interface StateBasedAnalysisPackage extends EPackage {
* @generated
* @ordered
*/
int CYBER_SECURITY_ANALYSIS__MODE = GQAMPackage.GA_ANALYSIS_CONTEXT__MODE;
int SAN_ANALYSIS__MODE = GQAMPackage.GA_ANALYSIS_CONTEXT__MODE;
/**
* The feature id for the '<em><b>Base Named Element</b></em>' reference.
......@@ -110,7 +110,7 @@ public interface StateBasedAnalysisPackage extends EPackage {
* @generated
* @ordered
*/
int CYBER_SECURITY_ANALYSIS__BASE_NAMED_ELEMENT = GQAMPackage.GA_ANALYSIS_CONTEXT__BASE_NAMED_ELEMENT;
int SAN_ANALYSIS__BASE_NAMED_ELEMENT = GQAMPackage.GA_ANALYSIS_CONTEXT__BASE_NAMED_ELEMENT;
/**
* The feature id for the '<em><b>Context</b></em>' attribute list.
......@@ -119,7 +119,7 @@ public interface StateBasedAnalysisPackage extends EPackage {
* @generated
* @ordered
*/
int CYBER_SECURITY_ANALYSIS__CONTEXT = GQAMPackage.GA_ANALYSIS_CONTEXT__CONTEXT;
int SAN_ANALYSIS__CONTEXT = GQAMPackage.GA_ANALYSIS_CONTEXT__CONTEXT;
/**
* The feature id for the '<em><b>Workload</b></em>' reference list.
......@@ -128,7 +128,7 @@ public interface StateBasedAnalysisPackage extends EPackage {
* @generated
* @ordered
*/
int CYBER_SECURITY_ANALYSIS__WORKLOAD = GQAMPackage.GA_ANALYSIS_CONTEXT__WORKLOAD;
int SAN_ANALYSIS__WORKLOAD = GQAMPackage.GA_ANALYSIS_CONTEXT__WORKLOAD;
/**
* The feature id for the '<em><b>Platform</b></em>' reference list.
......@@ -137,7 +137,7 @@ public interface StateBasedAnalysisPackage extends EPackage {
* @generated
* @ordered
*/
int CYBER_SECURITY_ANALYSIS__PLATFORM = GQAMPackage.GA_ANALYSIS_CONTEXT__PLATFORM;
int SAN_ANALYSIS__PLATFORM = GQAMPackage.GA_ANALYSIS_CONTEXT__PLATFORM;
/**
* The feature id for the '<em><b>Condition</b></em>' attribute.
......@@ -146,16 +146,16 @@ public interface StateBasedAnalysisPackage extends EPackage {
* @generated
* @ordered
*/
int CYBER_SECURITY_ANALYSIS__CONDITION = GQAMPackage.GA_ANALYSIS_CONTEXT_FEATURE_COUNT + 0;
int SAN_ANALYSIS__CONDITION = GQAMPackage.GA_ANALYSIS_CONTEXT_FEATURE_COUNT + 0;
/**
* The number of structural features of the '<em>Cyber Security Analysis</em>' class.
* The number of structural features of the '<em>SAN Analysis</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CYBER_SECURITY_ANALYSIS_FEATURE_COUNT = GQAMPackage.GA_ANALYSIS_CONTEXT_FEATURE_COUNT + 1;
int SAN_ANALYSIS_FEATURE_COUNT = GQAMPackage.GA_ANALYSIS_CONTEXT_FEATURE_COUNT + 1;
/**
* The meta object id for the '{@link org.polarsys.chess.chessmlprofile.Dependability.StateBased.StateBasedAnalysis.impl.StateBasedAnalysisImpl <em>State Based Analysis</em>}' class.
......@@ -351,25 +351,25 @@ public interface StateBasedAnalysisPackage extends EPackage {
/**
* Returns the meta object for class '{@link org.polarsys.chess.chessmlprofile.Dependability.StateBased.StateBasedAnalysis.CyberSecurityAnalysis <em>Cyber Security Analysis</em>}'.
* Returns the meta object for class '{@link org.polarsys.chess.chessmlprofile.Dependability.StateBased.StateBasedAnalysis.SANAnalysis <em>SAN Analysis</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Cyber Security Analysis</em>'.
* @see org.polarsys.chess.chessmlprofile.Dependability.StateBased.StateBasedAnalysis.CyberSecurityAnalysis
* @return the meta object for class '<em>SAN Analysis</em>'.
* @see org.polarsys.chess.chessmlprofile.Dependability.StateBased.StateBasedAnalysis.SANAnalysis
* @generated
*/
EClass getCyberSecurityAnalysis();
EClass getSANAnalysis();
/**
* Returns the meta object for the attribute '{@link org.polarsys.chess.chessmlprofile.Dependability.StateBased.StateBasedAnalysis.CyberSecurityAnalysis#getCondition <em>Condition</em>}'.
* Returns the meta object for the attribute '{@link org.polarsys.chess.chessmlprofile.Dependability.StateBased.StateBasedAnalysis.SANAnalysis#getCondition <em>Condition</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Condition</em>'.
* @see org.polarsys.chess.chessmlprofile.Dependability.StateBased.StateBasedAnalysis.CyberSecurityAnalysis#getCondition()
* @see #getCyberSecurityAnalysis()
* @see org.polarsys.chess.chessmlprofile.Dependability.StateBased.StateBasedAnalysis.SANAnalysis#getCondition()
* @see #getSANAnalysis()
* @generated
*/
EAttribute getCyberSecurityAnalysis_Condition();
EAttribute getSANAnalysis_Condition();
/**
* Returns the meta object for class '{@link org.polarsys.chess.chessmlprofile.Dependability.StateBased.StateBasedAnalysis.StateBasedAnalysis <em>State Based Analysis</em>}'.
......@@ -524,14 +524,14 @@ public interface StateBasedAnalysisPackage extends EPackage {
*/
interface Literals {
/**
* The meta object literal for the '{@link org.polarsys.chess.chessmlprofile.Dependability.StateBased.StateBasedAnalysis.impl.CyberSecurityAnalysisImpl <em>Cyber Security Analysis</em>}' class.
* The meta object literal for the '{@link org.polarsys.chess.chessmlprofile.Dependability.StateBased.StateBasedAnalysis.impl.SANAnalysisImpl <em>SAN Analysis</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.polarsys.chess.chessmlprofile.Dependability.StateBased.StateBasedAnalysis.impl.CyberSecurityAnalysisImpl
* @see org.polarsys.chess.chessmlprofile.Dependability.StateBased.StateBasedAnalysis.impl.StateBasedAnalysisPackageImpl#getCyberSecurityAnalysis()
* @see org.polarsys.chess.chessmlprofile.Dependability.StateBased.StateBasedAnalysis.impl.SANAnalysisImpl
* @see org.polarsys.chess.chessmlprofile.Dependability.StateBased.StateBasedAnalysis.impl.StateBasedAnalysisPackageImpl#getSANAnalysis()
* @generated
*/
EClass CYBER_SECURITY_ANALYSIS = eINSTANCE.getCyberSecurityAnalysis();
EClass SAN_ANALYSIS = eINSTANCE.getSANAnalysis();
/**
* The meta object literal for the '<em><b>Condition</b></em>' attribute feature.
......@@ -539,7 +539,7 @@ public interface StateBasedAnalysisPackage extends EPackage {
* <!-- end-user-doc -->
* @generated
*/
EAttribute CYBER_SECURITY_ANALYSIS__CONDITION = eINSTANCE.getCyberSecurityAnalysis_Condition();
EAttribute SAN_ANALYSIS__CONDITION = eINSTANCE.getSANAnalysis_Condition();
/**
* The meta object literal for the '{@link org.polarsys.chess.chessmlprofile.Dependability.StateBased.StateBasedAnalysis.impl.StateBasedAnalysisImpl <em>State Based Analysis</em>}' class.
......
......@@ -10,23 +10,23 @@ import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.papyrus.MARTE.MARTE_AnalysisModel.GQAM.impl.GaAnalysisContextImpl;
import org.polarsys.chess.chessmlprofile.Dependability.StateBased.StateBasedAnalysis.CyberSecurityAnalysis;
import org.polarsys.chess.chessmlprofile.Dependability.StateBased.StateBasedAnalysis.SANAnalysis;
import org.polarsys.chess.chessmlprofile.Dependability.StateBased.StateBasedAnalysis.StateBasedAnalysisPackage;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Cyber Security Analysis</b></em>'.
* An implementation of the model object '<em><b>SAN Analysis</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.polarsys.chess.chessmlprofile.Dependability.StateBased.StateBasedAnalysis.impl.CyberSecurityAnalysisImpl#getCondition <em>Condition</em>}</li>
* <li>{@link org.polarsys.chess.chessmlprofile.Dependability.StateBased.StateBasedAnalysis.impl.SANAnalysisImpl#getCondition <em>Condition</em>}</li>
* </ul>
*
* @generated
*/
public class CyberSecurityAnalysisImpl extends GaAnalysisContextImpl implements CyberSecurityAnalysis {
public class SANAnalysisImpl extends GaAnalysisContextImpl implements SANAnalysis {
/**
* The default value of the '{@link #getCondition() <em>Condition</em>}' attribute.
* <!-- begin-user-doc -->
......@@ -52,7 +52,7 @@ public class CyberSecurityAnalysisImpl extends GaAnalysisContextImpl implements
* <!-- end-user-doc -->
* @generated
*/
protected CyberSecurityAnalysisImpl() {
protected SANAnalysisImpl() {
super();
}
......@@ -63,7 +63,7 @@ public class CyberSecurityAnalysisImpl extends GaAnalysisContextImpl implements
*/
@Override
protected EClass eStaticClass() {
return StateBasedAnalysisPackage.Literals.CYBER_SECURITY_ANALYSIS;
return StateBasedAnalysisPackage.Literals.SAN_ANALYSIS;
}
/**
......@@ -84,7 +84,7 @@ public class CyberSecurityAnalysisImpl extends GaAnalysisContextImpl implements
String oldCondition = condition;
condition = newCondition;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, StateBasedAnalysisPackage.CYBER_SECURITY_ANALYSIS__CONDITION, oldCondition, condition));
eNotify(new ENotificationImpl(this, Notification.SET, StateBasedAnalysisPackage.SAN_ANALYSIS__CONDITION, oldCondition, condition));
}
/**
......@@ -95,7 +95,7 @@ public class CyberSecurityAnalysisImpl extends GaAnalysisContextImpl implements
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case StateBasedAnalysisPackage.CYBER_SECURITY_ANALYSIS__CONDITION:
case StateBasedAnalysisPackage.SAN_ANALYSIS__CONDITION:
return getCondition();
}
return super.eGet(featureID, resolve, coreType);
......@@ -109,7 +109,7 @@ public class CyberSecurityAnalysisImpl extends GaAnalysisContextImpl implements
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case StateBasedAnalysisPackage.CYBER_SECURITY_ANALYSIS__CONDITION:
case StateBasedAnalysisPackage.SAN_ANALYSIS__CONDITION:
setCondition((String)newValue);
return;
}
......@@ -124,7 +124,7 @@ public class CyberSecurityAnalysisImpl extends GaAnalysisContextImpl implements
@Override
public void eUnset(int featureID) {
switch (featureID) {
case StateBasedAnalysisPackage.CYBER_SECURITY_ANALYSIS__CONDITION:
case StateBasedAnalysisPackage.SAN_ANALYSIS__CONDITION:
setCondition(CONDITION_EDEFAULT);
return;
}
......@@ -139,7 +139,7 @@ public class CyberSecurityAnalysisImpl extends GaAnalysisContextImpl implements
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case StateBasedAnalysisPackage.CYBER_SECURITY_ANALYSIS__CONDITION:
case StateBasedAnalysisPackage.SAN_ANALYSIS__CONDITION:
return CONDITION_EDEFAULT == null ? condition != null : !CONDITION_EDEFAULT.equals(condition);
}
return super.eIsSet(featureID);
......@@ -161,4 +161,4 @@ public class CyberSecurityAnalysisImpl extends GaAnalysisContextImpl implements
return result.toString();
}
} //CyberSecurityAnalysisImpl
} //SANAnalysisImpl
......@@ -62,7 +62,7 @@ public class StateBasedAnalysisFactoryImpl extends EFactoryImpl implements State
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
case StateBasedAnalysisPackage.CYBER_SECURITY_ANALYSIS: return createCyberSecurityAnalysis();
case StateBasedAnalysisPackage.SAN_ANALYSIS: return createSANAnalysis();
case StateBasedAnalysisPackage.STATE_BASED_ANALYSIS: return createStateBasedAnalysis();
case StateBasedAnalysisPackage.SBA_INITIAL_CONDITIONS: return createSBAInitialConditions();
default:
......@@ -75,9 +75,9 @@ public class StateBasedAnalysisFactoryImpl extends EFactoryImpl implements State
* <!-- end-user-doc -->
* @generated
*/
public CyberSecurityAnalysis createCyberSecurityAnalysis() {
CyberSecurityAnalysisImpl cyberSecurityAnalysis = new CyberSecurityAnalysisImpl();
return cyberSecurityAnalysis;
public SANAnalysis createSANAnalysis() {
SANAnalysisImpl sanAnalysis = new SANAnalysisImpl();
return sanAnalysis;
}
/**
......
......@@ -48,6 +48,7 @@ import org.polarsys.chess.chessmlprofile.Dependability.StateBased.FaultTolerance
import org.polarsys.chess.chessmlprofile.Dependability.StateBased.MaintenanceMonitoring.MaintenanceMonitoringPackage;
import org.polarsys.chess.chessmlprofile.Dependability.StateBased.MaintenanceMonitoring.impl.MaintenanceMonitoringPackageImpl;
import org.polarsys.chess.chessmlprofile.Dependability.StateBased.StateBasedAnalysis.CyberSecurityAnalysis;
import org.polarsys.chess.chessmlprofile.Dependability.StateBased.StateBasedAnalysis.SANAnalysis;
import org.polarsys.chess.chessmlprofile.Dependability.StateBased.StateBasedAnalysis.SBAInitialConditions;
import org.polarsys.chess.chessmlprofile.Dependability.StateBased.StateBasedAnalysis.StateBasedAnalysis;
import org.polarsys.chess.chessmlprofile.Dependability.StateBased.StateBasedAnalysis.StateBasedAnalysisFactory;
......@@ -90,7 +91,7 @@ public class StateBasedAnalysisPackageImpl extends EPackageImpl implements State
* <!-- end-user-doc -->
* @generated
*/
private EClass cyberSecurityAnalysisEClass = null;
private EClass sanAnalysisEClass = null;
/**
* <!-- begin-user-doc -->
......@@ -249,8 +250,8 @@ public class StateBasedAnalysisPackageImpl extends EPackageImpl implements State
* <!-- end-user-doc -->
* @generated
*/
public EClass getCyberSecurityAnalysis() {
return cyberSecurityAnalysisEClass;
public EClass getSANAnalysis() {
return sanAnalysisEClass;
}
/**
......@@ -258,8 +259,8 @@ public class StateBasedAnalysisPackageImpl extends EPackageImpl implements State
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getCyberSecurityAnalysis_Condition() {
return (EAttribute)cyberSecurityAnalysisEClass.getEStructuralFeatures().get(0);
public EAttribute getSANAnalysis_Condition() {
return (EAttribute)sanAnalysisEClass.getEStructuralFeatures().get(0);
}
/**
......@@ -398,8 +399,8 @@ public class StateBasedAnalysisPackageImpl extends EPackageImpl implements State
isCreated = true;
// Create classes and their features
cyberSecurityAnalysisEClass = createEClass(CYBER_SECURITY_ANALYSIS);
createEAttribute(cyberSecurityAnalysisEClass, CYBER_SECURITY_ANALYSIS__CONDITION);
sanAnalysisEClass = createEClass(SAN_ANALYSIS);
createEAttribute(sanAnalysisEClass, SAN_ANALYSIS__CONDITION);
stateBasedAnalysisEClass = createEClass(STATE_BASED_ANALYSIS);
createEAttribute(stateBasedAnalysisEClass, STATE_BASED_ANALYSIS__MEASURE);
......@@ -449,12 +450,12 @@ public class StateBasedAnalysisPackageImpl extends EPackageImpl implements State
// Set bounds for type parameters
// Add supertypes to classes
cyberSecurityAnalysisEClass.getESuperTypes().add(theGQAMPackage.getGaAnalysisContext());
sanAnalysisEClass.getESuperTypes().add(theGQAMPackage.getGaAnalysisContext());
stateBasedAnalysisEClass.getESuperTypes().add(theGQAMPackage.getGaAnalysisContext());
// Initialize classes and features; add operations and parameters
initEClass(cyberSecurityAnalysisEClass, CyberSecurityAnalysis.class, "CyberSecurityAnalysis", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getCyberSecurityAnalysis_Condition(), theTypesPackage.getString(), "condition", null, 1, 1, CyberSecurityAnalysis.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEClass(sanAnalysisEClass, SANAnalysis.class, "SANAnalysis", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getSANAnalysis_Condition(), theTypesPackage.getString(), "condition", null, 1, 1, SANAnalysis.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEClass(stateBasedAnalysisEClass, StateBasedAnalysis.class, "StateBasedAnalysis", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getStateBasedAnalysis_Measure(), theTypesPackage.getString(), "measure", null, 1, 1, StateBasedAnalysis.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
......
......@@ -77,8 +77,8 @@ public class StateBasedAnalysisAdapterFactory extends AdapterFactoryImpl {
protected StateBasedAnalysisSwitch<Adapter> modelSwitch =
new StateBasedAnalysisSwitch<Adapter>() {
@Override
public Adapter caseCyberSecurityAnalysis(CyberSecurityAnalysis object) {
return createCyberSecurityAnalysisAdapter();
public Adapter caseSANAnalysis(SANAnalysis object) {
return createSANAnalysisAdapter();
}
@Override
public Adapter caseStateBasedAnalysis(StateBasedAnalysis object) {
......@@ -121,16 +121,16 @@ public class StateBasedAnalysisAdapterFactory extends AdapterFactoryImpl {
/**
* Creates a new adapter for an object of class '{@link org.polarsys.chess.chessmlprofile.Dependability.StateBased.StateBasedAnalysis.CyberSecurityAnalysis <em>Cyber Security Analysis</em>}'.
* Creates a new adapter for an object of class '{@link org.polarsys.chess.chessmlprofile.Dependability.StateBased.StateBasedAnalysis.SANAnalysis <em>SAN Analysis</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see org.polarsys.chess.chessmlprofile.Dependability.StateBased.StateBasedAnalysis.CyberSecurityAnalysis
* @see org.polarsys.chess.chessmlprofile.Dependability.StateBased.StateBasedAnalysis.SANAnalysis
* @generated
*/
public Adapter createCyberSecurityAnalysisAdapter() {
public Adapter createSANAnalysisAdapter() {
return null;
}
......
......@@ -79,12 +79,12 @@ public class StateBasedAnalysisSwitch<T> extends Switch<T> {
@Override
protected T doSwitch(int classifierID, EObject theEObject) {
switch (classifierID) {
case StateBasedAnalysisPackage.CYBER_SECURITY_ANALYSIS: {
CyberSecurityAnalysis cyberSecurityAnalysis = (CyberSecurityAnalysis)theEObject;
T result = caseCyberSecurityAnalysis(cyberSecurityAnalysis);
if (result == null) result = caseGaAnalysisContext(cyberSecurityAnalysis);
if (result == null) result = caseConfiguration(cyberSecurityAnalysis);
if (result == null) result = caseExpressionContext(cyberSecurityAnalysis);
case StateBasedAnalysisPackage.SAN_ANALYSIS: {
SANAnalysis sanAnalysis = (SANAnalysis)theEObject;
T result = caseSANAnalysis(sanAnalysis);
if (result == null) result = caseGaAnalysisContext(sanAnalysis);
if (result == null) result = caseConfiguration(sanAnalysis);
if (result == null) result = caseExpressionContext(sanAnalysis);
if (result == null) result = defaultCase(theEObject);
return result;
}
......@@ -108,17 +108,17 @@ public class StateBasedAnalysisSwitch<T> extends Switch<T> {
}
/**
* Returns the result of interpreting the object as an instance of '<em>Cyber Security Analysis</em>'.
* Returns the result of interpreting the object as an instance of '<em>SAN Analysis</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Cyber Security Analysis</em>'.
* @return the result of interpreting the object as an instance of '<em>SAN Analysis</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseCyberSecurityAnalysis(CyberSecurityAnalysis object) {
public T caseSANAnalysis(SANAnalysis object) {
return null;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment