Removes generated code + added src-gen folder to the gitignores

This commit is contained in:
Maximilian Kratz 2024-03-08 11:10:37 +01:00
parent c425468845
commit 7a0f2d8980
27 changed files with 2 additions and 2526 deletions

View file

@ -1 +1,2 @@
/bin/
/src-gen/

View file

@ -1,21 +0,0 @@
package classDiagram;
import classDiagram.ClassDiagramPackage;
import org.emoflon.smartemf.runtime.notification.SmartEMFNotification;
import org.emoflon.smartemf.runtime.SmartObject;
import org.emoflon.smartemf.runtime.collections.*;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
public interface Attribute extends EObject, classDiagram.Feature {
public java.lang.String getName();
public void setName(java.lang.String value);
}

View file

@ -1,26 +0,0 @@
package classDiagram;
import classDiagram.ClazzModel;
import classDiagram.Clazz;
import classDiagram.Feature;
import classDiagram.Method;
import classDiagram.Attribute;
import org.eclipse.emf.ecore.EFactory;
public interface ClassDiagramFactory extends EFactory {
ClassDiagramFactory eINSTANCE = classDiagram.impl.ClassDiagramFactoryImpl.init();
ClazzModel createClazzModel();
Clazz createClazz();
Method createMethod();
Attribute createAttribute();
ClassDiagramPackage getClassDiagramPackage();
}

View file

@ -1,95 +0,0 @@
package classDiagram;
import java.lang.String;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.EEnum;
import org.emoflon.smartemf.runtime.SmartPackage;
public interface ClassDiagramPackage extends SmartPackage {
String eNAME = "classDiagram";
String eNS_URI = "platform:/resource/ClassDiagram/model/classDiagram.ecore";
String eNS_PREFIX = "classDiagram";
ClassDiagramPackage eINSTANCE = classDiagram.impl.ClassDiagramPackageImpl.init();
int CLAZZ_MODEL = 0;
int CLAZZ_MODEL__CLAZZES = 0;
int CLAZZ_MODEL_FEATURE_COUNT = 1;
int CLAZZ_MODEL_OPERATION_COUNT = 0;
int CLAZZ = 1;
int CLAZZ__NAME = 1;
int CLAZZ__FEATURES = 2;
int CLAZZ_FEATURE_COUNT = 2;
int CLAZZ_OPERATION_COUNT = 0;
int FEATURE = 2;
int FEATURE__NAME = 3;
int FEATURE_FEATURE_COUNT = 1;
int FEATURE_OPERATION_COUNT = 0;
int METHOD = 3;
int METHOD__DEPENDENCIES = 4;
int METHOD_FEATURE_COUNT = 2;
int METHOD_OPERATION_COUNT = 0;
int ATTRIBUTE = 4;
int ATTRIBUTE_FEATURE_COUNT = 1;
int ATTRIBUTE_OPERATION_COUNT = 0;
EClass getClazzModel();
EReference getClazzModel_Clazzes();
EClass getClazz();
EAttribute getClazz_Name();
EReference getClazz_Features();
EClass getFeature();
EAttribute getFeature_Name();
EClass getMethod();
EReference getMethod_Dependencies();
EClass getAttribute();
classDiagram.ClassDiagramFactory getClassDiagramFactory();
interface Literals {
EClass CLAZZ_MODEL = eINSTANCE.getClazzModel();
EReference CLAZZ_MODEL__CLAZZES = eINSTANCE.getClazzModel_Clazzes();
EClass CLAZZ = eINSTANCE.getClazz();
EAttribute CLAZZ__NAME = eINSTANCE.getClazz_Name();
EReference CLAZZ__FEATURES = eINSTANCE.getClazz_Features();
EClass FEATURE = eINSTANCE.getFeature();
EAttribute FEATURE__NAME = eINSTANCE.getFeature_Name();
EClass METHOD = eINSTANCE.getMethod();
EReference METHOD__DEPENDENCIES = eINSTANCE.getMethod_Dependencies();
EClass ATTRIBUTE = eINSTANCE.getAttribute();
}
}

View file

@ -1,25 +0,0 @@
package classDiagram;
import classDiagram.ClassDiagramPackage;
import org.emoflon.smartemf.runtime.notification.SmartEMFNotification;
import org.emoflon.smartemf.runtime.SmartObject;
import org.emoflon.smartemf.runtime.collections.*;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
public interface Clazz extends EObject {
public java.lang.String getName();
public void setName(java.lang.String value);
public LinkedSmartESet<classDiagram.Feature> getFeatures();
public void setFeatures(LinkedSmartESet<classDiagram.Feature> value);
}

View file

@ -1,21 +0,0 @@
package classDiagram;
import classDiagram.ClassDiagramPackage;
import org.emoflon.smartemf.runtime.notification.SmartEMFNotification;
import org.emoflon.smartemf.runtime.SmartObject;
import org.emoflon.smartemf.runtime.collections.*;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
public interface ClazzModel extends EObject {
public LinkedSmartESet<classDiagram.Clazz> getClazzes();
public void setClazzes(LinkedSmartESet<classDiagram.Clazz> value);
}

View file

@ -1,21 +0,0 @@
package classDiagram;
import classDiagram.ClassDiagramPackage;
import org.emoflon.smartemf.runtime.notification.SmartEMFNotification;
import org.emoflon.smartemf.runtime.SmartObject;
import org.emoflon.smartemf.runtime.collections.*;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
public interface Feature extends EObject {
public java.lang.String getName();
public void setName(java.lang.String value);
}

View file

@ -1,25 +0,0 @@
package classDiagram;
import classDiagram.ClassDiagramPackage;
import org.emoflon.smartemf.runtime.notification.SmartEMFNotification;
import org.emoflon.smartemf.runtime.SmartObject;
import org.emoflon.smartemf.runtime.collections.*;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
public interface Method extends EObject, classDiagram.Feature {
public java.lang.String getName();
public void setName(java.lang.String value);
public LinkedSmartESet<classDiagram.Attribute> getDependencies();
public void setDependencies(LinkedSmartESet<classDiagram.Attribute> value);
}

View file

@ -1,118 +0,0 @@
package classDiagram.impl;
import classDiagram.ClassDiagramPackage;
import classDiagram.ClassDiagramPackage;
import org.emoflon.smartemf.runtime.*;
import org.emoflon.smartemf.runtime.collections.*;
import org.emoflon.smartemf.persistence.SmartEMFResource;
import org.emoflon.smartemf.runtime.notification.SmartEMFNotification;
import org.emoflon.smartemf.runtime.notification.NotifyStatus;
import java.util.function.Consumer;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EcoreFactory;
import org.eclipse.emf.ecore.EcorePackage;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.resource.Resource;
public class AttributeImpl extends SmartObject implements classDiagram.Attribute {
protected java.lang.String name = null;
protected AttributeImpl() {
super(ClassDiagramPackage.Literals.ATTRIBUTE);
}
@Override
public java.lang.String getName() {
return this.name;
}
@Override
public void setName(java.lang.String value) {
Object oldValue = this.name;
this.name = value;
sendNotification(SmartEMFNotification.createSetNotification(this, ClassDiagramPackage.Literals.FEATURE__NAME, oldValue, value, -1));
}
@Override
public void eSet(EStructuralFeature eFeature, Object newValue){
if (ClassDiagramPackage.Literals.FEATURE__NAME.equals(eFeature)) {
setName((java.lang.String) newValue);
return;
}
eDynamicSet(eFeature, newValue);
}
@Override
public void eUnset(EStructuralFeature eFeature){
if (ClassDiagramPackage.Literals.FEATURE__NAME.equals(eFeature)) {
setName((java.lang.String)null);
return;
}
eDynamicUnset(eFeature);
}
@Override
public String toString(){
StringBuilder b = new StringBuilder();
b.append(super.toString());
b.append(" (");
if (SmartEMFConfig.simpleStringRepresentations()) {
b.append(getName());
} else {
b.append("name: ");
b.append(getName());
}
b.append(")");
return b.toString();
}
@Override
public Object eGet(EStructuralFeature eFeature){
if (ClassDiagramPackage.Literals.FEATURE__NAME.equals(eFeature))
return getName();
return eDynamicGet(eFeature);
}
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType){
throw new UnsupportedOperationException("This method has been deactivated since it is not always safe to use.");
}
@Override
public void eInverseAdd(Object otherEnd, EStructuralFeature feature) {
if(feature == null)
return;
eDynamicInverseAdd(otherEnd, feature);
}
@Override
public void eInverseRemove(Object otherEnd, EStructuralFeature feature) {
if(feature == null)
return;
eDynamicInverseRemove(otherEnd, feature);
}
@Override
/**
* This method sets the resource and generates REMOVING_ADAPTER and ADD notifications
*/
protected void setResourceOfContainments(Consumer<SmartObject> setResourceCall) {
}
@Override
/**
* This method sets the resource and only generates REMOVING_ADAPTER notifications (no ADD messages)
*/
protected void setResourceOfContainmentsSilently(Resource r) {
}
}

View file

@ -1,84 +0,0 @@
package classDiagram.impl;
import classDiagram.ClazzModel;
import classDiagram.Clazz;
import classDiagram.Feature;
import classDiagram.Method;
import classDiagram.Attribute;
import classDiagram.ClassDiagramFactory;
import classDiagram.ClassDiagramPackage;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.impl.EFactoryImpl;
import org.eclipse.emf.ecore.plugin.EcorePlugin;
public class ClassDiagramFactoryImpl extends EFactoryImpl implements classDiagram.ClassDiagramFactory {
public static classDiagram.ClassDiagramFactory init() {
try {
ClassDiagramFactory theClassDiagramFactory = (ClassDiagramFactory) EPackage.Registry.INSTANCE
.getEFactory(ClassDiagramPackage.eNS_URI);
if (theClassDiagramFactory != null) {
return theClassDiagramFactory;
}
} catch (java.lang.Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new ClassDiagramFactoryImpl();
}
public ClassDiagramFactoryImpl() {
super();
}
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
case ClassDiagramPackage.CLAZZ_MODEL:
return createClazzModel();
case ClassDiagramPackage.CLAZZ:
return createClazz();
case ClassDiagramPackage.METHOD:
return createMethod();
case ClassDiagramPackage.ATTRIBUTE:
return createAttribute();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
}
@Override
public classDiagram.ClazzModel createClazzModel() {
ClazzModelImpl clazzModel = new ClazzModelImpl();
return clazzModel;
}
@Override
public classDiagram.Clazz createClazz() {
ClazzImpl clazz = new ClazzImpl();
return clazz;
}
@Override
public classDiagram.Method createMethod() {
MethodImpl method = new MethodImpl();
return method;
}
@Override
public classDiagram.Attribute createAttribute() {
AttributeImpl attribute = new AttributeImpl();
return attribute;
}
@Override
public ClassDiagramPackage getClassDiagramPackage() {
return (ClassDiagramPackage) getEPackage();
}
}

View file

@ -1,231 +0,0 @@
package classDiagram.impl;
import classDiagram.ClazzModel;
import classDiagram.Clazz;
import classDiagram.Feature;
import classDiagram.Method;
import classDiagram.Attribute;
import classDiagram.ClassDiagramFactory;
import classDiagram.ClassDiagramPackage;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EEnum;
import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.EcorePackage;
import org.eclipse.emf.ecore.impl.EPackageImpl;
import org.emoflon.smartemf.runtime.SmartPackageImpl;
public class ClassDiagramPackageImpl extends SmartPackageImpl
implements ClassDiagramPackage {
private EClass clazzModelEClass = null;
private EReference clazzModel_clazzesEReference = null;
private EClass clazzEClass = null;
private EAttribute clazz_nameEAttribute = null;
private EReference clazz_featuresEReference = null;
private EClass featureEClass = null;
private EAttribute feature_nameEAttribute = null;
private EClass methodEClass = null;
private EReference method_dependenciesEReference = null;
private EClass attributeEClass = null;
private ClassDiagramPackageImpl() {
super(eNS_URI, classDiagram.ClassDiagramFactory.eINSTANCE);
}
private static boolean isRegistered = false;
private boolean isCreated = false;
private boolean isInitialized = false;
public static ClassDiagramPackage init() {
if (isRegistered)
return (ClassDiagramPackage) EPackage.Registry.INSTANCE
.getEPackage(ClassDiagramPackage.eNS_URI);
// Obtain or create and register package
Object registeredClassDiagramPackage = EPackage.Registry.INSTANCE.get(eNS_URI);
ClassDiagramPackageImpl theClassDiagramPackage = registeredClassDiagramPackage instanceof ClassDiagramPackageImpl
? (ClassDiagramPackageImpl) registeredClassDiagramPackage
: new ClassDiagramPackageImpl();
isRegistered = true;
// Create package meta-data objects
theClassDiagramPackage.createPackageContents();
// Initialize created meta-data
theClassDiagramPackage.initializePackageContents();
// Inject internal eOpposites to unidirectional references
theClassDiagramPackage.injectDynamicOpposites();
// Inject external references into foreign packages
theClassDiagramPackage.injectExternalReferences();
// Mark meta-data to indicate it can't be changed
theClassDiagramPackage.freeze();
// Update the registry and return the package
EPackage.Registry.INSTANCE.put(ClassDiagramPackage.eNS_URI,
theClassDiagramPackage);
theClassDiagramPackage.fetchDynamicEStructuralFeaturesOfSuperTypes();
return theClassDiagramPackage;
}
@Override
public EClass getClazzModel() {
return clazzModelEClass;
}
@Override
public EReference getClazzModel_Clazzes() {
return clazzModel_clazzesEReference;
}
@Override
public EClass getClazz() {
return clazzEClass;
}
@Override
public EAttribute getClazz_Name() {
return clazz_nameEAttribute;
}
@Override
public EReference getClazz_Features() {
return clazz_featuresEReference;
}
@Override
public EClass getFeature() {
return featureEClass;
}
@Override
public EAttribute getFeature_Name() {
return feature_nameEAttribute;
}
@Override
public EClass getMethod() {
return methodEClass;
}
@Override
public EReference getMethod_Dependencies() {
return method_dependenciesEReference;
}
@Override
public EClass getAttribute() {
return attributeEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public classDiagram.ClassDiagramFactory getClassDiagramFactory() {
return (classDiagram.ClassDiagramFactory) getEFactoryInstance();
}
public void createPackageContents() {
if (isCreated)
return;
isCreated = true;
// Create classes and their features
clazzModelEClass = createEClass(CLAZZ_MODEL);
createEReference(clazzModelEClass, CLAZZ_MODEL__CLAZZES);
clazzModel_clazzesEReference = (EReference) clazzModelEClass.getEStructuralFeatures().get(0);
clazzEClass = createEClass(CLAZZ);
createEAttribute(clazzEClass, CLAZZ__NAME);
clazz_nameEAttribute = (EAttribute) clazzEClass.getEStructuralFeatures().get(0);
createEReference(clazzEClass, CLAZZ__FEATURES);
clazz_featuresEReference = (EReference) clazzEClass.getEStructuralFeatures().get(1);
featureEClass = createEClass(FEATURE);
createEAttribute(featureEClass, FEATURE__NAME);
feature_nameEAttribute = (EAttribute) featureEClass.getEStructuralFeatures().get(0);
methodEClass = createEClass(METHOD);
createEReference(methodEClass, METHOD__DEPENDENCIES);
method_dependenciesEReference = (EReference) methodEClass.getEStructuralFeatures().get(0);
attributeEClass = createEClass(ATTRIBUTE);
// Create enums
// Create data types
}
public void initializePackageContents() {
if (isInitialized)
return;
isInitialized = true;
// Initialize package
setName(eNAME);
setNsPrefix(eNS_PREFIX);
setNsURI(eNS_URI);
// Obtain other dependent packages
// Create type parameters
// Set bounds for type parameters
// Add supertypes to classes
methodEClass.getESuperTypes().add(this.getFeature());
attributeEClass.getESuperTypes().add(this.getFeature());
// Initialize classes, features, and operations; add parameters
initEClass(clazzModelEClass, ClazzModel.class, "ClazzModel", !IS_ABSTRACT, !IS_INTERFACE,
IS_GENERATED_INSTANCE_CLASS);
initEReference(getClazzModel_Clazzes(), this.getClazz(), null,
"clazzes", null, 0, -1, ClazzModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, IS_RESOLVE_PROXIES,
!IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(clazzEClass, Clazz.class, "Clazz", !IS_ABSTRACT, !IS_INTERFACE,
IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getClazz_Name(), ecorePackage.getEString(),
"name", null, 0, 1, Clazz.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, IS_ID, IS_UNIQUE,
!IS_DERIVED, IS_ORDERED);
initEReference(getClazz_Features(), this.getFeature(), null,
"features", null, 0, -1, Clazz.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, IS_RESOLVE_PROXIES,
!IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(featureEClass, Feature.class, "Feature", IS_ABSTRACT, !IS_INTERFACE,
IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getFeature_Name(), ecorePackage.getEString(),
"name", null, 0, 1, Feature.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, IS_ID, IS_UNIQUE,
!IS_DERIVED, IS_ORDERED);
initEClass(methodEClass, Method.class, "Method", !IS_ABSTRACT, !IS_INTERFACE,
IS_GENERATED_INSTANCE_CLASS);
initEReference(getMethod_Dependencies(), this.getAttribute(), null,
"dependencies", null, 0, -1, Method.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES,
!IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(attributeEClass, Attribute.class, "Attribute", !IS_ABSTRACT, !IS_INTERFACE,
IS_GENERATED_INSTANCE_CLASS);
// Initialize enums and add enum literals
// Initialize data types
// Create resource
createResource(eNS_URI);
}
}

View file

@ -1,146 +0,0 @@
package classDiagram.impl;
import classDiagram.ClassDiagramPackage;
import classDiagram.ClassDiagramPackage;
import org.emoflon.smartemf.runtime.*;
import org.emoflon.smartemf.runtime.collections.*;
import org.emoflon.smartemf.persistence.SmartEMFResource;
import org.emoflon.smartemf.runtime.notification.SmartEMFNotification;
import org.emoflon.smartemf.runtime.notification.NotifyStatus;
import java.util.function.Consumer;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EcoreFactory;
import org.eclipse.emf.ecore.EcorePackage;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.resource.Resource;
public class ClazzImpl extends SmartObject implements classDiagram.Clazz {
protected java.lang.String name = null;
protected LinkedSmartESet<classDiagram.Feature> features = new LinkedSmartESet<classDiagram.Feature>(this, ClassDiagramPackage.Literals.CLAZZ__FEATURES);
protected ClazzImpl() {
super(ClassDiagramPackage.Literals.CLAZZ);
}
@Override
public java.lang.String getName() {
return this.name;
}
@Override
public void setName(java.lang.String value) {
Object oldValue = this.name;
this.name = value;
sendNotification(SmartEMFNotification.createSetNotification(this, ClassDiagramPackage.Literals.CLAZZ__NAME, oldValue, value, -1));
}
@Override
public LinkedSmartESet<classDiagram.Feature> getFeatures() {
return this.features;
}
@Override
public void setFeatures(LinkedSmartESet<classDiagram.Feature> value) {
throw new UnsupportedOperationException("Set methods for SmartEMF collections are not supported.");
}
@Override
public void eSet(EStructuralFeature eFeature, Object newValue){
if (ClassDiagramPackage.Literals.CLAZZ__NAME.equals(eFeature)) {
setName((java.lang.String) newValue);
return;
}
if (ClassDiagramPackage.Literals.CLAZZ__FEATURES.equals(eFeature)) {
setFeatures((LinkedSmartESet<classDiagram.Feature>) newValue);
return;
}
eDynamicSet(eFeature, newValue);
}
@Override
public void eUnset(EStructuralFeature eFeature){
if (ClassDiagramPackage.Literals.CLAZZ__NAME.equals(eFeature)) {
setName((java.lang.String)null);
return;
}
if (ClassDiagramPackage.Literals.CLAZZ__FEATURES.equals(eFeature)) {
getFeatures().clear();
return;
}
eDynamicUnset(eFeature);
}
@Override
public String toString(){
StringBuilder b = new StringBuilder();
b.append(super.toString());
b.append(" (");
if (SmartEMFConfig.simpleStringRepresentations()) {
b.append(getName());
} else {
b.append("name: ");
b.append(getName());
}
b.append(")");
return b.toString();
}
@Override
public Object eGet(EStructuralFeature eFeature){
if (ClassDiagramPackage.Literals.CLAZZ__NAME.equals(eFeature))
return getName();
if (ClassDiagramPackage.Literals.CLAZZ__FEATURES.equals(eFeature))
return getFeatures();
return eDynamicGet(eFeature);
}
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType){
throw new UnsupportedOperationException("This method has been deactivated since it is not always safe to use.");
}
@Override
public void eInverseAdd(Object otherEnd, EStructuralFeature feature) {
if(feature == null)
return;
eDynamicInverseAdd(otherEnd, feature);
}
@Override
public void eInverseRemove(Object otherEnd, EStructuralFeature feature) {
if(feature == null)
return;
eDynamicInverseRemove(otherEnd, feature);
}
@Override
/**
* This method sets the resource and generates REMOVING_ADAPTER and ADD notifications
*/
protected void setResourceOfContainments(Consumer<SmartObject> setResourceCall) {
for(Object obj : getFeatures()) {
setResourceCall.accept(((SmartObject) obj));
}
}
@Override
/**
* This method sets the resource and only generates REMOVING_ADAPTER notifications (no ADD messages)
*/
protected void setResourceOfContainmentsSilently(Resource r) {
for(Object obj : getFeatures()) {
((SmartObject) obj).setResourceSilently(r);
}
}
}

View file

@ -1,111 +0,0 @@
package classDiagram.impl;
import classDiagram.ClassDiagramPackage;
import classDiagram.ClassDiagramPackage;
import org.emoflon.smartemf.runtime.*;
import org.emoflon.smartemf.runtime.collections.*;
import org.emoflon.smartemf.persistence.SmartEMFResource;
import org.emoflon.smartemf.runtime.notification.SmartEMFNotification;
import org.emoflon.smartemf.runtime.notification.NotifyStatus;
import java.util.function.Consumer;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EcoreFactory;
import org.eclipse.emf.ecore.EcorePackage;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.resource.Resource;
public class ClazzModelImpl extends SmartObject implements classDiagram.ClazzModel {
protected LinkedSmartESet<classDiagram.Clazz> clazzes = new LinkedSmartESet<classDiagram.Clazz>(this, ClassDiagramPackage.Literals.CLAZZ_MODEL__CLAZZES);
protected ClazzModelImpl() {
super(ClassDiagramPackage.Literals.CLAZZ_MODEL);
}
@Override
public LinkedSmartESet<classDiagram.Clazz> getClazzes() {
return this.clazzes;
}
@Override
public void setClazzes(LinkedSmartESet<classDiagram.Clazz> value) {
throw new UnsupportedOperationException("Set methods for SmartEMF collections are not supported.");
}
@Override
public void eSet(EStructuralFeature eFeature, Object newValue){
if (ClassDiagramPackage.Literals.CLAZZ_MODEL__CLAZZES.equals(eFeature)) {
setClazzes((LinkedSmartESet<classDiagram.Clazz>) newValue);
return;
}
eDynamicSet(eFeature, newValue);
}
@Override
public void eUnset(EStructuralFeature eFeature){
if (ClassDiagramPackage.Literals.CLAZZ_MODEL__CLAZZES.equals(eFeature)) {
getClazzes().clear();
return;
}
eDynamicUnset(eFeature);
}
@Override
public String toString(){
return super.toString();
}
@Override
public Object eGet(EStructuralFeature eFeature){
if (ClassDiagramPackage.Literals.CLAZZ_MODEL__CLAZZES.equals(eFeature))
return getClazzes();
return eDynamicGet(eFeature);
}
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType){
throw new UnsupportedOperationException("This method has been deactivated since it is not always safe to use.");
}
@Override
public void eInverseAdd(Object otherEnd, EStructuralFeature feature) {
if(feature == null)
return;
eDynamicInverseAdd(otherEnd, feature);
}
@Override
public void eInverseRemove(Object otherEnd, EStructuralFeature feature) {
if(feature == null)
return;
eDynamicInverseRemove(otherEnd, feature);
}
@Override
/**
* This method sets the resource and generates REMOVING_ADAPTER and ADD notifications
*/
protected void setResourceOfContainments(Consumer<SmartObject> setResourceCall) {
for(Object obj : getClazzes()) {
setResourceCall.accept(((SmartObject) obj));
}
}
@Override
/**
* This method sets the resource and only generates REMOVING_ADAPTER notifications (no ADD messages)
*/
protected void setResourceOfContainmentsSilently(Resource r) {
for(Object obj : getClazzes()) {
((SmartObject) obj).setResourceSilently(r);
}
}
}

View file

@ -1,118 +0,0 @@
package classDiagram.impl;
import classDiagram.ClassDiagramPackage;
import classDiagram.ClassDiagramPackage;
import org.emoflon.smartemf.runtime.*;
import org.emoflon.smartemf.runtime.collections.*;
import org.emoflon.smartemf.persistence.SmartEMFResource;
import org.emoflon.smartemf.runtime.notification.SmartEMFNotification;
import org.emoflon.smartemf.runtime.notification.NotifyStatus;
import java.util.function.Consumer;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EcoreFactory;
import org.eclipse.emf.ecore.EcorePackage;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.resource.Resource;
public class FeatureImpl extends SmartObject implements classDiagram.Feature {
protected java.lang.String name = null;
protected FeatureImpl() {
super(ClassDiagramPackage.Literals.FEATURE);
}
@Override
public java.lang.String getName() {
return this.name;
}
@Override
public void setName(java.lang.String value) {
Object oldValue = this.name;
this.name = value;
sendNotification(SmartEMFNotification.createSetNotification(this, ClassDiagramPackage.Literals.FEATURE__NAME, oldValue, value, -1));
}
@Override
public void eSet(EStructuralFeature eFeature, Object newValue){
if (ClassDiagramPackage.Literals.FEATURE__NAME.equals(eFeature)) {
setName((java.lang.String) newValue);
return;
}
eDynamicSet(eFeature, newValue);
}
@Override
public void eUnset(EStructuralFeature eFeature){
if (ClassDiagramPackage.Literals.FEATURE__NAME.equals(eFeature)) {
setName((java.lang.String)null);
return;
}
eDynamicUnset(eFeature);
}
@Override
public String toString(){
StringBuilder b = new StringBuilder();
b.append(super.toString());
b.append(" (");
if (SmartEMFConfig.simpleStringRepresentations()) {
b.append(getName());
} else {
b.append("name: ");
b.append(getName());
}
b.append(")");
return b.toString();
}
@Override
public Object eGet(EStructuralFeature eFeature){
if (ClassDiagramPackage.Literals.FEATURE__NAME.equals(eFeature))
return getName();
return eDynamicGet(eFeature);
}
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType){
throw new UnsupportedOperationException("This method has been deactivated since it is not always safe to use.");
}
@Override
public void eInverseAdd(Object otherEnd, EStructuralFeature feature) {
if(feature == null)
return;
eDynamicInverseAdd(otherEnd, feature);
}
@Override
public void eInverseRemove(Object otherEnd, EStructuralFeature feature) {
if(feature == null)
return;
eDynamicInverseRemove(otherEnd, feature);
}
@Override
/**
* This method sets the resource and generates REMOVING_ADAPTER and ADD notifications
*/
protected void setResourceOfContainments(Consumer<SmartObject> setResourceCall) {
}
@Override
/**
* This method sets the resource and only generates REMOVING_ADAPTER notifications (no ADD messages)
*/
protected void setResourceOfContainmentsSilently(Resource r) {
}
}

View file

@ -1,140 +0,0 @@
package classDiagram.impl;
import classDiagram.ClassDiagramPackage;
import classDiagram.ClassDiagramPackage;
import org.emoflon.smartemf.runtime.*;
import org.emoflon.smartemf.runtime.collections.*;
import org.emoflon.smartemf.persistence.SmartEMFResource;
import org.emoflon.smartemf.runtime.notification.SmartEMFNotification;
import org.emoflon.smartemf.runtime.notification.NotifyStatus;
import java.util.function.Consumer;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EcoreFactory;
import org.eclipse.emf.ecore.EcorePackage;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.resource.Resource;
public class MethodImpl extends SmartObject implements classDiagram.Method {
protected java.lang.String name = null;
protected LinkedSmartESet<classDiagram.Attribute> dependencies = new LinkedSmartESet<classDiagram.Attribute>(this, ClassDiagramPackage.Literals.METHOD__DEPENDENCIES);
protected MethodImpl() {
super(ClassDiagramPackage.Literals.METHOD);
}
@Override
public java.lang.String getName() {
return this.name;
}
@Override
public void setName(java.lang.String value) {
Object oldValue = this.name;
this.name = value;
sendNotification(SmartEMFNotification.createSetNotification(this, ClassDiagramPackage.Literals.FEATURE__NAME, oldValue, value, -1));
}
@Override
public LinkedSmartESet<classDiagram.Attribute> getDependencies() {
return this.dependencies;
}
@Override
public void setDependencies(LinkedSmartESet<classDiagram.Attribute> value) {
throw new UnsupportedOperationException("Set methods for SmartEMF collections are not supported.");
}
@Override
public void eSet(EStructuralFeature eFeature, Object newValue){
if (ClassDiagramPackage.Literals.FEATURE__NAME.equals(eFeature)) {
setName((java.lang.String) newValue);
return;
}
if (ClassDiagramPackage.Literals.METHOD__DEPENDENCIES.equals(eFeature)) {
setDependencies((LinkedSmartESet<classDiagram.Attribute>) newValue);
return;
}
eDynamicSet(eFeature, newValue);
}
@Override
public void eUnset(EStructuralFeature eFeature){
if (ClassDiagramPackage.Literals.FEATURE__NAME.equals(eFeature)) {
setName((java.lang.String)null);
return;
}
if (ClassDiagramPackage.Literals.METHOD__DEPENDENCIES.equals(eFeature)) {
getDependencies().clear();
return;
}
eDynamicUnset(eFeature);
}
@Override
public String toString(){
StringBuilder b = new StringBuilder();
b.append(super.toString());
b.append(" (");
if (SmartEMFConfig.simpleStringRepresentations()) {
b.append(getName());
} else {
b.append("name: ");
b.append(getName());
}
b.append(")");
return b.toString();
}
@Override
public Object eGet(EStructuralFeature eFeature){
if (ClassDiagramPackage.Literals.FEATURE__NAME.equals(eFeature))
return getName();
if (ClassDiagramPackage.Literals.METHOD__DEPENDENCIES.equals(eFeature))
return getDependencies();
return eDynamicGet(eFeature);
}
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType){
throw new UnsupportedOperationException("This method has been deactivated since it is not always safe to use.");
}
@Override
public void eInverseAdd(Object otherEnd, EStructuralFeature feature) {
if(feature == null)
return;
eDynamicInverseAdd(otherEnd, feature);
}
@Override
public void eInverseRemove(Object otherEnd, EStructuralFeature feature) {
if(feature == null)
return;
eDynamicInverseRemove(otherEnd, feature);
}
@Override
/**
* This method sets the resource and generates REMOVING_ADAPTER and ADD notifications
*/
protected void setResourceOfContainments(Consumer<SmartObject> setResourceCall) {
}
@Override
/**
* This method sets the resource and only generates REMOVING_ADAPTER notifications (no ADD messages)
*/
protected void setResourceOfContainmentsSilently(Resource r) {
}
}

View file

@ -1,195 +0,0 @@
/**
*/
package classDiagram.util;
import classDiagram.*;
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.Notifier;
import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc -->
* The <b>Adapter Factory</b> for the model.
* It provides an adapter <code>createXXX</code> method for each class of the model.
* <!-- end-user-doc -->
* @see classDiagram.ClassDiagramPackage
* @generated
*/
public class ClassDiagramAdapterFactory extends AdapterFactoryImpl {
/**
* The cached model package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static ClassDiagramPackage modelPackage;
/**
* Creates an instance of the adapter factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ClassDiagramAdapterFactory() {
if (modelPackage == null) {
modelPackage = ClassDiagramPackage.eINSTANCE;
}
}
/**
* Returns whether this factory is applicable for the type of the object.
* <!-- begin-user-doc -->
* This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
* <!-- end-user-doc -->
* @return whether this factory is applicable for the type of the object.
* @generated
*/
@Override
public boolean isFactoryForType(Object object) {
if (object == modelPackage) {
return true;
}
if (object instanceof EObject) {
return ((EObject) object).eClass().getEPackage() == modelPackage;
}
return false;
}
/**
* The switch that delegates to the <code>createXXX</code> methods.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ClassDiagramSwitch<Adapter> modelSwitch = new ClassDiagramSwitch<Adapter>() {
@Override
public Adapter caseClazzModel(ClazzModel object) {
return createClazzModelAdapter();
}
@Override
public Adapter caseClazz(Clazz object) {
return createClazzAdapter();
}
@Override
public Adapter caseFeature(Feature object) {
return createFeatureAdapter();
}
@Override
public Adapter caseMethod(Method object) {
return createMethodAdapter();
}
@Override
public Adapter caseAttribute(Attribute object) {
return createAttributeAdapter();
}
@Override
public Adapter defaultCase(EObject object) {
return createEObjectAdapter();
}
};
/**
* Creates an adapter for the <code>target</code>.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param target the object to adapt.
* @return the adapter for the <code>target</code>.
* @generated
*/
@Override
public Adapter createAdapter(Notifier target) {
return modelSwitch.doSwitch((EObject) target);
}
/**
* Creates a new adapter for an object of class '{@link classDiagram.ClazzModel <em>Clazz Model</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 classDiagram.ClazzModel
* @generated
*/
public Adapter createClazzModelAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link classDiagram.Clazz <em>Clazz</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 classDiagram.Clazz
* @generated
*/
public Adapter createClazzAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link classDiagram.Feature <em>Feature</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 classDiagram.Feature
* @generated
*/
public Adapter createFeatureAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link classDiagram.Method <em>Method</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 classDiagram.Method
* @generated
*/
public Adapter createMethodAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link classDiagram.Attribute <em>Attribute</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 classDiagram.Attribute
* @generated
*/
public Adapter createAttributeAdapter() {
return null;
}
/**
* Creates a new adapter for the default case.
* <!-- begin-user-doc -->
* This default implementation returns null.
* <!-- end-user-doc -->
* @return the new adapter.
* @generated
*/
public Adapter createEObjectAdapter() {
return null;
}
} //ClassDiagramAdapterFactory

View file

@ -1,204 +0,0 @@
/**
*/
package classDiagram.util;
import classDiagram.*;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.util.Switch;
/**
* <!-- begin-user-doc -->
* The <b>Switch</b> for the model's inheritance hierarchy.
* It supports the call {@link #doSwitch(EObject) doSwitch(object)}
* to invoke the <code>caseXXX</code> method for each class of the model,
* starting with the actual class of the object
* and proceeding up the inheritance hierarchy
* until a non-null result is returned,
* which is the result of the switch.
* <!-- end-user-doc -->
* @see classDiagram.ClassDiagramPackage
* @generated
*/
public class ClassDiagramSwitch<T> extends Switch<T> {
/**
* The cached model package
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static ClassDiagramPackage modelPackage;
/**
* Creates an instance of the switch.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ClassDiagramSwitch() {
if (modelPackage == null) {
modelPackage = ClassDiagramPackage.eINSTANCE;
}
}
/**
* Checks whether this is a switch for the given package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param ePackage the package in question.
* @return whether this is a switch for the given package.
* @generated
*/
@Override
protected boolean isSwitchFor(EPackage ePackage) {
return ePackage == modelPackage;
}
/**
* Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the first non-null result returned by a <code>caseXXX</code> call.
* @generated
*/
@Override
protected T doSwitch(int classifierID, EObject theEObject) {
switch (classifierID) {
case ClassDiagramPackage.CLAZZ_MODEL: {
ClazzModel clazzModel = (ClazzModel) theEObject;
T result = caseClazzModel(clazzModel);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case ClassDiagramPackage.CLAZZ: {
Clazz clazz = (Clazz) theEObject;
T result = caseClazz(clazz);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case ClassDiagramPackage.FEATURE: {
Feature feature = (Feature) theEObject;
T result = caseFeature(feature);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case ClassDiagramPackage.METHOD: {
Method method = (Method) theEObject;
T result = caseMethod(method);
if (result == null)
result = caseFeature(method);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case ClassDiagramPackage.ATTRIBUTE: {
Attribute attribute = (Attribute) theEObject;
T result = caseAttribute(attribute);
if (result == null)
result = caseFeature(attribute);
if (result == null)
result = defaultCase(theEObject);
return result;
}
default:
return defaultCase(theEObject);
}
}
/**
* Returns the result of interpreting the object as an instance of '<em>Clazz Model</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>Clazz Model</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseClazzModel(ClazzModel object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Clazz</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>Clazz</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseClazz(Clazz object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Feature</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>Feature</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseFeature(Feature object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Method</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>Method</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseMethod(Method object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Attribute</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>Attribute</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseAttribute(Attribute object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch, but this is the last case anyway.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>EObject</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject)
* @generated
*/
@Override
public T defaultCase(EObject object) {
return null;
}
} //ClassDiagramSwitch

View file

@ -1 +1,2 @@
/bin/
/src-gen/

View file

@ -1,33 +0,0 @@
package softwareSystem;
import softwareSystem.SoftwareSystemPackage;
import org.emoflon.smartemf.runtime.notification.SmartEMFNotification;
import org.emoflon.smartemf.runtime.SmartObject;
import org.emoflon.smartemf.runtime.collections.*;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
public interface Component extends EObject {
public LinkedSmartESet<softwareSystem.Component> getImports();
public void setImports(LinkedSmartESet<softwareSystem.Component> value);
public java.lang.String getName();
public void setName(java.lang.String value);
public int getFunctionPoints();
public void setFunctionPoints(int value);
public softwareSystem.SIL getSil();
public void setSil(softwareSystem.SIL value);
}

View file

@ -1,88 +0,0 @@
package softwareSystem;
import java.lang.String;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import org.eclipse.emf.common.util.Enumerator;
public enum SIL implements Enumerator {
LOW(0, "LOW", "LOW"), MED(1, "MED", "MED"), HIGH(2, "HIGH", "HIGH");
public static final int LOW_VALUE = 0;
public static final int MED_VALUE = 1;
public static final int HIGH_VALUE = 2;
private static final SIL[] VALUES_ARRAY = new SIL[] {LOW,MED,HIGH};
public static final List<SIL> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
public static SIL get(String literal) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
SIL result = VALUES_ARRAY[i];
if (result.toString().equals(literal)) {
return result;
}
}
return null;
}
public static SIL getByName(String name) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
SIL result = VALUES_ARRAY[i];
if (result.getName().equals(name)) {
return result;
}
}
return null;
}
public static SIL get(int value) {
switch (value) {
case LOW_VALUE:
return LOW;
case MED_VALUE:
return MED;
case HIGH_VALUE:
return HIGH;
}
return null;
}
private final int value;
private final String name;
private final String literal;
private SIL(int value, String name, String literal) {
this.value = value;
this.name = name;
this.literal = literal;
}
@Override
public int getValue() {
return value;
}
@Override
public String getName() {
return name;
}
@Override
public String getLiteral() {
return literal;
}
@Override
public String toString() {
return literal;
}
}

View file

@ -1,19 +0,0 @@
package softwareSystem;
import softwareSystem.System;
import softwareSystem.Component;
import org.eclipse.emf.ecore.EFactory;
public interface SoftwareSystemFactory extends EFactory {
SoftwareSystemFactory eINSTANCE = softwareSystem.impl.SoftwareSystemFactoryImpl.init();
System createSystem();
Component createComponent();
SoftwareSystemPackage getSoftwareSystemPackage();
}

View file

@ -1,82 +0,0 @@
package softwareSystem;
import java.lang.String;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.EEnum;
import org.emoflon.smartemf.runtime.SmartPackage;
public interface SoftwareSystemPackage extends SmartPackage {
String eNAME = "softwareSystem";
String eNS_URI = "platform:/resource/SoftwareSystem/model/softwareSystem.ecore";
String eNS_PREFIX = "softwareSystem";
SoftwareSystemPackage eINSTANCE = softwareSystem.impl.SoftwareSystemPackageImpl.init();
int SYSTEM = 0;
int SYSTEM__SUB_SYSTEMS = 0;
int SYSTEM__COMPONENTS = 1;
int SYSTEM__NAME = 2;
int SYSTEM_FEATURE_COUNT = 3;
int SYSTEM_OPERATION_COUNT = 0;
int COMPONENT = 1;
int COMPONENT__IMPORTS = 3;
int COMPONENT__NAME = 4;
int COMPONENT__FUNCTION_POINTS = 5;
int COMPONENT__SIL = 6;
int COMPONENT_FEATURE_COUNT = 4;
int COMPONENT_OPERATION_COUNT = 0;
int SIL = 2;
EClass getSystem();
EReference getSystem_SubSystems();
EReference getSystem_Components();
EAttribute getSystem_Name();
EClass getComponent();
EReference getComponent_Imports();
EAttribute getComponent_Name();
EAttribute getComponent_FunctionPoints();
EAttribute getComponent_Sil();
EEnum getSIL();
softwareSystem.SoftwareSystemFactory getSoftwareSystemFactory();
interface Literals {
EClass SYSTEM = eINSTANCE.getSystem();
EReference SYSTEM__SUB_SYSTEMS = eINSTANCE.getSystem_SubSystems();
EReference SYSTEM__COMPONENTS = eINSTANCE.getSystem_Components();
EAttribute SYSTEM__NAME = eINSTANCE.getSystem_Name();
EClass COMPONENT = eINSTANCE.getComponent();
EReference COMPONENT__IMPORTS = eINSTANCE.getComponent_Imports();
EAttribute COMPONENT__NAME = eINSTANCE.getComponent_Name();
EAttribute COMPONENT__FUNCTION_POINTS = eINSTANCE.getComponent_FunctionPoints();
EAttribute COMPONENT__SIL = eINSTANCE.getComponent_Sil();
EEnum SIL = eINSTANCE.getSIL();
}
}

View file

@ -1,29 +0,0 @@
package softwareSystem;
import softwareSystem.SoftwareSystemPackage;
import org.emoflon.smartemf.runtime.notification.SmartEMFNotification;
import org.emoflon.smartemf.runtime.SmartObject;
import org.emoflon.smartemf.runtime.collections.*;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
public interface System extends EObject {
public LinkedSmartESet<softwareSystem.System> getSubSystems();
public void setSubSystems(LinkedSmartESet<softwareSystem.System> value);
public LinkedSmartESet<softwareSystem.Component> getComponents();
public void setComponents(LinkedSmartESet<softwareSystem.Component> value);
public java.lang.String getName();
public void setName(java.lang.String value);
}

View file

@ -1,195 +0,0 @@
package softwareSystem.impl;
import softwareSystem.SoftwareSystemPackage;
import softwareSystem.SoftwareSystemPackage;
import org.emoflon.smartemf.runtime.*;
import org.emoflon.smartemf.runtime.collections.*;
import org.emoflon.smartemf.persistence.SmartEMFResource;
import org.emoflon.smartemf.runtime.notification.SmartEMFNotification;
import org.emoflon.smartemf.runtime.notification.NotifyStatus;
import java.util.function.Consumer;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EcoreFactory;
import org.eclipse.emf.ecore.EcorePackage;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.resource.Resource;
public class ComponentImpl extends SmartObject implements softwareSystem.Component {
protected LinkedSmartESet<softwareSystem.Component> imports = new LinkedSmartESet<softwareSystem.Component>(this, SoftwareSystemPackage.Literals.COMPONENT__IMPORTS);
protected java.lang.String name = null;
protected int functionPoints = 0;
protected softwareSystem.SIL sil = softwareSystem.SIL.LOW;
protected ComponentImpl() {
super(SoftwareSystemPackage.Literals.COMPONENT);
}
@Override
public LinkedSmartESet<softwareSystem.Component> getImports() {
return this.imports;
}
@Override
public void setImports(LinkedSmartESet<softwareSystem.Component> value) {
throw new UnsupportedOperationException("Set methods for SmartEMF collections are not supported.");
}
@Override
public java.lang.String getName() {
return this.name;
}
@Override
public void setName(java.lang.String value) {
Object oldValue = this.name;
this.name = value;
sendNotification(SmartEMFNotification.createSetNotification(this, SoftwareSystemPackage.Literals.COMPONENT__NAME, oldValue, value, -1));
}
@Override
public int getFunctionPoints() {
return this.functionPoints;
}
@Override
public void setFunctionPoints(int value) {
Object oldValue = this.functionPoints;
this.functionPoints = value;
sendNotification(SmartEMFNotification.createSetNotification(this, SoftwareSystemPackage.Literals.COMPONENT__FUNCTION_POINTS, oldValue, value, -1));
}
@Override
public softwareSystem.SIL getSil() {
return this.sil;
}
@Override
public void setSil(softwareSystem.SIL value) {
Object oldValue = this.sil;
this.sil = value;
sendNotification(SmartEMFNotification.createSetNotification(this, SoftwareSystemPackage.Literals.COMPONENT__SIL, oldValue, value, -1));
}
@Override
public void eSet(EStructuralFeature eFeature, Object newValue){
if (SoftwareSystemPackage.Literals.COMPONENT__IMPORTS.equals(eFeature)) {
setImports((LinkedSmartESet<softwareSystem.Component>) newValue);
return;
}
if (SoftwareSystemPackage.Literals.COMPONENT__NAME.equals(eFeature)) {
setName((java.lang.String) newValue);
return;
}
if (SoftwareSystemPackage.Literals.COMPONENT__FUNCTION_POINTS.equals(eFeature)) {
setFunctionPoints((int) newValue);
return;
}
if (SoftwareSystemPackage.Literals.COMPONENT__SIL.equals(eFeature)) {
setSil((softwareSystem.SIL) newValue);
return;
}
eDynamicSet(eFeature, newValue);
}
@Override
public void eUnset(EStructuralFeature eFeature){
if (SoftwareSystemPackage.Literals.COMPONENT__IMPORTS.equals(eFeature)) {
getImports().clear();
return;
}
if (SoftwareSystemPackage.Literals.COMPONENT__NAME.equals(eFeature)) {
setName((java.lang.String)null);
return;
}
if (SoftwareSystemPackage.Literals.COMPONENT__FUNCTION_POINTS.equals(eFeature)) {
setFunctionPoints((int)0);
return;
}
if (SoftwareSystemPackage.Literals.COMPONENT__SIL.equals(eFeature)) {
setSil((softwareSystem.SIL)softwareSystem.SIL.LOW);
return;
}
eDynamicUnset(eFeature);
}
@Override
public String toString(){
StringBuilder b = new StringBuilder();
b.append(super.toString());
b.append(" (");
if (SmartEMFConfig.simpleStringRepresentations()) {
b.append(getName());
} else {
b.append("name: ");
b.append(getName());
b.append(", ");
b.append("functionPoints: ");
b.append(getFunctionPoints());b.append(", ");
b.append("sil: ");
b.append(getSil());
}
b.append(")");
return b.toString();
}
@Override
public Object eGet(EStructuralFeature eFeature){
if (SoftwareSystemPackage.Literals.COMPONENT__IMPORTS.equals(eFeature))
return getImports();
if (SoftwareSystemPackage.Literals.COMPONENT__NAME.equals(eFeature))
return getName();
if (SoftwareSystemPackage.Literals.COMPONENT__FUNCTION_POINTS.equals(eFeature))
return getFunctionPoints();
if (SoftwareSystemPackage.Literals.COMPONENT__SIL.equals(eFeature))
return getSil();
return eDynamicGet(eFeature);
}
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType){
throw new UnsupportedOperationException("This method has been deactivated since it is not always safe to use.");
}
@Override
public void eInverseAdd(Object otherEnd, EStructuralFeature feature) {
if(feature == null)
return;
eDynamicInverseAdd(otherEnd, feature);
}
@Override
public void eInverseRemove(Object otherEnd, EStructuralFeature feature) {
if(feature == null)
return;
eDynamicInverseRemove(otherEnd, feature);
}
@Override
/**
* This method sets the resource and generates REMOVING_ADAPTER and ADD notifications
*/
protected void setResourceOfContainments(Consumer<SmartObject> setResourceCall) {
}
@Override
/**
* This method sets the resource and only generates REMOVING_ADAPTER notifications (no ADD messages)
*/
protected void setResourceOfContainmentsSilently(Resource r) {
}
}

View file

@ -1,98 +0,0 @@
package softwareSystem.impl;
import softwareSystem.System;
import softwareSystem.Component;
import softwareSystem.SIL;
import softwareSystem.SoftwareSystemFactory;
import softwareSystem.SoftwareSystemPackage;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.impl.EFactoryImpl;
import org.eclipse.emf.ecore.plugin.EcorePlugin;
public class SoftwareSystemFactoryImpl extends EFactoryImpl implements softwareSystem.SoftwareSystemFactory {
public static softwareSystem.SoftwareSystemFactory init() {
try {
SoftwareSystemFactory theSoftwareSystemFactory = (SoftwareSystemFactory) EPackage.Registry.INSTANCE
.getEFactory(SoftwareSystemPackage.eNS_URI);
if (theSoftwareSystemFactory != null) {
return theSoftwareSystemFactory;
}
} catch (java.lang.Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new SoftwareSystemFactoryImpl();
}
public SoftwareSystemFactoryImpl() {
super();
}
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
case SoftwareSystemPackage.SYSTEM:
return createSystem();
case SoftwareSystemPackage.COMPONENT:
return createComponent();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
}
@Override
public Object createFromString(EDataType eDataType, String initialValue) {
switch (eDataType.getClassifierID()) {
case SoftwareSystemPackage.SIL:
return createSILFromString(eDataType, initialValue);
default:
throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
}
}
@Override
public String convertToString(EDataType eDataType, Object instanceValue) {
switch (eDataType.getClassifierID()) {
case SoftwareSystemPackage.SIL:
return convertSILToString(eDataType, instanceValue);
default:
throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
}
}
@Override
public softwareSystem.System createSystem() {
SystemImpl system = new SystemImpl();
return system;
}
@Override
public softwareSystem.Component createComponent() {
ComponentImpl component = new ComponentImpl();
return component;
}
public SIL createSILFromString(EDataType eDataType, String initialValue) {
SIL result = SIL.get(initialValue);
if (result == null)
throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
return result;
}
public String convertSILToString(EDataType eDataType, Object instanceValue) {
return instanceValue == null ? null : instanceValue.toString();
}
@Override
public SoftwareSystemPackage getSoftwareSystemPackage() {
return (SoftwareSystemPackage) getEPackage();
}
}

View file

@ -1,227 +0,0 @@
package softwareSystem.impl;
import softwareSystem.System;
import softwareSystem.Component;
import softwareSystem.SIL;
import softwareSystem.SoftwareSystemFactory;
import softwareSystem.SoftwareSystemPackage;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EEnum;
import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.EcorePackage;
import org.eclipse.emf.ecore.impl.EPackageImpl;
import org.emoflon.smartemf.runtime.SmartPackageImpl;
public class SoftwareSystemPackageImpl extends SmartPackageImpl
implements SoftwareSystemPackage {
private EClass systemEClass = null;
private EReference system_subSystemsEReference = null;
private EReference system_componentsEReference = null;
private EAttribute system_nameEAttribute = null;
private EClass componentEClass = null;
private EReference component_importsEReference = null;
private EAttribute component_nameEAttribute = null;
private EAttribute component_functionPointsEAttribute = null;
private EAttribute component_silEAttribute = null;
private EEnum sILEEnum = null;
private SoftwareSystemPackageImpl() {
super(eNS_URI, softwareSystem.SoftwareSystemFactory.eINSTANCE);
}
private static boolean isRegistered = false;
private boolean isCreated = false;
private boolean isInitialized = false;
public static SoftwareSystemPackage init() {
if (isRegistered)
return (SoftwareSystemPackage) EPackage.Registry.INSTANCE
.getEPackage(SoftwareSystemPackage.eNS_URI);
// Obtain or create and register package
Object registeredSoftwareSystemPackage = EPackage.Registry.INSTANCE.get(eNS_URI);
SoftwareSystemPackageImpl theSoftwareSystemPackage = registeredSoftwareSystemPackage instanceof SoftwareSystemPackageImpl
? (SoftwareSystemPackageImpl) registeredSoftwareSystemPackage
: new SoftwareSystemPackageImpl();
isRegistered = true;
// Create package meta-data objects
theSoftwareSystemPackage.createPackageContents();
// Initialize created meta-data
theSoftwareSystemPackage.initializePackageContents();
// Inject internal eOpposites to unidirectional references
theSoftwareSystemPackage.injectDynamicOpposites();
// Inject external references into foreign packages
theSoftwareSystemPackage.injectExternalReferences();
// Mark meta-data to indicate it can't be changed
theSoftwareSystemPackage.freeze();
// Update the registry and return the package
EPackage.Registry.INSTANCE.put(SoftwareSystemPackage.eNS_URI,
theSoftwareSystemPackage);
theSoftwareSystemPackage.fetchDynamicEStructuralFeaturesOfSuperTypes();
return theSoftwareSystemPackage;
}
@Override
public EClass getSystem() {
return systemEClass;
}
@Override
public EReference getSystem_SubSystems() {
return system_subSystemsEReference;
}
@Override
public EReference getSystem_Components() {
return system_componentsEReference;
}
@Override
public EAttribute getSystem_Name() {
return system_nameEAttribute;
}
@Override
public EClass getComponent() {
return componentEClass;
}
@Override
public EReference getComponent_Imports() {
return component_importsEReference;
}
@Override
public EAttribute getComponent_Name() {
return component_nameEAttribute;
}
@Override
public EAttribute getComponent_FunctionPoints() {
return component_functionPointsEAttribute;
}
@Override
public EAttribute getComponent_Sil() {
return component_silEAttribute;
}
@Override
public EEnum getSIL() {
return sILEEnum;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public softwareSystem.SoftwareSystemFactory getSoftwareSystemFactory() {
return (softwareSystem.SoftwareSystemFactory) getEFactoryInstance();
}
public void createPackageContents() {
if (isCreated)
return;
isCreated = true;
// Create classes and their features
systemEClass = createEClass(SYSTEM);
createEReference(systemEClass, SYSTEM__SUB_SYSTEMS);
system_subSystemsEReference = (EReference) systemEClass.getEStructuralFeatures().get(0);
createEReference(systemEClass, SYSTEM__COMPONENTS);
system_componentsEReference = (EReference) systemEClass.getEStructuralFeatures().get(1);
createEAttribute(systemEClass, SYSTEM__NAME);
system_nameEAttribute = (EAttribute) systemEClass.getEStructuralFeatures().get(2);
componentEClass = createEClass(COMPONENT);
createEReference(componentEClass, COMPONENT__IMPORTS);
component_importsEReference = (EReference) componentEClass.getEStructuralFeatures().get(0);
createEAttribute(componentEClass, COMPONENT__NAME);
component_nameEAttribute = (EAttribute) componentEClass.getEStructuralFeatures().get(1);
createEAttribute(componentEClass, COMPONENT__FUNCTION_POINTS);
component_functionPointsEAttribute = (EAttribute) componentEClass.getEStructuralFeatures().get(2);
createEAttribute(componentEClass, COMPONENT__SIL);
component_silEAttribute = (EAttribute) componentEClass.getEStructuralFeatures().get(3);
// Create enums
sILEEnum = createEEnum(SIL);
// Create data types
}
public void initializePackageContents() {
if (isInitialized)
return;
isInitialized = true;
// Initialize package
setName(eNAME);
setNsPrefix(eNS_PREFIX);
setNsURI(eNS_URI);
// Obtain other dependent packages
// Create type parameters
// Set bounds for type parameters
// Add supertypes to classes
// Initialize classes, features, and operations; add parameters
initEClass(systemEClass, System.class, "System", !IS_ABSTRACT, !IS_INTERFACE,
IS_GENERATED_INSTANCE_CLASS);
initEReference(getSystem_SubSystems(), this.getSystem(), null,
"subSystems", null, 0, -1, System.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, IS_RESOLVE_PROXIES,
!IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getSystem_Components(), this.getComponent(), null,
"components", null, 0, -1, System.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, IS_RESOLVE_PROXIES,
!IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getSystem_Name(), ecorePackage.getEString(),
"name", null, 0, 1, System.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, IS_ID, IS_UNIQUE,
!IS_DERIVED, IS_ORDERED);
initEClass(componentEClass, Component.class, "Component", !IS_ABSTRACT, !IS_INTERFACE,
IS_GENERATED_INSTANCE_CLASS);
initEReference(getComponent_Imports(), this.getComponent(), null,
"imports", null, 0, -1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES,
!IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getComponent_Name(), ecorePackage.getEString(),
"name", null, 0, 1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, IS_ID, IS_UNIQUE,
!IS_DERIVED, IS_ORDERED);
initEAttribute(getComponent_FunctionPoints(), ecorePackage.getEInt(),
"functionPoints", "0", 0, 1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, IS_ID, IS_UNIQUE,
!IS_DERIVED, IS_ORDERED);
initEAttribute(getComponent_Sil(), this.getSIL(),
"sil", "LOW", 0, 1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, IS_ID, IS_UNIQUE,
!IS_DERIVED, IS_ORDERED);
// Initialize enums and add enum literals
initEEnum(sILEEnum, SIL.class, "SIL");
addEEnumLiteral(sILEEnum, softwareSystem.SIL.LOW);
addEEnumLiteral(sILEEnum, softwareSystem.SIL.MED);
addEEnumLiteral(sILEEnum, softwareSystem.SIL.HIGH);
// Initialize data types
// Create resource
createResource(eNS_URI);
}
}

View file

@ -1,174 +0,0 @@
package softwareSystem.impl;
import softwareSystem.SoftwareSystemPackage;
import softwareSystem.SoftwareSystemPackage;
import org.emoflon.smartemf.runtime.*;
import org.emoflon.smartemf.runtime.collections.*;
import org.emoflon.smartemf.persistence.SmartEMFResource;
import org.emoflon.smartemf.runtime.notification.SmartEMFNotification;
import org.emoflon.smartemf.runtime.notification.NotifyStatus;
import java.util.function.Consumer;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EcoreFactory;
import org.eclipse.emf.ecore.EcorePackage;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.resource.Resource;
public class SystemImpl extends SmartObject implements softwareSystem.System {
protected LinkedSmartESet<softwareSystem.System> subSystems = new LinkedSmartESet<softwareSystem.System>(this, SoftwareSystemPackage.Literals.SYSTEM__SUB_SYSTEMS);
protected LinkedSmartESet<softwareSystem.Component> components = new LinkedSmartESet<softwareSystem.Component>(this, SoftwareSystemPackage.Literals.SYSTEM__COMPONENTS);
protected java.lang.String name = null;
protected SystemImpl() {
super(SoftwareSystemPackage.Literals.SYSTEM);
}
@Override
public LinkedSmartESet<softwareSystem.System> getSubSystems() {
return this.subSystems;
}
@Override
public void setSubSystems(LinkedSmartESet<softwareSystem.System> value) {
throw new UnsupportedOperationException("Set methods for SmartEMF collections are not supported.");
}
@Override
public LinkedSmartESet<softwareSystem.Component> getComponents() {
return this.components;
}
@Override
public void setComponents(LinkedSmartESet<softwareSystem.Component> value) {
throw new UnsupportedOperationException("Set methods for SmartEMF collections are not supported.");
}
@Override
public java.lang.String getName() {
return this.name;
}
@Override
public void setName(java.lang.String value) {
Object oldValue = this.name;
this.name = value;
sendNotification(SmartEMFNotification.createSetNotification(this, SoftwareSystemPackage.Literals.SYSTEM__NAME, oldValue, value, -1));
}
@Override
public void eSet(EStructuralFeature eFeature, Object newValue){
if (SoftwareSystemPackage.Literals.SYSTEM__SUB_SYSTEMS.equals(eFeature)) {
setSubSystems((LinkedSmartESet<softwareSystem.System>) newValue);
return;
}
if (SoftwareSystemPackage.Literals.SYSTEM__COMPONENTS.equals(eFeature)) {
setComponents((LinkedSmartESet<softwareSystem.Component>) newValue);
return;
}
if (SoftwareSystemPackage.Literals.SYSTEM__NAME.equals(eFeature)) {
setName((java.lang.String) newValue);
return;
}
eDynamicSet(eFeature, newValue);
}
@Override
public void eUnset(EStructuralFeature eFeature){
if (SoftwareSystemPackage.Literals.SYSTEM__SUB_SYSTEMS.equals(eFeature)) {
getSubSystems().clear();
return;
}
if (SoftwareSystemPackage.Literals.SYSTEM__COMPONENTS.equals(eFeature)) {
getComponents().clear();
return;
}
if (SoftwareSystemPackage.Literals.SYSTEM__NAME.equals(eFeature)) {
setName((java.lang.String)null);
return;
}
eDynamicUnset(eFeature);
}
@Override
public String toString(){
StringBuilder b = new StringBuilder();
b.append(super.toString());
b.append(" (");
if (SmartEMFConfig.simpleStringRepresentations()) {
b.append(getName());
} else {
b.append("name: ");
b.append(getName());
}
b.append(")");
return b.toString();
}
@Override
public Object eGet(EStructuralFeature eFeature){
if (SoftwareSystemPackage.Literals.SYSTEM__SUB_SYSTEMS.equals(eFeature))
return getSubSystems();
if (SoftwareSystemPackage.Literals.SYSTEM__COMPONENTS.equals(eFeature))
return getComponents();
if (SoftwareSystemPackage.Literals.SYSTEM__NAME.equals(eFeature))
return getName();
return eDynamicGet(eFeature);
}
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType){
throw new UnsupportedOperationException("This method has been deactivated since it is not always safe to use.");
}
@Override
public void eInverseAdd(Object otherEnd, EStructuralFeature feature) {
if(feature == null)
return;
eDynamicInverseAdd(otherEnd, feature);
}
@Override
public void eInverseRemove(Object otherEnd, EStructuralFeature feature) {
if(feature == null)
return;
eDynamicInverseRemove(otherEnd, feature);
}
@Override
/**
* This method sets the resource and generates REMOVING_ADAPTER and ADD notifications
*/
protected void setResourceOfContainments(Consumer<SmartObject> setResourceCall) {
for(Object obj : getSubSystems()) {
setResourceCall.accept(((SmartObject) obj));
}
for(Object obj : getComponents()) {
setResourceCall.accept(((SmartObject) obj));
}
}
@Override
/**
* This method sets the resource and only generates REMOVING_ADAPTER notifications (no ADD messages)
*/
protected void setResourceOfContainmentsSilently(Resource r) {
for(Object obj : getSubSystems()) {
((SmartObject) obj).setResourceSilently(r);
}
for(Object obj : getComponents()) {
((SmartObject) obj).setResourceSilently(r);
}
}
}