Skip to content

Commit

Permalink
Rename Sex to Gender and add to clients
Browse files Browse the repository at this point in the history
  • Loading branch information
HeikoKlare committed Dec 17, 2021
1 parent 08049bf commit b3f18cb
Show file tree
Hide file tree
Showing 9 changed files with 230 additions and 77 deletions.
34 changes: 23 additions & 11 deletions bundles/edu.kit.ipd.sdq.metamodels.insurance/model/insurance.aird
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:diagram="http://www.eclipse.org/sirius/diagram/1.1.0" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/style/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description/style">
<viewpoint:DAnalysis uid="_T52JAGrEEeqek6MsJmxUyg" selectedViews="_UGJfoGrEEeqek6MsJmxUyg" version="14.3.0.201909031200">
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:diagram="http://www.eclipse.org/sirius/diagram/1.1.0" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.3/notation" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/style/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description/style">
<viewpoint:DAnalysis uid="_T52JAGrEEeqek6MsJmxUyg" selectedViews="_UGJfoGrEEeqek6MsJmxUyg" version="14.5.1.202106111100">
<semanticResources>insurance.ecore</semanticResources>
<semanticResources>insurance.genmodel</semanticResources>
<semanticResources>../.polyglot.build.properties</semanticResources>
<ownedViews xmi:type="viewpoint:DView" uid="_UGJfoGrEEeqek6MsJmxUyg">
<viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']"/>
<ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_UZAKMWrEEeqek6MsJmxUyg" name="insurance" repPath="#_UYz88GrEEeqek6MsJmxUyg" changeId="689609ad-175e-4dc2-be31-154f7b8bba6c">
<ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_UZAKMWrEEeqek6MsJmxUyg" name="insurance" repPath="#_UYz88GrEEeqek6MsJmxUyg" changeId="f1cfa9fc-d87d-4872-ac4f-7120e0309964">
<description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']"/>
<target xmi:type="ecore:EPackage" href="insurance.ecore#/"/>
</ownedRepresentationDescriptors>
Expand Down Expand Up @@ -48,6 +48,10 @@
<styles xmi:type="notation:FontStyle" xmi:id="_hOsDMWrEEeqek6MsJmxUyg" fontColor="2697711" fontName="Segoe UI" fontHeight="8"/>
<layoutConstraint xmi:type="notation:Location" xmi:id="_hOsqQGrEEeqek6MsJmxUyg"/>
</children>
<children xmi:type="notation:Node" xmi:id="_JHG8218NEey6NcU_y6112w" type="3010" element="_JG0B4F8NEey6NcU_y6112w">
<styles xmi:type="notation:FontStyle" xmi:id="_JHG83F8NEey6NcU_y6112w" fontColor="2697711" fontName="Segoe UI" fontHeight="8"/>
<layoutConstraint xmi:type="notation:Location" xmi:id="_JHG83V8NEey6NcU_y6112w"/>
</children>
<styles xmi:type="notation:SortingStyle" xmi:id="_bh7UsmrEEeqek6MsJmxUyg"/>
<styles xmi:type="notation:FilteringStyle" xmi:id="_bh7Us2rEEeqek6MsJmxUyg"/>
</children>
Expand Down Expand Up @@ -101,7 +105,7 @@
<ownedDiagramElements xmi:type="diagram:DNodeList" uid="_bh2cMGrEEeqek6MsJmxUyg" name="InsuranceClient" tooltipText="" incomingEdges="_q4f2EGrEEeqek6MsJmxUyg" width="12" height="10">
<target xmi:type="ecore:EClass" href="insurance.ecore#//InsuranceClient"/>
<semanticElements xmi:type="ecore:EClass" href="insurance.ecore#//InsuranceClient"/>
<ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_kgCfMWrEEeqek6MsJmxUyg" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216">
<ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_KnOrw18NEey6NcU_y6112w" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216">
<description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/>
</ownedStyle>
<actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/>
Expand All @@ -121,25 +125,33 @@
</ownedStyle>
<actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/>
</ownedElements>
<ownedElements xmi:type="diagram:DNodeListElement" uid="_JG0B4F8NEey6NcU_y6112w" name="gender : Gender = MALE" tooltipText="">
<target xmi:type="ecore:EAttribute" href="insurance.ecore#//InsuranceClient/gender"/>
<semanticElements xmi:type="ecore:EAttribute" href="insurance.ecore#//InsuranceClient/gender"/>
<ownedStyle xmi:type="diagram:BundledImage" uid="_KnOryF8NEey6NcU_y6112w" labelAlignment="LEFT">
<description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']/@style"/>
</ownedStyle>
<actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/>
</ownedElements>
</ownedDiagramElements>
<ownedDiagramElements xmi:type="diagram:DNodeList" uid="_lm6AoGrEEeqek6MsJmxUyg" name="Sex" tooltipText="" width="12" height="10">
<target xmi:type="ecore:EEnum" href="insurance.ecore#//Sex"/>
<semanticElements xmi:type="ecore:EEnum" href="insurance.ecore#//Sex"/>
<ownedDiagramElements xmi:type="diagram:DNodeList" uid="_lm6AoGrEEeqek6MsJmxUyg" name="Gender" tooltipText="" width="12" height="10">
<target xmi:type="ecore:EEnum" href="insurance.ecore#//Gender"/>
<semanticElements xmi:type="ecore:EEnum" href="insurance.ecore#//Gender"/>
<ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_lm6AoWrEEeqek6MsJmxUyg" borderSize="1" borderSizeComputationExpression="1" borderColor="125,125,125" backgroundStyle="Liquid" foregroundColor="221,236,202">
<description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@style"/>
</ownedStyle>
<actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']"/>
<ownedElements xmi:type="diagram:DNodeListElement" uid="_n7PawGrEEeqek6MsJmxUyg" name="MALE" tooltipText="">
<target xmi:type="ecore:EEnumLiteral" href="insurance.ecore#//Sex/MALE"/>
<semanticElements xmi:type="ecore:EEnumLiteral" href="insurance.ecore#//Sex/MALE"/>
<target xmi:type="ecore:EEnumLiteral" href="insurance.ecore#//Gender/MALE"/>
<semanticElements xmi:type="ecore:EEnumLiteral" href="insurance.ecore#//Gender/MALE"/>
<ownedStyle xmi:type="diagram:BundledImage" uid="_n7PawWrEEeqek6MsJmxUyg" labelAlignment="LEFT">
<description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']/@style"/>
</ownedStyle>
<actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/>
</ownedElements>
<ownedElements xmi:type="diagram:DNodeListElement" uid="_o9Ui0GrEEeqek6MsJmxUyg" name="FEMALE" tooltipText="">
<target xmi:type="ecore:EEnumLiteral" href="insurance.ecore#//Sex/FEMALE"/>
<semanticElements xmi:type="ecore:EEnumLiteral" href="insurance.ecore#//Sex/FEMALE"/>
<target xmi:type="ecore:EEnumLiteral" href="insurance.ecore#//Gender/FEMALE"/>
<semanticElements xmi:type="ecore:EEnumLiteral" href="insurance.ecore#//Gender/FEMALE"/>
<ownedStyle xmi:type="diagram:BundledImage" uid="_o9Ui0WrEEeqek6MsJmxUyg" labelAlignment="LEFT">
<description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']/@style"/>
</ownedStyle>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
<eClassifiers xsi:type="ecore:EClass" name="InsuranceClient">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="socialSecurityNumber" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="gender" eType="#//Gender"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EEnum" name="Sex">
<eClassifiers xsi:type="ecore:EEnum" name="Gender">
<eLiterals name="MALE"/>
<eLiterals name="FEMALE" value="1"/>
</eClassifiers>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,17 @@
<testsDirectory xsi:nil="true"/>
<genPackages prefix="Insurance" basePackage="edu.kit.ipd.sdq.metamodels" disposableProviderFactory="true"
ecorePackage="insurance.ecore#/">
<genEnums typeSafeEnumCompatible="false" ecoreEnum="insurance.ecore#//Sex">
<genEnumLiterals ecoreEnumLiteral="insurance.ecore#//Sex/MALE"/>
<genEnumLiterals ecoreEnumLiteral="insurance.ecore#//Sex/FEMALE"/>
<genEnums typeSafeEnumCompatible="false" ecoreEnum="insurance.ecore#//Gender">
<genEnumLiterals ecoreEnumLiteral="insurance.ecore#//Gender/MALE"/>
<genEnumLiterals ecoreEnumLiteral="insurance.ecore#//Gender/FEMALE"/>
</genEnums>
<genClasses ecoreClass="insurance.ecore#//InsuranceDatabase">
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference insurance.ecore#//InsuranceDatabase/insuranceclient"/>
</genClasses>
<genClasses ecoreClass="insurance.ecore#//InsuranceClient">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute insurance.ecore#//InsuranceClient/name"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute insurance.ecore#//InsuranceClient/socialSecurityNumber"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute insurance.ecore#//InsuranceClient/gender"/>
</genClasses>
</genPackages>
</genmodel:GenModel>
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@

/**
* <!-- begin-user-doc -->
* A representation of the literals of the enumeration '<em><b>Sex</b></em>',
* A representation of the literals of the enumeration '<em><b>Gender</b></em>',
* and utility methods for working with them.
* <!-- end-user-doc -->
* @see edu.kit.ipd.sdq.metamodels.insurance.InsurancePackage#getSex()
* @see edu.kit.ipd.sdq.metamodels.insurance.InsurancePackage#getGender()
* @model
* @generated
*/
public enum Sex implements Enumerator {
public enum Gender implements Enumerator
{
/**
* The '<em><b>MALE</b></em>' literal object.
* <!-- begin-user-doc -->
Expand Down Expand Up @@ -61,71 +62,82 @@ public enum Sex implements Enumerator {
public static final int FEMALE_VALUE = 1;

/**
* An array of all the '<em><b>Sex</b></em>' enumerators.
* An array of all the '<em><b>Gender</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static final Sex[] VALUES_ARRAY = new Sex[] { MALE, FEMALE, };
private static final Gender[] VALUES_ARRAY =
new Gender[]
{
MALE,
FEMALE,
};

/**
* A public read-only list of all the '<em><b>Sex</b></em>' enumerators.
* A public read-only list of all the '<em><b>Gender</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final List<Sex> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
public static final List<Gender> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));

/**
* Returns the '<em><b>Sex</b></em>' literal with the specified literal value.
* Returns the '<em><b>Gender</b></em>' literal with the specified literal value.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param literal the literal.
* @return the matching enumerator or <code>null</code>.
* @generated
*/
public static Sex get(String literal) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
Sex result = VALUES_ARRAY[i];
if (result.toString().equals(literal)) {
public static Gender get(String literal)
{
for (int i = 0; i < VALUES_ARRAY.length; ++i)
{
Gender result = VALUES_ARRAY[i];
if (result.toString().equals(literal))
{
return result;
}
}
return null;
}

/**
* Returns the '<em><b>Sex</b></em>' literal with the specified name.
* Returns the '<em><b>Gender</b></em>' literal with the specified name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param name the name.
* @return the matching enumerator or <code>null</code>.
* @generated
*/
public static Sex getByName(String name) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
Sex result = VALUES_ARRAY[i];
if (result.getName().equals(name)) {
public static Gender getByName(String name)
{
for (int i = 0; i < VALUES_ARRAY.length; ++i)
{
Gender result = VALUES_ARRAY[i];
if (result.getName().equals(name))
{
return result;
}
}
return null;
}

/**
* Returns the '<em><b>Sex</b></em>' literal with the specified integer value.
* Returns the '<em><b>Gender</b></em>' literal with the specified integer value.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the integer value.
* @return the matching enumerator or <code>null</code>.
* @generated
*/
public static Sex get(int value) {
switch (value) {
case MALE_VALUE:
return MALE;
case FEMALE_VALUE:
return FEMALE;
public static Gender get(int value)
{
switch (value)
{
case MALE_VALUE: return MALE;
case FEMALE_VALUE: return FEMALE;
}
return null;
}
Expand Down Expand Up @@ -157,7 +169,8 @@ public static Sex get(int value) {
* <!-- end-user-doc -->
* @generated
*/
private Sex(int value, String name, String literal) {
private Gender(int value, String name, String literal)
{
this.value = value;
this.name = name;
this.literal = literal;
Expand All @@ -168,26 +181,29 @@ private Sex(int value, String name, String literal) {
* <!-- end-user-doc -->
* @generated
*/
public int getValue() {
return value;
public int getValue()
{
return value;
}

/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getName() {
return name;
public String getName()
{
return name;
}

/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getLiteral() {
return literal;
public String getLiteral()
{
return literal;
}

/**
Expand All @@ -197,8 +213,9 @@ public String getLiteral() {
* @generated
*/
@Override
public String toString() {
public String toString()
{
return literal;
}

} //Sex
} //Gender
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* <ul>
* <li>{@link edu.kit.ipd.sdq.metamodels.insurance.InsuranceClient#getName <em>Name</em>}</li>
* <li>{@link edu.kit.ipd.sdq.metamodels.insurance.InsuranceClient#getSocialSecurityNumber <em>Social Security Number</em>}</li>
* <li>{@link edu.kit.ipd.sdq.metamodels.insurance.InsuranceClient#getGender <em>Gender</em>}</li>
* </ul>
*
* @see edu.kit.ipd.sdq.metamodels.insurance.InsurancePackage#getInsuranceClient()
Expand Down Expand Up @@ -66,4 +67,29 @@ public interface InsuranceClient extends EObject {
*/
void setSocialSecurityNumber(String value);

/**
* Returns the value of the '<em><b>Gender</b></em>' attribute.
* The literals are from the enumeration {@link edu.kit.ipd.sdq.metamodels.insurance.Gender}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Gender</em>' attribute.
* @see edu.kit.ipd.sdq.metamodels.insurance.Gender
* @see #setGender(Gender)
* @see edu.kit.ipd.sdq.metamodels.insurance.InsurancePackage#getInsuranceClient_Gender()
* @model
* @generated
*/
Gender getGender();

/**
* Sets the value of the '{@link edu.kit.ipd.sdq.metamodels.insurance.InsuranceClient#getGender <em>Gender</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Gender</em>' attribute.
* @see edu.kit.ipd.sdq.metamodels.insurance.Gender
* @see #getGender()
* @generated
*/
void setGender(Gender value);

} // InsuranceClient
Loading

0 comments on commit b3f18cb

Please sign in to comment.