From dbbf707d78c76f4bc001d7df2418bd6ceab12db3 Mon Sep 17 00:00:00 2001 From: OszkarSemerath Date: Sat, 24 Mar 2018 22:08:23 -0400 Subject: example projects added --- .../Examples/ModelGenExampleFAM_plugin/.classpath | 10 + .../Examples/ModelGenExampleFAM_plugin/.gitignore | 1 + .../Examples/ModelGenExampleFAM_plugin/.project | 40 + .../.settings/org.eclipse.jdt.core.prefs | 11 + ...ry.patternlanguage.emf.EMFPatternLanguage.prefs | 32 + .../FamGeneration.vsconfig | 18 + .../ModelGenExampleFAM_plugin/META-INF/MANIFEST.MF | 21 + .../ModelGenExampleFAM_plugin/build.properties | 7 + .../functionalarchitecture/FAMTerminator.java | 52 + .../ecore-gen/functionalarchitecture/Function.java | 61 ++ .../functionalarchitecture/FunctionType.java | 241 +++++ .../FunctionalArchitectureModel.java | 42 + .../functionalarchitecture/FunctionalData.java | 81 ++ .../functionalarchitecture/FunctionalElement.java | 109 +++ .../functionalarchitecture/FunctionalInput.java | 42 + .../FunctionalInterface.java | 73 ++ .../functionalarchitecture/FunctionalOutput.java | 42 + .../FunctionalarchitectureFactory.java | 96 ++ .../FunctionalarchitecturePackage.java | 1032 ++++++++++++++++++++ .../functionalarchitecture/InformationLink.java | 81 ++ .../impl/FAMTerminatorImpl.java | 196 ++++ .../functionalarchitecture/impl/FunctionImpl.java | 191 ++++ .../impl/FunctionalArchitectureModelImpl.java | 152 +++ .../impl/FunctionalDataImpl.java | 267 +++++ .../impl/FunctionalElementImpl.java | 318 ++++++ .../impl/FunctionalInputImpl.java | 165 ++++ .../impl/FunctionalInterfaceImpl.java | 243 +++++ .../impl/FunctionalOutputImpl.java | 165 ++++ .../impl/FunctionalarchitectureFactoryImpl.java | 213 ++++ .../impl/FunctionalarchitecturePackageImpl.java | 574 +++++++++++ .../impl/InformationLinkImpl.java | 285 ++++++ .../util/FunctionalarchitectureAdapterFactory.java | 265 +++++ .../util/FunctionalarchitectureSwitch.java | 282 ++++++ .../ModelGenExampleFAM_plugin/generator.vqgen | 2 + .../model/FamMetamodel.aird | 2 + .../model/FamMetamodel.ecore | 69 ++ .../model/FamMetamodel.genmodel | 48 + .../model/FunctionalArchitectureModel.xmi | 4 + .../ModelGenExampleFAM_plugin/output/.gitignore | 2 + .../ModelGenExampleFAM_plugin/plugin.properties | 4 + .../Examples/ModelGenExampleFAM_plugin/plugin.xml | 27 + .../domains/transima/fam/FamPatterns.vql | 114 +++ .../dslreasoner/domains/transima/fam/.gitignore | 18 + .../ModelGenExampleFAM_standalone/.project | 23 + .../FamGeneration.vsconfig | 25 + .../inputs/FamInstance.xmi | 12 + .../inputs/FamMetamodel.ecore | 52 + .../inputs/FamPatterns.vql | 104 ++ .../outputs/.gitignore | 2 + 49 files changed, 5916 insertions(+) create mode 100644 Domains/Examples/ModelGenExampleFAM_plugin/.classpath create mode 100644 Domains/Examples/ModelGenExampleFAM_plugin/.gitignore create mode 100644 Domains/Examples/ModelGenExampleFAM_plugin/.project create mode 100644 Domains/Examples/ModelGenExampleFAM_plugin/.settings/org.eclipse.jdt.core.prefs create mode 100644 Domains/Examples/ModelGenExampleFAM_plugin/.settings/org.eclipse.viatra.query.patternlanguage.emf.EMFPatternLanguage.prefs create mode 100644 Domains/Examples/ModelGenExampleFAM_plugin/FamGeneration.vsconfig create mode 100644 Domains/Examples/ModelGenExampleFAM_plugin/META-INF/MANIFEST.MF create mode 100644 Domains/Examples/ModelGenExampleFAM_plugin/build.properties create mode 100644 Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FAMTerminator.java create mode 100644 Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/Function.java create mode 100644 Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FunctionType.java create mode 100644 Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FunctionalArchitectureModel.java create mode 100644 Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FunctionalData.java create mode 100644 Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FunctionalElement.java create mode 100644 Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FunctionalInput.java create mode 100644 Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FunctionalInterface.java create mode 100644 Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FunctionalOutput.java create mode 100644 Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FunctionalarchitectureFactory.java create mode 100644 Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FunctionalarchitecturePackage.java create mode 100644 Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/InformationLink.java create mode 100644 Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FAMTerminatorImpl.java create mode 100644 Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionImpl.java create mode 100644 Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalArchitectureModelImpl.java create mode 100644 Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalDataImpl.java create mode 100644 Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalElementImpl.java create mode 100644 Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalInputImpl.java create mode 100644 Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalInterfaceImpl.java create mode 100644 Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalOutputImpl.java create mode 100644 Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalarchitectureFactoryImpl.java create mode 100644 Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalarchitecturePackageImpl.java create mode 100644 Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/InformationLinkImpl.java create mode 100644 Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/util/FunctionalarchitectureAdapterFactory.java create mode 100644 Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/util/FunctionalarchitectureSwitch.java create mode 100644 Domains/Examples/ModelGenExampleFAM_plugin/generator.vqgen create mode 100644 Domains/Examples/ModelGenExampleFAM_plugin/model/FamMetamodel.aird create mode 100644 Domains/Examples/ModelGenExampleFAM_plugin/model/FamMetamodel.ecore create mode 100644 Domains/Examples/ModelGenExampleFAM_plugin/model/FamMetamodel.genmodel create mode 100644 Domains/Examples/ModelGenExampleFAM_plugin/model/FunctionalArchitectureModel.xmi create mode 100644 Domains/Examples/ModelGenExampleFAM_plugin/output/.gitignore create mode 100644 Domains/Examples/ModelGenExampleFAM_plugin/plugin.properties create mode 100644 Domains/Examples/ModelGenExampleFAM_plugin/plugin.xml create mode 100644 Domains/Examples/ModelGenExampleFAM_plugin/src/hu/bme/mit/inf/dslreasoner/domains/transima/fam/FamPatterns.vql create mode 100644 Domains/Examples/ModelGenExampleFAM_plugin/vql-gen/hu/bme/mit/inf/dslreasoner/domains/transima/fam/.gitignore create mode 100644 Domains/Examples/ModelGenExampleFAM_standalone/.project create mode 100644 Domains/Examples/ModelGenExampleFAM_standalone/FamGeneration.vsconfig create mode 100644 Domains/Examples/ModelGenExampleFAM_standalone/inputs/FamInstance.xmi create mode 100644 Domains/Examples/ModelGenExampleFAM_standalone/inputs/FamMetamodel.ecore create mode 100644 Domains/Examples/ModelGenExampleFAM_standalone/inputs/FamPatterns.vql create mode 100644 Domains/Examples/ModelGenExampleFAM_standalone/outputs/.gitignore diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/.classpath b/Domains/Examples/ModelGenExampleFAM_plugin/.classpath new file mode 100644 index 00000000..5d959836 --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_plugin/.classpath @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/.gitignore b/Domains/Examples/ModelGenExampleFAM_plugin/.gitignore new file mode 100644 index 00000000..ae3c1726 --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_plugin/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/.project b/Domains/Examples/ModelGenExampleFAM_plugin/.project new file mode 100644 index 00000000..70920828 --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_plugin/.project @@ -0,0 +1,40 @@ + + + ModelGenExampleFAM_plugin + + + + + + org.eclipse.viatra.query.tooling.ui.projectbuilder + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.xtext.ui.shared.xtextNature + org.eclipse.viatra.query.projectnature + org.eclipse.pde.PluginNature + + diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/.settings/org.eclipse.jdt.core.prefs b/Domains/Examples/ModelGenExampleFAM_plugin/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..bb35fa0a --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_plugin/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/.settings/org.eclipse.viatra.query.patternlanguage.emf.EMFPatternLanguage.prefs b/Domains/Examples/ModelGenExampleFAM_plugin/.settings/org.eclipse.viatra.query.patternlanguage.emf.EMFPatternLanguage.prefs new file mode 100644 index 00000000..c1ba78d2 --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_plugin/.settings/org.eclipse.viatra.query.patternlanguage.emf.EMFPatternLanguage.prefs @@ -0,0 +1,32 @@ +BuilderConfiguration.is_project_specific=true +autobuilding=true +eclipse.preferences.version=1 +generateEclipseExtensions=true +generateGeneratedAnnotation=false +generateManifestEntries=true +generateMatchProcessors=true +generateMatchers=USE_GENERIC +generateSuppressWarnings=true +generatedAnnotationComment= +includeDateInGenerated=false +org.eclipse.viatra.query.patternlanguage.emf.EMFPatternLanguage.useProjectSettings=true +outlet.DEFAULT_OUTPUT.cleanDirectory=false +outlet.DEFAULT_OUTPUT.cleanupDerived=true +outlet.DEFAULT_OUTPUT.createDirectory=true +outlet.DEFAULT_OUTPUT.derived=true +outlet.DEFAULT_OUTPUT.directory=./vql-gen +outlet.DEFAULT_OUTPUT.hideLocalSyntheticVariables=true +outlet.DEFAULT_OUTPUT.installDslAsPrimarySource=false +outlet.DEFAULT_OUTPUT.keepLocalHistory=true +outlet.DEFAULT_OUTPUT.override=true +outlet.DEFAULT_OUTPUT.sourceFolder.ecore-gen.directory= +outlet.DEFAULT_OUTPUT.sourceFolder.ecore-gen.ignore= +outlet.DEFAULT_OUTPUT.sourceFolder.inputs.directory= +outlet.DEFAULT_OUTPUT.sourceFolder.inputs.ignore= +outlet.DEFAULT_OUTPUT.sourceFolder.src-gen.directory= +outlet.DEFAULT_OUTPUT.sourceFolder.src-gen.ignore= +outlet.DEFAULT_OUTPUT.sourceFolder.src.directory= +outlet.DEFAULT_OUTPUT.sourceFolder.src.ignore= +outlet.DEFAULT_OUTPUT.userOutputPerSourceFolder= +targetJavaVersion=JAVA5 +useJavaCompilerCompliance=true diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/FamGeneration.vsconfig b/Domains/Examples/ModelGenExampleFAM_plugin/FamGeneration.vsconfig new file mode 100644 index 00000000..b84679b7 --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_plugin/FamGeneration.vsconfig @@ -0,0 +1,18 @@ +import epackage "http://www.inf.mit.bme.hu/viatrasolver/example/fam" +import viatra "hu.bme.mit.inf.dslreasoner.domains.transima.fam.FamPatterns" + +generate { + metamodel = { package functionalarchitecture } + patterns = { package hu.bme.mit.inf.dslreasoner.domains.transima.fam } + + solver = ViatraSolver + + scope = { + #node = 10 + } + + number = 3 + runs = 3 + + output = "platform:/resource/ModelGenExampleFAM_plugin/output" +} \ No newline at end of file diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/META-INF/MANIFEST.MF b/Domains/Examples/ModelGenExampleFAM_plugin/META-INF/MANIFEST.MF new file mode 100644 index 00000000..423e95bd --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_plugin/META-INF/MANIFEST.MF @@ -0,0 +1,21 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: ModelGenExampleFAM_plugin;singleton:=true +Bundle-Version: 1.0.0.qualifier +Bundle-ClassPath: . +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Export-Package: functionalarchitecture, + functionalarchitecture.impl, + functionalarchitecture.util, + hu.bme.mit.inf.dslreasoner.domains.transima.fam +Require-Bundle: ModelGenExampleFAM_plugin, + org.eclipse.viatra.addon.querybasedfeatures.runtime, + org.eclipse.viatra.query.runtime, + org.apache.log4j;bundle-version="1.2.15", + com.google.guava;bundle-version="15.0.0", + org.eclipse.core.runtime, + org.eclipse.emf.ecore;visibility:=reexport +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-ActivationPolicy: lazy diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/build.properties b/Domains/Examples/ModelGenExampleFAM_plugin/build.properties new file mode 100644 index 00000000..2503cbe2 --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_plugin/build.properties @@ -0,0 +1,7 @@ +bin.includes = META-INF/,\ + .,\ + plugin.xml +source.. = src/,\ + model/,\ + src-gen/ +output.. = bin/ diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FAMTerminator.java b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FAMTerminator.java new file mode 100644 index 00000000..ae350e1f --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FAMTerminator.java @@ -0,0 +1,52 @@ +/** + */ +package functionalarchitecture; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'FAM Terminator'. + * + * + *

+ * The following features are supported: + *

+ * + * + * @see functionalarchitecture.FunctionalarchitecturePackage#getFAMTerminator() + * @model + * @generated + */ +public interface FAMTerminator extends EObject { + /** + * Returns the value of the 'Data' container reference. + * It is bidirectional and its opposite is '{@link functionalarchitecture.FunctionalData#getTerminator Terminator}'. + * + *

+ * If the meaning of the 'Data' container reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Data' container reference. + * @see #setData(FunctionalData) + * @see functionalarchitecture.FunctionalarchitecturePackage#getFAMTerminator_Data() + * @see functionalarchitecture.FunctionalData#getTerminator + * @model opposite="terminator" transient="false" + * @generated + */ + FunctionalData getData(); + + /** + * Sets the value of the '{@link functionalarchitecture.FAMTerminator#getData Data}' container reference. + * + * + * @param value the new value of the 'Data' container reference. + * @see #getData() + * @generated + */ + void setData(FunctionalData value); + +} // FAMTerminator diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/Function.java b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/Function.java new file mode 100644 index 00000000..5b484066 --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/Function.java @@ -0,0 +1,61 @@ +/** + */ +package functionalarchitecture; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Function'. + * + * + *

+ * The following features are supported: + *

+ * + * + * @see functionalarchitecture.FunctionalarchitecturePackage#getFunction() + * @model + * @generated + */ +public interface Function extends FunctionalElement { + /** + * Returns the value of the 'Sub Elements' containment reference list. + * The list contents are of type {@link functionalarchitecture.FunctionalElement}. + * It is bidirectional and its opposite is '{@link functionalarchitecture.FunctionalElement#getParent Parent}'. + * + *

+ * If the meaning of the 'Sub Elements' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Sub Elements' containment reference list. + * @see functionalarchitecture.FunctionalarchitecturePackage#getFunction_SubElements() + * @see functionalarchitecture.FunctionalElement#getParent + * @model opposite="parent" containment="true" + * @generated + */ + EList getSubElements(); + + /** + * Returns the value of the 'Type' attribute. + * The literals are from the enumeration {@link functionalarchitecture.FunctionType}. + * + *

+ * If the meaning of the 'Type' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Type' attribute. + * @see functionalarchitecture.FunctionType + * @see functionalarchitecture.FunctionalarchitecturePackage#getFunction_Type() + * @model required="true" transient="true" changeable="false" volatile="true" derived="true" + * annotation="org.eclipse.viatra.query.querybasedfeature patternFQN='hu.bme.mit.inf.dslreasoner.domains.transima.fam.type'" + * @generated + */ + FunctionType getType(); + +} // Function diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FunctionType.java b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FunctionType.java new file mode 100644 index 00000000..59fe3fb2 --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FunctionType.java @@ -0,0 +1,241 @@ +/** + */ +package functionalarchitecture; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * + * A representation of the literals of the enumeration 'Function Type', + * and utility methods for working with them. + * + * @see functionalarchitecture.FunctionalarchitecturePackage#getFunctionType() + * @model + * @generated + */ +public enum FunctionType implements Enumerator { + /** + * The 'Root' literal object. + * + * + * @see #ROOT_VALUE + * @generated + * @ordered + */ + ROOT(0, "Root", "Root"), + + /** + * The 'Intermediate' literal object. + * + * + * @see #INTERMEDIATE_VALUE + * @generated + * @ordered + */ + INTERMEDIATE(1, "Intermediate", "Intermediate"), + + /** + * The 'Leaf' literal object. + * + * + * @see #LEAF_VALUE + * @generated + * @ordered + */ + LEAF(2, "Leaf", "Leaf"); + + /** + * The 'Root' literal value. + * + *

+ * If the meaning of 'Root' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #ROOT + * @model name="Root" + * @generated + * @ordered + */ + public static final int ROOT_VALUE = 0; + + /** + * The 'Intermediate' literal value. + * + *

+ * If the meaning of 'Intermediate' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #INTERMEDIATE + * @model name="Intermediate" + * @generated + * @ordered + */ + public static final int INTERMEDIATE_VALUE = 1; + + /** + * The 'Leaf' literal value. + * + *

+ * If the meaning of 'Leaf' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #LEAF + * @model name="Leaf" + * @generated + * @ordered + */ + public static final int LEAF_VALUE = 2; + + /** + * An array of all the 'Function Type' enumerators. + * + * + * @generated + */ + private static final FunctionType[] VALUES_ARRAY = + new FunctionType[] { + ROOT, + INTERMEDIATE, + LEAF, + }; + + /** + * A public read-only list of all the 'Function Type' enumerators. + * + * + * @generated + */ + public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the 'Function Type' literal with the specified literal value. + * + * + * @param literal the literal. + * @return the matching enumerator or null. + * @generated + */ + public static FunctionType get(String literal) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + FunctionType result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Function Type' literal with the specified name. + * + * + * @param name the name. + * @return the matching enumerator or null. + * @generated + */ + public static FunctionType getByName(String name) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + FunctionType result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Function Type' literal with the specified integer value. + * + * + * @param value the integer value. + * @return the matching enumerator or null. + * @generated + */ + public static FunctionType get(int value) { + switch (value) { + case ROOT_VALUE: return ROOT; + case INTERMEDIATE_VALUE: return INTERMEDIATE; + case LEAF_VALUE: return LEAF; + } + return null; + } + + /** + * + * + * @generated + */ + private final int value; + + /** + * + * + * @generated + */ + private final String name; + + /** + * + * + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * + * + * @generated + */ + private FunctionType(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * + * + * @generated + */ + public int getValue() { + return value; + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * + * + * @generated + */ + @Override + public String toString() { + return literal; + } + +} //FunctionType diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FunctionalArchitectureModel.java b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FunctionalArchitectureModel.java new file mode 100644 index 00000000..048a08ef --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FunctionalArchitectureModel.java @@ -0,0 +1,42 @@ +/** + */ +package functionalarchitecture; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Functional Architecture Model'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link functionalarchitecture.FunctionalArchitectureModel#getRootElements Root Elements}
  • + *
+ * + * @see functionalarchitecture.FunctionalarchitecturePackage#getFunctionalArchitectureModel() + * @model + * @generated + */ +public interface FunctionalArchitectureModel extends EObject { + /** + * Returns the value of the 'Root Elements' containment reference list. + * The list contents are of type {@link functionalarchitecture.FunctionalElement}. + * + *

+ * If the meaning of the 'Root Elements' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Root Elements' containment reference list. + * @see functionalarchitecture.FunctionalarchitecturePackage#getFunctionalArchitectureModel_RootElements() + * @model containment="true" + * @generated + */ + EList getRootElements(); + +} // FunctionalArchitectureModel diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FunctionalData.java b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FunctionalData.java new file mode 100644 index 00000000..39639f99 --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FunctionalData.java @@ -0,0 +1,81 @@ +/** + */ +package functionalarchitecture; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Functional Data'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link functionalarchitecture.FunctionalData#getTerminator Terminator}
  • + *
  • {@link functionalarchitecture.FunctionalData#getInterface Interface}
  • + *
+ * + * @see functionalarchitecture.FunctionalarchitecturePackage#getFunctionalData() + * @model abstract="true" + * @generated + */ +public interface FunctionalData extends EObject { + /** + * Returns the value of the 'Terminator' containment reference. + * It is bidirectional and its opposite is '{@link functionalarchitecture.FAMTerminator#getData Data}'. + * + *

+ * If the meaning of the 'Terminator' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Terminator' containment reference. + * @see #setTerminator(FAMTerminator) + * @see functionalarchitecture.FunctionalarchitecturePackage#getFunctionalData_Terminator() + * @see functionalarchitecture.FAMTerminator#getData + * @model opposite="data" containment="true" + * @generated + */ + FAMTerminator getTerminator(); + + /** + * Sets the value of the '{@link functionalarchitecture.FunctionalData#getTerminator Terminator}' containment reference. + * + * + * @param value the new value of the 'Terminator' containment reference. + * @see #getTerminator() + * @generated + */ + void setTerminator(FAMTerminator value); + + /** + * Returns the value of the 'Interface' container reference. + * It is bidirectional and its opposite is '{@link functionalarchitecture.FunctionalInterface#getData Data}'. + * + *

+ * If the meaning of the 'Interface' container reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Interface' container reference. + * @see #setInterface(FunctionalInterface) + * @see functionalarchitecture.FunctionalarchitecturePackage#getFunctionalData_Interface() + * @see functionalarchitecture.FunctionalInterface#getData + * @model opposite="data" transient="false" + * @generated + */ + FunctionalInterface getInterface(); + + /** + * Sets the value of the '{@link functionalarchitecture.FunctionalData#getInterface Interface}' container reference. + * + * + * @param value the new value of the 'Interface' container reference. + * @see #getInterface() + * @generated + */ + void setInterface(FunctionalInterface value); + +} // FunctionalData diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FunctionalElement.java b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FunctionalElement.java new file mode 100644 index 00000000..f5a2ff19 --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FunctionalElement.java @@ -0,0 +1,109 @@ +/** + */ +package functionalarchitecture; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Functional Element'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link functionalarchitecture.FunctionalElement#getInterface Interface}
  • + *
  • {@link functionalarchitecture.FunctionalElement#getModel Model}
  • + *
  • {@link functionalarchitecture.FunctionalElement#getParent Parent}
  • + *
+ * + * @see functionalarchitecture.FunctionalarchitecturePackage#getFunctionalElement() + * @model abstract="true" + * @generated + */ +public interface FunctionalElement extends EObject { + /** + * Returns the value of the 'Interface' containment reference. + * It is bidirectional and its opposite is '{@link functionalarchitecture.FunctionalInterface#getElement Element}'. + * + *

+ * If the meaning of the 'Interface' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Interface' containment reference. + * @see #setInterface(FunctionalInterface) + * @see functionalarchitecture.FunctionalarchitecturePackage#getFunctionalElement_Interface() + * @see functionalarchitecture.FunctionalInterface#getElement + * @model opposite="element" containment="true" + * @generated + */ + FunctionalInterface getInterface(); + + /** + * Sets the value of the '{@link functionalarchitecture.FunctionalElement#getInterface Interface}' containment reference. + * + * + * @param value the new value of the 'Interface' containment reference. + * @see #getInterface() + * @generated + */ + void setInterface(FunctionalInterface value); + + /** + * Returns the value of the 'Model' reference. + * + *

+ * If the meaning of the 'Model' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Model' reference. + * @see #setModel(FunctionalArchitectureModel) + * @see functionalarchitecture.FunctionalarchitecturePackage#getFunctionalElement_Model() + * @model required="true" transient="true" volatile="true" derived="true" + * annotation="org.eclipse.viatra.query.querybasedfeature patternFQN='hu.bme.mit.inf.dslreasoner.domains.transima.fam.model'" + * @generated + */ + FunctionalArchitectureModel getModel(); + + /** + * Sets the value of the '{@link functionalarchitecture.FunctionalElement#getModel Model}' reference. + * + * + * @param value the new value of the 'Model' reference. + * @see #getModel() + * @generated + */ + void setModel(FunctionalArchitectureModel value); + + /** + * Returns the value of the 'Parent' container reference. + * It is bidirectional and its opposite is '{@link functionalarchitecture.Function#getSubElements Sub Elements}'. + * + *

+ * If the meaning of the 'Parent' container reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Parent' container reference. + * @see #setParent(Function) + * @see functionalarchitecture.FunctionalarchitecturePackage#getFunctionalElement_Parent() + * @see functionalarchitecture.Function#getSubElements + * @model opposite="subElements" transient="false" + * @generated + */ + Function getParent(); + + /** + * Sets the value of the '{@link functionalarchitecture.FunctionalElement#getParent Parent}' container reference. + * + * + * @param value the new value of the 'Parent' container reference. + * @see #getParent() + * @generated + */ + void setParent(Function value); + +} // FunctionalElement diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FunctionalInput.java b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FunctionalInput.java new file mode 100644 index 00000000..47a8c7d4 --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FunctionalInput.java @@ -0,0 +1,42 @@ +/** + */ +package functionalarchitecture; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Functional Input'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link functionalarchitecture.FunctionalInput#getIncomingLinks Incoming Links}
  • + *
+ * + * @see functionalarchitecture.FunctionalarchitecturePackage#getFunctionalInput() + * @model + * @generated + */ +public interface FunctionalInput extends FunctionalData { + /** + * Returns the value of the 'Incoming Links' reference list. + * The list contents are of type {@link functionalarchitecture.InformationLink}. + * It is bidirectional and its opposite is '{@link functionalarchitecture.InformationLink#getTo To}'. + * + *

+ * If the meaning of the 'Incoming Links' reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Incoming Links' reference list. + * @see functionalarchitecture.FunctionalarchitecturePackage#getFunctionalInput_IncomingLinks() + * @see functionalarchitecture.InformationLink#getTo + * @model opposite="to" + * @generated + */ + EList getIncomingLinks(); + +} // FunctionalInput diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FunctionalInterface.java b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FunctionalInterface.java new file mode 100644 index 00000000..e752f903 --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FunctionalInterface.java @@ -0,0 +1,73 @@ +/** + */ +package functionalarchitecture; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Functional Interface'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link functionalarchitecture.FunctionalInterface#getData Data}
  • + *
  • {@link functionalarchitecture.FunctionalInterface#getElement Element}
  • + *
+ * + * @see functionalarchitecture.FunctionalarchitecturePackage#getFunctionalInterface() + * @model + * @generated + */ +public interface FunctionalInterface extends EObject { + /** + * Returns the value of the 'Data' containment reference list. + * The list contents are of type {@link functionalarchitecture.FunctionalData}. + * It is bidirectional and its opposite is '{@link functionalarchitecture.FunctionalData#getInterface Interface}'. + * + *

+ * If the meaning of the 'Data' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Data' containment reference list. + * @see functionalarchitecture.FunctionalarchitecturePackage#getFunctionalInterface_Data() + * @see functionalarchitecture.FunctionalData#getInterface + * @model opposite="interface" containment="true" + * @generated + */ + EList getData(); + + /** + * Returns the value of the 'Element' container reference. + * It is bidirectional and its opposite is '{@link functionalarchitecture.FunctionalElement#getInterface Interface}'. + * + *

+ * If the meaning of the 'Element' container reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Element' container reference. + * @see #setElement(FunctionalElement) + * @see functionalarchitecture.FunctionalarchitecturePackage#getFunctionalInterface_Element() + * @see functionalarchitecture.FunctionalElement#getInterface + * @model opposite="interface" transient="false" + * @generated + */ + FunctionalElement getElement(); + + /** + * Sets the value of the '{@link functionalarchitecture.FunctionalInterface#getElement Element}' container reference. + * + * + * @param value the new value of the 'Element' container reference. + * @see #getElement() + * @generated + */ + void setElement(FunctionalElement value); + +} // FunctionalInterface diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FunctionalOutput.java b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FunctionalOutput.java new file mode 100644 index 00000000..29f467ef --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FunctionalOutput.java @@ -0,0 +1,42 @@ +/** + */ +package functionalarchitecture; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Functional Output'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link functionalarchitecture.FunctionalOutput#getOutgoingLinks Outgoing Links}
  • + *
+ * + * @see functionalarchitecture.FunctionalarchitecturePackage#getFunctionalOutput() + * @model + * @generated + */ +public interface FunctionalOutput extends FunctionalData { + /** + * Returns the value of the 'Outgoing Links' containment reference list. + * The list contents are of type {@link functionalarchitecture.InformationLink}. + * It is bidirectional and its opposite is '{@link functionalarchitecture.InformationLink#getFrom From}'. + * + *

+ * If the meaning of the 'Outgoing Links' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Outgoing Links' containment reference list. + * @see functionalarchitecture.FunctionalarchitecturePackage#getFunctionalOutput_OutgoingLinks() + * @see functionalarchitecture.InformationLink#getFrom + * @model opposite="from" containment="true" + * @generated + */ + EList getOutgoingLinks(); + +} // FunctionalOutput diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FunctionalarchitectureFactory.java b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FunctionalarchitectureFactory.java new file mode 100644 index 00000000..a65ae0a7 --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FunctionalarchitectureFactory.java @@ -0,0 +1,96 @@ +/** + */ +package functionalarchitecture; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see functionalarchitecture.FunctionalarchitecturePackage + * @generated + */ +public interface FunctionalarchitectureFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + FunctionalarchitectureFactory eINSTANCE = functionalarchitecture.impl.FunctionalarchitectureFactoryImpl.init(); + + /** + * Returns a new object of class 'Functional Architecture Model'. + * + * + * @return a new object of class 'Functional Architecture Model'. + * @generated + */ + FunctionalArchitectureModel createFunctionalArchitectureModel(); + + /** + * Returns a new object of class 'Function'. + * + * + * @return a new object of class 'Function'. + * @generated + */ + Function createFunction(); + + /** + * Returns a new object of class 'FAM Terminator'. + * + * + * @return a new object of class 'FAM Terminator'. + * @generated + */ + FAMTerminator createFAMTerminator(); + + /** + * Returns a new object of class 'Information Link'. + * + * + * @return a new object of class 'Information Link'. + * @generated + */ + InformationLink createInformationLink(); + + /** + * Returns a new object of class 'Functional Interface'. + * + * + * @return a new object of class 'Functional Interface'. + * @generated + */ + FunctionalInterface createFunctionalInterface(); + + /** + * Returns a new object of class 'Functional Input'. + * + * + * @return a new object of class 'Functional Input'. + * @generated + */ + FunctionalInput createFunctionalInput(); + + /** + * Returns a new object of class 'Functional Output'. + * + * + * @return a new object of class 'Functional Output'. + * @generated + */ + FunctionalOutput createFunctionalOutput(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + FunctionalarchitecturePackage getFunctionalarchitecturePackage(); + +} //FunctionalarchitectureFactory diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FunctionalarchitecturePackage.java b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FunctionalarchitecturePackage.java new file mode 100644 index 00000000..ac0d910e --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FunctionalarchitecturePackage.java @@ -0,0 +1,1032 @@ +/** + */ +package functionalarchitecture; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see functionalarchitecture.FunctionalarchitectureFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/Ecore settingDelegates='org.eclipse.viatra.query.querybasedfeature'" + * @generated + */ +public interface FunctionalarchitecturePackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "functionalarchitecture"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "http://www.inf.mit.bme.hu/viatrasolver/example/fam"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "functionalarchitecture"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + FunctionalarchitecturePackage eINSTANCE = functionalarchitecture.impl.FunctionalarchitecturePackageImpl.init(); + + /** + * The meta object id for the '{@link functionalarchitecture.impl.FunctionalElementImpl Functional Element}' class. + * + * + * @see functionalarchitecture.impl.FunctionalElementImpl + * @see functionalarchitecture.impl.FunctionalarchitecturePackageImpl#getFunctionalElement() + * @generated + */ + int FUNCTIONAL_ELEMENT = 0; + + /** + * The feature id for the 'Interface' containment reference. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_ELEMENT__INTERFACE = 0; + + /** + * The feature id for the 'Model' reference. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_ELEMENT__MODEL = 1; + + /** + * The feature id for the 'Parent' container reference. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_ELEMENT__PARENT = 2; + + /** + * The number of structural features of the 'Functional Element' class. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_ELEMENT_FEATURE_COUNT = 3; + + /** + * The number of operations of the 'Functional Element' class. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_ELEMENT_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link functionalarchitecture.impl.FunctionalArchitectureModelImpl Functional Architecture Model}' class. + * + * + * @see functionalarchitecture.impl.FunctionalArchitectureModelImpl + * @see functionalarchitecture.impl.FunctionalarchitecturePackageImpl#getFunctionalArchitectureModel() + * @generated + */ + int FUNCTIONAL_ARCHITECTURE_MODEL = 1; + + /** + * The feature id for the 'Root Elements' containment reference list. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_ARCHITECTURE_MODEL__ROOT_ELEMENTS = 0; + + /** + * The number of structural features of the 'Functional Architecture Model' class. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_ARCHITECTURE_MODEL_FEATURE_COUNT = 1; + + /** + * The number of operations of the 'Functional Architecture Model' class. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_ARCHITECTURE_MODEL_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link functionalarchitecture.impl.FunctionImpl Function}' class. + * + * + * @see functionalarchitecture.impl.FunctionImpl + * @see functionalarchitecture.impl.FunctionalarchitecturePackageImpl#getFunction() + * @generated + */ + int FUNCTION = 2; + + /** + * The feature id for the 'Interface' containment reference. + * + * + * @generated + * @ordered + */ + int FUNCTION__INTERFACE = FUNCTIONAL_ELEMENT__INTERFACE; + + /** + * The feature id for the 'Model' reference. + * + * + * @generated + * @ordered + */ + int FUNCTION__MODEL = FUNCTIONAL_ELEMENT__MODEL; + + /** + * The feature id for the 'Parent' container reference. + * + * + * @generated + * @ordered + */ + int FUNCTION__PARENT = FUNCTIONAL_ELEMENT__PARENT; + + /** + * The feature id for the 'Sub Elements' containment reference list. + * + * + * @generated + * @ordered + */ + int FUNCTION__SUB_ELEMENTS = FUNCTIONAL_ELEMENT_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Type' attribute. + * + * + * @generated + * @ordered + */ + int FUNCTION__TYPE = FUNCTIONAL_ELEMENT_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Function' class. + * + * + * @generated + * @ordered + */ + int FUNCTION_FEATURE_COUNT = FUNCTIONAL_ELEMENT_FEATURE_COUNT + 2; + + /** + * The number of operations of the 'Function' class. + * + * + * @generated + * @ordered + */ + int FUNCTION_OPERATION_COUNT = FUNCTIONAL_ELEMENT_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link functionalarchitecture.impl.FAMTerminatorImpl FAM Terminator}' class. + * + * + * @see functionalarchitecture.impl.FAMTerminatorImpl + * @see functionalarchitecture.impl.FunctionalarchitecturePackageImpl#getFAMTerminator() + * @generated + */ + int FAM_TERMINATOR = 3; + + /** + * The feature id for the 'Data' container reference. + * + * + * @generated + * @ordered + */ + int FAM_TERMINATOR__DATA = 0; + + /** + * The number of structural features of the 'FAM Terminator' class. + * + * + * @generated + * @ordered + */ + int FAM_TERMINATOR_FEATURE_COUNT = 1; + + /** + * The number of operations of the 'FAM Terminator' class. + * + * + * @generated + * @ordered + */ + int FAM_TERMINATOR_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link functionalarchitecture.impl.InformationLinkImpl Information Link}' class. + * + * + * @see functionalarchitecture.impl.InformationLinkImpl + * @see functionalarchitecture.impl.FunctionalarchitecturePackageImpl#getInformationLink() + * @generated + */ + int INFORMATION_LINK = 4; + + /** + * The feature id for the 'From' container reference. + * + * + * @generated + * @ordered + */ + int INFORMATION_LINK__FROM = 0; + + /** + * The feature id for the 'To' reference. + * + * + * @generated + * @ordered + */ + int INFORMATION_LINK__TO = 1; + + /** + * The number of structural features of the 'Information Link' class. + * + * + * @generated + * @ordered + */ + int INFORMATION_LINK_FEATURE_COUNT = 2; + + /** + * The number of operations of the 'Information Link' class. + * + * + * @generated + * @ordered + */ + int INFORMATION_LINK_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link functionalarchitecture.impl.FunctionalInterfaceImpl Functional Interface}' class. + * + * + * @see functionalarchitecture.impl.FunctionalInterfaceImpl + * @see functionalarchitecture.impl.FunctionalarchitecturePackageImpl#getFunctionalInterface() + * @generated + */ + int FUNCTIONAL_INTERFACE = 5; + + /** + * The feature id for the 'Data' containment reference list. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_INTERFACE__DATA = 0; + + /** + * The feature id for the 'Element' container reference. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_INTERFACE__ELEMENT = 1; + + /** + * The number of structural features of the 'Functional Interface' class. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_INTERFACE_FEATURE_COUNT = 2; + + /** + * The number of operations of the 'Functional Interface' class. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_INTERFACE_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link functionalarchitecture.impl.FunctionalDataImpl Functional Data}' class. + * + * + * @see functionalarchitecture.impl.FunctionalDataImpl + * @see functionalarchitecture.impl.FunctionalarchitecturePackageImpl#getFunctionalData() + * @generated + */ + int FUNCTIONAL_DATA = 8; + + /** + * The feature id for the 'Terminator' containment reference. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_DATA__TERMINATOR = 0; + + /** + * The feature id for the 'Interface' container reference. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_DATA__INTERFACE = 1; + + /** + * The number of structural features of the 'Functional Data' class. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_DATA_FEATURE_COUNT = 2; + + /** + * The number of operations of the 'Functional Data' class. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_DATA_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link functionalarchitecture.impl.FunctionalInputImpl Functional Input}' class. + * + * + * @see functionalarchitecture.impl.FunctionalInputImpl + * @see functionalarchitecture.impl.FunctionalarchitecturePackageImpl#getFunctionalInput() + * @generated + */ + int FUNCTIONAL_INPUT = 6; + + /** + * The feature id for the 'Terminator' containment reference. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_INPUT__TERMINATOR = FUNCTIONAL_DATA__TERMINATOR; + + /** + * The feature id for the 'Interface' container reference. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_INPUT__INTERFACE = FUNCTIONAL_DATA__INTERFACE; + + /** + * The feature id for the 'Incoming Links' reference list. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_INPUT__INCOMING_LINKS = FUNCTIONAL_DATA_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Functional Input' class. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_INPUT_FEATURE_COUNT = FUNCTIONAL_DATA_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Functional Input' class. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_INPUT_OPERATION_COUNT = FUNCTIONAL_DATA_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link functionalarchitecture.impl.FunctionalOutputImpl Functional Output}' class. + * + * + * @see functionalarchitecture.impl.FunctionalOutputImpl + * @see functionalarchitecture.impl.FunctionalarchitecturePackageImpl#getFunctionalOutput() + * @generated + */ + int FUNCTIONAL_OUTPUT = 7; + + /** + * The feature id for the 'Terminator' containment reference. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_OUTPUT__TERMINATOR = FUNCTIONAL_DATA__TERMINATOR; + + /** + * The feature id for the 'Interface' container reference. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_OUTPUT__INTERFACE = FUNCTIONAL_DATA__INTERFACE; + + /** + * The feature id for the 'Outgoing Links' containment reference list. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_OUTPUT__OUTGOING_LINKS = FUNCTIONAL_DATA_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Functional Output' class. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_OUTPUT_FEATURE_COUNT = FUNCTIONAL_DATA_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Functional Output' class. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_OUTPUT_OPERATION_COUNT = FUNCTIONAL_DATA_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link functionalarchitecture.FunctionType Function Type}' enum. + * + * + * @see functionalarchitecture.FunctionType + * @see functionalarchitecture.impl.FunctionalarchitecturePackageImpl#getFunctionType() + * @generated + */ + int FUNCTION_TYPE = 9; + + + /** + * Returns the meta object for class '{@link functionalarchitecture.FunctionalElement Functional Element}'. + * + * + * @return the meta object for class 'Functional Element'. + * @see functionalarchitecture.FunctionalElement + * @generated + */ + EClass getFunctionalElement(); + + /** + * Returns the meta object for the containment reference '{@link functionalarchitecture.FunctionalElement#getInterface Interface}'. + * + * + * @return the meta object for the containment reference 'Interface'. + * @see functionalarchitecture.FunctionalElement#getInterface() + * @see #getFunctionalElement() + * @generated + */ + EReference getFunctionalElement_Interface(); + + /** + * Returns the meta object for the reference '{@link functionalarchitecture.FunctionalElement#getModel Model}'. + * + * + * @return the meta object for the reference 'Model'. + * @see functionalarchitecture.FunctionalElement#getModel() + * @see #getFunctionalElement() + * @generated + */ + EReference getFunctionalElement_Model(); + + /** + * Returns the meta object for the container reference '{@link functionalarchitecture.FunctionalElement#getParent Parent}'. + * + * + * @return the meta object for the container reference 'Parent'. + * @see functionalarchitecture.FunctionalElement#getParent() + * @see #getFunctionalElement() + * @generated + */ + EReference getFunctionalElement_Parent(); + + /** + * Returns the meta object for class '{@link functionalarchitecture.FunctionalArchitectureModel Functional Architecture Model}'. + * + * + * @return the meta object for class 'Functional Architecture Model'. + * @see functionalarchitecture.FunctionalArchitectureModel + * @generated + */ + EClass getFunctionalArchitectureModel(); + + /** + * Returns the meta object for the containment reference list '{@link functionalarchitecture.FunctionalArchitectureModel#getRootElements Root Elements}'. + * + * + * @return the meta object for the containment reference list 'Root Elements'. + * @see functionalarchitecture.FunctionalArchitectureModel#getRootElements() + * @see #getFunctionalArchitectureModel() + * @generated + */ + EReference getFunctionalArchitectureModel_RootElements(); + + /** + * Returns the meta object for class '{@link functionalarchitecture.Function Function}'. + * + * + * @return the meta object for class 'Function'. + * @see functionalarchitecture.Function + * @generated + */ + EClass getFunction(); + + /** + * Returns the meta object for the containment reference list '{@link functionalarchitecture.Function#getSubElements Sub Elements}'. + * + * + * @return the meta object for the containment reference list 'Sub Elements'. + * @see functionalarchitecture.Function#getSubElements() + * @see #getFunction() + * @generated + */ + EReference getFunction_SubElements(); + + /** + * Returns the meta object for the attribute '{@link functionalarchitecture.Function#getType Type}'. + * + * + * @return the meta object for the attribute 'Type'. + * @see functionalarchitecture.Function#getType() + * @see #getFunction() + * @generated + */ + EAttribute getFunction_Type(); + + /** + * Returns the meta object for class '{@link functionalarchitecture.FAMTerminator FAM Terminator}'. + * + * + * @return the meta object for class 'FAM Terminator'. + * @see functionalarchitecture.FAMTerminator + * @generated + */ + EClass getFAMTerminator(); + + /** + * Returns the meta object for the container reference '{@link functionalarchitecture.FAMTerminator#getData Data}'. + * + * + * @return the meta object for the container reference 'Data'. + * @see functionalarchitecture.FAMTerminator#getData() + * @see #getFAMTerminator() + * @generated + */ + EReference getFAMTerminator_Data(); + + /** + * Returns the meta object for class '{@link functionalarchitecture.InformationLink Information Link}'. + * + * + * @return the meta object for class 'Information Link'. + * @see functionalarchitecture.InformationLink + * @generated + */ + EClass getInformationLink(); + + /** + * Returns the meta object for the container reference '{@link functionalarchitecture.InformationLink#getFrom From}'. + * + * + * @return the meta object for the container reference 'From'. + * @see functionalarchitecture.InformationLink#getFrom() + * @see #getInformationLink() + * @generated + */ + EReference getInformationLink_From(); + + /** + * Returns the meta object for the reference '{@link functionalarchitecture.InformationLink#getTo To}'. + * + * + * @return the meta object for the reference 'To'. + * @see functionalarchitecture.InformationLink#getTo() + * @see #getInformationLink() + * @generated + */ + EReference getInformationLink_To(); + + /** + * Returns the meta object for class '{@link functionalarchitecture.FunctionalInterface Functional Interface}'. + * + * + * @return the meta object for class 'Functional Interface'. + * @see functionalarchitecture.FunctionalInterface + * @generated + */ + EClass getFunctionalInterface(); + + /** + * Returns the meta object for the containment reference list '{@link functionalarchitecture.FunctionalInterface#getData Data}'. + * + * + * @return the meta object for the containment reference list 'Data'. + * @see functionalarchitecture.FunctionalInterface#getData() + * @see #getFunctionalInterface() + * @generated + */ + EReference getFunctionalInterface_Data(); + + /** + * Returns the meta object for the container reference '{@link functionalarchitecture.FunctionalInterface#getElement Element}'. + * + * + * @return the meta object for the container reference 'Element'. + * @see functionalarchitecture.FunctionalInterface#getElement() + * @see #getFunctionalInterface() + * @generated + */ + EReference getFunctionalInterface_Element(); + + /** + * Returns the meta object for class '{@link functionalarchitecture.FunctionalInput Functional Input}'. + * + * + * @return the meta object for class 'Functional Input'. + * @see functionalarchitecture.FunctionalInput + * @generated + */ + EClass getFunctionalInput(); + + /** + * Returns the meta object for the reference list '{@link functionalarchitecture.FunctionalInput#getIncomingLinks Incoming Links}'. + * + * + * @return the meta object for the reference list 'Incoming Links'. + * @see functionalarchitecture.FunctionalInput#getIncomingLinks() + * @see #getFunctionalInput() + * @generated + */ + EReference getFunctionalInput_IncomingLinks(); + + /** + * Returns the meta object for class '{@link functionalarchitecture.FunctionalOutput Functional Output}'. + * + * + * @return the meta object for class 'Functional Output'. + * @see functionalarchitecture.FunctionalOutput + * @generated + */ + EClass getFunctionalOutput(); + + /** + * Returns the meta object for the containment reference list '{@link functionalarchitecture.FunctionalOutput#getOutgoingLinks Outgoing Links}'. + * + * + * @return the meta object for the containment reference list 'Outgoing Links'. + * @see functionalarchitecture.FunctionalOutput#getOutgoingLinks() + * @see #getFunctionalOutput() + * @generated + */ + EReference getFunctionalOutput_OutgoingLinks(); + + /** + * Returns the meta object for class '{@link functionalarchitecture.FunctionalData Functional Data}'. + * + * + * @return the meta object for class 'Functional Data'. + * @see functionalarchitecture.FunctionalData + * @generated + */ + EClass getFunctionalData(); + + /** + * Returns the meta object for the containment reference '{@link functionalarchitecture.FunctionalData#getTerminator Terminator}'. + * + * + * @return the meta object for the containment reference 'Terminator'. + * @see functionalarchitecture.FunctionalData#getTerminator() + * @see #getFunctionalData() + * @generated + */ + EReference getFunctionalData_Terminator(); + + /** + * Returns the meta object for the container reference '{@link functionalarchitecture.FunctionalData#getInterface Interface}'. + * + * + * @return the meta object for the container reference 'Interface'. + * @see functionalarchitecture.FunctionalData#getInterface() + * @see #getFunctionalData() + * @generated + */ + EReference getFunctionalData_Interface(); + + /** + * Returns the meta object for enum '{@link functionalarchitecture.FunctionType Function Type}'. + * + * + * @return the meta object for enum 'Function Type'. + * @see functionalarchitecture.FunctionType + * @generated + */ + EEnum getFunctionType(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + FunctionalarchitectureFactory getFunctionalarchitectureFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link functionalarchitecture.impl.FunctionalElementImpl Functional Element}' class. + * + * + * @see functionalarchitecture.impl.FunctionalElementImpl + * @see functionalarchitecture.impl.FunctionalarchitecturePackageImpl#getFunctionalElement() + * @generated + */ + EClass FUNCTIONAL_ELEMENT = eINSTANCE.getFunctionalElement(); + + /** + * The meta object literal for the 'Interface' containment reference feature. + * + * + * @generated + */ + EReference FUNCTIONAL_ELEMENT__INTERFACE = eINSTANCE.getFunctionalElement_Interface(); + + /** + * The meta object literal for the 'Model' reference feature. + * + * + * @generated + */ + EReference FUNCTIONAL_ELEMENT__MODEL = eINSTANCE.getFunctionalElement_Model(); + + /** + * The meta object literal for the 'Parent' container reference feature. + * + * + * @generated + */ + EReference FUNCTIONAL_ELEMENT__PARENT = eINSTANCE.getFunctionalElement_Parent(); + + /** + * The meta object literal for the '{@link functionalarchitecture.impl.FunctionalArchitectureModelImpl Functional Architecture Model}' class. + * + * + * @see functionalarchitecture.impl.FunctionalArchitectureModelImpl + * @see functionalarchitecture.impl.FunctionalarchitecturePackageImpl#getFunctionalArchitectureModel() + * @generated + */ + EClass FUNCTIONAL_ARCHITECTURE_MODEL = eINSTANCE.getFunctionalArchitectureModel(); + + /** + * The meta object literal for the 'Root Elements' containment reference list feature. + * + * + * @generated + */ + EReference FUNCTIONAL_ARCHITECTURE_MODEL__ROOT_ELEMENTS = eINSTANCE.getFunctionalArchitectureModel_RootElements(); + + /** + * The meta object literal for the '{@link functionalarchitecture.impl.FunctionImpl Function}' class. + * + * + * @see functionalarchitecture.impl.FunctionImpl + * @see functionalarchitecture.impl.FunctionalarchitecturePackageImpl#getFunction() + * @generated + */ + EClass FUNCTION = eINSTANCE.getFunction(); + + /** + * The meta object literal for the 'Sub Elements' containment reference list feature. + * + * + * @generated + */ + EReference FUNCTION__SUB_ELEMENTS = eINSTANCE.getFunction_SubElements(); + + /** + * The meta object literal for the 'Type' attribute feature. + * + * + * @generated + */ + EAttribute FUNCTION__TYPE = eINSTANCE.getFunction_Type(); + + /** + * The meta object literal for the '{@link functionalarchitecture.impl.FAMTerminatorImpl FAM Terminator}' class. + * + * + * @see functionalarchitecture.impl.FAMTerminatorImpl + * @see functionalarchitecture.impl.FunctionalarchitecturePackageImpl#getFAMTerminator() + * @generated + */ + EClass FAM_TERMINATOR = eINSTANCE.getFAMTerminator(); + + /** + * The meta object literal for the 'Data' container reference feature. + * + * + * @generated + */ + EReference FAM_TERMINATOR__DATA = eINSTANCE.getFAMTerminator_Data(); + + /** + * The meta object literal for the '{@link functionalarchitecture.impl.InformationLinkImpl Information Link}' class. + * + * + * @see functionalarchitecture.impl.InformationLinkImpl + * @see functionalarchitecture.impl.FunctionalarchitecturePackageImpl#getInformationLink() + * @generated + */ + EClass INFORMATION_LINK = eINSTANCE.getInformationLink(); + + /** + * The meta object literal for the 'From' container reference feature. + * + * + * @generated + */ + EReference INFORMATION_LINK__FROM = eINSTANCE.getInformationLink_From(); + + /** + * The meta object literal for the 'To' reference feature. + * + * + * @generated + */ + EReference INFORMATION_LINK__TO = eINSTANCE.getInformationLink_To(); + + /** + * The meta object literal for the '{@link functionalarchitecture.impl.FunctionalInterfaceImpl Functional Interface}' class. + * + * + * @see functionalarchitecture.impl.FunctionalInterfaceImpl + * @see functionalarchitecture.impl.FunctionalarchitecturePackageImpl#getFunctionalInterface() + * @generated + */ + EClass FUNCTIONAL_INTERFACE = eINSTANCE.getFunctionalInterface(); + + /** + * The meta object literal for the 'Data' containment reference list feature. + * + * + * @generated + */ + EReference FUNCTIONAL_INTERFACE__DATA = eINSTANCE.getFunctionalInterface_Data(); + + /** + * The meta object literal for the 'Element' container reference feature. + * + * + * @generated + */ + EReference FUNCTIONAL_INTERFACE__ELEMENT = eINSTANCE.getFunctionalInterface_Element(); + + /** + * The meta object literal for the '{@link functionalarchitecture.impl.FunctionalInputImpl Functional Input}' class. + * + * + * @see functionalarchitecture.impl.FunctionalInputImpl + * @see functionalarchitecture.impl.FunctionalarchitecturePackageImpl#getFunctionalInput() + * @generated + */ + EClass FUNCTIONAL_INPUT = eINSTANCE.getFunctionalInput(); + + /** + * The meta object literal for the 'Incoming Links' reference list feature. + * + * + * @generated + */ + EReference FUNCTIONAL_INPUT__INCOMING_LINKS = eINSTANCE.getFunctionalInput_IncomingLinks(); + + /** + * The meta object literal for the '{@link functionalarchitecture.impl.FunctionalOutputImpl Functional Output}' class. + * + * + * @see functionalarchitecture.impl.FunctionalOutputImpl + * @see functionalarchitecture.impl.FunctionalarchitecturePackageImpl#getFunctionalOutput() + * @generated + */ + EClass FUNCTIONAL_OUTPUT = eINSTANCE.getFunctionalOutput(); + + /** + * The meta object literal for the 'Outgoing Links' containment reference list feature. + * + * + * @generated + */ + EReference FUNCTIONAL_OUTPUT__OUTGOING_LINKS = eINSTANCE.getFunctionalOutput_OutgoingLinks(); + + /** + * The meta object literal for the '{@link functionalarchitecture.impl.FunctionalDataImpl Functional Data}' class. + * + * + * @see functionalarchitecture.impl.FunctionalDataImpl + * @see functionalarchitecture.impl.FunctionalarchitecturePackageImpl#getFunctionalData() + * @generated + */ + EClass FUNCTIONAL_DATA = eINSTANCE.getFunctionalData(); + + /** + * The meta object literal for the 'Terminator' containment reference feature. + * + * + * @generated + */ + EReference FUNCTIONAL_DATA__TERMINATOR = eINSTANCE.getFunctionalData_Terminator(); + + /** + * The meta object literal for the 'Interface' container reference feature. + * + * + * @generated + */ + EReference FUNCTIONAL_DATA__INTERFACE = eINSTANCE.getFunctionalData_Interface(); + + /** + * The meta object literal for the '{@link functionalarchitecture.FunctionType Function Type}' enum. + * + * + * @see functionalarchitecture.FunctionType + * @see functionalarchitecture.impl.FunctionalarchitecturePackageImpl#getFunctionType() + * @generated + */ + EEnum FUNCTION_TYPE = eINSTANCE.getFunctionType(); + + } + +} //FunctionalarchitecturePackage diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/InformationLink.java b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/InformationLink.java new file mode 100644 index 00000000..64cd9df4 --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/InformationLink.java @@ -0,0 +1,81 @@ +/** + */ +package functionalarchitecture; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Information Link'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link functionalarchitecture.InformationLink#getFrom From}
  • + *
  • {@link functionalarchitecture.InformationLink#getTo To}
  • + *
+ * + * @see functionalarchitecture.FunctionalarchitecturePackage#getInformationLink() + * @model + * @generated + */ +public interface InformationLink extends EObject { + /** + * Returns the value of the 'From' container reference. + * It is bidirectional and its opposite is '{@link functionalarchitecture.FunctionalOutput#getOutgoingLinks Outgoing Links}'. + * + *

+ * If the meaning of the 'From' container reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'From' container reference. + * @see #setFrom(FunctionalOutput) + * @see functionalarchitecture.FunctionalarchitecturePackage#getInformationLink_From() + * @see functionalarchitecture.FunctionalOutput#getOutgoingLinks + * @model opposite="outgoingLinks" transient="false" + * @generated + */ + FunctionalOutput getFrom(); + + /** + * Sets the value of the '{@link functionalarchitecture.InformationLink#getFrom From}' container reference. + * + * + * @param value the new value of the 'From' container reference. + * @see #getFrom() + * @generated + */ + void setFrom(FunctionalOutput value); + + /** + * Returns the value of the 'To' reference. + * It is bidirectional and its opposite is '{@link functionalarchitecture.FunctionalInput#getIncomingLinks Incoming Links}'. + * + *

+ * If the meaning of the 'To' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'To' reference. + * @see #setTo(FunctionalInput) + * @see functionalarchitecture.FunctionalarchitecturePackage#getInformationLink_To() + * @see functionalarchitecture.FunctionalInput#getIncomingLinks + * @model opposite="IncomingLinks" required="true" + * @generated + */ + FunctionalInput getTo(); + + /** + * Sets the value of the '{@link functionalarchitecture.InformationLink#getTo To}' reference. + * + * + * @param value the new value of the 'To' reference. + * @see #getTo() + * @generated + */ + void setTo(FunctionalInput value); + +} // InformationLink diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FAMTerminatorImpl.java b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FAMTerminatorImpl.java new file mode 100644 index 00000000..382e0170 --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FAMTerminatorImpl.java @@ -0,0 +1,196 @@ +/** + */ +package functionalarchitecture.impl; + +import functionalarchitecture.FAMTerminator; +import functionalarchitecture.FunctionalData; +import functionalarchitecture.FunctionalarchitecturePackage; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EcoreUtil; + +/** + * + * An implementation of the model object 'FAM Terminator'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link functionalarchitecture.impl.FAMTerminatorImpl#getData Data}
  • + *
+ * + * @generated + */ +public class FAMTerminatorImpl extends MinimalEObjectImpl.Container implements FAMTerminator { + /** + * + * + * @generated + */ + protected FAMTerminatorImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return FunctionalarchitecturePackage.Literals.FAM_TERMINATOR; + } + + /** + * + * + * @generated + */ + public FunctionalData getData() { + if (eContainerFeatureID() != FunctionalarchitecturePackage.FAM_TERMINATOR__DATA) return null; + return (FunctionalData)eInternalContainer(); + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetData(FunctionalData newData, NotificationChain msgs) { + msgs = eBasicSetContainer((InternalEObject)newData, FunctionalarchitecturePackage.FAM_TERMINATOR__DATA, msgs); + return msgs; + } + + /** + * + * + * @generated + */ + public void setData(FunctionalData newData) { + if (newData != eInternalContainer() || (eContainerFeatureID() != FunctionalarchitecturePackage.FAM_TERMINATOR__DATA && newData != null)) { + if (EcoreUtil.isAncestor(this, newData)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newData != null) + msgs = ((InternalEObject)newData).eInverseAdd(this, FunctionalarchitecturePackage.FUNCTIONAL_DATA__TERMINATOR, FunctionalData.class, msgs); + msgs = basicSetData(newData, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, FunctionalarchitecturePackage.FAM_TERMINATOR__DATA, newData, newData)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case FunctionalarchitecturePackage.FAM_TERMINATOR__DATA: + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + return basicSetData((FunctionalData)otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case FunctionalarchitecturePackage.FAM_TERMINATOR__DATA: + return basicSetData(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { + switch (eContainerFeatureID()) { + case FunctionalarchitecturePackage.FAM_TERMINATOR__DATA: + return eInternalContainer().eInverseRemove(this, FunctionalarchitecturePackage.FUNCTIONAL_DATA__TERMINATOR, FunctionalData.class, msgs); + } + return super.eBasicRemoveFromContainerFeature(msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case FunctionalarchitecturePackage.FAM_TERMINATOR__DATA: + return getData(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case FunctionalarchitecturePackage.FAM_TERMINATOR__DATA: + setData((FunctionalData)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case FunctionalarchitecturePackage.FAM_TERMINATOR__DATA: + setData((FunctionalData)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case FunctionalarchitecturePackage.FAM_TERMINATOR__DATA: + return getData() != null; + } + return super.eIsSet(featureID); + } + +} //FAMTerminatorImpl diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionImpl.java b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionImpl.java new file mode 100644 index 00000000..46736c8c --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionImpl.java @@ -0,0 +1,191 @@ +/** + */ +package functionalarchitecture.impl; + +import functionalarchitecture.Function; +import functionalarchitecture.FunctionType; +import functionalarchitecture.FunctionalElement; +import functionalarchitecture.FunctionalarchitecturePackage; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Function'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link functionalarchitecture.impl.FunctionImpl#getSubElements Sub Elements}
  • + *
  • {@link functionalarchitecture.impl.FunctionImpl#getType Type}
  • + *
+ * + * @generated + */ +public class FunctionImpl extends FunctionalElementImpl implements Function { + /** + * The cached value of the '{@link #getSubElements() Sub Elements}' containment reference list. + * + * + * @see #getSubElements() + * @generated + * @ordered + */ + protected EList subElements; + + /** + * The cached setting delegate for the '{@link #getType() Type}' attribute. + * + * + * @see #getType() + * @generated + * @ordered + */ + protected EStructuralFeature.Internal.SettingDelegate TYPE__ESETTING_DELEGATE = ((EStructuralFeature.Internal)FunctionalarchitecturePackage.Literals.FUNCTION__TYPE).getSettingDelegate(); + + /** + * + * + * @generated + */ + protected FunctionImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return FunctionalarchitecturePackage.Literals.FUNCTION; + } + + /** + * + * + * @generated + */ + public EList getSubElements() { + if (subElements == null) { + subElements = new EObjectContainmentWithInverseEList(FunctionalElement.class, this, FunctionalarchitecturePackage.FUNCTION__SUB_ELEMENTS, FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__PARENT); + } + return subElements; + } + + /** + * + * + * @generated + */ + public FunctionType getType() { + return (FunctionType)TYPE__ESETTING_DELEGATE.dynamicGet(this, null, 0, true, false); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case FunctionalarchitecturePackage.FUNCTION__SUB_ELEMENTS: + return ((InternalEList)(InternalEList)getSubElements()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case FunctionalarchitecturePackage.FUNCTION__SUB_ELEMENTS: + return ((InternalEList)getSubElements()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case FunctionalarchitecturePackage.FUNCTION__SUB_ELEMENTS: + return getSubElements(); + case FunctionalarchitecturePackage.FUNCTION__TYPE: + return getType(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case FunctionalarchitecturePackage.FUNCTION__SUB_ELEMENTS: + getSubElements().clear(); + getSubElements().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case FunctionalarchitecturePackage.FUNCTION__SUB_ELEMENTS: + getSubElements().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case FunctionalarchitecturePackage.FUNCTION__SUB_ELEMENTS: + return subElements != null && !subElements.isEmpty(); + case FunctionalarchitecturePackage.FUNCTION__TYPE: + return TYPE__ESETTING_DELEGATE.dynamicIsSet(this, null, 0); + } + return super.eIsSet(featureID); + } + +} //FunctionImpl diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalArchitectureModelImpl.java b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalArchitectureModelImpl.java new file mode 100644 index 00000000..78f6d6f2 --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalArchitectureModelImpl.java @@ -0,0 +1,152 @@ +/** + */ +package functionalarchitecture.impl; + +import functionalarchitecture.FunctionalArchitectureModel; +import functionalarchitecture.FunctionalElement; +import functionalarchitecture.FunctionalarchitecturePackage; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Functional Architecture Model'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link functionalarchitecture.impl.FunctionalArchitectureModelImpl#getRootElements Root Elements}
  • + *
+ * + * @generated + */ +public class FunctionalArchitectureModelImpl extends MinimalEObjectImpl.Container implements FunctionalArchitectureModel { + /** + * The cached value of the '{@link #getRootElements() Root Elements}' containment reference list. + * + * + * @see #getRootElements() + * @generated + * @ordered + */ + protected EList rootElements; + + /** + * + * + * @generated + */ + protected FunctionalArchitectureModelImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return FunctionalarchitecturePackage.Literals.FUNCTIONAL_ARCHITECTURE_MODEL; + } + + /** + * + * + * @generated + */ + public EList getRootElements() { + if (rootElements == null) { + rootElements = new EObjectContainmentEList(FunctionalElement.class, this, FunctionalarchitecturePackage.FUNCTIONAL_ARCHITECTURE_MODEL__ROOT_ELEMENTS); + } + return rootElements; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case FunctionalarchitecturePackage.FUNCTIONAL_ARCHITECTURE_MODEL__ROOT_ELEMENTS: + return ((InternalEList)getRootElements()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case FunctionalarchitecturePackage.FUNCTIONAL_ARCHITECTURE_MODEL__ROOT_ELEMENTS: + return getRootElements(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case FunctionalarchitecturePackage.FUNCTIONAL_ARCHITECTURE_MODEL__ROOT_ELEMENTS: + getRootElements().clear(); + getRootElements().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case FunctionalarchitecturePackage.FUNCTIONAL_ARCHITECTURE_MODEL__ROOT_ELEMENTS: + getRootElements().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case FunctionalarchitecturePackage.FUNCTIONAL_ARCHITECTURE_MODEL__ROOT_ELEMENTS: + return rootElements != null && !rootElements.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //FunctionalArchitectureModelImpl diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalDataImpl.java b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalDataImpl.java new file mode 100644 index 00000000..10937e8d --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalDataImpl.java @@ -0,0 +1,267 @@ +/** + */ +package functionalarchitecture.impl; + +import functionalarchitecture.FAMTerminator; +import functionalarchitecture.FunctionalData; +import functionalarchitecture.FunctionalInterface; +import functionalarchitecture.FunctionalarchitecturePackage; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EcoreUtil; + +/** + * + * An implementation of the model object 'Functional Data'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link functionalarchitecture.impl.FunctionalDataImpl#getTerminator Terminator}
  • + *
  • {@link functionalarchitecture.impl.FunctionalDataImpl#getInterface Interface}
  • + *
+ * + * @generated + */ +public abstract class FunctionalDataImpl extends MinimalEObjectImpl.Container implements FunctionalData { + /** + * The cached value of the '{@link #getTerminator() Terminator}' containment reference. + * + * + * @see #getTerminator() + * @generated + * @ordered + */ + protected FAMTerminator terminator; + + /** + * + * + * @generated + */ + protected FunctionalDataImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return FunctionalarchitecturePackage.Literals.FUNCTIONAL_DATA; + } + + /** + * + * + * @generated + */ + public FAMTerminator getTerminator() { + return terminator; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetTerminator(FAMTerminator newTerminator, NotificationChain msgs) { + FAMTerminator oldTerminator = terminator; + terminator = newTerminator; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FunctionalarchitecturePackage.FUNCTIONAL_DATA__TERMINATOR, oldTerminator, newTerminator); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setTerminator(FAMTerminator newTerminator) { + if (newTerminator != terminator) { + NotificationChain msgs = null; + if (terminator != null) + msgs = ((InternalEObject)terminator).eInverseRemove(this, FunctionalarchitecturePackage.FAM_TERMINATOR__DATA, FAMTerminator.class, msgs); + if (newTerminator != null) + msgs = ((InternalEObject)newTerminator).eInverseAdd(this, FunctionalarchitecturePackage.FAM_TERMINATOR__DATA, FAMTerminator.class, msgs); + msgs = basicSetTerminator(newTerminator, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, FunctionalarchitecturePackage.FUNCTIONAL_DATA__TERMINATOR, newTerminator, newTerminator)); + } + + /** + * + * + * @generated + */ + public FunctionalInterface getInterface() { + if (eContainerFeatureID() != FunctionalarchitecturePackage.FUNCTIONAL_DATA__INTERFACE) return null; + return (FunctionalInterface)eInternalContainer(); + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetInterface(FunctionalInterface newInterface, NotificationChain msgs) { + msgs = eBasicSetContainer((InternalEObject)newInterface, FunctionalarchitecturePackage.FUNCTIONAL_DATA__INTERFACE, msgs); + return msgs; + } + + /** + * + * + * @generated + */ + public void setInterface(FunctionalInterface newInterface) { + if (newInterface != eInternalContainer() || (eContainerFeatureID() != FunctionalarchitecturePackage.FUNCTIONAL_DATA__INTERFACE && newInterface != null)) { + if (EcoreUtil.isAncestor(this, newInterface)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newInterface != null) + msgs = ((InternalEObject)newInterface).eInverseAdd(this, FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__DATA, FunctionalInterface.class, msgs); + msgs = basicSetInterface(newInterface, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, FunctionalarchitecturePackage.FUNCTIONAL_DATA__INTERFACE, newInterface, newInterface)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case FunctionalarchitecturePackage.FUNCTIONAL_DATA__TERMINATOR: + if (terminator != null) + msgs = ((InternalEObject)terminator).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FunctionalarchitecturePackage.FUNCTIONAL_DATA__TERMINATOR, null, msgs); + return basicSetTerminator((FAMTerminator)otherEnd, msgs); + case FunctionalarchitecturePackage.FUNCTIONAL_DATA__INTERFACE: + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + return basicSetInterface((FunctionalInterface)otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case FunctionalarchitecturePackage.FUNCTIONAL_DATA__TERMINATOR: + return basicSetTerminator(null, msgs); + case FunctionalarchitecturePackage.FUNCTIONAL_DATA__INTERFACE: + return basicSetInterface(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { + switch (eContainerFeatureID()) { + case FunctionalarchitecturePackage.FUNCTIONAL_DATA__INTERFACE: + return eInternalContainer().eInverseRemove(this, FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__DATA, FunctionalInterface.class, msgs); + } + return super.eBasicRemoveFromContainerFeature(msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case FunctionalarchitecturePackage.FUNCTIONAL_DATA__TERMINATOR: + return getTerminator(); + case FunctionalarchitecturePackage.FUNCTIONAL_DATA__INTERFACE: + return getInterface(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case FunctionalarchitecturePackage.FUNCTIONAL_DATA__TERMINATOR: + setTerminator((FAMTerminator)newValue); + return; + case FunctionalarchitecturePackage.FUNCTIONAL_DATA__INTERFACE: + setInterface((FunctionalInterface)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case FunctionalarchitecturePackage.FUNCTIONAL_DATA__TERMINATOR: + setTerminator((FAMTerminator)null); + return; + case FunctionalarchitecturePackage.FUNCTIONAL_DATA__INTERFACE: + setInterface((FunctionalInterface)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case FunctionalarchitecturePackage.FUNCTIONAL_DATA__TERMINATOR: + return terminator != null; + case FunctionalarchitecturePackage.FUNCTIONAL_DATA__INTERFACE: + return getInterface() != null; + } + return super.eIsSet(featureID); + } + +} //FunctionalDataImpl diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalElementImpl.java b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalElementImpl.java new file mode 100644 index 00000000..809e9ed5 --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalElementImpl.java @@ -0,0 +1,318 @@ +/** + */ +package functionalarchitecture.impl; + +import functionalarchitecture.Function; +import functionalarchitecture.FunctionalArchitectureModel; +import functionalarchitecture.FunctionalElement; +import functionalarchitecture.FunctionalInterface; +import functionalarchitecture.FunctionalarchitecturePackage; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EcoreUtil; + +/** + * + * An implementation of the model object 'Functional Element'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link functionalarchitecture.impl.FunctionalElementImpl#getInterface Interface}
  • + *
  • {@link functionalarchitecture.impl.FunctionalElementImpl#getModel Model}
  • + *
  • {@link functionalarchitecture.impl.FunctionalElementImpl#getParent Parent}
  • + *
+ * + * @generated + */ +public abstract class FunctionalElementImpl extends MinimalEObjectImpl.Container implements FunctionalElement { + /** + * The cached value of the '{@link #getInterface() Interface}' containment reference. + * + * + * @see #getInterface() + * @generated + * @ordered + */ + protected FunctionalInterface interface_; + + /** + * The cached setting delegate for the '{@link #getModel() Model}' reference. + * + * + * @see #getModel() + * @generated + * @ordered + */ + protected EStructuralFeature.Internal.SettingDelegate MODEL__ESETTING_DELEGATE = ((EStructuralFeature.Internal)FunctionalarchitecturePackage.Literals.FUNCTIONAL_ELEMENT__MODEL).getSettingDelegate(); + + /** + * + * + * @generated + */ + protected FunctionalElementImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return FunctionalarchitecturePackage.Literals.FUNCTIONAL_ELEMENT; + } + + /** + * + * + * @generated + */ + public FunctionalInterface getInterface() { + return interface_; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetInterface(FunctionalInterface newInterface, NotificationChain msgs) { + FunctionalInterface oldInterface = interface_; + interface_ = newInterface; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__INTERFACE, oldInterface, newInterface); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setInterface(FunctionalInterface newInterface) { + if (newInterface != interface_) { + NotificationChain msgs = null; + if (interface_ != null) + msgs = ((InternalEObject)interface_).eInverseRemove(this, FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__ELEMENT, FunctionalInterface.class, msgs); + if (newInterface != null) + msgs = ((InternalEObject)newInterface).eInverseAdd(this, FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__ELEMENT, FunctionalInterface.class, msgs); + msgs = basicSetInterface(newInterface, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__INTERFACE, newInterface, newInterface)); + } + + /** + * + * + * @generated + */ + public FunctionalArchitectureModel getModel() { + return (FunctionalArchitectureModel)MODEL__ESETTING_DELEGATE.dynamicGet(this, null, 0, true, false); + } + + /** + * + * + * @generated + */ + public FunctionalArchitectureModel basicGetModel() { + return (FunctionalArchitectureModel)MODEL__ESETTING_DELEGATE.dynamicGet(this, null, 0, false, false); + } + + /** + * + * + * @generated + */ + public void setModel(FunctionalArchitectureModel newModel) { + MODEL__ESETTING_DELEGATE.dynamicSet(this, null, 0, newModel); + } + + /** + * + * + * @generated + */ + public Function getParent() { + if (eContainerFeatureID() != FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__PARENT) return null; + return (Function)eInternalContainer(); + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetParent(Function newParent, NotificationChain msgs) { + msgs = eBasicSetContainer((InternalEObject)newParent, FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__PARENT, msgs); + return msgs; + } + + /** + * + * + * @generated + */ + public void setParent(Function newParent) { + if (newParent != eInternalContainer() || (eContainerFeatureID() != FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__PARENT && newParent != null)) { + if (EcoreUtil.isAncestor(this, newParent)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newParent != null) + msgs = ((InternalEObject)newParent).eInverseAdd(this, FunctionalarchitecturePackage.FUNCTION__SUB_ELEMENTS, Function.class, msgs); + msgs = basicSetParent(newParent, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__PARENT, newParent, newParent)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__INTERFACE: + if (interface_ != null) + msgs = ((InternalEObject)interface_).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__INTERFACE, null, msgs); + return basicSetInterface((FunctionalInterface)otherEnd, msgs); + case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__PARENT: + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + return basicSetParent((Function)otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__INTERFACE: + return basicSetInterface(null, msgs); + case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__PARENT: + return basicSetParent(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { + switch (eContainerFeatureID()) { + case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__PARENT: + return eInternalContainer().eInverseRemove(this, FunctionalarchitecturePackage.FUNCTION__SUB_ELEMENTS, Function.class, msgs); + } + return super.eBasicRemoveFromContainerFeature(msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__INTERFACE: + return getInterface(); + case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__MODEL: + if (resolve) return getModel(); + return basicGetModel(); + case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__PARENT: + return getParent(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__INTERFACE: + setInterface((FunctionalInterface)newValue); + return; + case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__MODEL: + setModel((FunctionalArchitectureModel)newValue); + return; + case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__PARENT: + setParent((Function)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__INTERFACE: + setInterface((FunctionalInterface)null); + return; + case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__MODEL: + setModel((FunctionalArchitectureModel)null); + return; + case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__PARENT: + setParent((Function)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__INTERFACE: + return interface_ != null; + case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__MODEL: + return MODEL__ESETTING_DELEGATE.dynamicIsSet(this, null, 0); + case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__PARENT: + return getParent() != null; + } + return super.eIsSet(featureID); + } + +} //FunctionalElementImpl diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalInputImpl.java b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalInputImpl.java new file mode 100644 index 00000000..9df1ec0c --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalInputImpl.java @@ -0,0 +1,165 @@ +/** + */ +package functionalarchitecture.impl; + +import functionalarchitecture.FunctionalInput; +import functionalarchitecture.FunctionalarchitecturePackage; +import functionalarchitecture.InformationLink; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Functional Input'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link functionalarchitecture.impl.FunctionalInputImpl#getIncomingLinks Incoming Links}
  • + *
+ * + * @generated + */ +public class FunctionalInputImpl extends FunctionalDataImpl implements FunctionalInput { + /** + * The cached value of the '{@link #getIncomingLinks() Incoming Links}' reference list. + * + * + * @see #getIncomingLinks() + * @generated + * @ordered + */ + protected EList incomingLinks; + + /** + * + * + * @generated + */ + protected FunctionalInputImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return FunctionalarchitecturePackage.Literals.FUNCTIONAL_INPUT; + } + + /** + * + * + * @generated + */ + public EList getIncomingLinks() { + if (incomingLinks == null) { + incomingLinks = new EObjectWithInverseResolvingEList(InformationLink.class, this, FunctionalarchitecturePackage.FUNCTIONAL_INPUT__INCOMING_LINKS, FunctionalarchitecturePackage.INFORMATION_LINK__TO); + } + return incomingLinks; + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case FunctionalarchitecturePackage.FUNCTIONAL_INPUT__INCOMING_LINKS: + return ((InternalEList)(InternalEList)getIncomingLinks()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case FunctionalarchitecturePackage.FUNCTIONAL_INPUT__INCOMING_LINKS: + return ((InternalEList)getIncomingLinks()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case FunctionalarchitecturePackage.FUNCTIONAL_INPUT__INCOMING_LINKS: + return getIncomingLinks(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case FunctionalarchitecturePackage.FUNCTIONAL_INPUT__INCOMING_LINKS: + getIncomingLinks().clear(); + getIncomingLinks().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case FunctionalarchitecturePackage.FUNCTIONAL_INPUT__INCOMING_LINKS: + getIncomingLinks().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case FunctionalarchitecturePackage.FUNCTIONAL_INPUT__INCOMING_LINKS: + return incomingLinks != null && !incomingLinks.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //FunctionalInputImpl diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalInterfaceImpl.java b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalInterfaceImpl.java new file mode 100644 index 00000000..20151886 --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalInterfaceImpl.java @@ -0,0 +1,243 @@ +/** + */ +package functionalarchitecture.impl; + +import functionalarchitecture.FunctionalData; +import functionalarchitecture.FunctionalElement; +import functionalarchitecture.FunctionalInterface; +import functionalarchitecture.FunctionalarchitecturePackage; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Functional Interface'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link functionalarchitecture.impl.FunctionalInterfaceImpl#getData Data}
  • + *
  • {@link functionalarchitecture.impl.FunctionalInterfaceImpl#getElement Element}
  • + *
+ * + * @generated + */ +public class FunctionalInterfaceImpl extends MinimalEObjectImpl.Container implements FunctionalInterface { + /** + * The cached value of the '{@link #getData() Data}' containment reference list. + * + * + * @see #getData() + * @generated + * @ordered + */ + protected EList data; + + /** + * + * + * @generated + */ + protected FunctionalInterfaceImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return FunctionalarchitecturePackage.Literals.FUNCTIONAL_INTERFACE; + } + + /** + * + * + * @generated + */ + public EList getData() { + if (data == null) { + data = new EObjectContainmentWithInverseEList(FunctionalData.class, this, FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__DATA, FunctionalarchitecturePackage.FUNCTIONAL_DATA__INTERFACE); + } + return data; + } + + /** + * + * + * @generated + */ + public FunctionalElement getElement() { + if (eContainerFeatureID() != FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__ELEMENT) return null; + return (FunctionalElement)eInternalContainer(); + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetElement(FunctionalElement newElement, NotificationChain msgs) { + msgs = eBasicSetContainer((InternalEObject)newElement, FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__ELEMENT, msgs); + return msgs; + } + + /** + * + * + * @generated + */ + public void setElement(FunctionalElement newElement) { + if (newElement != eInternalContainer() || (eContainerFeatureID() != FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__ELEMENT && newElement != null)) { + if (EcoreUtil.isAncestor(this, newElement)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newElement != null) + msgs = ((InternalEObject)newElement).eInverseAdd(this, FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__INTERFACE, FunctionalElement.class, msgs); + msgs = basicSetElement(newElement, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__ELEMENT, newElement, newElement)); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__DATA: + return ((InternalEList)(InternalEList)getData()).basicAdd(otherEnd, msgs); + case FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__ELEMENT: + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + return basicSetElement((FunctionalElement)otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__DATA: + return ((InternalEList)getData()).basicRemove(otherEnd, msgs); + case FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__ELEMENT: + return basicSetElement(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { + switch (eContainerFeatureID()) { + case FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__ELEMENT: + return eInternalContainer().eInverseRemove(this, FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__INTERFACE, FunctionalElement.class, msgs); + } + return super.eBasicRemoveFromContainerFeature(msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__DATA: + return getData(); + case FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__ELEMENT: + return getElement(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__DATA: + getData().clear(); + getData().addAll((Collection)newValue); + return; + case FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__ELEMENT: + setElement((FunctionalElement)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__DATA: + getData().clear(); + return; + case FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__ELEMENT: + setElement((FunctionalElement)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__DATA: + return data != null && !data.isEmpty(); + case FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__ELEMENT: + return getElement() != null; + } + return super.eIsSet(featureID); + } + +} //FunctionalInterfaceImpl diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalOutputImpl.java b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalOutputImpl.java new file mode 100644 index 00000000..1ae2a964 --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalOutputImpl.java @@ -0,0 +1,165 @@ +/** + */ +package functionalarchitecture.impl; + +import functionalarchitecture.FunctionalOutput; +import functionalarchitecture.FunctionalarchitecturePackage; +import functionalarchitecture.InformationLink; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Functional Output'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link functionalarchitecture.impl.FunctionalOutputImpl#getOutgoingLinks Outgoing Links}
  • + *
+ * + * @generated + */ +public class FunctionalOutputImpl extends FunctionalDataImpl implements FunctionalOutput { + /** + * The cached value of the '{@link #getOutgoingLinks() Outgoing Links}' containment reference list. + * + * + * @see #getOutgoingLinks() + * @generated + * @ordered + */ + protected EList outgoingLinks; + + /** + * + * + * @generated + */ + protected FunctionalOutputImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return FunctionalarchitecturePackage.Literals.FUNCTIONAL_OUTPUT; + } + + /** + * + * + * @generated + */ + public EList getOutgoingLinks() { + if (outgoingLinks == null) { + outgoingLinks = new EObjectContainmentWithInverseEList(InformationLink.class, this, FunctionalarchitecturePackage.FUNCTIONAL_OUTPUT__OUTGOING_LINKS, FunctionalarchitecturePackage.INFORMATION_LINK__FROM); + } + return outgoingLinks; + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case FunctionalarchitecturePackage.FUNCTIONAL_OUTPUT__OUTGOING_LINKS: + return ((InternalEList)(InternalEList)getOutgoingLinks()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case FunctionalarchitecturePackage.FUNCTIONAL_OUTPUT__OUTGOING_LINKS: + return ((InternalEList)getOutgoingLinks()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case FunctionalarchitecturePackage.FUNCTIONAL_OUTPUT__OUTGOING_LINKS: + return getOutgoingLinks(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case FunctionalarchitecturePackage.FUNCTIONAL_OUTPUT__OUTGOING_LINKS: + getOutgoingLinks().clear(); + getOutgoingLinks().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case FunctionalarchitecturePackage.FUNCTIONAL_OUTPUT__OUTGOING_LINKS: + getOutgoingLinks().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case FunctionalarchitecturePackage.FUNCTIONAL_OUTPUT__OUTGOING_LINKS: + return outgoingLinks != null && !outgoingLinks.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //FunctionalOutputImpl diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalarchitectureFactoryImpl.java b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalarchitectureFactoryImpl.java new file mode 100644 index 00000000..56ecfa25 --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalarchitectureFactoryImpl.java @@ -0,0 +1,213 @@ +/** + */ +package functionalarchitecture.impl; + +import functionalarchitecture.*; +import functionalarchitecture.FunctionalInterface; + +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; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class FunctionalarchitectureFactoryImpl extends EFactoryImpl implements FunctionalarchitectureFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static FunctionalarchitectureFactory init() { + try { + FunctionalarchitectureFactory theFunctionalarchitectureFactory = (FunctionalarchitectureFactory)EPackage.Registry.INSTANCE.getEFactory(FunctionalarchitecturePackage.eNS_URI); + if (theFunctionalarchitectureFactory != null) { + return theFunctionalarchitectureFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new FunctionalarchitectureFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public FunctionalarchitectureFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case FunctionalarchitecturePackage.FUNCTIONAL_ARCHITECTURE_MODEL: return createFunctionalArchitectureModel(); + case FunctionalarchitecturePackage.FUNCTION: return createFunction(); + case FunctionalarchitecturePackage.FAM_TERMINATOR: return createFAMTerminator(); + case FunctionalarchitecturePackage.INFORMATION_LINK: return createInformationLink(); + case FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE: return createFunctionalInterface(); + case FunctionalarchitecturePackage.FUNCTIONAL_INPUT: return createFunctionalInput(); + case FunctionalarchitecturePackage.FUNCTIONAL_OUTPUT: return createFunctionalOutput(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + @Override + public Object createFromString(EDataType eDataType, String initialValue) { + switch (eDataType.getClassifierID()) { + case FunctionalarchitecturePackage.FUNCTION_TYPE: + return createFunctionTypeFromString(eDataType, initialValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + @Override + public String convertToString(EDataType eDataType, Object instanceValue) { + switch (eDataType.getClassifierID()) { + case FunctionalarchitecturePackage.FUNCTION_TYPE: + return convertFunctionTypeToString(eDataType, instanceValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public FunctionalArchitectureModel createFunctionalArchitectureModel() { + FunctionalArchitectureModelImpl functionalArchitectureModel = new FunctionalArchitectureModelImpl(); + return functionalArchitectureModel; + } + + /** + * + * + * @generated + */ + public Function createFunction() { + FunctionImpl function = new FunctionImpl(); + return function; + } + + /** + * + * + * @generated + */ + public FAMTerminator createFAMTerminator() { + FAMTerminatorImpl famTerminator = new FAMTerminatorImpl(); + return famTerminator; + } + + /** + * + * + * @generated + */ + public InformationLink createInformationLink() { + InformationLinkImpl informationLink = new InformationLinkImpl(); + return informationLink; + } + + /** + * + * + * @generated + */ + public FunctionalInterface createFunctionalInterface() { + FunctionalInterfaceImpl functionalInterface = new FunctionalInterfaceImpl(); + return functionalInterface; + } + + /** + * + * + * @generated + */ + public FunctionalInput createFunctionalInput() { + FunctionalInputImpl functionalInput = new FunctionalInputImpl(); + return functionalInput; + } + + /** + * + * + * @generated + */ + public FunctionalOutput createFunctionalOutput() { + FunctionalOutputImpl functionalOutput = new FunctionalOutputImpl(); + return functionalOutput; + } + + /** + * + * + * @generated + */ + public FunctionType createFunctionTypeFromString(EDataType eDataType, String initialValue) { + FunctionType result = FunctionType.get(initialValue); + if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); + return result; + } + + /** + * + * + * @generated + */ + public String convertFunctionTypeToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * + * + * @generated + */ + public FunctionalarchitecturePackage getFunctionalarchitecturePackage() { + return (FunctionalarchitecturePackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static FunctionalarchitecturePackage getPackage() { + return FunctionalarchitecturePackage.eINSTANCE; + } + +} //FunctionalarchitectureFactoryImpl diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalarchitecturePackageImpl.java b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalarchitecturePackageImpl.java new file mode 100644 index 00000000..22c15533 --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalarchitecturePackageImpl.java @@ -0,0 +1,574 @@ +/** + */ +package functionalarchitecture.impl; + +import functionalarchitecture.FAMTerminator; +import functionalarchitecture.Function; +import functionalarchitecture.FunctionType; +import functionalarchitecture.FunctionalArchitectureModel; +import functionalarchitecture.FunctionalData; +import functionalarchitecture.FunctionalElement; +import functionalarchitecture.FunctionalInput; +import functionalarchitecture.FunctionalInterface; +import functionalarchitecture.FunctionalOutput; +import functionalarchitecture.FunctionalarchitectureFactory; +import functionalarchitecture.FunctionalarchitecturePackage; +import functionalarchitecture.InformationLink; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class FunctionalarchitecturePackageImpl extends EPackageImpl implements FunctionalarchitecturePackage { + /** + * + * + * @generated + */ + private EClass functionalElementEClass = null; + + /** + * + * + * @generated + */ + private EClass functionalArchitectureModelEClass = null; + + /** + * + * + * @generated + */ + private EClass functionEClass = null; + + /** + * + * + * @generated + */ + private EClass famTerminatorEClass = null; + + /** + * + * + * @generated + */ + private EClass informationLinkEClass = null; + + /** + * + * + * @generated + */ + private EClass functionalInterfaceEClass = null; + + /** + * + * + * @generated + */ + private EClass functionalInputEClass = null; + + /** + * + * + * @generated + */ + private EClass functionalOutputEClass = null; + + /** + * + * + * @generated + */ + private EClass functionalDataEClass = null; + + /** + * + * + * @generated + */ + private EEnum functionTypeEEnum = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see functionalarchitecture.FunctionalarchitecturePackage#eNS_URI + * @see #init() + * @generated + */ + private FunctionalarchitecturePackageImpl() { + super(eNS_URI, FunctionalarchitectureFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link FunctionalarchitecturePackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static FunctionalarchitecturePackage init() { + if (isInited) return (FunctionalarchitecturePackage)EPackage.Registry.INSTANCE.getEPackage(FunctionalarchitecturePackage.eNS_URI); + + // Obtain or create and register package + FunctionalarchitecturePackageImpl theFunctionalarchitecturePackage = (FunctionalarchitecturePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof FunctionalarchitecturePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new FunctionalarchitecturePackageImpl()); + + isInited = true; + + // Create package meta-data objects + theFunctionalarchitecturePackage.createPackageContents(); + + // Initialize created meta-data + theFunctionalarchitecturePackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theFunctionalarchitecturePackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(FunctionalarchitecturePackage.eNS_URI, theFunctionalarchitecturePackage); + return theFunctionalarchitecturePackage; + } + + /** + * + * + * @generated + */ + public EClass getFunctionalElement() { + return functionalElementEClass; + } + + /** + * + * + * @generated + */ + public EReference getFunctionalElement_Interface() { + return (EReference)functionalElementEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getFunctionalElement_Model() { + return (EReference)functionalElementEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getFunctionalElement_Parent() { + return (EReference)functionalElementEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getFunctionalArchitectureModel() { + return functionalArchitectureModelEClass; + } + + /** + * + * + * @generated + */ + public EReference getFunctionalArchitectureModel_RootElements() { + return (EReference)functionalArchitectureModelEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getFunction() { + return functionEClass; + } + + /** + * + * + * @generated + */ + public EReference getFunction_SubElements() { + return (EReference)functionEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getFunction_Type() { + return (EAttribute)functionEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getFAMTerminator() { + return famTerminatorEClass; + } + + /** + * + * + * @generated + */ + public EReference getFAMTerminator_Data() { + return (EReference)famTerminatorEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getInformationLink() { + return informationLinkEClass; + } + + /** + * + * + * @generated + */ + public EReference getInformationLink_From() { + return (EReference)informationLinkEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getInformationLink_To() { + return (EReference)informationLinkEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getFunctionalInterface() { + return functionalInterfaceEClass; + } + + /** + * + * + * @generated + */ + public EReference getFunctionalInterface_Data() { + return (EReference)functionalInterfaceEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getFunctionalInterface_Element() { + return (EReference)functionalInterfaceEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getFunctionalInput() { + return functionalInputEClass; + } + + /** + * + * + * @generated + */ + public EReference getFunctionalInput_IncomingLinks() { + return (EReference)functionalInputEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getFunctionalOutput() { + return functionalOutputEClass; + } + + /** + * + * + * @generated + */ + public EReference getFunctionalOutput_OutgoingLinks() { + return (EReference)functionalOutputEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getFunctionalData() { + return functionalDataEClass; + } + + /** + * + * + * @generated + */ + public EReference getFunctionalData_Terminator() { + return (EReference)functionalDataEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getFunctionalData_Interface() { + return (EReference)functionalDataEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EEnum getFunctionType() { + return functionTypeEEnum; + } + + /** + * + * + * @generated + */ + public FunctionalarchitectureFactory getFunctionalarchitectureFactory() { + return (FunctionalarchitectureFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + functionalElementEClass = createEClass(FUNCTIONAL_ELEMENT); + createEReference(functionalElementEClass, FUNCTIONAL_ELEMENT__INTERFACE); + createEReference(functionalElementEClass, FUNCTIONAL_ELEMENT__MODEL); + createEReference(functionalElementEClass, FUNCTIONAL_ELEMENT__PARENT); + + functionalArchitectureModelEClass = createEClass(FUNCTIONAL_ARCHITECTURE_MODEL); + createEReference(functionalArchitectureModelEClass, FUNCTIONAL_ARCHITECTURE_MODEL__ROOT_ELEMENTS); + + functionEClass = createEClass(FUNCTION); + createEReference(functionEClass, FUNCTION__SUB_ELEMENTS); + createEAttribute(functionEClass, FUNCTION__TYPE); + + famTerminatorEClass = createEClass(FAM_TERMINATOR); + createEReference(famTerminatorEClass, FAM_TERMINATOR__DATA); + + informationLinkEClass = createEClass(INFORMATION_LINK); + createEReference(informationLinkEClass, INFORMATION_LINK__FROM); + createEReference(informationLinkEClass, INFORMATION_LINK__TO); + + functionalInterfaceEClass = createEClass(FUNCTIONAL_INTERFACE); + createEReference(functionalInterfaceEClass, FUNCTIONAL_INTERFACE__DATA); + createEReference(functionalInterfaceEClass, FUNCTIONAL_INTERFACE__ELEMENT); + + functionalInputEClass = createEClass(FUNCTIONAL_INPUT); + createEReference(functionalInputEClass, FUNCTIONAL_INPUT__INCOMING_LINKS); + + functionalOutputEClass = createEClass(FUNCTIONAL_OUTPUT); + createEReference(functionalOutputEClass, FUNCTIONAL_OUTPUT__OUTGOING_LINKS); + + functionalDataEClass = createEClass(FUNCTIONAL_DATA); + createEReference(functionalDataEClass, FUNCTIONAL_DATA__TERMINATOR); + createEReference(functionalDataEClass, FUNCTIONAL_DATA__INTERFACE); + + // Create enums + functionTypeEEnum = createEEnum(FUNCTION_TYPE); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + functionEClass.getESuperTypes().add(this.getFunctionalElement()); + functionalInputEClass.getESuperTypes().add(this.getFunctionalData()); + functionalOutputEClass.getESuperTypes().add(this.getFunctionalData()); + + // Initialize classes, features, and operations; add parameters + initEClass(functionalElementEClass, FunctionalElement.class, "FunctionalElement", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getFunctionalElement_Interface(), this.getFunctionalInterface(), this.getFunctionalInterface_Element(), "interface", null, 0, 1, FunctionalElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getFunctionalElement_Model(), this.getFunctionalArchitectureModel(), null, "model", null, 1, 1, FunctionalElement.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED); + initEReference(getFunctionalElement_Parent(), this.getFunction(), this.getFunction_SubElements(), "parent", null, 0, 1, FunctionalElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(functionalArchitectureModelEClass, FunctionalArchitectureModel.class, "FunctionalArchitectureModel", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getFunctionalArchitectureModel_RootElements(), this.getFunctionalElement(), null, "rootElements", null, 0, -1, FunctionalArchitectureModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(functionEClass, Function.class, "Function", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getFunction_SubElements(), this.getFunctionalElement(), this.getFunctionalElement_Parent(), "subElements", null, 0, -1, Function.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getFunction_Type(), this.getFunctionType(), "type", null, 1, 1, Function.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED); + + initEClass(famTerminatorEClass, FAMTerminator.class, "FAMTerminator", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getFAMTerminator_Data(), this.getFunctionalData(), this.getFunctionalData_Terminator(), "data", null, 0, 1, FAMTerminator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(informationLinkEClass, InformationLink.class, "InformationLink", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getInformationLink_From(), this.getFunctionalOutput(), this.getFunctionalOutput_OutgoingLinks(), "from", null, 0, 1, InformationLink.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getInformationLink_To(), this.getFunctionalInput(), this.getFunctionalInput_IncomingLinks(), "to", null, 1, 1, InformationLink.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(functionalInterfaceEClass, FunctionalInterface.class, "FunctionalInterface", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getFunctionalInterface_Data(), this.getFunctionalData(), this.getFunctionalData_Interface(), "data", null, 0, -1, FunctionalInterface.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getFunctionalInterface_Element(), this.getFunctionalElement(), this.getFunctionalElement_Interface(), "element", null, 0, 1, FunctionalInterface.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(functionalInputEClass, FunctionalInput.class, "FunctionalInput", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getFunctionalInput_IncomingLinks(), this.getInformationLink(), this.getInformationLink_To(), "IncomingLinks", null, 0, -1, FunctionalInput.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(functionalOutputEClass, FunctionalOutput.class, "FunctionalOutput", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getFunctionalOutput_OutgoingLinks(), this.getInformationLink(), this.getInformationLink_From(), "outgoingLinks", null, 0, -1, FunctionalOutput.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(functionalDataEClass, FunctionalData.class, "FunctionalData", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getFunctionalData_Terminator(), this.getFAMTerminator(), this.getFAMTerminator_Data(), "terminator", null, 0, 1, FunctionalData.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getFunctionalData_Interface(), this.getFunctionalInterface(), this.getFunctionalInterface_Data(), "interface", null, 0, 1, FunctionalData.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Initialize enums and add enum literals + initEEnum(functionTypeEEnum, FunctionType.class, "FunctionType"); + addEEnumLiteral(functionTypeEEnum, FunctionType.ROOT); + addEEnumLiteral(functionTypeEEnum, FunctionType.INTERMEDIATE); + addEEnumLiteral(functionTypeEEnum, FunctionType.LEAF); + + // Create resource + createResource(eNS_URI); + + // Create annotations + // http://www.eclipse.org/emf/2002/Ecore + createEcoreAnnotations(); + // org.eclipse.viatra.query.querybasedfeature + createOrgAnnotations(); + } + + /** + * Initializes the annotations for http://www.eclipse.org/emf/2002/Ecore. + * + * + * @generated + */ + protected void createEcoreAnnotations() { + String source = "http://www.eclipse.org/emf/2002/Ecore"; + addAnnotation + (this, + source, + new String[] { + "settingDelegates", "org.eclipse.viatra.query.querybasedfeature" + }); + } + + /** + * Initializes the annotations for org.eclipse.viatra.query.querybasedfeature. + * + * + * @generated + */ + protected void createOrgAnnotations() { + String source = "org.eclipse.viatra.query.querybasedfeature"; + addAnnotation + (getFunctionalElement_Model(), + source, + new String[] { + "patternFQN", "hu.bme.mit.inf.dslreasoner.domains.transima.fam.model" + }); + addAnnotation + (getFunction_Type(), + source, + new String[] { + "patternFQN", "hu.bme.mit.inf.dslreasoner.domains.transima.fam.type" + }); + } + +} //FunctionalarchitecturePackageImpl diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/InformationLinkImpl.java b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/InformationLinkImpl.java new file mode 100644 index 00000000..4b46fef8 --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/InformationLinkImpl.java @@ -0,0 +1,285 @@ +/** + */ +package functionalarchitecture.impl; + +import functionalarchitecture.FunctionalInput; +import functionalarchitecture.FunctionalOutput; +import functionalarchitecture.FunctionalarchitecturePackage; +import functionalarchitecture.InformationLink; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EcoreUtil; + +/** + * + * An implementation of the model object 'Information Link'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link functionalarchitecture.impl.InformationLinkImpl#getFrom From}
  • + *
  • {@link functionalarchitecture.impl.InformationLinkImpl#getTo To}
  • + *
+ * + * @generated + */ +public class InformationLinkImpl extends MinimalEObjectImpl.Container implements InformationLink { + /** + * The cached value of the '{@link #getTo() To}' reference. + * + * + * @see #getTo() + * @generated + * @ordered + */ + protected FunctionalInput to; + + /** + * + * + * @generated + */ + protected InformationLinkImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return FunctionalarchitecturePackage.Literals.INFORMATION_LINK; + } + + /** + * + * + * @generated + */ + public FunctionalOutput getFrom() { + if (eContainerFeatureID() != FunctionalarchitecturePackage.INFORMATION_LINK__FROM) return null; + return (FunctionalOutput)eInternalContainer(); + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetFrom(FunctionalOutput newFrom, NotificationChain msgs) { + msgs = eBasicSetContainer((InternalEObject)newFrom, FunctionalarchitecturePackage.INFORMATION_LINK__FROM, msgs); + return msgs; + } + + /** + * + * + * @generated + */ + public void setFrom(FunctionalOutput newFrom) { + if (newFrom != eInternalContainer() || (eContainerFeatureID() != FunctionalarchitecturePackage.INFORMATION_LINK__FROM && newFrom != null)) { + if (EcoreUtil.isAncestor(this, newFrom)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newFrom != null) + msgs = ((InternalEObject)newFrom).eInverseAdd(this, FunctionalarchitecturePackage.FUNCTIONAL_OUTPUT__OUTGOING_LINKS, FunctionalOutput.class, msgs); + msgs = basicSetFrom(newFrom, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, FunctionalarchitecturePackage.INFORMATION_LINK__FROM, newFrom, newFrom)); + } + + /** + * + * + * @generated + */ + public FunctionalInput getTo() { + if (to != null && to.eIsProxy()) { + InternalEObject oldTo = (InternalEObject)to; + to = (FunctionalInput)eResolveProxy(oldTo); + if (to != oldTo) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, FunctionalarchitecturePackage.INFORMATION_LINK__TO, oldTo, to)); + } + } + return to; + } + + /** + * + * + * @generated + */ + public FunctionalInput basicGetTo() { + return to; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetTo(FunctionalInput newTo, NotificationChain msgs) { + FunctionalInput oldTo = to; + to = newTo; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FunctionalarchitecturePackage.INFORMATION_LINK__TO, oldTo, newTo); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setTo(FunctionalInput newTo) { + if (newTo != to) { + NotificationChain msgs = null; + if (to != null) + msgs = ((InternalEObject)to).eInverseRemove(this, FunctionalarchitecturePackage.FUNCTIONAL_INPUT__INCOMING_LINKS, FunctionalInput.class, msgs); + if (newTo != null) + msgs = ((InternalEObject)newTo).eInverseAdd(this, FunctionalarchitecturePackage.FUNCTIONAL_INPUT__INCOMING_LINKS, FunctionalInput.class, msgs); + msgs = basicSetTo(newTo, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, FunctionalarchitecturePackage.INFORMATION_LINK__TO, newTo, newTo)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case FunctionalarchitecturePackage.INFORMATION_LINK__FROM: + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + return basicSetFrom((FunctionalOutput)otherEnd, msgs); + case FunctionalarchitecturePackage.INFORMATION_LINK__TO: + if (to != null) + msgs = ((InternalEObject)to).eInverseRemove(this, FunctionalarchitecturePackage.FUNCTIONAL_INPUT__INCOMING_LINKS, FunctionalInput.class, msgs); + return basicSetTo((FunctionalInput)otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case FunctionalarchitecturePackage.INFORMATION_LINK__FROM: + return basicSetFrom(null, msgs); + case FunctionalarchitecturePackage.INFORMATION_LINK__TO: + return basicSetTo(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { + switch (eContainerFeatureID()) { + case FunctionalarchitecturePackage.INFORMATION_LINK__FROM: + return eInternalContainer().eInverseRemove(this, FunctionalarchitecturePackage.FUNCTIONAL_OUTPUT__OUTGOING_LINKS, FunctionalOutput.class, msgs); + } + return super.eBasicRemoveFromContainerFeature(msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case FunctionalarchitecturePackage.INFORMATION_LINK__FROM: + return getFrom(); + case FunctionalarchitecturePackage.INFORMATION_LINK__TO: + if (resolve) return getTo(); + return basicGetTo(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case FunctionalarchitecturePackage.INFORMATION_LINK__FROM: + setFrom((FunctionalOutput)newValue); + return; + case FunctionalarchitecturePackage.INFORMATION_LINK__TO: + setTo((FunctionalInput)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case FunctionalarchitecturePackage.INFORMATION_LINK__FROM: + setFrom((FunctionalOutput)null); + return; + case FunctionalarchitecturePackage.INFORMATION_LINK__TO: + setTo((FunctionalInput)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case FunctionalarchitecturePackage.INFORMATION_LINK__FROM: + return getFrom() != null; + case FunctionalarchitecturePackage.INFORMATION_LINK__TO: + return to != null; + } + return super.eIsSet(featureID); + } + +} //InformationLinkImpl diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/util/FunctionalarchitectureAdapterFactory.java b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/util/FunctionalarchitectureAdapterFactory.java new file mode 100644 index 00000000..f990a7a4 --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/util/FunctionalarchitectureAdapterFactory.java @@ -0,0 +1,265 @@ +/** + */ +package functionalarchitecture.util; + +import functionalarchitecture.*; +import functionalarchitecture.FunctionalInterface; + +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; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see functionalarchitecture.FunctionalarchitecturePackage + * @generated + */ +public class FunctionalarchitectureAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static FunctionalarchitecturePackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public FunctionalarchitectureAdapterFactory() { + if (modelPackage == null) { + modelPackage = FunctionalarchitecturePackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @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 createXXX methods. + * + * + * @generated + */ + protected FunctionalarchitectureSwitch modelSwitch = + new FunctionalarchitectureSwitch() { + @Override + public Adapter caseFunctionalElement(FunctionalElement object) { + return createFunctionalElementAdapter(); + } + @Override + public Adapter caseFunctionalArchitectureModel(FunctionalArchitectureModel object) { + return createFunctionalArchitectureModelAdapter(); + } + @Override + public Adapter caseFunction(Function object) { + return createFunctionAdapter(); + } + @Override + public Adapter caseFAMTerminator(FAMTerminator object) { + return createFAMTerminatorAdapter(); + } + @Override + public Adapter caseInformationLink(InformationLink object) { + return createInformationLinkAdapter(); + } + @Override + public Adapter caseFunctionalInterface(FunctionalInterface object) { + return createFunctionalInterfaceAdapter(); + } + @Override + public Adapter caseFunctionalInput(FunctionalInput object) { + return createFunctionalInputAdapter(); + } + @Override + public Adapter caseFunctionalOutput(FunctionalOutput object) { + return createFunctionalOutputAdapter(); + } + @Override + public Adapter caseFunctionalData(FunctionalData object) { + return createFunctionalDataAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link functionalarchitecture.FunctionalElement Functional Element}'. + * + * 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. + * + * @return the new adapter. + * @see functionalarchitecture.FunctionalElement + * @generated + */ + public Adapter createFunctionalElementAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link functionalarchitecture.FunctionalArchitectureModel Functional Architecture Model}'. + * + * 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. + * + * @return the new adapter. + * @see functionalarchitecture.FunctionalArchitectureModel + * @generated + */ + public Adapter createFunctionalArchitectureModelAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link functionalarchitecture.Function Function}'. + * + * 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. + * + * @return the new adapter. + * @see functionalarchitecture.Function + * @generated + */ + public Adapter createFunctionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link functionalarchitecture.FAMTerminator FAM Terminator}'. + * + * 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. + * + * @return the new adapter. + * @see functionalarchitecture.FAMTerminator + * @generated + */ + public Adapter createFAMTerminatorAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link functionalarchitecture.InformationLink Information Link}'. + * + * 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. + * + * @return the new adapter. + * @see functionalarchitecture.InformationLink + * @generated + */ + public Adapter createInformationLinkAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link functionalarchitecture.FunctionalInterface Functional Interface}'. + * + * 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. + * + * @return the new adapter. + * @see functionalarchitecture.FunctionalInterface + * @generated + */ + public Adapter createFunctionalInterfaceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link functionalarchitecture.FunctionalInput Functional Input}'. + * + * 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. + * + * @return the new adapter. + * @see functionalarchitecture.FunctionalInput + * @generated + */ + public Adapter createFunctionalInputAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link functionalarchitecture.FunctionalOutput Functional Output}'. + * + * 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. + * + * @return the new adapter. + * @see functionalarchitecture.FunctionalOutput + * @generated + */ + public Adapter createFunctionalOutputAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link functionalarchitecture.FunctionalData Functional Data}'. + * + * 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. + * + * @return the new adapter. + * @see functionalarchitecture.FunctionalData + * @generated + */ + public Adapter createFunctionalDataAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //FunctionalarchitectureAdapterFactory diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/util/FunctionalarchitectureSwitch.java b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/util/FunctionalarchitectureSwitch.java new file mode 100644 index 00000000..b481a978 --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/util/FunctionalarchitectureSwitch.java @@ -0,0 +1,282 @@ +/** + */ +package functionalarchitecture.util; + +import functionalarchitecture.*; +import functionalarchitecture.FunctionalInterface; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX 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. + * + * @see functionalarchitecture.FunctionalarchitecturePackage + * @generated + */ +public class FunctionalarchitectureSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static FunctionalarchitecturePackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public FunctionalarchitectureSwitch() { + if (modelPackage == null) { + modelPackage = FunctionalarchitecturePackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @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 caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT: { + FunctionalElement functionalElement = (FunctionalElement)theEObject; + T result = caseFunctionalElement(functionalElement); + if (result == null) result = defaultCase(theEObject); + return result; + } + case FunctionalarchitecturePackage.FUNCTIONAL_ARCHITECTURE_MODEL: { + FunctionalArchitectureModel functionalArchitectureModel = (FunctionalArchitectureModel)theEObject; + T result = caseFunctionalArchitectureModel(functionalArchitectureModel); + if (result == null) result = defaultCase(theEObject); + return result; + } + case FunctionalarchitecturePackage.FUNCTION: { + Function function = (Function)theEObject; + T result = caseFunction(function); + if (result == null) result = caseFunctionalElement(function); + if (result == null) result = defaultCase(theEObject); + return result; + } + case FunctionalarchitecturePackage.FAM_TERMINATOR: { + FAMTerminator famTerminator = (FAMTerminator)theEObject; + T result = caseFAMTerminator(famTerminator); + if (result == null) result = defaultCase(theEObject); + return result; + } + case FunctionalarchitecturePackage.INFORMATION_LINK: { + InformationLink informationLink = (InformationLink)theEObject; + T result = caseInformationLink(informationLink); + if (result == null) result = defaultCase(theEObject); + return result; + } + case FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE: { + FunctionalInterface functionalInterface = (FunctionalInterface)theEObject; + T result = caseFunctionalInterface(functionalInterface); + if (result == null) result = defaultCase(theEObject); + return result; + } + case FunctionalarchitecturePackage.FUNCTIONAL_INPUT: { + FunctionalInput functionalInput = (FunctionalInput)theEObject; + T result = caseFunctionalInput(functionalInput); + if (result == null) result = caseFunctionalData(functionalInput); + if (result == null) result = defaultCase(theEObject); + return result; + } + case FunctionalarchitecturePackage.FUNCTIONAL_OUTPUT: { + FunctionalOutput functionalOutput = (FunctionalOutput)theEObject; + T result = caseFunctionalOutput(functionalOutput); + if (result == null) result = caseFunctionalData(functionalOutput); + if (result == null) result = defaultCase(theEObject); + return result; + } + case FunctionalarchitecturePackage.FUNCTIONAL_DATA: { + FunctionalData functionalData = (FunctionalData)theEObject; + T result = caseFunctionalData(functionalData); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Functional Element'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Functional Element'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFunctionalElement(FunctionalElement object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Functional Architecture Model'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Functional Architecture Model'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFunctionalArchitectureModel(FunctionalArchitectureModel object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Function'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Function'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFunction(Function object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'FAM Terminator'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'FAM Terminator'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFAMTerminator(FAMTerminator object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Information Link'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Information Link'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseInformationLink(InformationLink object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Functional Interface'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Functional Interface'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFunctionalInterface(FunctionalInterface object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Functional Input'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Functional Input'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFunctionalInput(FunctionalInput object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Functional Output'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Functional Output'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFunctionalOutput(FunctionalOutput object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Functional Data'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Functional Data'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFunctionalData(FunctionalData object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //FunctionalarchitectureSwitch diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/generator.vqgen b/Domains/Examples/ModelGenExampleFAM_plugin/generator.vqgen new file mode 100644 index 00000000..9851c9de --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_plugin/generator.vqgen @@ -0,0 +1,2 @@ +genmodel +"platform:/resource/ModelGenExampleFAM_plugin/model/FamMetamodel.genmodel" \ No newline at end of file diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/model/FamMetamodel.aird b/Domains/Examples/ModelGenExampleFAM_plugin/model/FamMetamodel.aird new file mode 100644 index 00000000..f6549d91 --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_plugin/model/FamMetamodel.aird @@ -0,0 +1,2 @@ + + diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/model/FamMetamodel.ecore b/Domains/Examples/ModelGenExampleFAM_plugin/model/FamMetamodel.ecore new file mode 100644 index 00000000..d8331ba8 --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_plugin/model/FamMetamodel.ecore @@ -0,0 +1,69 @@ + + + +
+ + + + + +
+ + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/model/FamMetamodel.genmodel b/Domains/Examples/ModelGenExampleFAM_plugin/model/FamMetamodel.genmodel new file mode 100644 index 00000000..9d89c145 --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_plugin/model/FamMetamodel.genmodel @@ -0,0 +1,48 @@ + + + FamMetamodel.ecore + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/model/FunctionalArchitectureModel.xmi b/Domains/Examples/ModelGenExampleFAM_plugin/model/FunctionalArchitectureModel.xmi new file mode 100644 index 00000000..59935a2c --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_plugin/model/FunctionalArchitectureModel.xmi @@ -0,0 +1,4 @@ + + diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/output/.gitignore b/Domains/Examples/ModelGenExampleFAM_plugin/output/.gitignore new file mode 100644 index 00000000..a3a0c8b5 --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_plugin/output/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore \ No newline at end of file diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/plugin.properties b/Domains/Examples/ModelGenExampleFAM_plugin/plugin.properties new file mode 100644 index 00000000..2b140c6a --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_plugin/plugin.properties @@ -0,0 +1,4 @@ +# + +pluginName = FamMetamodel Model +providerName = www.example.org diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/plugin.xml b/Domains/Examples/ModelGenExampleFAM_plugin/plugin.xml new file mode 100644 index 00000000..d68d0328 --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_plugin/plugin.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/src/hu/bme/mit/inf/dslreasoner/domains/transima/fam/FamPatterns.vql b/Domains/Examples/ModelGenExampleFAM_plugin/src/hu/bme/mit/inf/dslreasoner/domains/transima/fam/FamPatterns.vql new file mode 100644 index 00000000..f0e48d42 --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_plugin/src/hu/bme/mit/inf/dslreasoner/domains/transima/fam/FamPatterns.vql @@ -0,0 +1,114 @@ +package hu.bme.mit.inf.dslreasoner.domains.transima.fam + +import epackage "http://www.inf.mit.bme.hu/viatrasolver/example/fam" + +@Constraint(message="terminatorAndInformation", severity="error", key={T}) +pattern terminatorAndInformation(T : FAMTerminator, I : InformationLink) = { + FunctionalOutput.outgoingLinks(Out,I); + FunctionalOutput.terminator(Out,T); +} or { + InformationLink.to(I,In); + FunctionalInput.terminator(In,T); +} + +@QueryBasedFeature +pattern type(This : Function, Target : FunctionType) = { + find rootElements(_Model, This); + Target == FunctionType::Root; +} or { + neg find parent(_Child, This); + neg find rootElements(_Model, This); + Target == FunctionType::Leaf; +} or { + find parent(This, _Par); + find parent(_Child, This); + Target == FunctionType::Intermediate; +} + +pattern rootElements(Model: FunctionalArchitectureModel, Root : Function) = { + FunctionalArchitectureModel.rootElements(Model, Root); +} + +pattern parent(Func : Function, Par : Function) = { + Function.parent(Func, Par); +} + +@QueryBasedFeature +pattern model(This:FunctionalElement, Target: FunctionalArchitectureModel) { + FunctionalElement(This); + FunctionalArchitectureModel(Target); +} + +pattern hasRoot(F : Function) { + find rootElements(_Model, F); +} +pattern hasInt(F : Function) { + neg find parent(_Child, F); + neg find rootElements(_Model, F); +} +pattern hasLeaf(F : Function) { + find parent(F, _Par); + find parent(_Child, F); +} +/* +@Constraint(message="noRoot", severity="error", key={fam}) +pattern noRoot(fam: FunctionalArchitectureModel) { + FunctionalArchitectureModel(fam); + neg find hasRoot(_); +} +@Constraint(message="noIntermediate", severity="error", key={fam}) +pattern noInt(fam: FunctionalArchitectureModel) { + FunctionalArchitectureModel(fam); + neg find hasInt(_); +} +@Constraint(message="noLeaf", severity="error", key={fam}) +pattern noLeaf(fam: FunctionalArchitectureModel) { + FunctionalArchitectureModel(fam); + neg find hasLeaf(_); +}*/ + + +/* +@QueryBasedFeature +pattern model(This : FunctionalElement, Target : FunctionalArchitectureModel) = { + find parent+(This, Parent); + find rootElements(Target, Parent); +} or { + find rootElements(Target, This); +} + +pattern interfaceData(FI : FunctionalInterface, FD : FunctionalData) = { + FunctionalInterface.data(FI, FD); +} + +@QueryBasedFeature +pattern inputs(This : FunctionalInterface, Target : FunctionalInput) = { + find interfaceData(This, Target); +} + +@QueryBasedFeature +pattern outputs(This : FunctionalInterface, Target : FunctionalOutput) = { + find interfaceData(This, Target); +} + +@QueryBasedFeature +pattern outgoingLinks(This : FunctionalElement, Target : InformationLink) = { + FunctionalElement.interface.outputs(This, Output); + InformationLink.from(Target, Output); +} + +@QueryBasedFeature +pattern incomingLinks(This : FunctionalElement, Target : InformationLink) = { + FunctionalElement.interface.inputs(This, Input); + InformationLink.to(Target, Input); +} + +@QueryBasedFeature +pattern connects(This : FunctionalElement, Target : FunctionalElement) = { + FunctionalElement.outgoingLinks(This,Link); + FunctionalElement.incomingLinks(Target,Link); +}*/ + +/*pattern frequency(a: Function, b : EInt) { + Function.minimumFrequency(a,b); +}*/ diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/vql-gen/hu/bme/mit/inf/dslreasoner/domains/transima/fam/.gitignore b/Domains/Examples/ModelGenExampleFAM_plugin/vql-gen/hu/bme/mit/inf/dslreasoner/domains/transima/fam/.gitignore new file mode 100644 index 00000000..b35893db --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_plugin/vql-gen/hu/bme/mit/inf/dslreasoner/domains/transima/fam/.gitignore @@ -0,0 +1,18 @@ +/.FamPatterns.java._trace +/.HasInt.java._trace +/.HasLeaf.java._trace +/.HasRoot.java._trace +/.Model.java._trace +/.Parent.java._trace +/.RootElements.java._trace +/.TerminatorAndInformation.java._trace +/.Type.java._trace +/FamPatterns.java +/HasInt.java +/HasLeaf.java +/HasRoot.java +/Model.java +/Parent.java +/RootElements.java +/TerminatorAndInformation.java +/Type.java diff --git a/Domains/Examples/ModelGenExampleFAM_standalone/.project b/Domains/Examples/ModelGenExampleFAM_standalone/.project new file mode 100644 index 00000000..cac2abc4 --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_standalone/.project @@ -0,0 +1,23 @@ + + + ModelGenExampleFAM_standalone + + + + + + org.eclipse.viatra.query.tooling.ui.projectbuilder + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + + org.eclipse.xtext.ui.shared.xtextNature + org.eclipse.viatra.query.projectnature + + diff --git a/Domains/Examples/ModelGenExampleFAM_standalone/FamGeneration.vsconfig b/Domains/Examples/ModelGenExampleFAM_standalone/FamGeneration.vsconfig new file mode 100644 index 00000000..30e6adfa --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_standalone/FamGeneration.vsconfig @@ -0,0 +1,25 @@ +import epackage "platform:/resource/ModelGenExampleFAM_standalone/inputs/FamMetamodel.ecore" +import viatra "platform:/resource/ModelGenExampleFAM_standalone/inputs/FamPatterns.vql" + +file LogFile = "platform:/resource/ModelGenExampleFAM/outputs/log.txt" +generate { + metamodel = { package functionalarchitecture } + patterns = { package hu.bme.mit.inf.dslreasoner.domains.fam excluding { model } } + solver = ViatraSolver + scope = { + #node = 10 + } + + config = { + runtime = 10000, + log-level = normal + } + + number = 5 + runs = 1 + + debug = "platform:/resource/ModelGenExampleFAM_standalone/outputs/debug" + log = "platform:/resource/ModelGenExampleFAM_standalone/outputs/log.txt" + output = "platform:/resource/ModelGenExampleFAM_standalone/outputs/models" + statistics = "platform:/resource/ModelGenExampleFAM_standalone/outputs/statistics.csv" +} \ No newline at end of file diff --git a/Domains/Examples/ModelGenExampleFAM_standalone/inputs/FamInstance.xmi b/Domains/Examples/ModelGenExampleFAM_standalone/inputs/FamInstance.xmi new file mode 100644 index 00000000..9e3561d2 --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_standalone/inputs/FamInstance.xmi @@ -0,0 +1,12 @@ + + + + + diff --git a/Domains/Examples/ModelGenExampleFAM_standalone/inputs/FamMetamodel.ecore b/Domains/Examples/ModelGenExampleFAM_standalone/inputs/FamMetamodel.ecore new file mode 100644 index 00000000..00d16fc0 --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_standalone/inputs/FamMetamodel.ecore @@ -0,0 +1,52 @@ + + + +
+ + + + + +
+ + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Domains/Examples/ModelGenExampleFAM_standalone/inputs/FamPatterns.vql b/Domains/Examples/ModelGenExampleFAM_standalone/inputs/FamPatterns.vql new file mode 100644 index 00000000..34394ef6 --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_standalone/inputs/FamPatterns.vql @@ -0,0 +1,104 @@ +package hu.bme.mit.inf.dslreasoner.domains.fam + +import epackage "http://www.inf.mit.bme.hu/viatrasolver/example/fam" +//import epackage "platform:/resource/ModelGenExampleFAM/inputs/FamMetamodel.ecore"; + +@Constraint(message="terminatorAndInformation", severity="error", key={T}) +pattern terminatorAndInformation(T : FAMTerminator, I : InformationLink) = { + FunctionalOutput.outgoingLinks(Out,I); + FunctionalOutput.terminator(Out,T); +} or { + InformationLink.to(I,In); + FunctionalInput.terminator(In,T); +} + +@QueryBasedFeature +pattern type(This : Function, Target : FunctionType) = { + find rootElements(_Model, This); + Target == FunctionType::Root; +} or { + neg find parent(_Child, This); + neg find rootElements(_Model, This); + Target == FunctionType::Leaf; +} or { + find parent(This, _Par); + find parent(_Child, This); + Target == FunctionType::Intermediate; +} + +pattern rootElements(Model: FunctionalArchitectureModel, Root : Function) = { + FunctionalArchitectureModel.rootElements(Model, Root); +} + +pattern parent(Func : Function, Par : Function) = { + Function.parent(Func, Par); +} + +@QueryBasedFeature +pattern model(This:FunctionalElement, Target: FunctionalArchitectureModel) { + FunctionalElement(This); + FunctionalArchitectureModel(Target); +} + +/* +@Constraint(message="noRoot", severity="error", key={fam}) +pattern noRoot(fam: FunctionalArchitectureModel) { + FunctionalArchitectureModel(fam); + neg find hasRoot(_); +} +@Constraint(message="noIntermediate", severity="error", key={fam}) +pattern noInt(fam: FunctionalArchitectureModel) { + FunctionalArchitectureModel(fam); + neg find hasInt(_); +} +@Constraint(message="noLeaf", severity="error", key={fam}) +pattern noLeaf(fam: FunctionalArchitectureModel) { + FunctionalArchitectureModel(fam); + neg find hasLeaf(_); +} +*/ + +/* +@QueryBasedFeature +pattern model(This : FunctionalElement, Target : FunctionalArchitectureModel) = { + find parent+(This, Parent); + find rootElements(Target, Parent); +} or { + find rootElements(Target, This); +} + +pattern interfaceData(FI : FunctionalInterface, FD : FunctionalData) = { + FunctionalInterface.data(FI, FD); +} + +@QueryBasedFeature +pattern inputs(This : FunctionalInterface, Target : FunctionalInput) = { + find interfaceData(This, Target); +} + +@QueryBasedFeature +pattern outputs(This : FunctionalInterface, Target : FunctionalOutput) = { + find interfaceData(This, Target); +} + +@QueryBasedFeature +pattern outgoingLinks(This : FunctionalElement, Target : InformationLink) = { + FunctionalElement.interface.outputs(This, Output); + InformationLink.from(Target, Output); +} + +@QueryBasedFeature +pattern incomingLinks(This : FunctionalElement, Target : InformationLink) = { + FunctionalElement.interface.inputs(This, Input); + InformationLink.to(Target, Input); +} + +@QueryBasedFeature +pattern connects(This : FunctionalElement, Target : FunctionalElement) = { + FunctionalElement.outgoingLinks(This,Link); + FunctionalElement.incomingLinks(Target,Link); +}*/ + +/*pattern frequency(a: Function, b : EInt) { + Function.minimumFrequency(a,b); +}*/ diff --git a/Domains/Examples/ModelGenExampleFAM_standalone/outputs/.gitignore b/Domains/Examples/ModelGenExampleFAM_standalone/outputs/.gitignore new file mode 100644 index 00000000..a3a0c8b5 --- /dev/null +++ b/Domains/Examples/ModelGenExampleFAM_standalone/outputs/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore \ No newline at end of file -- cgit v1.2.3-54-g00ecf