Initial commit.

This commit is contained in:
2018-12-06 14:47:05 +01:00
parent b1dcd806aa
commit 79820f4433
370 changed files with 247380 additions and 3 deletions

View File

@@ -0,0 +1,52 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.pseim;
import com.irtsaintexupery.pseim.seim.PropertyHolder;
import org.eclipse.emf.common.util.EList;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Cardinality Element</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link com.irtsaintexupery.pseim.pseim.CardinalityElement#getCalculatedVia <em>Calculated Via</em>}</li>
* </ul>
*
* @see com.irtsaintexupery.pseim.pseim.PseimPackage#getCardinalityElement()
* @model
* @generated
*/
public interface CardinalityElement extends PropertyHolder {
/**
* Returns the value of the '<em><b>Calculated Via</b></em>' reference list.
* The list contents are of type {@link com.irtsaintexupery.pseim.seim.PropertyHolder}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Calculated Via</em>' reference list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Calculated Via</em>' reference list.
* @see com.irtsaintexupery.pseim.pseim.PseimPackage#getCardinalityElement_CalculatedVia()
* @model
* @generated
*/
EList<PropertyHolder> getCalculatedVia();
} // CardinalityElement

View File

@@ -0,0 +1,62 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.pseim;
import com.irtsaintexupery.pseim.seim.PropertyHolder;
import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Identified Element</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link com.irtsaintexupery.pseim.pseim.IdentifiedElement#getIdentifiedAs <em>Identified As</em>}</li>
* </ul>
*
* @see com.irtsaintexupery.pseim.pseim.PseimPackage#getIdentifiedElement()
* @model interface="true" abstract="true"
* @generated
*/
public interface IdentifiedElement extends EObject {
/**
* Returns the value of the '<em><b>Identified As</b></em>' reference.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Identified As</em>' reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Identified As</em>' reference.
* @see #setIdentifiedAs(PropertyHolder)
* @see com.irtsaintexupery.pseim.pseim.PseimPackage#getIdentifiedElement_IdentifiedAs()
* @model
* @generated
*/
PropertyHolder getIdentifiedAs();
/**
* Sets the value of the '{@link com.irtsaintexupery.pseim.pseim.IdentifiedElement#getIdentifiedAs <em>Identified As</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Identified As</em>' reference.
* @see #getIdentifiedAs()
* @generated
*/
void setIdentifiedAs(PropertyHolder value);
} // IdentifiedElement

View File

@@ -0,0 +1,51 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.pseim;
import com.irtsaintexupery.pseim.seim.NamedElement;
import org.eclipse.emf.common.util.EList;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Library</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link com.irtsaintexupery.pseim.pseim.Library#getPatterns <em>Patterns</em>}</li>
* </ul>
*
* @see com.irtsaintexupery.pseim.pseim.PseimPackage#getLibrary()
* @model
* @generated
*/
public interface Library extends NamedElement {
/**
* Returns the value of the '<em><b>Patterns</b></em>' containment reference list.
* The list contents are of type {@link com.irtsaintexupery.pseim.pseim.Pattern}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Patterns</em>' containment reference list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Patterns</em>' containment reference list.
* @see com.irtsaintexupery.pseim.pseim.PseimPackage#getLibrary_Patterns()
* @model containment="true"
* @generated
*/
EList<Pattern> getPatterns();
} // Library

View File

@@ -0,0 +1,303 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.pseim;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import org.eclipse.emf.common.util.Enumerator;
/**
* <!-- begin-user-doc -->
* A representation of the literals of the enumeration '<em><b>Link Type</b></em>',
* and utility methods for working with them.
* <!-- end-user-doc -->
* @see com.irtsaintexupery.pseim.pseim.PseimPackage#getLinkType()
* @model
* @generated
*/
public enum LinkType implements Enumerator {
/**
* The '<em><b>TRANSPOSE</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #TRANSPOSE_VALUE
* @generated
* @ordered
*/
TRANSPOSE(0, "TRANSPOSE", "TRANSPOSE"),
/**
* The '<em><b>IDENTITY</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #IDENTITY_VALUE
* @generated
* @ordered
*/
IDENTITY(1, "IDENTITY", "IDENTITY"),
/**
* The '<em><b>SHIFT</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #SHIFT_VALUE
* @generated
* @ordered
*/
SHIFT(2, "SHIFT", "SHIFT"),
/**
* The '<em><b>FIRST</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #FIRST_VALUE
* @generated
* @ordered
*/
FIRST(3, "FIRST", "FIRST"),
/**
* The '<em><b>ROTATE</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #ROTATE_VALUE
* @generated
* @ordered
*/
ROTATE(4, "ROTATE", "ROTATE");
/**
* The '<em><b>TRANSPOSE</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>TRANSPOSE</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #TRANSPOSE
* @model
* @generated
* @ordered
*/
public static final int TRANSPOSE_VALUE = 0;
/**
* The '<em><b>IDENTITY</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>IDENTITY</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #IDENTITY
* @model
* @generated
* @ordered
*/
public static final int IDENTITY_VALUE = 1;
/**
* The '<em><b>SHIFT</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>SHIFT</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #SHIFT
* @model
* @generated
* @ordered
*/
public static final int SHIFT_VALUE = 2;
/**
* The '<em><b>FIRST</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>FIRST</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #FIRST
* @model
* @generated
* @ordered
*/
public static final int FIRST_VALUE = 3;
/**
* The '<em><b>ROTATE</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>ROTATE</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #ROTATE
* @model
* @generated
* @ordered
*/
public static final int ROTATE_VALUE = 4;
/**
* An array of all the '<em><b>Link Type</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static final LinkType[] VALUES_ARRAY = new LinkType[] { TRANSPOSE, IDENTITY, SHIFT, FIRST, ROTATE, };
/**
* A public read-only list of all the '<em><b>Link Type</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final List<LinkType> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
/**
* Returns the '<em><b>Link Type</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 LinkType get(String literal) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
LinkType result = VALUES_ARRAY[i];
if (result.toString().equals(literal)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Link Type</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 LinkType getByName(String name) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
LinkType result = VALUES_ARRAY[i];
if (result.getName().equals(name)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Link Type</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 LinkType get(int value) {
switch (value) {
case TRANSPOSE_VALUE:
return TRANSPOSE;
case IDENTITY_VALUE:
return IDENTITY;
case SHIFT_VALUE:
return SHIFT;
case FIRST_VALUE:
return FIRST;
case ROTATE_VALUE:
return ROTATE;
}
return null;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private final int value;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private final String name;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private final String literal;
/**
* Only this class can construct instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private LinkType(int value, String name, String literal) {
this.value = value;
this.name = name;
this.literal = literal;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public int getValue() {
return value;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getName() {
return name;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getLiteral() {
return literal;
}
/**
* Returns the literal value of the enumerator, which is its string representation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
return literal;
}
} //LinkType

View File

@@ -0,0 +1,90 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.pseim;
import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Multiplicity Element</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link com.irtsaintexupery.pseim.pseim.MultiplicityElement#getMultiplicityValue <em>Multiplicity Value</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.pseim.MultiplicityElement#getCardinalityElement <em>Cardinality Element</em>}</li>
* </ul>
*
* @see com.irtsaintexupery.pseim.pseim.PseimPackage#getMultiplicityElement()
* @model interface="true" abstract="true"
* annotation="http://www.eclipse.org/emf/2002/Ecore constraints='cardinalityAsElementOrMult'"
* annotation="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot cardinalityAsElementOrMult='(not (cardinalityElement.oclIsUndefined())) implies multiplicityValue = 1'"
* @generated
*/
public interface MultiplicityElement extends EObject {
/**
* Returns the value of the '<em><b>Multiplicity Value</b></em>' attribute.
* The default value is <code>"1"</code>.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Multiplicity Value</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Multiplicity Value</em>' attribute.
* @see #setMultiplicityValue(int)
* @see com.irtsaintexupery.pseim.pseim.PseimPackage#getMultiplicityElement_MultiplicityValue()
* @model default="1" required="true"
* @generated
*/
int getMultiplicityValue();
/**
* Sets the value of the '{@link com.irtsaintexupery.pseim.pseim.MultiplicityElement#getMultiplicityValue <em>Multiplicity Value</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Multiplicity Value</em>' attribute.
* @see #getMultiplicityValue()
* @generated
*/
void setMultiplicityValue(int value);
/**
* Returns the value of the '<em><b>Cardinality Element</b></em>' reference.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Cardinality Element</em>' reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Cardinality Element</em>' reference.
* @see #setCardinalityElement(CardinalityElement)
* @see com.irtsaintexupery.pseim.pseim.PseimPackage#getMultiplicityElement_CardinalityElement()
* @model
* @generated
*/
CardinalityElement getCardinalityElement();
/**
* Sets the value of the '{@link com.irtsaintexupery.pseim.pseim.MultiplicityElement#getCardinalityElement <em>Cardinality Element</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Cardinality Element</em>' reference.
* @see #getCardinalityElement()
* @generated
*/
void setCardinalityElement(CardinalityElement value);
} // MultiplicityElement

View File

@@ -0,0 +1,238 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.pseim;
import com.irtsaintexupery.pseim.seim.Model;
import com.irtsaintexupery.pseim.seim.PropertyHolder;
import org.eclipse.emf.common.util.EList;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Pattern</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link com.irtsaintexupery.pseim.pseim.Pattern#getTypeHS <em>Type HS</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.pseim.Pattern#getTypeFailure <em>Type Failure</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.pseim.Pattern#getAlsoKnownAs <em>Also Known As</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.pseim.Pattern#getUsedTactics <em>Used Tactics</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.pseim.Pattern#getContext <em>Context</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.pseim.Pattern#getDomain <em>Domain</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.pseim.Pattern#isIsSingleChannel <em>Is Single Channel</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.pseim.Pattern#getInterfaceElements <em>Interface Elements</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.pseim.Pattern#getCardinalityElements <em>Cardinality Elements</em>}</li>
* </ul>
*
* @see com.irtsaintexupery.pseim.pseim.PseimPackage#getPattern()
* @model
* @generated
*/
public interface Pattern extends Model {
/**
* Returns the value of the '<em><b>Type HS</b></em>' attribute list.
* The list contents are of type {@link com.irtsaintexupery.pseim.pseim.PatternTypeHS}.
* The literals are from the enumeration {@link com.irtsaintexupery.pseim.pseim.PatternTypeHS}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Type HS</em>' attribute list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Type HS</em>' attribute list.
* @see com.irtsaintexupery.pseim.pseim.PatternTypeHS
* @see com.irtsaintexupery.pseim.pseim.PseimPackage#getPattern_TypeHS()
* @model ordered="false"
* @generated
*/
EList<PatternTypeHS> getTypeHS();
/**
* Returns the value of the '<em><b>Type Failure</b></em>' attribute.
* The literals are from the enumeration {@link com.irtsaintexupery.pseim.pseim.PatternTypeFailureMode}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Type Failure</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Type Failure</em>' attribute.
* @see com.irtsaintexupery.pseim.pseim.PatternTypeFailureMode
* @see #setTypeFailure(PatternTypeFailureMode)
* @see com.irtsaintexupery.pseim.pseim.PseimPackage#getPattern_TypeFailure()
* @model
* @generated
*/
PatternTypeFailureMode getTypeFailure();
/**
* Sets the value of the '{@link com.irtsaintexupery.pseim.pseim.Pattern#getTypeFailure <em>Type Failure</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Type Failure</em>' attribute.
* @see com.irtsaintexupery.pseim.pseim.PatternTypeFailureMode
* @see #getTypeFailure()
* @generated
*/
void setTypeFailure(PatternTypeFailureMode value);
/**
* Returns the value of the '<em><b>Also Known As</b></em>' attribute list.
* The list contents are of type {@link java.lang.String}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Also Known As</em>' attribute list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Also Known As</em>' attribute list.
* @see com.irtsaintexupery.pseim.pseim.PseimPackage#getPattern_AlsoKnownAs()
* @model ordered="false"
* annotation="http://www.eclipse.org/OCL/Collection nullFree='false'"
* @generated
*/
EList<String> getAlsoKnownAs();
/**
* Returns the value of the '<em><b>Used Tactics</b></em>' attribute list.
* The list contents are of type {@link com.irtsaintexupery.pseim.pseim.SafetyTactic}.
* The literals are from the enumeration {@link com.irtsaintexupery.pseim.pseim.SafetyTactic}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Used Tactics</em>' attribute list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Used Tactics</em>' attribute list.
* @see com.irtsaintexupery.pseim.pseim.SafetyTactic
* @see com.irtsaintexupery.pseim.pseim.PseimPackage#getPattern_UsedTactics()
* @model ordered="false"
* annotation="http://www.eclipse.org/OCL/Collection nullFree='false'"
* @generated
*/
EList<SafetyTactic> getUsedTactics();
/**
* Returns the value of the '<em><b>Context</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Context</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Context</em>' attribute.
* @see #setContext(String)
* @see com.irtsaintexupery.pseim.pseim.PseimPackage#getPattern_Context()
* @model
* @generated
*/
String getContext();
/**
* Sets the value of the '{@link com.irtsaintexupery.pseim.pseim.Pattern#getContext <em>Context</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Context</em>' attribute.
* @see #getContext()
* @generated
*/
void setContext(String value);
/**
* Returns the value of the '<em><b>Domain</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Domain</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Domain</em>' attribute.
* @see #setDomain(String)
* @see com.irtsaintexupery.pseim.pseim.PseimPackage#getPattern_Domain()
* @model
* @generated
*/
String getDomain();
/**
* Sets the value of the '{@link com.irtsaintexupery.pseim.pseim.Pattern#getDomain <em>Domain</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Domain</em>' attribute.
* @see #getDomain()
* @generated
*/
void setDomain(String value);
/**
* Returns the value of the '<em><b>Is Single Channel</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Is Single Channel</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Is Single Channel</em>' attribute.
* @see #setIsSingleChannel(boolean)
* @see com.irtsaintexupery.pseim.pseim.PseimPackage#getPattern_IsSingleChannel()
* @model required="true"
* @generated
*/
boolean isIsSingleChannel();
/**
* Sets the value of the '{@link com.irtsaintexupery.pseim.pseim.Pattern#isIsSingleChannel <em>Is Single Channel</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Is Single Channel</em>' attribute.
* @see #isIsSingleChannel()
* @generated
*/
void setIsSingleChannel(boolean value);
/**
* Returns the value of the '<em><b>Interface Elements</b></em>' reference list.
* The list contents are of type {@link com.irtsaintexupery.pseim.seim.PropertyHolder}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Interface Elements</em>' reference list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Interface Elements</em>' reference list.
* @see com.irtsaintexupery.pseim.pseim.PseimPackage#getPattern_InterfaceElements()
* @model
* @generated
*/
EList<PropertyHolder> getInterfaceElements();
/**
* Returns the value of the '<em><b>Cardinality Elements</b></em>' containment reference list.
* The list contents are of type {@link com.irtsaintexupery.pseim.pseim.CardinalityElement}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Cardinality Elements</em>' containment reference list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Cardinality Elements</em>' containment reference list.
* @see com.irtsaintexupery.pseim.pseim.PseimPackage#getPattern_CardinalityElements()
* @model containment="true"
* @generated
*/
EList<CardinalityElement> getCardinalityElements();
} // Pattern

View File

@@ -0,0 +1,61 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.pseim;
import com.irtsaintexupery.pseim.seim.Component;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Pattern Component</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link com.irtsaintexupery.pseim.pseim.PatternComponent#isMergeContent <em>Merge Content</em>}</li>
* </ul>
*
* @see com.irtsaintexupery.pseim.pseim.PseimPackage#getPatternComponent()
* @model annotation="http://www.eclipse.org/emf/2002/Ecore constraints='contentIsPatternContent'"
* annotation="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot contentIsPatternContent='content-&gt;forAll(c | c.oclIsTypeOf(PatternComponent) or c.oclIsTypeOf(PatternPort) or c.oclIsTypeOf(PatternLink))'"
* @generated
*/
public interface PatternComponent extends MultiplicityElement, IdentifiedElement, Component {
/**
* Returns the value of the '<em><b>Merge Content</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Merge Content</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Merge Content</em>' attribute.
* @see #setMergeContent(boolean)
* @see com.irtsaintexupery.pseim.pseim.PseimPackage#getPatternComponent_MergeContent()
* @model required="true"
* @generated
*/
boolean isMergeContent();
/**
* Sets the value of the '{@link com.irtsaintexupery.pseim.pseim.PatternComponent#isMergeContent <em>Merge Content</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Merge Content</em>' attribute.
* @see #isMergeContent()
* @generated
*/
void setMergeContent(boolean value);
} // PatternComponent

View File

@@ -0,0 +1,91 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.pseim;
import com.irtsaintexupery.pseim.seim.Link;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Pattern Link</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link com.irtsaintexupery.pseim.pseim.PatternLink#getLinkType <em>Link Type</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.pseim.PatternLink#getElement <em>Element</em>}</li>
* </ul>
*
* @see com.irtsaintexupery.pseim.pseim.PseimPackage#getPatternLink()
* @model annotation="http://www.eclipse.org/emf/2002/Ecore constraints='srcIsPatternPort dstIsPatternPort'"
* annotation="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot srcIsPatternPort='src.oclIsTypeOf(PatternLink)' dstIsPatternPort='dst.oclIsTypeOf(PatternLink)'"
* @generated
*/
public interface PatternLink extends IdentifiedElement, Link {
/**
* Returns the value of the '<em><b>Link Type</b></em>' attribute.
* The literals are from the enumeration {@link com.irtsaintexupery.pseim.pseim.LinkType}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Link Type</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Link Type</em>' attribute.
* @see com.irtsaintexupery.pseim.pseim.LinkType
* @see #setLinkType(LinkType)
* @see com.irtsaintexupery.pseim.pseim.PseimPackage#getPatternLink_LinkType()
* @model required="true"
* @generated
*/
LinkType getLinkType();
/**
* Sets the value of the '{@link com.irtsaintexupery.pseim.pseim.PatternLink#getLinkType <em>Link Type</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Link Type</em>' attribute.
* @see com.irtsaintexupery.pseim.pseim.LinkType
* @see #getLinkType()
* @generated
*/
void setLinkType(LinkType value);
/**
* Returns the value of the '<em><b>Element</b></em>' reference.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Element</em>' reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Element</em>' reference.
* @see #setElement(CardinalityElement)
* @see com.irtsaintexupery.pseim.pseim.PseimPackage#getPatternLink_Element()
* @model
* @generated
*/
CardinalityElement getElement();
/**
* Sets the value of the '{@link com.irtsaintexupery.pseim.pseim.PatternLink#getElement <em>Element</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Element</em>' reference.
* @see #getElement()
* @generated
*/
void setElement(CardinalityElement value);
} // PatternLink

View File

@@ -0,0 +1,63 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.pseim;
import com.irtsaintexupery.pseim.seim.Port;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Pattern Port</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link com.irtsaintexupery.pseim.pseim.PatternPort#getDir <em>Dir</em>}</li>
* </ul>
*
* @see com.irtsaintexupery.pseim.pseim.PseimPackage#getPatternPort()
* @model
* @generated
*/
public interface PatternPort extends MultiplicityElement, IdentifiedElement, Port {
/**
* Returns the value of the '<em><b>Dir</b></em>' attribute.
* The literals are from the enumeration {@link com.irtsaintexupery.pseim.pseim.PatternPortDirection}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Dir</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Dir</em>' attribute.
* @see com.irtsaintexupery.pseim.pseim.PatternPortDirection
* @see #setDir(PatternPortDirection)
* @see com.irtsaintexupery.pseim.pseim.PseimPackage#getPatternPort_Dir()
* @model required="true"
* @generated
*/
PatternPortDirection getDir();
/**
* Sets the value of the '{@link com.irtsaintexupery.pseim.pseim.PatternPort#getDir <em>Dir</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Dir</em>' attribute.
* @see com.irtsaintexupery.pseim.pseim.PatternPortDirection
* @see #getDir()
* @generated
*/
void setDir(PatternPortDirection value);
} // PatternPort

View File

@@ -0,0 +1,277 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.pseim;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import org.eclipse.emf.common.util.Enumerator;
/**
* <!-- begin-user-doc -->
* A representation of the literals of the enumeration '<em><b>Pattern Port Direction</b></em>',
* and utility methods for working with them.
* <!-- end-user-doc -->
* @see com.irtsaintexupery.pseim.pseim.PseimPackage#getPatternPortDirection()
* @model
* @generated
*/
public enum PatternPortDirection implements Enumerator {
/**
* The '<em><b>UNSPECIFIED</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #UNSPECIFIED_VALUE
* @generated
* @ordered
*/
UNSPECIFIED(3, "UNSPECIFIED", "UNSPECIFIED"),
/**
* The '<em><b>IN</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #IN_VALUE
* @generated
* @ordered
*/
IN(0, "IN", "IN"),
/**
* The '<em><b>OUT</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #OUT_VALUE
* @generated
* @ordered
*/
OUT(1, "OUT", "OUT"),
/**
* The '<em><b>INOUT</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #INOUT_VALUE
* @generated
* @ordered
*/
INOUT(2, "INOUT", "INOUT");
/**
* The '<em><b>UNSPECIFIED</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>UNSPECIFIED</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #UNSPECIFIED
* @model
* @generated
* @ordered
*/
public static final int UNSPECIFIED_VALUE = 3;
/**
* The '<em><b>IN</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>IN</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #IN
* @model
* @generated
* @ordered
*/
public static final int IN_VALUE = 0;
/**
* The '<em><b>OUT</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>OUT</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #OUT
* @model
* @generated
* @ordered
*/
public static final int OUT_VALUE = 1;
/**
* The '<em><b>INOUT</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>INOUT</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #INOUT
* @model
* @generated
* @ordered
*/
public static final int INOUT_VALUE = 2;
/**
* An array of all the '<em><b>Pattern Port Direction</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static final PatternPortDirection[] VALUES_ARRAY = new PatternPortDirection[] { UNSPECIFIED, IN, OUT,
INOUT, };
/**
* A public read-only list of all the '<em><b>Pattern Port Direction</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final List<PatternPortDirection> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
/**
* Returns the '<em><b>Pattern Port Direction</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 PatternPortDirection get(String literal) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
PatternPortDirection result = VALUES_ARRAY[i];
if (result.toString().equals(literal)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Pattern Port Direction</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 PatternPortDirection getByName(String name) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
PatternPortDirection result = VALUES_ARRAY[i];
if (result.getName().equals(name)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Pattern Port Direction</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 PatternPortDirection get(int value) {
switch (value) {
case UNSPECIFIED_VALUE:
return UNSPECIFIED;
case IN_VALUE:
return IN;
case OUT_VALUE:
return OUT;
case INOUT_VALUE:
return INOUT;
}
return null;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private final int value;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private final String name;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private final String literal;
/**
* Only this class can construct instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private PatternPortDirection(int value, String name, String literal) {
this.value = value;
this.name = name;
this.literal = literal;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public int getValue() {
return value;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getName() {
return name;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getLiteral() {
return literal;
}
/**
* Returns the literal value of the enumerator, which is its string representation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
return literal;
}
} //PatternPortDirection

View File

@@ -0,0 +1,222 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.pseim;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import org.eclipse.emf.common.util.Enumerator;
/**
* <!-- begin-user-doc -->
* A representation of the literals of the enumeration '<em><b>Pattern Type Failure Mode</b></em>',
* and utility methods for working with them.
* <!-- end-user-doc -->
* @see com.irtsaintexupery.pseim.pseim.PseimPackage#getPatternTypeFailureMode()
* @model
* @generated
*/
public enum PatternTypeFailureMode implements Enumerator {
/**
* The '<em><b>Fail safe</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #FAIL_SAFE_VALUE
* @generated
* @ordered
*/
FAIL_SAFE(0, "Fail_safe", "Fail_safe"),
/**
* The '<em><b>Fail over</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #FAIL_OVER_VALUE
* @generated
* @ordered
*/
FAIL_OVER(1, "Fail_over", "Fail_over");
/**
* The '<em><b>Fail safe</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Fail safe</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #FAIL_SAFE
* @model name="Fail_safe"
* @generated
* @ordered
*/
public static final int FAIL_SAFE_VALUE = 0;
/**
* The '<em><b>Fail over</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Fail over</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #FAIL_OVER
* @model name="Fail_over"
* @generated
* @ordered
*/
public static final int FAIL_OVER_VALUE = 1;
/**
* An array of all the '<em><b>Pattern Type Failure Mode</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static final PatternTypeFailureMode[] VALUES_ARRAY = new PatternTypeFailureMode[] { FAIL_SAFE, FAIL_OVER, };
/**
* A public read-only list of all the '<em><b>Pattern Type Failure Mode</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final List<PatternTypeFailureMode> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
/**
* Returns the '<em><b>Pattern Type Failure Mode</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 PatternTypeFailureMode get(String literal) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
PatternTypeFailureMode result = VALUES_ARRAY[i];
if (result.toString().equals(literal)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Pattern Type Failure Mode</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 PatternTypeFailureMode getByName(String name) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
PatternTypeFailureMode result = VALUES_ARRAY[i];
if (result.getName().equals(name)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Pattern Type Failure Mode</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 PatternTypeFailureMode get(int value) {
switch (value) {
case FAIL_SAFE_VALUE:
return FAIL_SAFE;
case FAIL_OVER_VALUE:
return FAIL_OVER;
}
return null;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private final int value;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private final String name;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private final String literal;
/**
* Only this class can construct instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private PatternTypeFailureMode(int value, String name, String literal) {
this.value = value;
this.name = name;
this.literal = literal;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public int getValue() {
return value;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getName() {
return name;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getLiteral() {
return literal;
}
/**
* Returns the literal value of the enumerator, which is its string representation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
return literal;
}
} //PatternTypeFailureMode

View File

@@ -0,0 +1,222 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.pseim;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import org.eclipse.emf.common.util.Enumerator;
/**
* <!-- begin-user-doc -->
* A representation of the literals of the enumeration '<em><b>Pattern Type HS</b></em>',
* and utility methods for working with them.
* <!-- end-user-doc -->
* @see com.irtsaintexupery.pseim.pseim.PseimPackage#getPatternTypeHS()
* @model
* @generated
*/
public enum PatternTypeHS implements Enumerator {
/**
* The '<em><b>Hardware</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #HARDWARE_VALUE
* @generated
* @ordered
*/
HARDWARE(0, "Hardware", "Hardware"),
/**
* The '<em><b>Software</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #SOFTWARE_VALUE
* @generated
* @ordered
*/
SOFTWARE(1, "Software", "Software");
/**
* The '<em><b>Hardware</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Hardware</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #HARDWARE
* @model name="Hardware"
* @generated
* @ordered
*/
public static final int HARDWARE_VALUE = 0;
/**
* The '<em><b>Software</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Software</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #SOFTWARE
* @model name="Software"
* @generated
* @ordered
*/
public static final int SOFTWARE_VALUE = 1;
/**
* An array of all the '<em><b>Pattern Type HS</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static final PatternTypeHS[] VALUES_ARRAY = new PatternTypeHS[] { HARDWARE, SOFTWARE, };
/**
* A public read-only list of all the '<em><b>Pattern Type HS</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final List<PatternTypeHS> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
/**
* Returns the '<em><b>Pattern Type HS</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 PatternTypeHS get(String literal) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
PatternTypeHS result = VALUES_ARRAY[i];
if (result.toString().equals(literal)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Pattern Type HS</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 PatternTypeHS getByName(String name) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
PatternTypeHS result = VALUES_ARRAY[i];
if (result.getName().equals(name)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Pattern Type HS</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 PatternTypeHS get(int value) {
switch (value) {
case HARDWARE_VALUE:
return HARDWARE;
case SOFTWARE_VALUE:
return SOFTWARE;
}
return null;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private final int value;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private final String name;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private final String literal;
/**
* Only this class can construct instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private PatternTypeHS(int value, String name, String literal) {
this.value = value;
this.name = name;
this.literal = literal;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public int getValue() {
return value;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getName() {
return name;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getLiteral() {
return literal;
}
/**
* Returns the literal value of the enumerator, which is its string representation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
return literal;
}
} //PatternTypeHS

View File

@@ -0,0 +1,97 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.pseim;
import org.eclipse.emf.ecore.EFactory;
/**
* <!-- begin-user-doc -->
* The <b>Factory</b> for the model.
* It provides a create method for each non-abstract class of the model.
* <!-- end-user-doc -->
* @see com.irtsaintexupery.pseim.pseim.PseimPackage
* @generated
*/
public interface PseimFactory extends EFactory {
/**
* The singleton instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
PseimFactory eINSTANCE = com.irtsaintexupery.pseim.pseim.impl.PseimFactoryImpl.init();
/**
* Returns a new object of class '<em>Library</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Library</em>'.
* @generated
*/
Library createLibrary();
/**
* Returns a new object of class '<em>Pattern</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Pattern</em>'.
* @generated
*/
Pattern createPattern();
/**
* Returns a new object of class '<em>Cardinality Element</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Cardinality Element</em>'.
* @generated
*/
CardinalityElement createCardinalityElement();
/**
* Returns a new object of class '<em>Pattern Component</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Pattern Component</em>'.
* @generated
*/
PatternComponent createPatternComponent();
/**
* Returns a new object of class '<em>Pattern Port</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Pattern Port</em>'.
* @generated
*/
PatternPort createPatternPort();
/**
* Returns a new object of class '<em>Pattern Link</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Pattern Link</em>'.
* @generated
*/
PatternLink createPatternLink();
/**
* Returns the package supported by this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the package supported by this factory.
* @generated
*/
PseimPackage getPseimPackage();
} //PseimFactory

View File

@@ -0,0 +1,521 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.pseim;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import org.eclipse.emf.common.util.Enumerator;
/**
* <!-- begin-user-doc -->
* A representation of the literals of the enumeration '<em><b>Safety Tactic</b></em>',
* and utility methods for working with them.
* <!-- end-user-doc -->
* @see com.irtsaintexupery.pseim.pseim.PseimPackage#getSafetyTactic()
* @model
* @generated
*/
public enum SafetyTactic implements Enumerator {
/**
* The '<em><b>Simplicity</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #SIMPLICITY_VALUE
* @generated
* @ordered
*/
SIMPLICITY(0, "Simplicity", "Simplicity"),
/**
* The '<em><b>Substitution</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #SUBSTITUTION_VALUE
* @generated
* @ordered
*/
SUBSTITUTION(1, "Substitution", "Substitution"),
/**
* The '<em><b>Sanity Check</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #SANITY_CHECK_VALUE
* @generated
* @ordered
*/
SANITY_CHECK(2, "Sanity_Check", "Sanity_Check"),
/**
* The '<em><b>Condition Monitoring</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #CONDITION_MONITORING_VALUE
* @generated
* @ordered
*/
CONDITION_MONITORING(3, "Condition_Monitoring", "Condition_Monitoring"),
/**
* The '<em><b>Comparison</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #COMPARISON_VALUE
* @generated
* @ordered
*/
COMPARISON(4, "Comparison", "Comparison"),
/**
* The '<em><b>Diverse Redundancy</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #DIVERSE_REDUNDANCY_VALUE
* @generated
* @ordered
*/
DIVERSE_REDUNDANCY(5, "Diverse_Redundancy", "Diverse_Redundancy"),
/**
* The '<em><b>Replication Redundancy</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #REPLICATION_REDUNDANCY_VALUE
* @generated
* @ordered
*/
REPLICATION_REDUNDANCY(6, "Replication_Redundancy", "Replication_Redundancy"),
/**
* The '<em><b>Repair</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #REPAIR_VALUE
* @generated
* @ordered
*/
REPAIR(7, "Repair", "Repair"),
/**
* The '<em><b>Degradation</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #DEGRADATION_VALUE
* @generated
* @ordered
*/
DEGRADATION(8, "Degradation", "Degradation"),
/**
* The '<em><b>Voting</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #VOTING_VALUE
* @generated
* @ordered
*/
VOTING(9, "Voting", "Voting"),
/**
* The '<em><b>Override</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #OVERRIDE_VALUE
* @generated
* @ordered
*/
OVERRIDE(10, "Override", "Override"),
/**
* The '<em><b>Barrier</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #BARRIER_VALUE
* @generated
* @ordered
*/
BARRIER(11, "Barrier", "Barrier"),
/**
* The '<em><b>Heartbeat</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #HEARTBEAT_VALUE
* @generated
* @ordered
*/
HEARTBEAT(12, "Heartbeat", "Heartbeat");
/**
* The '<em><b>Simplicity</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Simplicity</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #SIMPLICITY
* @model name="Simplicity"
* @generated
* @ordered
*/
public static final int SIMPLICITY_VALUE = 0;
/**
* The '<em><b>Substitution</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Substitution</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #SUBSTITUTION
* @model name="Substitution"
* @generated
* @ordered
*/
public static final int SUBSTITUTION_VALUE = 1;
/**
* The '<em><b>Sanity Check</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Sanity Check</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #SANITY_CHECK
* @model name="Sanity_Check"
* @generated
* @ordered
*/
public static final int SANITY_CHECK_VALUE = 2;
/**
* The '<em><b>Condition Monitoring</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Condition Monitoring</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #CONDITION_MONITORING
* @model name="Condition_Monitoring"
* @generated
* @ordered
*/
public static final int CONDITION_MONITORING_VALUE = 3;
/**
* The '<em><b>Comparison</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Comparison</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #COMPARISON
* @model name="Comparison"
* @generated
* @ordered
*/
public static final int COMPARISON_VALUE = 4;
/**
* The '<em><b>Diverse Redundancy</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Diverse Redundancy</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #DIVERSE_REDUNDANCY
* @model name="Diverse_Redundancy"
* @generated
* @ordered
*/
public static final int DIVERSE_REDUNDANCY_VALUE = 5;
/**
* The '<em><b>Replication Redundancy</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Replication Redundancy</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #REPLICATION_REDUNDANCY
* @model name="Replication_Redundancy"
* @generated
* @ordered
*/
public static final int REPLICATION_REDUNDANCY_VALUE = 6;
/**
* The '<em><b>Repair</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Repair</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #REPAIR
* @model name="Repair"
* @generated
* @ordered
*/
public static final int REPAIR_VALUE = 7;
/**
* The '<em><b>Degradation</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Degradation</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #DEGRADATION
* @model name="Degradation"
* @generated
* @ordered
*/
public static final int DEGRADATION_VALUE = 8;
/**
* The '<em><b>Voting</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Voting</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #VOTING
* @model name="Voting"
* @generated
* @ordered
*/
public static final int VOTING_VALUE = 9;
/**
* The '<em><b>Override</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Override</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #OVERRIDE
* @model name="Override"
* @generated
* @ordered
*/
public static final int OVERRIDE_VALUE = 10;
/**
* The '<em><b>Barrier</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Barrier</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #BARRIER
* @model name="Barrier"
* @generated
* @ordered
*/
public static final int BARRIER_VALUE = 11;
/**
* The '<em><b>Heartbeat</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Heartbeat</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #HEARTBEAT
* @model name="Heartbeat"
* @generated
* @ordered
*/
public static final int HEARTBEAT_VALUE = 12;
/**
* An array of all the '<em><b>Safety Tactic</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static final SafetyTactic[] VALUES_ARRAY = new SafetyTactic[] { SIMPLICITY, SUBSTITUTION, SANITY_CHECK,
CONDITION_MONITORING, COMPARISON, DIVERSE_REDUNDANCY, REPLICATION_REDUNDANCY, REPAIR, DEGRADATION, VOTING,
OVERRIDE, BARRIER, HEARTBEAT, };
/**
* A public read-only list of all the '<em><b>Safety Tactic</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final List<SafetyTactic> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
/**
* Returns the '<em><b>Safety Tactic</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 SafetyTactic get(String literal) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
SafetyTactic result = VALUES_ARRAY[i];
if (result.toString().equals(literal)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Safety Tactic</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 SafetyTactic getByName(String name) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
SafetyTactic result = VALUES_ARRAY[i];
if (result.getName().equals(name)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Safety Tactic</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 SafetyTactic get(int value) {
switch (value) {
case SIMPLICITY_VALUE:
return SIMPLICITY;
case SUBSTITUTION_VALUE:
return SUBSTITUTION;
case SANITY_CHECK_VALUE:
return SANITY_CHECK;
case CONDITION_MONITORING_VALUE:
return CONDITION_MONITORING;
case COMPARISON_VALUE:
return COMPARISON;
case DIVERSE_REDUNDANCY_VALUE:
return DIVERSE_REDUNDANCY;
case REPLICATION_REDUNDANCY_VALUE:
return REPLICATION_REDUNDANCY;
case REPAIR_VALUE:
return REPAIR;
case DEGRADATION_VALUE:
return DEGRADATION;
case VOTING_VALUE:
return VOTING;
case OVERRIDE_VALUE:
return OVERRIDE;
case BARRIER_VALUE:
return BARRIER;
case HEARTBEAT_VALUE:
return HEARTBEAT;
}
return null;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private final int value;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private final String name;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private final String literal;
/**
* Only this class can construct instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private SafetyTactic(int value, String name, String literal) {
this.value = value;
this.name = name;
this.literal = literal;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public int getValue() {
return value;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getName() {
return name;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getLiteral() {
return literal;
}
/**
* Returns the literal value of the enumerator, which is its string representation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
return literal;
}
} //SafetyTactic

View File

@@ -0,0 +1,330 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.pseim.impl;
import com.irtsaintexupery.pseim.pseim.CardinalityElement;
import com.irtsaintexupery.pseim.pseim.PseimPackage;
import com.irtsaintexupery.pseim.seim.Property;
import com.irtsaintexupery.pseim.seim.PropertyHolder;
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.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.EObjectResolvingEList;
import org.eclipse.emf.ecore.util.InternalEList;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Cardinality Element</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link com.irtsaintexupery.pseim.pseim.impl.CardinalityElementImpl#getUid <em>Uid</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.pseim.impl.CardinalityElementImpl#getName <em>Name</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.pseim.impl.CardinalityElementImpl#getProperties <em>Properties</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.pseim.impl.CardinalityElementImpl#getCalculatedVia <em>Calculated Via</em>}</li>
* </ul>
*
* @generated
*/
public class CardinalityElementImpl extends MinimalEObjectImpl.Container implements CardinalityElement {
/**
* The default value of the '{@link #getUid() <em>Uid</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getUid()
* @generated
* @ordered
*/
protected static final String UID_EDEFAULT = null;
/**
* The cached value of the '{@link #getUid() <em>Uid</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getUid()
* @generated
* @ordered
*/
protected String uid = UID_EDEFAULT;
/**
* This is true if the Uid attribute has been set.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
protected boolean uidESet;
/**
* The default value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getName()
* @generated
* @ordered
*/
protected static final String NAME_EDEFAULT = null;
/**
* The cached value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getName()
* @generated
* @ordered
*/
protected String name = NAME_EDEFAULT;
/**
* The cached value of the '{@link #getProperties() <em>Properties</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getProperties()
* @generated
* @ordered
*/
protected EList<Property> properties;
/**
* The cached value of the '{@link #getCalculatedVia() <em>Calculated Via</em>}' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getCalculatedVia()
* @generated
* @ordered
*/
protected EList<PropertyHolder> calculatedVia;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected CardinalityElementImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return PseimPackage.Literals.CARDINALITY_ELEMENT;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getUid() {
return uid;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean isSetUid() {
return uidESet;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getName() {
return name;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setName(String newName) {
String oldName = name;
name = newName;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, PseimPackage.CARDINALITY_ELEMENT__NAME, oldName,
name));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<Property> getProperties() {
if (properties == null) {
properties = new EObjectContainmentEList<Property>(Property.class, this,
PseimPackage.CARDINALITY_ELEMENT__PROPERTIES);
}
return properties;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<PropertyHolder> getCalculatedVia() {
if (calculatedVia == null) {
calculatedVia = new EObjectResolvingEList<PropertyHolder>(PropertyHolder.class, this,
PseimPackage.CARDINALITY_ELEMENT__CALCULATED_VIA);
}
return calculatedVia;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case PseimPackage.CARDINALITY_ELEMENT__PROPERTIES:
return ((InternalEList<?>) getProperties()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case PseimPackage.CARDINALITY_ELEMENT__UID:
return getUid();
case PseimPackage.CARDINALITY_ELEMENT__NAME:
return getName();
case PseimPackage.CARDINALITY_ELEMENT__PROPERTIES:
return getProperties();
case PseimPackage.CARDINALITY_ELEMENT__CALCULATED_VIA:
return getCalculatedVia();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case PseimPackage.CARDINALITY_ELEMENT__NAME:
setName((String) newValue);
return;
case PseimPackage.CARDINALITY_ELEMENT__PROPERTIES:
getProperties().clear();
getProperties().addAll((Collection<? extends Property>) newValue);
return;
case PseimPackage.CARDINALITY_ELEMENT__CALCULATED_VIA:
getCalculatedVia().clear();
getCalculatedVia().addAll((Collection<? extends PropertyHolder>) newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case PseimPackage.CARDINALITY_ELEMENT__NAME:
setName(NAME_EDEFAULT);
return;
case PseimPackage.CARDINALITY_ELEMENT__PROPERTIES:
getProperties().clear();
return;
case PseimPackage.CARDINALITY_ELEMENT__CALCULATED_VIA:
getCalculatedVia().clear();
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case PseimPackage.CARDINALITY_ELEMENT__UID:
return isSetUid();
case PseimPackage.CARDINALITY_ELEMENT__NAME:
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
case PseimPackage.CARDINALITY_ELEMENT__PROPERTIES:
return properties != null && !properties.isEmpty();
case PseimPackage.CARDINALITY_ELEMENT__CALCULATED_VIA:
return calculatedVia != null && !calculatedVia.isEmpty();
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
if (eIsProxy())
return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (uid: ");
if (uidESet)
result.append(uid);
else
result.append("<unset>");
result.append(", name: ");
result.append(name);
result.append(')');
return result.toString();
}
} //CardinalityElementImpl

View File

@@ -0,0 +1,290 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.pseim.impl;
import com.irtsaintexupery.pseim.pseim.Library;
import com.irtsaintexupery.pseim.pseim.Pattern;
import com.irtsaintexupery.pseim.pseim.PseimPackage;
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.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Library</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link com.irtsaintexupery.pseim.pseim.impl.LibraryImpl#getUid <em>Uid</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.pseim.impl.LibraryImpl#getName <em>Name</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.pseim.impl.LibraryImpl#getPatterns <em>Patterns</em>}</li>
* </ul>
*
* @generated
*/
public class LibraryImpl extends MinimalEObjectImpl.Container implements Library {
/**
* The default value of the '{@link #getUid() <em>Uid</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getUid()
* @generated
* @ordered
*/
protected static final String UID_EDEFAULT = null;
/**
* The cached value of the '{@link #getUid() <em>Uid</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getUid()
* @generated
* @ordered
*/
protected String uid = UID_EDEFAULT;
/**
* This is true if the Uid attribute has been set.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
protected boolean uidESet;
/**
* The default value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getName()
* @generated
* @ordered
*/
protected static final String NAME_EDEFAULT = null;
/**
* The cached value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getName()
* @generated
* @ordered
*/
protected String name = NAME_EDEFAULT;
/**
* The cached value of the '{@link #getPatterns() <em>Patterns</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getPatterns()
* @generated
* @ordered
*/
protected EList<Pattern> patterns;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected LibraryImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return PseimPackage.Literals.LIBRARY;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getUid() {
return uid;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean isSetUid() {
return uidESet;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getName() {
return name;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setName(String newName) {
String oldName = name;
name = newName;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, PseimPackage.LIBRARY__NAME, oldName, name));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<Pattern> getPatterns() {
if (patterns == null) {
patterns = new EObjectContainmentEList<Pattern>(Pattern.class, this, PseimPackage.LIBRARY__PATTERNS);
}
return patterns;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case PseimPackage.LIBRARY__PATTERNS:
return ((InternalEList<?>) getPatterns()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case PseimPackage.LIBRARY__UID:
return getUid();
case PseimPackage.LIBRARY__NAME:
return getName();
case PseimPackage.LIBRARY__PATTERNS:
return getPatterns();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case PseimPackage.LIBRARY__NAME:
setName((String) newValue);
return;
case PseimPackage.LIBRARY__PATTERNS:
getPatterns().clear();
getPatterns().addAll((Collection<? extends Pattern>) newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case PseimPackage.LIBRARY__NAME:
setName(NAME_EDEFAULT);
return;
case PseimPackage.LIBRARY__PATTERNS:
getPatterns().clear();
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case PseimPackage.LIBRARY__UID:
return isSetUid();
case PseimPackage.LIBRARY__NAME:
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
case PseimPackage.LIBRARY__PATTERNS:
return patterns != null && !patterns.isEmpty();
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
if (eIsProxy())
return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (uid: ");
if (uidESet)
result.append(uid);
else
result.append("<unset>");
result.append(", name: ");
result.append(name);
result.append(')');
return result.toString();
}
} //LibraryImpl

View File

@@ -0,0 +1,698 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.pseim.impl;
import com.irtsaintexupery.pseim.pseim.CardinalityElement;
import com.irtsaintexupery.pseim.pseim.IdentifiedElement;
import com.irtsaintexupery.pseim.pseim.PatternComponent;
import com.irtsaintexupery.pseim.pseim.PseimPackage;
import com.irtsaintexupery.pseim.seim.Component;
import com.irtsaintexupery.pseim.seim.Element;
import com.irtsaintexupery.pseim.seim.GraphElement;
import com.irtsaintexupery.pseim.seim.NamedElement;
import com.irtsaintexupery.pseim.seim.Property;
import com.irtsaintexupery.pseim.seim.PropertyHolder;
import com.irtsaintexupery.pseim.seim.SeimPackage;
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.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Pattern Component</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link com.irtsaintexupery.pseim.pseim.impl.PatternComponentImpl#getMultiplicityValue <em>Multiplicity Value</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.pseim.impl.PatternComponentImpl#getCardinalityElement <em>Cardinality Element</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.pseim.impl.PatternComponentImpl#getIdentifiedAs <em>Identified As</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.pseim.impl.PatternComponentImpl#getUid <em>Uid</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.pseim.impl.PatternComponentImpl#getName <em>Name</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.pseim.impl.PatternComponentImpl#getProperties <em>Properties</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.pseim.impl.PatternComponentImpl#getContent <em>Content</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.pseim.impl.PatternComponentImpl#isMergeContent <em>Merge Content</em>}</li>
* </ul>
*
* @generated
*/
public class PatternComponentImpl extends MinimalEObjectImpl.Container implements PatternComponent {
/**
* The default value of the '{@link #getMultiplicityValue() <em>Multiplicity Value</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getMultiplicityValue()
* @generated
* @ordered
*/
protected static final int MULTIPLICITY_VALUE_EDEFAULT = 1;
/**
* The cached value of the '{@link #getMultiplicityValue() <em>Multiplicity Value</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getMultiplicityValue()
* @generated
* @ordered
*/
protected int multiplicityValue = MULTIPLICITY_VALUE_EDEFAULT;
/**
* The cached value of the '{@link #getCardinalityElement() <em>Cardinality Element</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getCardinalityElement()
* @generated
* @ordered
*/
protected CardinalityElement cardinalityElement;
/**
* The cached value of the '{@link #getIdentifiedAs() <em>Identified As</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getIdentifiedAs()
* @generated
* @ordered
*/
protected PropertyHolder identifiedAs;
/**
* The default value of the '{@link #getUid() <em>Uid</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getUid()
* @generated
* @ordered
*/
protected static final String UID_EDEFAULT = null;
/**
* The cached value of the '{@link #getUid() <em>Uid</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getUid()
* @generated
* @ordered
*/
protected String uid = UID_EDEFAULT;
/**
* This is true if the Uid attribute has been set.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
protected boolean uidESet;
/**
* The default value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getName()
* @generated
* @ordered
*/
protected static final String NAME_EDEFAULT = null;
/**
* The cached value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getName()
* @generated
* @ordered
*/
protected String name = NAME_EDEFAULT;
/**
* The cached value of the '{@link #getProperties() <em>Properties</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getProperties()
* @generated
* @ordered
*/
protected EList<Property> properties;
/**
* The cached value of the '{@link #getContent() <em>Content</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getContent()
* @generated
* @ordered
*/
protected EList<Element> content;
/**
* The default value of the '{@link #isMergeContent() <em>Merge Content</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #isMergeContent()
* @generated
* @ordered
*/
protected static final boolean MERGE_CONTENT_EDEFAULT = false;
/**
* The cached value of the '{@link #isMergeContent() <em>Merge Content</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #isMergeContent()
* @generated
* @ordered
*/
protected boolean mergeContent = MERGE_CONTENT_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected PatternComponentImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return PseimPackage.Literals.PATTERN_COMPONENT;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public int getMultiplicityValue() {
return multiplicityValue;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setMultiplicityValue(int newMultiplicityValue) {
int oldMultiplicityValue = multiplicityValue;
multiplicityValue = newMultiplicityValue;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, PseimPackage.PATTERN_COMPONENT__MULTIPLICITY_VALUE,
oldMultiplicityValue, multiplicityValue));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public CardinalityElement getCardinalityElement() {
if (cardinalityElement != null && cardinalityElement.eIsProxy()) {
InternalEObject oldCardinalityElement = (InternalEObject) cardinalityElement;
cardinalityElement = (CardinalityElement) eResolveProxy(oldCardinalityElement);
if (cardinalityElement != oldCardinalityElement) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE,
PseimPackage.PATTERN_COMPONENT__CARDINALITY_ELEMENT, oldCardinalityElement,
cardinalityElement));
}
}
return cardinalityElement;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public CardinalityElement basicGetCardinalityElement() {
return cardinalityElement;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setCardinalityElement(CardinalityElement newCardinalityElement) {
CardinalityElement oldCardinalityElement = cardinalityElement;
cardinalityElement = newCardinalityElement;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, PseimPackage.PATTERN_COMPONENT__CARDINALITY_ELEMENT,
oldCardinalityElement, cardinalityElement));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PropertyHolder getIdentifiedAs() {
if (identifiedAs != null && identifiedAs.eIsProxy()) {
InternalEObject oldIdentifiedAs = (InternalEObject) identifiedAs;
identifiedAs = (PropertyHolder) eResolveProxy(oldIdentifiedAs);
if (identifiedAs != oldIdentifiedAs) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE,
PseimPackage.PATTERN_COMPONENT__IDENTIFIED_AS, oldIdentifiedAs, identifiedAs));
}
}
return identifiedAs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PropertyHolder basicGetIdentifiedAs() {
return identifiedAs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setIdentifiedAs(PropertyHolder newIdentifiedAs) {
PropertyHolder oldIdentifiedAs = identifiedAs;
identifiedAs = newIdentifiedAs;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, PseimPackage.PATTERN_COMPONENT__IDENTIFIED_AS,
oldIdentifiedAs, identifiedAs));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getUid() {
return uid;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean isSetUid() {
return uidESet;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getName() {
return name;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setName(String newName) {
String oldName = name;
name = newName;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, PseimPackage.PATTERN_COMPONENT__NAME, oldName, name));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<Property> getProperties() {
if (properties == null) {
properties = new EObjectContainmentEList<Property>(Property.class, this,
PseimPackage.PATTERN_COMPONENT__PROPERTIES);
}
return properties;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<Element> getContent() {
if (content == null) {
content = new EObjectContainmentEList<Element>(Element.class, this,
PseimPackage.PATTERN_COMPONENT__CONTENT);
}
return content;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean isMergeContent() {
return mergeContent;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setMergeContent(boolean newMergeContent) {
boolean oldMergeContent = mergeContent;
mergeContent = newMergeContent;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, PseimPackage.PATTERN_COMPONENT__MERGE_CONTENT,
oldMergeContent, mergeContent));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case PseimPackage.PATTERN_COMPONENT__PROPERTIES:
return ((InternalEList<?>) getProperties()).basicRemove(otherEnd, msgs);
case PseimPackage.PATTERN_COMPONENT__CONTENT:
return ((InternalEList<?>) getContent()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case PseimPackage.PATTERN_COMPONENT__MULTIPLICITY_VALUE:
return getMultiplicityValue();
case PseimPackage.PATTERN_COMPONENT__CARDINALITY_ELEMENT:
if (resolve)
return getCardinalityElement();
return basicGetCardinalityElement();
case PseimPackage.PATTERN_COMPONENT__IDENTIFIED_AS:
if (resolve)
return getIdentifiedAs();
return basicGetIdentifiedAs();
case PseimPackage.PATTERN_COMPONENT__UID:
return getUid();
case PseimPackage.PATTERN_COMPONENT__NAME:
return getName();
case PseimPackage.PATTERN_COMPONENT__PROPERTIES:
return getProperties();
case PseimPackage.PATTERN_COMPONENT__CONTENT:
return getContent();
case PseimPackage.PATTERN_COMPONENT__MERGE_CONTENT:
return isMergeContent();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case PseimPackage.PATTERN_COMPONENT__MULTIPLICITY_VALUE:
setMultiplicityValue((Integer) newValue);
return;
case PseimPackage.PATTERN_COMPONENT__CARDINALITY_ELEMENT:
setCardinalityElement((CardinalityElement) newValue);
return;
case PseimPackage.PATTERN_COMPONENT__IDENTIFIED_AS:
setIdentifiedAs((PropertyHolder) newValue);
return;
case PseimPackage.PATTERN_COMPONENT__NAME:
setName((String) newValue);
return;
case PseimPackage.PATTERN_COMPONENT__PROPERTIES:
getProperties().clear();
getProperties().addAll((Collection<? extends Property>) newValue);
return;
case PseimPackage.PATTERN_COMPONENT__CONTENT:
getContent().clear();
getContent().addAll((Collection<? extends Element>) newValue);
return;
case PseimPackage.PATTERN_COMPONENT__MERGE_CONTENT:
setMergeContent((Boolean) newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case PseimPackage.PATTERN_COMPONENT__MULTIPLICITY_VALUE:
setMultiplicityValue(MULTIPLICITY_VALUE_EDEFAULT);
return;
case PseimPackage.PATTERN_COMPONENT__CARDINALITY_ELEMENT:
setCardinalityElement((CardinalityElement) null);
return;
case PseimPackage.PATTERN_COMPONENT__IDENTIFIED_AS:
setIdentifiedAs((PropertyHolder) null);
return;
case PseimPackage.PATTERN_COMPONENT__NAME:
setName(NAME_EDEFAULT);
return;
case PseimPackage.PATTERN_COMPONENT__PROPERTIES:
getProperties().clear();
return;
case PseimPackage.PATTERN_COMPONENT__CONTENT:
getContent().clear();
return;
case PseimPackage.PATTERN_COMPONENT__MERGE_CONTENT:
setMergeContent(MERGE_CONTENT_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case PseimPackage.PATTERN_COMPONENT__MULTIPLICITY_VALUE:
return multiplicityValue != MULTIPLICITY_VALUE_EDEFAULT;
case PseimPackage.PATTERN_COMPONENT__CARDINALITY_ELEMENT:
return cardinalityElement != null;
case PseimPackage.PATTERN_COMPONENT__IDENTIFIED_AS:
return identifiedAs != null;
case PseimPackage.PATTERN_COMPONENT__UID:
return isSetUid();
case PseimPackage.PATTERN_COMPONENT__NAME:
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
case PseimPackage.PATTERN_COMPONENT__PROPERTIES:
return properties != null && !properties.isEmpty();
case PseimPackage.PATTERN_COMPONENT__CONTENT:
return content != null && !content.isEmpty();
case PseimPackage.PATTERN_COMPONENT__MERGE_CONTENT:
return mergeContent != MERGE_CONTENT_EDEFAULT;
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
if (baseClass == IdentifiedElement.class) {
switch (derivedFeatureID) {
case PseimPackage.PATTERN_COMPONENT__IDENTIFIED_AS:
return PseimPackage.IDENTIFIED_ELEMENT__IDENTIFIED_AS;
default:
return -1;
}
}
if (baseClass == com.irtsaintexupery.pseim.seim.IdentifiedElement.class) {
switch (derivedFeatureID) {
case PseimPackage.PATTERN_COMPONENT__UID:
return SeimPackage.IDENTIFIED_ELEMENT__UID;
default:
return -1;
}
}
if (baseClass == NamedElement.class) {
switch (derivedFeatureID) {
case PseimPackage.PATTERN_COMPONENT__NAME:
return SeimPackage.NAMED_ELEMENT__NAME;
default:
return -1;
}
}
if (baseClass == PropertyHolder.class) {
switch (derivedFeatureID) {
case PseimPackage.PATTERN_COMPONENT__PROPERTIES:
return SeimPackage.PROPERTY_HOLDER__PROPERTIES;
default:
return -1;
}
}
if (baseClass == Element.class) {
switch (derivedFeatureID) {
default:
return -1;
}
}
if (baseClass == GraphElement.class) {
switch (derivedFeatureID) {
default:
return -1;
}
}
if (baseClass == Component.class) {
switch (derivedFeatureID) {
case PseimPackage.PATTERN_COMPONENT__CONTENT:
return SeimPackage.COMPONENT__CONTENT;
default:
return -1;
}
}
return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
if (baseClass == IdentifiedElement.class) {
switch (baseFeatureID) {
case PseimPackage.IDENTIFIED_ELEMENT__IDENTIFIED_AS:
return PseimPackage.PATTERN_COMPONENT__IDENTIFIED_AS;
default:
return -1;
}
}
if (baseClass == com.irtsaintexupery.pseim.seim.IdentifiedElement.class) {
switch (baseFeatureID) {
case SeimPackage.IDENTIFIED_ELEMENT__UID:
return PseimPackage.PATTERN_COMPONENT__UID;
default:
return -1;
}
}
if (baseClass == NamedElement.class) {
switch (baseFeatureID) {
case SeimPackage.NAMED_ELEMENT__NAME:
return PseimPackage.PATTERN_COMPONENT__NAME;
default:
return -1;
}
}
if (baseClass == PropertyHolder.class) {
switch (baseFeatureID) {
case SeimPackage.PROPERTY_HOLDER__PROPERTIES:
return PseimPackage.PATTERN_COMPONENT__PROPERTIES;
default:
return -1;
}
}
if (baseClass == Element.class) {
switch (baseFeatureID) {
default:
return -1;
}
}
if (baseClass == GraphElement.class) {
switch (baseFeatureID) {
default:
return -1;
}
}
if (baseClass == Component.class) {
switch (baseFeatureID) {
case SeimPackage.COMPONENT__CONTENT:
return PseimPackage.PATTERN_COMPONENT__CONTENT;
default:
return -1;
}
}
return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
if (eIsProxy())
return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (multiplicityValue: ");
result.append(multiplicityValue);
result.append(", uid: ");
if (uidESet)
result.append(uid);
else
result.append("<unset>");
result.append(", name: ");
result.append(name);
result.append(", mergeContent: ");
result.append(mergeContent);
result.append(')');
return result.toString();
}
} //PatternComponentImpl

View File

@@ -0,0 +1,550 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.pseim.impl;
import com.irtsaintexupery.pseim.pseim.CardinalityElement;
import com.irtsaintexupery.pseim.pseim.Pattern;
import com.irtsaintexupery.pseim.pseim.PatternTypeFailureMode;
import com.irtsaintexupery.pseim.pseim.PatternTypeHS;
import com.irtsaintexupery.pseim.pseim.PseimPackage;
import com.irtsaintexupery.pseim.pseim.SafetyTactic;
import com.irtsaintexupery.pseim.seim.PropertyHolder;
import com.irtsaintexupery.pseim.seim.impl.ModelImpl;
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.util.EDataTypeUniqueEList;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.EObjectResolvingEList;
import org.eclipse.emf.ecore.util.InternalEList;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Pattern</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link com.irtsaintexupery.pseim.pseim.impl.PatternImpl#getTypeHS <em>Type HS</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.pseim.impl.PatternImpl#getTypeFailure <em>Type Failure</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.pseim.impl.PatternImpl#getAlsoKnownAs <em>Also Known As</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.pseim.impl.PatternImpl#getUsedTactics <em>Used Tactics</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.pseim.impl.PatternImpl#getContext <em>Context</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.pseim.impl.PatternImpl#getDomain <em>Domain</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.pseim.impl.PatternImpl#isIsSingleChannel <em>Is Single Channel</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.pseim.impl.PatternImpl#getInterfaceElements <em>Interface Elements</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.pseim.impl.PatternImpl#getCardinalityElements <em>Cardinality Elements</em>}</li>
* </ul>
*
* @generated
*/
public class PatternImpl extends ModelImpl implements Pattern {
/**
* The cached value of the '{@link #getTypeHS() <em>Type HS</em>}' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getTypeHS()
* @generated
* @ordered
*/
protected EList<PatternTypeHS> typeHS;
/**
* The default value of the '{@link #getTypeFailure() <em>Type Failure</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getTypeFailure()
* @generated
* @ordered
*/
protected static final PatternTypeFailureMode TYPE_FAILURE_EDEFAULT = PatternTypeFailureMode.FAIL_SAFE;
/**
* The cached value of the '{@link #getTypeFailure() <em>Type Failure</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getTypeFailure()
* @generated
* @ordered
*/
protected PatternTypeFailureMode typeFailure = TYPE_FAILURE_EDEFAULT;
/**
* The cached value of the '{@link #getAlsoKnownAs() <em>Also Known As</em>}' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getAlsoKnownAs()
* @generated
* @ordered
*/
protected EList<String> alsoKnownAs;
/**
* The cached value of the '{@link #getUsedTactics() <em>Used Tactics</em>}' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getUsedTactics()
* @generated
* @ordered
*/
protected EList<SafetyTactic> usedTactics;
/**
* The default value of the '{@link #getContext() <em>Context</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getContext()
* @generated
* @ordered
*/
protected static final String CONTEXT_EDEFAULT = null;
/**
* The cached value of the '{@link #getContext() <em>Context</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getContext()
* @generated
* @ordered
*/
protected String context = CONTEXT_EDEFAULT;
/**
* The default value of the '{@link #getDomain() <em>Domain</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getDomain()
* @generated
* @ordered
*/
protected static final String DOMAIN_EDEFAULT = null;
/**
* The cached value of the '{@link #getDomain() <em>Domain</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getDomain()
* @generated
* @ordered
*/
protected String domain = DOMAIN_EDEFAULT;
/**
* The default value of the '{@link #isIsSingleChannel() <em>Is Single Channel</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #isIsSingleChannel()
* @generated
* @ordered
*/
protected static final boolean IS_SINGLE_CHANNEL_EDEFAULT = false;
/**
* The cached value of the '{@link #isIsSingleChannel() <em>Is Single Channel</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #isIsSingleChannel()
* @generated
* @ordered
*/
protected boolean isSingleChannel = IS_SINGLE_CHANNEL_EDEFAULT;
/**
* The cached value of the '{@link #getInterfaceElements() <em>Interface Elements</em>}' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getInterfaceElements()
* @generated
* @ordered
*/
protected EList<PropertyHolder> interfaceElements;
/**
* The cached value of the '{@link #getCardinalityElements() <em>Cardinality Elements</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getCardinalityElements()
* @generated
* @ordered
*/
protected EList<CardinalityElement> cardinalityElements;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected PatternImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return PseimPackage.Literals.PATTERN;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<PatternTypeHS> getTypeHS() {
if (typeHS == null) {
typeHS = new EDataTypeUniqueEList<PatternTypeHS>(PatternTypeHS.class, this, PseimPackage.PATTERN__TYPE_HS);
}
return typeHS;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PatternTypeFailureMode getTypeFailure() {
return typeFailure;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setTypeFailure(PatternTypeFailureMode newTypeFailure) {
PatternTypeFailureMode oldTypeFailure = typeFailure;
typeFailure = newTypeFailure == null ? TYPE_FAILURE_EDEFAULT : newTypeFailure;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, PseimPackage.PATTERN__TYPE_FAILURE, oldTypeFailure,
typeFailure));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<String> getAlsoKnownAs() {
if (alsoKnownAs == null) {
alsoKnownAs = new EDataTypeUniqueEList<String>(String.class, this, PseimPackage.PATTERN__ALSO_KNOWN_AS);
}
return alsoKnownAs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<SafetyTactic> getUsedTactics() {
if (usedTactics == null) {
usedTactics = new EDataTypeUniqueEList<SafetyTactic>(SafetyTactic.class, this,
PseimPackage.PATTERN__USED_TACTICS);
}
return usedTactics;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getContext() {
return context;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setContext(String newContext) {
String oldContext = context;
context = newContext;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, PseimPackage.PATTERN__CONTEXT, oldContext, context));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getDomain() {
return domain;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setDomain(String newDomain) {
String oldDomain = domain;
domain = newDomain;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, PseimPackage.PATTERN__DOMAIN, oldDomain, domain));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean isIsSingleChannel() {
return isSingleChannel;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setIsSingleChannel(boolean newIsSingleChannel) {
boolean oldIsSingleChannel = isSingleChannel;
isSingleChannel = newIsSingleChannel;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, PseimPackage.PATTERN__IS_SINGLE_CHANNEL,
oldIsSingleChannel, isSingleChannel));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<PropertyHolder> getInterfaceElements() {
if (interfaceElements == null) {
interfaceElements = new EObjectResolvingEList<PropertyHolder>(PropertyHolder.class, this,
PseimPackage.PATTERN__INTERFACE_ELEMENTS);
}
return interfaceElements;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<CardinalityElement> getCardinalityElements() {
if (cardinalityElements == null) {
cardinalityElements = new EObjectContainmentEList<CardinalityElement>(CardinalityElement.class, this,
PseimPackage.PATTERN__CARDINALITY_ELEMENTS);
}
return cardinalityElements;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case PseimPackage.PATTERN__CARDINALITY_ELEMENTS:
return ((InternalEList<?>) getCardinalityElements()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case PseimPackage.PATTERN__TYPE_HS:
return getTypeHS();
case PseimPackage.PATTERN__TYPE_FAILURE:
return getTypeFailure();
case PseimPackage.PATTERN__ALSO_KNOWN_AS:
return getAlsoKnownAs();
case PseimPackage.PATTERN__USED_TACTICS:
return getUsedTactics();
case PseimPackage.PATTERN__CONTEXT:
return getContext();
case PseimPackage.PATTERN__DOMAIN:
return getDomain();
case PseimPackage.PATTERN__IS_SINGLE_CHANNEL:
return isIsSingleChannel();
case PseimPackage.PATTERN__INTERFACE_ELEMENTS:
return getInterfaceElements();
case PseimPackage.PATTERN__CARDINALITY_ELEMENTS:
return getCardinalityElements();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case PseimPackage.PATTERN__TYPE_HS:
getTypeHS().clear();
getTypeHS().addAll((Collection<? extends PatternTypeHS>) newValue);
return;
case PseimPackage.PATTERN__TYPE_FAILURE:
setTypeFailure((PatternTypeFailureMode) newValue);
return;
case PseimPackage.PATTERN__ALSO_KNOWN_AS:
getAlsoKnownAs().clear();
getAlsoKnownAs().addAll((Collection<? extends String>) newValue);
return;
case PseimPackage.PATTERN__USED_TACTICS:
getUsedTactics().clear();
getUsedTactics().addAll((Collection<? extends SafetyTactic>) newValue);
return;
case PseimPackage.PATTERN__CONTEXT:
setContext((String) newValue);
return;
case PseimPackage.PATTERN__DOMAIN:
setDomain((String) newValue);
return;
case PseimPackage.PATTERN__IS_SINGLE_CHANNEL:
setIsSingleChannel((Boolean) newValue);
return;
case PseimPackage.PATTERN__INTERFACE_ELEMENTS:
getInterfaceElements().clear();
getInterfaceElements().addAll((Collection<? extends PropertyHolder>) newValue);
return;
case PseimPackage.PATTERN__CARDINALITY_ELEMENTS:
getCardinalityElements().clear();
getCardinalityElements().addAll((Collection<? extends CardinalityElement>) newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case PseimPackage.PATTERN__TYPE_HS:
getTypeHS().clear();
return;
case PseimPackage.PATTERN__TYPE_FAILURE:
setTypeFailure(TYPE_FAILURE_EDEFAULT);
return;
case PseimPackage.PATTERN__ALSO_KNOWN_AS:
getAlsoKnownAs().clear();
return;
case PseimPackage.PATTERN__USED_TACTICS:
getUsedTactics().clear();
return;
case PseimPackage.PATTERN__CONTEXT:
setContext(CONTEXT_EDEFAULT);
return;
case PseimPackage.PATTERN__DOMAIN:
setDomain(DOMAIN_EDEFAULT);
return;
case PseimPackage.PATTERN__IS_SINGLE_CHANNEL:
setIsSingleChannel(IS_SINGLE_CHANNEL_EDEFAULT);
return;
case PseimPackage.PATTERN__INTERFACE_ELEMENTS:
getInterfaceElements().clear();
return;
case PseimPackage.PATTERN__CARDINALITY_ELEMENTS:
getCardinalityElements().clear();
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case PseimPackage.PATTERN__TYPE_HS:
return typeHS != null && !typeHS.isEmpty();
case PseimPackage.PATTERN__TYPE_FAILURE:
return typeFailure != TYPE_FAILURE_EDEFAULT;
case PseimPackage.PATTERN__ALSO_KNOWN_AS:
return alsoKnownAs != null && !alsoKnownAs.isEmpty();
case PseimPackage.PATTERN__USED_TACTICS:
return usedTactics != null && !usedTactics.isEmpty();
case PseimPackage.PATTERN__CONTEXT:
return CONTEXT_EDEFAULT == null ? context != null : !CONTEXT_EDEFAULT.equals(context);
case PseimPackage.PATTERN__DOMAIN:
return DOMAIN_EDEFAULT == null ? domain != null : !DOMAIN_EDEFAULT.equals(domain);
case PseimPackage.PATTERN__IS_SINGLE_CHANNEL:
return isSingleChannel != IS_SINGLE_CHANNEL_EDEFAULT;
case PseimPackage.PATTERN__INTERFACE_ELEMENTS:
return interfaceElements != null && !interfaceElements.isEmpty();
case PseimPackage.PATTERN__CARDINALITY_ELEMENTS:
return cardinalityElements != null && !cardinalityElements.isEmpty();
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
if (eIsProxy())
return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (typeHS: ");
result.append(typeHS);
result.append(", typeFailure: ");
result.append(typeFailure);
result.append(", alsoKnownAs: ");
result.append(alsoKnownAs);
result.append(", usedTactics: ");
result.append(usedTactics);
result.append(", context: ");
result.append(context);
result.append(", domain: ");
result.append(domain);
result.append(", isSingleChannel: ");
result.append(isSingleChannel);
result.append(')');
return result.toString();
}
} //PatternImpl

View File

@@ -0,0 +1,719 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.pseim.impl;
import com.irtsaintexupery.pseim.pseim.CardinalityElement;
import com.irtsaintexupery.pseim.pseim.LinkType;
import com.irtsaintexupery.pseim.pseim.PatternLink;
import com.irtsaintexupery.pseim.pseim.PseimPackage;
import com.irtsaintexupery.pseim.seim.Element;
import com.irtsaintexupery.pseim.seim.GraphElement;
import com.irtsaintexupery.pseim.seim.IdentifiedElement;
import com.irtsaintexupery.pseim.seim.Link;
import com.irtsaintexupery.pseim.seim.NamedElement;
import com.irtsaintexupery.pseim.seim.Port;
import com.irtsaintexupery.pseim.seim.Property;
import com.irtsaintexupery.pseim.seim.PropertyHolder;
import com.irtsaintexupery.pseim.seim.SeimPackage;
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.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Pattern Link</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link com.irtsaintexupery.pseim.pseim.impl.PatternLinkImpl#getIdentifiedAs <em>Identified As</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.pseim.impl.PatternLinkImpl#getUid <em>Uid</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.pseim.impl.PatternLinkImpl#getName <em>Name</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.pseim.impl.PatternLinkImpl#getProperties <em>Properties</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.pseim.impl.PatternLinkImpl#getSrc <em>Src</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.pseim.impl.PatternLinkImpl#getDst <em>Dst</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.pseim.impl.PatternLinkImpl#getLinkType <em>Link Type</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.pseim.impl.PatternLinkImpl#getElement <em>Element</em>}</li>
* </ul>
*
* @generated
*/
public class PatternLinkImpl extends MinimalEObjectImpl.Container implements PatternLink {
/**
* The cached value of the '{@link #getIdentifiedAs() <em>Identified As</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getIdentifiedAs()
* @generated
* @ordered
*/
protected PropertyHolder identifiedAs;
/**
* The default value of the '{@link #getUid() <em>Uid</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getUid()
* @generated
* @ordered
*/
protected static final String UID_EDEFAULT = null;
/**
* The cached value of the '{@link #getUid() <em>Uid</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getUid()
* @generated
* @ordered
*/
protected String uid = UID_EDEFAULT;
/**
* This is true if the Uid attribute has been set.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
protected boolean uidESet;
/**
* The default value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getName()
* @generated
* @ordered
*/
protected static final String NAME_EDEFAULT = null;
/**
* The cached value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getName()
* @generated
* @ordered
*/
protected String name = NAME_EDEFAULT;
/**
* The cached value of the '{@link #getProperties() <em>Properties</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getProperties()
* @generated
* @ordered
*/
protected EList<Property> properties;
/**
* The cached value of the '{@link #getSrc() <em>Src</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getSrc()
* @generated
* @ordered
*/
protected Port src;
/**
* The cached value of the '{@link #getDst() <em>Dst</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getDst()
* @generated
* @ordered
*/
protected Port dst;
/**
* The default value of the '{@link #getLinkType() <em>Link Type</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getLinkType()
* @generated
* @ordered
*/
protected static final LinkType LINK_TYPE_EDEFAULT = LinkType.TRANSPOSE;
/**
* The cached value of the '{@link #getLinkType() <em>Link Type</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getLinkType()
* @generated
* @ordered
*/
protected LinkType linkType = LINK_TYPE_EDEFAULT;
/**
* The cached value of the '{@link #getElement() <em>Element</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getElement()
* @generated
* @ordered
*/
protected CardinalityElement element;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected PatternLinkImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return PseimPackage.Literals.PATTERN_LINK;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PropertyHolder getIdentifiedAs() {
if (identifiedAs != null && identifiedAs.eIsProxy()) {
InternalEObject oldIdentifiedAs = (InternalEObject) identifiedAs;
identifiedAs = (PropertyHolder) eResolveProxy(oldIdentifiedAs);
if (identifiedAs != oldIdentifiedAs) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, PseimPackage.PATTERN_LINK__IDENTIFIED_AS,
oldIdentifiedAs, identifiedAs));
}
}
return identifiedAs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PropertyHolder basicGetIdentifiedAs() {
return identifiedAs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setIdentifiedAs(PropertyHolder newIdentifiedAs) {
PropertyHolder oldIdentifiedAs = identifiedAs;
identifiedAs = newIdentifiedAs;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, PseimPackage.PATTERN_LINK__IDENTIFIED_AS,
oldIdentifiedAs, identifiedAs));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getUid() {
return uid;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean isSetUid() {
return uidESet;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getName() {
return name;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setName(String newName) {
String oldName = name;
name = newName;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, PseimPackage.PATTERN_LINK__NAME, oldName, name));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<Property> getProperties() {
if (properties == null) {
properties = new EObjectContainmentEList<Property>(Property.class, this,
PseimPackage.PATTERN_LINK__PROPERTIES);
}
return properties;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Port getSrc() {
if (src != null && src.eIsProxy()) {
InternalEObject oldSrc = (InternalEObject) src;
src = (Port) eResolveProxy(oldSrc);
if (src != oldSrc) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, PseimPackage.PATTERN_LINK__SRC, oldSrc,
src));
}
}
return src;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Port basicGetSrc() {
return src;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setSrc(Port newSrc) {
Port oldSrc = src;
src = newSrc;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, PseimPackage.PATTERN_LINK__SRC, oldSrc, src));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Port getDst() {
if (dst != null && dst.eIsProxy()) {
InternalEObject oldDst = (InternalEObject) dst;
dst = (Port) eResolveProxy(oldDst);
if (dst != oldDst) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, PseimPackage.PATTERN_LINK__DST, oldDst,
dst));
}
}
return dst;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Port basicGetDst() {
return dst;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setDst(Port newDst) {
Port oldDst = dst;
dst = newDst;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, PseimPackage.PATTERN_LINK__DST, oldDst, dst));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public LinkType getLinkType() {
return linkType;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setLinkType(LinkType newLinkType) {
LinkType oldLinkType = linkType;
linkType = newLinkType == null ? LINK_TYPE_EDEFAULT : newLinkType;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, PseimPackage.PATTERN_LINK__LINK_TYPE, oldLinkType,
linkType));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public CardinalityElement getElement() {
if (element != null && element.eIsProxy()) {
InternalEObject oldElement = (InternalEObject) element;
element = (CardinalityElement) eResolveProxy(oldElement);
if (element != oldElement) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, PseimPackage.PATTERN_LINK__ELEMENT,
oldElement, element));
}
}
return element;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public CardinalityElement basicGetElement() {
return element;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setElement(CardinalityElement newElement) {
CardinalityElement oldElement = element;
element = newElement;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, PseimPackage.PATTERN_LINK__ELEMENT, oldElement,
element));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case PseimPackage.PATTERN_LINK__PROPERTIES:
return ((InternalEList<?>) getProperties()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case PseimPackage.PATTERN_LINK__IDENTIFIED_AS:
if (resolve)
return getIdentifiedAs();
return basicGetIdentifiedAs();
case PseimPackage.PATTERN_LINK__UID:
return getUid();
case PseimPackage.PATTERN_LINK__NAME:
return getName();
case PseimPackage.PATTERN_LINK__PROPERTIES:
return getProperties();
case PseimPackage.PATTERN_LINK__SRC:
if (resolve)
return getSrc();
return basicGetSrc();
case PseimPackage.PATTERN_LINK__DST:
if (resolve)
return getDst();
return basicGetDst();
case PseimPackage.PATTERN_LINK__LINK_TYPE:
return getLinkType();
case PseimPackage.PATTERN_LINK__ELEMENT:
if (resolve)
return getElement();
return basicGetElement();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case PseimPackage.PATTERN_LINK__IDENTIFIED_AS:
setIdentifiedAs((PropertyHolder) newValue);
return;
case PseimPackage.PATTERN_LINK__NAME:
setName((String) newValue);
return;
case PseimPackage.PATTERN_LINK__PROPERTIES:
getProperties().clear();
getProperties().addAll((Collection<? extends Property>) newValue);
return;
case PseimPackage.PATTERN_LINK__SRC:
setSrc((Port) newValue);
return;
case PseimPackage.PATTERN_LINK__DST:
setDst((Port) newValue);
return;
case PseimPackage.PATTERN_LINK__LINK_TYPE:
setLinkType((LinkType) newValue);
return;
case PseimPackage.PATTERN_LINK__ELEMENT:
setElement((CardinalityElement) newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case PseimPackage.PATTERN_LINK__IDENTIFIED_AS:
setIdentifiedAs((PropertyHolder) null);
return;
case PseimPackage.PATTERN_LINK__NAME:
setName(NAME_EDEFAULT);
return;
case PseimPackage.PATTERN_LINK__PROPERTIES:
getProperties().clear();
return;
case PseimPackage.PATTERN_LINK__SRC:
setSrc((Port) null);
return;
case PseimPackage.PATTERN_LINK__DST:
setDst((Port) null);
return;
case PseimPackage.PATTERN_LINK__LINK_TYPE:
setLinkType(LINK_TYPE_EDEFAULT);
return;
case PseimPackage.PATTERN_LINK__ELEMENT:
setElement((CardinalityElement) null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case PseimPackage.PATTERN_LINK__IDENTIFIED_AS:
return identifiedAs != null;
case PseimPackage.PATTERN_LINK__UID:
return isSetUid();
case PseimPackage.PATTERN_LINK__NAME:
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
case PseimPackage.PATTERN_LINK__PROPERTIES:
return properties != null && !properties.isEmpty();
case PseimPackage.PATTERN_LINK__SRC:
return src != null;
case PseimPackage.PATTERN_LINK__DST:
return dst != null;
case PseimPackage.PATTERN_LINK__LINK_TYPE:
return linkType != LINK_TYPE_EDEFAULT;
case PseimPackage.PATTERN_LINK__ELEMENT:
return element != null;
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
if (baseClass == IdentifiedElement.class) {
switch (derivedFeatureID) {
case PseimPackage.PATTERN_LINK__UID:
return SeimPackage.IDENTIFIED_ELEMENT__UID;
default:
return -1;
}
}
if (baseClass == NamedElement.class) {
switch (derivedFeatureID) {
case PseimPackage.PATTERN_LINK__NAME:
return SeimPackage.NAMED_ELEMENT__NAME;
default:
return -1;
}
}
if (baseClass == PropertyHolder.class) {
switch (derivedFeatureID) {
case PseimPackage.PATTERN_LINK__PROPERTIES:
return SeimPackage.PROPERTY_HOLDER__PROPERTIES;
default:
return -1;
}
}
if (baseClass == Element.class) {
switch (derivedFeatureID) {
default:
return -1;
}
}
if (baseClass == GraphElement.class) {
switch (derivedFeatureID) {
default:
return -1;
}
}
if (baseClass == Link.class) {
switch (derivedFeatureID) {
case PseimPackage.PATTERN_LINK__SRC:
return SeimPackage.LINK__SRC;
case PseimPackage.PATTERN_LINK__DST:
return SeimPackage.LINK__DST;
default:
return -1;
}
}
return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
if (baseClass == IdentifiedElement.class) {
switch (baseFeatureID) {
case SeimPackage.IDENTIFIED_ELEMENT__UID:
return PseimPackage.PATTERN_LINK__UID;
default:
return -1;
}
}
if (baseClass == NamedElement.class) {
switch (baseFeatureID) {
case SeimPackage.NAMED_ELEMENT__NAME:
return PseimPackage.PATTERN_LINK__NAME;
default:
return -1;
}
}
if (baseClass == PropertyHolder.class) {
switch (baseFeatureID) {
case SeimPackage.PROPERTY_HOLDER__PROPERTIES:
return PseimPackage.PATTERN_LINK__PROPERTIES;
default:
return -1;
}
}
if (baseClass == Element.class) {
switch (baseFeatureID) {
default:
return -1;
}
}
if (baseClass == GraphElement.class) {
switch (baseFeatureID) {
default:
return -1;
}
}
if (baseClass == Link.class) {
switch (baseFeatureID) {
case SeimPackage.LINK__SRC:
return PseimPackage.PATTERN_LINK__SRC;
case SeimPackage.LINK__DST:
return PseimPackage.PATTERN_LINK__DST;
default:
return -1;
}
}
return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
if (eIsProxy())
return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (uid: ");
if (uidESet)
result.append(uid);
else
result.append("<unset>");
result.append(", name: ");
result.append(name);
result.append(", linkType: ");
result.append(linkType);
result.append(')');
return result.toString();
}
} //PatternLinkImpl

View File

@@ -0,0 +1,716 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.pseim.impl;
import com.irtsaintexupery.pseim.pseim.CardinalityElement;
import com.irtsaintexupery.pseim.pseim.IdentifiedElement;
import com.irtsaintexupery.pseim.pseim.PatternPort;
import com.irtsaintexupery.pseim.pseim.PatternPortDirection;
import com.irtsaintexupery.pseim.pseim.PseimPackage;
import com.irtsaintexupery.pseim.seim.BorderElement;
import com.irtsaintexupery.pseim.seim.Element;
import com.irtsaintexupery.pseim.seim.NamedElement;
import com.irtsaintexupery.pseim.seim.Port;
import com.irtsaintexupery.pseim.seim.PortDirection;
import com.irtsaintexupery.pseim.seim.Property;
import com.irtsaintexupery.pseim.seim.PropertyHolder;
import com.irtsaintexupery.pseim.seim.SeimPackage;
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.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Pattern Port</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link com.irtsaintexupery.pseim.pseim.impl.PatternPortImpl#getMultiplicityValue <em>Multiplicity Value</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.pseim.impl.PatternPortImpl#getCardinalityElement <em>Cardinality Element</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.pseim.impl.PatternPortImpl#getIdentifiedAs <em>Identified As</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.pseim.impl.PatternPortImpl#getUid <em>Uid</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.pseim.impl.PatternPortImpl#getName <em>Name</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.pseim.impl.PatternPortImpl#getProperties <em>Properties</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.pseim.impl.PatternPortImpl#getDirection <em>Direction</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.pseim.impl.PatternPortImpl#getDir <em>Dir</em>}</li>
* </ul>
*
* @generated
*/
public class PatternPortImpl extends MinimalEObjectImpl.Container implements PatternPort {
/**
* The default value of the '{@link #getMultiplicityValue() <em>Multiplicity Value</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getMultiplicityValue()
* @generated
* @ordered
*/
protected static final int MULTIPLICITY_VALUE_EDEFAULT = 1;
/**
* The cached value of the '{@link #getMultiplicityValue() <em>Multiplicity Value</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getMultiplicityValue()
* @generated
* @ordered
*/
protected int multiplicityValue = MULTIPLICITY_VALUE_EDEFAULT;
/**
* The cached value of the '{@link #getCardinalityElement() <em>Cardinality Element</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getCardinalityElement()
* @generated
* @ordered
*/
protected CardinalityElement cardinalityElement;
/**
* The cached value of the '{@link #getIdentifiedAs() <em>Identified As</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getIdentifiedAs()
* @generated
* @ordered
*/
protected PropertyHolder identifiedAs;
/**
* The default value of the '{@link #getUid() <em>Uid</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getUid()
* @generated
* @ordered
*/
protected static final String UID_EDEFAULT = null;
/**
* The cached value of the '{@link #getUid() <em>Uid</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getUid()
* @generated
* @ordered
*/
protected String uid = UID_EDEFAULT;
/**
* This is true if the Uid attribute has been set.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
protected boolean uidESet;
/**
* The default value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getName()
* @generated
* @ordered
*/
protected static final String NAME_EDEFAULT = null;
/**
* The cached value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getName()
* @generated
* @ordered
*/
protected String name = NAME_EDEFAULT;
/**
* The cached value of the '{@link #getProperties() <em>Properties</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getProperties()
* @generated
* @ordered
*/
protected EList<Property> properties;
/**
* The default value of the '{@link #getDirection() <em>Direction</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getDirection()
* @generated
* @ordered
*/
protected static final PortDirection DIRECTION_EDEFAULT = PortDirection.UNSPECIFIED;
/**
* The cached value of the '{@link #getDirection() <em>Direction</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getDirection()
* @generated
* @ordered
*/
protected PortDirection direction = DIRECTION_EDEFAULT;
/**
* The default value of the '{@link #getDir() <em>Dir</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getDir()
* @generated
* @ordered
*/
protected static final PatternPortDirection DIR_EDEFAULT = PatternPortDirection.UNSPECIFIED;
/**
* The cached value of the '{@link #getDir() <em>Dir</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getDir()
* @generated
* @ordered
*/
protected PatternPortDirection dir = DIR_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected PatternPortImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return PseimPackage.Literals.PATTERN_PORT;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public int getMultiplicityValue() {
return multiplicityValue;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setMultiplicityValue(int newMultiplicityValue) {
int oldMultiplicityValue = multiplicityValue;
multiplicityValue = newMultiplicityValue;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, PseimPackage.PATTERN_PORT__MULTIPLICITY_VALUE,
oldMultiplicityValue, multiplicityValue));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public CardinalityElement getCardinalityElement() {
if (cardinalityElement != null && cardinalityElement.eIsProxy()) {
InternalEObject oldCardinalityElement = (InternalEObject) cardinalityElement;
cardinalityElement = (CardinalityElement) eResolveProxy(oldCardinalityElement);
if (cardinalityElement != oldCardinalityElement) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE,
PseimPackage.PATTERN_PORT__CARDINALITY_ELEMENT, oldCardinalityElement, cardinalityElement));
}
}
return cardinalityElement;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public CardinalityElement basicGetCardinalityElement() {
return cardinalityElement;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setCardinalityElement(CardinalityElement newCardinalityElement) {
CardinalityElement oldCardinalityElement = cardinalityElement;
cardinalityElement = newCardinalityElement;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, PseimPackage.PATTERN_PORT__CARDINALITY_ELEMENT,
oldCardinalityElement, cardinalityElement));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PropertyHolder getIdentifiedAs() {
if (identifiedAs != null && identifiedAs.eIsProxy()) {
InternalEObject oldIdentifiedAs = (InternalEObject) identifiedAs;
identifiedAs = (PropertyHolder) eResolveProxy(oldIdentifiedAs);
if (identifiedAs != oldIdentifiedAs) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, PseimPackage.PATTERN_PORT__IDENTIFIED_AS,
oldIdentifiedAs, identifiedAs));
}
}
return identifiedAs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PropertyHolder basicGetIdentifiedAs() {
return identifiedAs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setIdentifiedAs(PropertyHolder newIdentifiedAs) {
PropertyHolder oldIdentifiedAs = identifiedAs;
identifiedAs = newIdentifiedAs;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, PseimPackage.PATTERN_PORT__IDENTIFIED_AS,
oldIdentifiedAs, identifiedAs));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getUid() {
return uid;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean isSetUid() {
return uidESet;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getName() {
return name;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setName(String newName) {
String oldName = name;
name = newName;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, PseimPackage.PATTERN_PORT__NAME, oldName, name));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<Property> getProperties() {
if (properties == null) {
properties = new EObjectContainmentEList<Property>(Property.class, this,
PseimPackage.PATTERN_PORT__PROPERTIES);
}
return properties;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PortDirection getDirection() {
return direction;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setDirection(PortDirection newDirection) {
PortDirection oldDirection = direction;
direction = newDirection == null ? DIRECTION_EDEFAULT : newDirection;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, PseimPackage.PATTERN_PORT__DIRECTION, oldDirection,
direction));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PatternPortDirection getDir() {
return dir;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setDir(PatternPortDirection newDir) {
PatternPortDirection oldDir = dir;
dir = newDir == null ? DIR_EDEFAULT : newDir;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, PseimPackage.PATTERN_PORT__DIR, oldDir, dir));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case PseimPackage.PATTERN_PORT__PROPERTIES:
return ((InternalEList<?>) getProperties()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case PseimPackage.PATTERN_PORT__MULTIPLICITY_VALUE:
return getMultiplicityValue();
case PseimPackage.PATTERN_PORT__CARDINALITY_ELEMENT:
if (resolve)
return getCardinalityElement();
return basicGetCardinalityElement();
case PseimPackage.PATTERN_PORT__IDENTIFIED_AS:
if (resolve)
return getIdentifiedAs();
return basicGetIdentifiedAs();
case PseimPackage.PATTERN_PORT__UID:
return getUid();
case PseimPackage.PATTERN_PORT__NAME:
return getName();
case PseimPackage.PATTERN_PORT__PROPERTIES:
return getProperties();
case PseimPackage.PATTERN_PORT__DIRECTION:
return getDirection();
case PseimPackage.PATTERN_PORT__DIR:
return getDir();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case PseimPackage.PATTERN_PORT__MULTIPLICITY_VALUE:
setMultiplicityValue((Integer) newValue);
return;
case PseimPackage.PATTERN_PORT__CARDINALITY_ELEMENT:
setCardinalityElement((CardinalityElement) newValue);
return;
case PseimPackage.PATTERN_PORT__IDENTIFIED_AS:
setIdentifiedAs((PropertyHolder) newValue);
return;
case PseimPackage.PATTERN_PORT__NAME:
setName((String) newValue);
return;
case PseimPackage.PATTERN_PORT__PROPERTIES:
getProperties().clear();
getProperties().addAll((Collection<? extends Property>) newValue);
return;
case PseimPackage.PATTERN_PORT__DIRECTION:
setDirection((PortDirection) newValue);
return;
case PseimPackage.PATTERN_PORT__DIR:
setDir((PatternPortDirection) newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case PseimPackage.PATTERN_PORT__MULTIPLICITY_VALUE:
setMultiplicityValue(MULTIPLICITY_VALUE_EDEFAULT);
return;
case PseimPackage.PATTERN_PORT__CARDINALITY_ELEMENT:
setCardinalityElement((CardinalityElement) null);
return;
case PseimPackage.PATTERN_PORT__IDENTIFIED_AS:
setIdentifiedAs((PropertyHolder) null);
return;
case PseimPackage.PATTERN_PORT__NAME:
setName(NAME_EDEFAULT);
return;
case PseimPackage.PATTERN_PORT__PROPERTIES:
getProperties().clear();
return;
case PseimPackage.PATTERN_PORT__DIRECTION:
setDirection(DIRECTION_EDEFAULT);
return;
case PseimPackage.PATTERN_PORT__DIR:
setDir(DIR_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case PseimPackage.PATTERN_PORT__MULTIPLICITY_VALUE:
return multiplicityValue != MULTIPLICITY_VALUE_EDEFAULT;
case PseimPackage.PATTERN_PORT__CARDINALITY_ELEMENT:
return cardinalityElement != null;
case PseimPackage.PATTERN_PORT__IDENTIFIED_AS:
return identifiedAs != null;
case PseimPackage.PATTERN_PORT__UID:
return isSetUid();
case PseimPackage.PATTERN_PORT__NAME:
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
case PseimPackage.PATTERN_PORT__PROPERTIES:
return properties != null && !properties.isEmpty();
case PseimPackage.PATTERN_PORT__DIRECTION:
return direction != DIRECTION_EDEFAULT;
case PseimPackage.PATTERN_PORT__DIR:
return dir != DIR_EDEFAULT;
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
if (baseClass == IdentifiedElement.class) {
switch (derivedFeatureID) {
case PseimPackage.PATTERN_PORT__IDENTIFIED_AS:
return PseimPackage.IDENTIFIED_ELEMENT__IDENTIFIED_AS;
default:
return -1;
}
}
if (baseClass == com.irtsaintexupery.pseim.seim.IdentifiedElement.class) {
switch (derivedFeatureID) {
case PseimPackage.PATTERN_PORT__UID:
return SeimPackage.IDENTIFIED_ELEMENT__UID;
default:
return -1;
}
}
if (baseClass == NamedElement.class) {
switch (derivedFeatureID) {
case PseimPackage.PATTERN_PORT__NAME:
return SeimPackage.NAMED_ELEMENT__NAME;
default:
return -1;
}
}
if (baseClass == PropertyHolder.class) {
switch (derivedFeatureID) {
case PseimPackage.PATTERN_PORT__PROPERTIES:
return SeimPackage.PROPERTY_HOLDER__PROPERTIES;
default:
return -1;
}
}
if (baseClass == Element.class) {
switch (derivedFeatureID) {
default:
return -1;
}
}
if (baseClass == BorderElement.class) {
switch (derivedFeatureID) {
default:
return -1;
}
}
if (baseClass == Port.class) {
switch (derivedFeatureID) {
case PseimPackage.PATTERN_PORT__DIRECTION:
return SeimPackage.PORT__DIRECTION;
default:
return -1;
}
}
return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
if (baseClass == IdentifiedElement.class) {
switch (baseFeatureID) {
case PseimPackage.IDENTIFIED_ELEMENT__IDENTIFIED_AS:
return PseimPackage.PATTERN_PORT__IDENTIFIED_AS;
default:
return -1;
}
}
if (baseClass == com.irtsaintexupery.pseim.seim.IdentifiedElement.class) {
switch (baseFeatureID) {
case SeimPackage.IDENTIFIED_ELEMENT__UID:
return PseimPackage.PATTERN_PORT__UID;
default:
return -1;
}
}
if (baseClass == NamedElement.class) {
switch (baseFeatureID) {
case SeimPackage.NAMED_ELEMENT__NAME:
return PseimPackage.PATTERN_PORT__NAME;
default:
return -1;
}
}
if (baseClass == PropertyHolder.class) {
switch (baseFeatureID) {
case SeimPackage.PROPERTY_HOLDER__PROPERTIES:
return PseimPackage.PATTERN_PORT__PROPERTIES;
default:
return -1;
}
}
if (baseClass == Element.class) {
switch (baseFeatureID) {
default:
return -1;
}
}
if (baseClass == BorderElement.class) {
switch (baseFeatureID) {
default:
return -1;
}
}
if (baseClass == Port.class) {
switch (baseFeatureID) {
case SeimPackage.PORT__DIRECTION:
return PseimPackage.PATTERN_PORT__DIRECTION;
default:
return -1;
}
}
return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
if (eIsProxy())
return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (multiplicityValue: ");
result.append(multiplicityValue);
result.append(", uid: ");
if (uidESet)
result.append(uid);
else
result.append("<unset>");
result.append(", name: ");
result.append(name);
result.append(", direction: ");
result.append(direction);
result.append(", dir: ");
result.append(dir);
result.append(')');
return result.toString();
}
} //PatternPortImpl

View File

@@ -0,0 +1,329 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.pseim.impl;
import com.irtsaintexupery.pseim.pseim.*;
import com.irtsaintexupery.pseim.seim.Model;
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;
import org.eclipse.emf.ecore.util.EcoreUtil;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Factory</b>.
* <!-- end-user-doc -->
* @generated
*/
public class PseimFactoryImpl extends EFactoryImpl implements PseimFactory {
/**
* Creates the default factory implementation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static PseimFactory init() {
try {
PseimFactory thePseimFactory = (PseimFactory) EPackage.Registry.INSTANCE.getEFactory(PseimPackage.eNS_URI);
if (thePseimFactory != null) {
return thePseimFactory;
}
} catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new PseimFactoryImpl();
}
/**
* Creates an instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PseimFactoryImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
case PseimPackage.LIBRARY:
return createLibrary();
case PseimPackage.PATTERN:
return createPattern();
case PseimPackage.CARDINALITY_ELEMENT:
return createCardinalityElement();
case PseimPackage.PATTERN_COMPONENT:
return createPatternComponent();
case PseimPackage.PATTERN_PORT:
return createPatternPort();
case PseimPackage.PATTERN_LINK:
return createPatternLink();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object createFromString(EDataType eDataType, String initialValue) {
switch (eDataType.getClassifierID()) {
case PseimPackage.PATTERN_TYPE_HS:
return createPatternTypeHSFromString(eDataType, initialValue);
case PseimPackage.PATTERN_TYPE_FAILURE_MODE:
return createPatternTypeFailureModeFromString(eDataType, initialValue);
case PseimPackage.SAFETY_TACTIC:
return createSafetyTacticFromString(eDataType, initialValue);
case PseimPackage.LINK_TYPE:
return createLinkTypeFromString(eDataType, initialValue);
case PseimPackage.PATTERN_PORT_DIRECTION:
return createPatternPortDirectionFromString(eDataType, initialValue);
default:
throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String convertToString(EDataType eDataType, Object instanceValue) {
switch (eDataType.getClassifierID()) {
case PseimPackage.PATTERN_TYPE_HS:
return convertPatternTypeHSToString(eDataType, instanceValue);
case PseimPackage.PATTERN_TYPE_FAILURE_MODE:
return convertPatternTypeFailureModeToString(eDataType, instanceValue);
case PseimPackage.SAFETY_TACTIC:
return convertSafetyTacticToString(eDataType, instanceValue);
case PseimPackage.LINK_TYPE:
return convertLinkTypeToString(eDataType, instanceValue);
case PseimPackage.PATTERN_PORT_DIRECTION:
return convertPatternPortDirectionToString(eDataType, instanceValue);
default:
throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
public Library createLibrary() {
LibraryImpl library = new LibraryImpl();
library.uid = EcoreUtil.generateUUID();
return library;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Pattern createPattern() {
PatternImpl pattern = new PatternImpl();
return pattern;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
public CardinalityElement createCardinalityElement() {
CardinalityElementImpl cardinalityElement = new CardinalityElementImpl();
cardinalityElement.uid = EcoreUtil.generateUUID();
return cardinalityElement;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
public PatternComponent createPatternComponent() {
PatternComponentImpl patternComponent = new PatternComponentImpl();
patternComponent.uid = EcoreUtil.generateUUID();
return patternComponent;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
public PatternPort createPatternPort() {
PatternPortImpl patternPort = new PatternPortImpl();
patternPort.uid = EcoreUtil.generateUUID();
return patternPort;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
public PatternLink createPatternLink() {
PatternLinkImpl patternLink = new PatternLinkImpl();
patternLink.uid = EcoreUtil.generateUUID();
return patternLink;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PatternTypeHS createPatternTypeHSFromString(EDataType eDataType, String initialValue) {
PatternTypeHS result = PatternTypeHS.get(initialValue);
if (result == null)
throw new IllegalArgumentException(
"The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
return result;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String convertPatternTypeHSToString(EDataType eDataType, Object instanceValue) {
return instanceValue == null ? null : instanceValue.toString();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PatternTypeFailureMode createPatternTypeFailureModeFromString(EDataType eDataType, String initialValue) {
PatternTypeFailureMode result = PatternTypeFailureMode.get(initialValue);
if (result == null)
throw new IllegalArgumentException(
"The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
return result;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String convertPatternTypeFailureModeToString(EDataType eDataType, Object instanceValue) {
return instanceValue == null ? null : instanceValue.toString();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public SafetyTactic createSafetyTacticFromString(EDataType eDataType, String initialValue) {
SafetyTactic result = SafetyTactic.get(initialValue);
if (result == null)
throw new IllegalArgumentException(
"The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
return result;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String convertSafetyTacticToString(EDataType eDataType, Object instanceValue) {
return instanceValue == null ? null : instanceValue.toString();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public LinkType createLinkTypeFromString(EDataType eDataType, String initialValue) {
LinkType result = LinkType.get(initialValue);
if (result == null)
throw new IllegalArgumentException(
"The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
return result;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String convertLinkTypeToString(EDataType eDataType, Object instanceValue) {
return instanceValue == null ? null : instanceValue.toString();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PatternPortDirection createPatternPortDirectionFromString(EDataType eDataType, String initialValue) {
PatternPortDirection result = PatternPortDirection.get(initialValue);
if (result == null)
throw new IllegalArgumentException(
"The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
return result;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String convertPatternPortDirectionToString(EDataType eDataType, Object instanceValue) {
return instanceValue == null ? null : instanceValue.toString();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PseimPackage getPseimPackage() {
return (PseimPackage) getEPackage();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @deprecated
* @generated
*/
@Deprecated
public static PseimPackage getPackage() {
return PseimPackage.eINSTANCE;
}
} //PseimFactoryImpl

View File

@@ -0,0 +1,789 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.pseim.impl;
import com.irtsaintexupery.pseim.pseim.CardinalityElement;
import com.irtsaintexupery.pseim.pseim.IdentifiedElement;
import com.irtsaintexupery.pseim.pseim.Library;
import com.irtsaintexupery.pseim.pseim.LinkType;
import com.irtsaintexupery.pseim.pseim.MultiplicityElement;
import com.irtsaintexupery.pseim.pseim.Pattern;
import com.irtsaintexupery.pseim.pseim.PatternComponent;
import com.irtsaintexupery.pseim.pseim.PatternLink;
import com.irtsaintexupery.pseim.pseim.PatternPort;
import com.irtsaintexupery.pseim.pseim.PatternPortDirection;
import com.irtsaintexupery.pseim.pseim.PatternTypeFailureMode;
import com.irtsaintexupery.pseim.pseim.PatternTypeHS;
import com.irtsaintexupery.pseim.pseim.PseimFactory;
import com.irtsaintexupery.pseim.pseim.PseimPackage;
import com.irtsaintexupery.pseim.pseim.SafetyTactic;
import com.irtsaintexupery.pseim.pseim.util.PseimValidator;
import com.irtsaintexupery.pseim.seim.SeimPackage;
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.EValidator;
import org.eclipse.emf.ecore.impl.EPackageImpl;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Package</b>.
* <!-- end-user-doc -->
* @generated
*/
public class PseimPackageImpl extends EPackageImpl implements PseimPackage {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass libraryEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass patternEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass cardinalityElementEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass patternComponentEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass patternPortEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass patternLinkEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass multiplicityElementEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass identifiedElementEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EEnum patternTypeHSEEnum = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EEnum patternTypeFailureModeEEnum = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EEnum safetyTacticEEnum = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EEnum linkTypeEEnum = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EEnum patternPortDirectionEEnum = null;
/**
* Creates an instance of the model <b>Package</b>, registered with
* {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
* package URI value.
* <p>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.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.emf.ecore.EPackage.Registry
* @see com.irtsaintexupery.pseim.pseim.PseimPackage#eNS_URI
* @see #init()
* @generated
*/
private PseimPackageImpl() {
super(eNS_URI, PseimFactory.eINSTANCE);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static boolean isInited = false;
/**
* Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
*
* <p>This method is used to initialize {@link PseimPackage#eINSTANCE} when that field is accessed.
* Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #eNS_URI
* @see #createPackageContents()
* @see #initializePackageContents()
* @generated
*/
public static PseimPackage init() {
if (isInited)
return (PseimPackage) EPackage.Registry.INSTANCE.getEPackage(PseimPackage.eNS_URI);
// Obtain or create and register package
PseimPackageImpl thePseimPackage = (PseimPackageImpl) (EPackage.Registry.INSTANCE
.get(eNS_URI) instanceof PseimPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI)
: new PseimPackageImpl());
isInited = true;
// Initialize simple dependencies
SeimPackage.eINSTANCE.eClass();
// Create package meta-data objects
thePseimPackage.createPackageContents();
// Initialize created meta-data
thePseimPackage.initializePackageContents();
// Register package validator
EValidator.Registry.INSTANCE.put(thePseimPackage, new EValidator.Descriptor() {
public EValidator getEValidator() {
return PseimValidator.INSTANCE;
}
});
// Mark meta-data to indicate it can't be changed
thePseimPackage.freeze();
// Update the registry and return the package
EPackage.Registry.INSTANCE.put(PseimPackage.eNS_URI, thePseimPackage);
return thePseimPackage;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getLibrary() {
return libraryEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getLibrary_Patterns() {
return (EReference) libraryEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getPattern() {
return patternEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getPattern_TypeHS() {
return (EAttribute) patternEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getPattern_TypeFailure() {
return (EAttribute) patternEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getPattern_AlsoKnownAs() {
return (EAttribute) patternEClass.getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getPattern_UsedTactics() {
return (EAttribute) patternEClass.getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getPattern_Context() {
return (EAttribute) patternEClass.getEStructuralFeatures().get(4);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getPattern_Domain() {
return (EAttribute) patternEClass.getEStructuralFeatures().get(5);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getPattern_IsSingleChannel() {
return (EAttribute) patternEClass.getEStructuralFeatures().get(6);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getPattern_InterfaceElements() {
return (EReference) patternEClass.getEStructuralFeatures().get(7);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getPattern_CardinalityElements() {
return (EReference) patternEClass.getEStructuralFeatures().get(8);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getCardinalityElement() {
return cardinalityElementEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getCardinalityElement_CalculatedVia() {
return (EReference) cardinalityElementEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getPatternComponent() {
return patternComponentEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getPatternComponent_MergeContent() {
return (EAttribute) patternComponentEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getPatternPort() {
return patternPortEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getPatternPort_Dir() {
return (EAttribute) patternPortEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getPatternLink() {
return patternLinkEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getPatternLink_LinkType() {
return (EAttribute) patternLinkEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getPatternLink_Element() {
return (EReference) patternLinkEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getMultiplicityElement() {
return multiplicityElementEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getMultiplicityElement_MultiplicityValue() {
return (EAttribute) multiplicityElementEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getMultiplicityElement_CardinalityElement() {
return (EReference) multiplicityElementEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getIdentifiedElement() {
return identifiedElementEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getIdentifiedElement_IdentifiedAs() {
return (EReference) identifiedElementEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EEnum getPatternTypeHS() {
return patternTypeHSEEnum;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EEnum getPatternTypeFailureMode() {
return patternTypeFailureModeEEnum;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EEnum getSafetyTactic() {
return safetyTacticEEnum;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EEnum getLinkType() {
return linkTypeEEnum;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EEnum getPatternPortDirection() {
return patternPortDirectionEEnum;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PseimFactory getPseimFactory() {
return (PseimFactory) getEFactoryInstance();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @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.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void createPackageContents() {
if (isCreated)
return;
isCreated = true;
// Create classes and their features
libraryEClass = createEClass(LIBRARY);
createEReference(libraryEClass, LIBRARY__PATTERNS);
patternEClass = createEClass(PATTERN);
createEAttribute(patternEClass, PATTERN__TYPE_HS);
createEAttribute(patternEClass, PATTERN__TYPE_FAILURE);
createEAttribute(patternEClass, PATTERN__ALSO_KNOWN_AS);
createEAttribute(patternEClass, PATTERN__USED_TACTICS);
createEAttribute(patternEClass, PATTERN__CONTEXT);
createEAttribute(patternEClass, PATTERN__DOMAIN);
createEAttribute(patternEClass, PATTERN__IS_SINGLE_CHANNEL);
createEReference(patternEClass, PATTERN__INTERFACE_ELEMENTS);
createEReference(patternEClass, PATTERN__CARDINALITY_ELEMENTS);
cardinalityElementEClass = createEClass(CARDINALITY_ELEMENT);
createEReference(cardinalityElementEClass, CARDINALITY_ELEMENT__CALCULATED_VIA);
patternComponentEClass = createEClass(PATTERN_COMPONENT);
createEAttribute(patternComponentEClass, PATTERN_COMPONENT__MERGE_CONTENT);
patternPortEClass = createEClass(PATTERN_PORT);
createEAttribute(patternPortEClass, PATTERN_PORT__DIR);
patternLinkEClass = createEClass(PATTERN_LINK);
createEAttribute(patternLinkEClass, PATTERN_LINK__LINK_TYPE);
createEReference(patternLinkEClass, PATTERN_LINK__ELEMENT);
multiplicityElementEClass = createEClass(MULTIPLICITY_ELEMENT);
createEAttribute(multiplicityElementEClass, MULTIPLICITY_ELEMENT__MULTIPLICITY_VALUE);
createEReference(multiplicityElementEClass, MULTIPLICITY_ELEMENT__CARDINALITY_ELEMENT);
identifiedElementEClass = createEClass(IDENTIFIED_ELEMENT);
createEReference(identifiedElementEClass, IDENTIFIED_ELEMENT__IDENTIFIED_AS);
// Create enums
patternTypeHSEEnum = createEEnum(PATTERN_TYPE_HS);
patternTypeFailureModeEEnum = createEEnum(PATTERN_TYPE_FAILURE_MODE);
safetyTacticEEnum = createEEnum(SAFETY_TACTIC);
linkTypeEEnum = createEEnum(LINK_TYPE);
patternPortDirectionEEnum = createEEnum(PATTERN_PORT_DIRECTION);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @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.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void initializePackageContents() {
if (isInitialized)
return;
isInitialized = true;
// Initialize package
setName(eNAME);
setNsPrefix(eNS_PREFIX);
setNsURI(eNS_URI);
// Obtain other dependent packages
SeimPackage theSeimPackage = (SeimPackage) EPackage.Registry.INSTANCE.getEPackage(SeimPackage.eNS_URI);
// Create type parameters
// Set bounds for type parameters
// Add supertypes to classes
libraryEClass.getESuperTypes().add(theSeimPackage.getNamedElement());
patternEClass.getESuperTypes().add(theSeimPackage.getModel());
cardinalityElementEClass.getESuperTypes().add(theSeimPackage.getPropertyHolder());
patternComponentEClass.getESuperTypes().add(this.getMultiplicityElement());
patternComponentEClass.getESuperTypes().add(this.getIdentifiedElement());
patternComponentEClass.getESuperTypes().add(theSeimPackage.getComponent());
patternPortEClass.getESuperTypes().add(this.getMultiplicityElement());
patternPortEClass.getESuperTypes().add(this.getIdentifiedElement());
patternPortEClass.getESuperTypes().add(theSeimPackage.getPort());
patternLinkEClass.getESuperTypes().add(this.getIdentifiedElement());
patternLinkEClass.getESuperTypes().add(theSeimPackage.getLink());
// Initialize classes, features, and operations; add parameters
initEClass(libraryEClass, Library.class, "Library", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getLibrary_Patterns(), this.getPattern(), null, "patterns", null, 0, -1, Library.class,
!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE,
IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(patternEClass, Pattern.class, "Pattern", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getPattern_TypeHS(), this.getPatternTypeHS(), "typeHS", null, 0, -1, Pattern.class,
!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED,
!IS_ORDERED);
initEAttribute(getPattern_TypeFailure(), this.getPatternTypeFailureMode(), "typeFailure", null, 0, 1,
Pattern.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
!IS_DERIVED, IS_ORDERED);
initEAttribute(getPattern_AlsoKnownAs(), ecorePackage.getEString(), "alsoKnownAs", null, 0, -1, Pattern.class,
!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED,
!IS_ORDERED);
initEAttribute(getPattern_UsedTactics(), this.getSafetyTactic(), "usedTactics", null, 0, -1, Pattern.class,
!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED,
!IS_ORDERED);
initEAttribute(getPattern_Context(), ecorePackage.getEString(), "context", null, 0, 1, Pattern.class,
!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getPattern_Domain(), ecorePackage.getEString(), "domain", null, 0, 1, Pattern.class,
!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getPattern_IsSingleChannel(), ecorePackage.getEBoolean(), "isSingleChannel", null, 1, 1,
Pattern.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
!IS_DERIVED, IS_ORDERED);
initEReference(getPattern_InterfaceElements(), theSeimPackage.getPropertyHolder(), null, "interfaceElements",
null, 0, -1, Pattern.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE,
IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getPattern_CardinalityElements(), this.getCardinalityElement(), null, "cardinalityElements",
null, 0, -1, Pattern.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE,
!IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(cardinalityElementEClass, CardinalityElement.class, "CardinalityElement", !IS_ABSTRACT,
!IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getCardinalityElement_CalculatedVia(), theSeimPackage.getPropertyHolder(), null, "calculatedVia",
null, 0, -1, CardinalityElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE,
IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(patternComponentEClass, PatternComponent.class, "PatternComponent", !IS_ABSTRACT, !IS_INTERFACE,
IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getPatternComponent_MergeContent(), ecorePackage.getEBoolean(), "mergeContent", null, 1, 1,
PatternComponent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
!IS_DERIVED, IS_ORDERED);
initEClass(patternPortEClass, PatternPort.class, "PatternPort", !IS_ABSTRACT, !IS_INTERFACE,
IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getPatternPort_Dir(), this.getPatternPortDirection(), "dir", null, 1, 1, PatternPort.class,
!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(patternLinkEClass, PatternLink.class, "PatternLink", !IS_ABSTRACT, !IS_INTERFACE,
IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getPatternLink_LinkType(), this.getLinkType(), "linkType", null, 1, 1, PatternLink.class,
!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getPatternLink_Element(), this.getCardinalityElement(), null, "element", null, 0, 1,
PatternLink.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES,
!IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(multiplicityElementEClass, MultiplicityElement.class, "MultiplicityElement", IS_ABSTRACT,
IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getMultiplicityElement_MultiplicityValue(), ecorePackage.getEInt(), "multiplicityValue", "1", 1,
1, MultiplicityElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID,
IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getMultiplicityElement_CardinalityElement(), this.getCardinalityElement(), null,
"cardinalityElement", null, 0, 1, MultiplicityElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE,
!IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(identifiedElementEClass, IdentifiedElement.class, "IdentifiedElement", IS_ABSTRACT, IS_INTERFACE,
IS_GENERATED_INSTANCE_CLASS);
initEReference(getIdentifiedElement_IdentifiedAs(), theSeimPackage.getPropertyHolder(), null, "identifiedAs",
null, 0, 1, IdentifiedElement.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(patternTypeHSEEnum, PatternTypeHS.class, "PatternTypeHS");
addEEnumLiteral(patternTypeHSEEnum, PatternTypeHS.HARDWARE);
addEEnumLiteral(patternTypeHSEEnum, PatternTypeHS.SOFTWARE);
initEEnum(patternTypeFailureModeEEnum, PatternTypeFailureMode.class, "PatternTypeFailureMode");
addEEnumLiteral(patternTypeFailureModeEEnum, PatternTypeFailureMode.FAIL_SAFE);
addEEnumLiteral(patternTypeFailureModeEEnum, PatternTypeFailureMode.FAIL_OVER);
initEEnum(safetyTacticEEnum, SafetyTactic.class, "SafetyTactic");
addEEnumLiteral(safetyTacticEEnum, SafetyTactic.SIMPLICITY);
addEEnumLiteral(safetyTacticEEnum, SafetyTactic.SUBSTITUTION);
addEEnumLiteral(safetyTacticEEnum, SafetyTactic.SANITY_CHECK);
addEEnumLiteral(safetyTacticEEnum, SafetyTactic.CONDITION_MONITORING);
addEEnumLiteral(safetyTacticEEnum, SafetyTactic.COMPARISON);
addEEnumLiteral(safetyTacticEEnum, SafetyTactic.DIVERSE_REDUNDANCY);
addEEnumLiteral(safetyTacticEEnum, SafetyTactic.REPLICATION_REDUNDANCY);
addEEnumLiteral(safetyTacticEEnum, SafetyTactic.REPAIR);
addEEnumLiteral(safetyTacticEEnum, SafetyTactic.DEGRADATION);
addEEnumLiteral(safetyTacticEEnum, SafetyTactic.VOTING);
addEEnumLiteral(safetyTacticEEnum, SafetyTactic.OVERRIDE);
addEEnumLiteral(safetyTacticEEnum, SafetyTactic.BARRIER);
addEEnumLiteral(safetyTacticEEnum, SafetyTactic.HEARTBEAT);
initEEnum(linkTypeEEnum, LinkType.class, "LinkType");
addEEnumLiteral(linkTypeEEnum, LinkType.TRANSPOSE);
addEEnumLiteral(linkTypeEEnum, LinkType.IDENTITY);
addEEnumLiteral(linkTypeEEnum, LinkType.SHIFT);
addEEnumLiteral(linkTypeEEnum, LinkType.FIRST);
addEEnumLiteral(linkTypeEEnum, LinkType.ROTATE);
initEEnum(patternPortDirectionEEnum, PatternPortDirection.class, "PatternPortDirection");
addEEnumLiteral(patternPortDirectionEEnum, PatternPortDirection.UNSPECIFIED);
addEEnumLiteral(patternPortDirectionEEnum, PatternPortDirection.IN);
addEEnumLiteral(patternPortDirectionEEnum, PatternPortDirection.OUT);
addEEnumLiteral(patternPortDirectionEEnum, PatternPortDirection.INOUT);
// Create resource
createResource(eNS_URI);
// Create annotations
// http://www.eclipse.org/OCL/Import
createImportAnnotations();
// http://www.eclipse.org/emf/2002/Ecore
createEcoreAnnotations();
// http://www.eclipse.org/OCL/Collection
createCollectionAnnotations();
// http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot
createPivotAnnotations();
}
/**
* Initializes the annotations for <b>http://www.eclipse.org/OCL/Import</b>.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void createImportAnnotations() {
String source = "http://www.eclipse.org/OCL/Import";
addAnnotation(this, source,
new String[] { "ecore", "http://www.eclipse.org/emf/2002/Ecore", "seim", "seim.ecore#/" });
}
/**
* Initializes the annotations for <b>http://www.eclipse.org/emf/2002/Ecore</b>.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void createEcoreAnnotations() {
String source = "http://www.eclipse.org/emf/2002/Ecore";
addAnnotation(this, source,
new String[] { "invocationDelegates", "http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot",
"settingDelegates", "http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot", "validationDelegates",
"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot" });
addAnnotation(patternComponentEClass, source, new String[] { "constraints", "contentIsPatternContent" });
addAnnotation(patternLinkEClass, source, new String[] { "constraints", "srcIsPatternPort dstIsPatternPort" });
addAnnotation(multiplicityElementEClass, source, new String[] { "constraints", "cardinalityAsElementOrMult" });
}
/**
* Initializes the annotations for <b>http://www.eclipse.org/OCL/Collection</b>.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void createCollectionAnnotations() {
String source = "http://www.eclipse.org/OCL/Collection";
addAnnotation(getPattern_AlsoKnownAs(), source, new String[] { "nullFree", "false" });
addAnnotation(getPattern_UsedTactics(), source, new String[] { "nullFree", "false" });
}
/**
* Initializes the annotations for <b>http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot</b>.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void createPivotAnnotations() {
String source = "http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot";
addAnnotation(patternComponentEClass, source, new String[] { "contentIsPatternContent",
"content->forAll(c | c.oclIsTypeOf(PatternComponent) or c.oclIsTypeOf(PatternPort) or c.oclIsTypeOf(PatternLink))" });
addAnnotation(patternLinkEClass, source, new String[] { "srcIsPatternPort", "src.oclIsTypeOf(PatternLink)",
"dstIsPatternPort", "dst.oclIsTypeOf(PatternLink)" });
addAnnotation(multiplicityElementEClass, source, new String[] { "cardinalityAsElementOrMult",
"(not (cardinalityElement.oclIsUndefined())) implies multiplicityValue = 1" });
}
} //PseimPackageImpl

View File

@@ -0,0 +1,462 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.pseim.util;
import com.irtsaintexupery.pseim.pseim.*;
import com.irtsaintexupery.pseim.seim.BorderElement;
import com.irtsaintexupery.pseim.seim.Component;
import com.irtsaintexupery.pseim.seim.Element;
import com.irtsaintexupery.pseim.seim.GraphElement;
import com.irtsaintexupery.pseim.seim.Link;
import com.irtsaintexupery.pseim.seim.Model;
import com.irtsaintexupery.pseim.seim.NamedElement;
import com.irtsaintexupery.pseim.seim.Port;
import com.irtsaintexupery.pseim.seim.PropertyHolder;
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.Notifier;
import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc -->
* The <b>Adapter Factory</b> for the model.
* It provides an adapter <code>createXXX</code> method for each class of the model.
* <!-- end-user-doc -->
* @see com.irtsaintexupery.pseim.pseim.PseimPackage
* @generated
*/
public class PseimAdapterFactory extends AdapterFactoryImpl {
/**
* The cached model package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static PseimPackage modelPackage;
/**
* Creates an instance of the adapter factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PseimAdapterFactory() {
if (modelPackage == null) {
modelPackage = PseimPackage.eINSTANCE;
}
}
/**
* Returns whether this factory is applicable for the type of the object.
* <!-- begin-user-doc -->
* This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
* <!-- end-user-doc -->
* @return whether this factory is applicable for the type of the object.
* @generated
*/
@Override
public boolean isFactoryForType(Object object) {
if (object == modelPackage) {
return true;
}
if (object instanceof EObject) {
return ((EObject) object).eClass().getEPackage() == modelPackage;
}
return false;
}
/**
* The switch that delegates to the <code>createXXX</code> methods.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected PseimSwitch<Adapter> modelSwitch = new PseimSwitch<Adapter>() {
@Override
public Adapter caseLibrary(Library object) {
return createLibraryAdapter();
}
@Override
public Adapter casePattern(Pattern object) {
return createPatternAdapter();
}
@Override
public Adapter caseCardinalityElement(CardinalityElement object) {
return createCardinalityElementAdapter();
}
@Override
public Adapter casePatternComponent(PatternComponent object) {
return createPatternComponentAdapter();
}
@Override
public Adapter casePatternPort(PatternPort object) {
return createPatternPortAdapter();
}
@Override
public Adapter casePatternLink(PatternLink object) {
return createPatternLinkAdapter();
}
@Override
public Adapter caseMultiplicityElement(MultiplicityElement object) {
return createMultiplicityElementAdapter();
}
@Override
public Adapter caseIdentifiedElement(IdentifiedElement object) {
return createIdentifiedElementAdapter();
}
@Override
public Adapter caseSeim_IdentifiedElement(com.irtsaintexupery.pseim.seim.IdentifiedElement object) {
return createSeim_IdentifiedElementAdapter();
}
@Override
public Adapter caseNamedElement(NamedElement object) {
return createNamedElementAdapter();
}
@Override
public Adapter casePropertyHolder(PropertyHolder object) {
return createPropertyHolderAdapter();
}
@Override
public Adapter caseModel(Model object) {
return createModelAdapter();
}
@Override
public Adapter caseElement(Element object) {
return createElementAdapter();
}
@Override
public Adapter caseGraphElement(GraphElement object) {
return createGraphElementAdapter();
}
@Override
public Adapter caseComponent(Component object) {
return createComponentAdapter();
}
@Override
public Adapter caseBorderElement(BorderElement object) {
return createBorderElementAdapter();
}
@Override
public Adapter casePort(Port object) {
return createPortAdapter();
}
@Override
public Adapter caseLink(Link object) {
return createLinkAdapter();
}
@Override
public Adapter defaultCase(EObject object) {
return createEObjectAdapter();
}
};
/**
* Creates an adapter for the <code>target</code>.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param target the object to adapt.
* @return the adapter for the <code>target</code>.
* @generated
*/
@Override
public Adapter createAdapter(Notifier target) {
return modelSwitch.doSwitch((EObject) target);
}
/**
* Creates a new adapter for an object of class '{@link com.irtsaintexupery.pseim.pseim.Library <em>Library</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see com.irtsaintexupery.pseim.pseim.Library
* @generated
*/
public Adapter createLibraryAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link com.irtsaintexupery.pseim.pseim.Pattern <em>Pattern</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see com.irtsaintexupery.pseim.pseim.Pattern
* @generated
*/
public Adapter createPatternAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link com.irtsaintexupery.pseim.pseim.CardinalityElement <em>Cardinality Element</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see com.irtsaintexupery.pseim.pseim.CardinalityElement
* @generated
*/
public Adapter createCardinalityElementAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link com.irtsaintexupery.pseim.pseim.PatternComponent <em>Pattern Component</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see com.irtsaintexupery.pseim.pseim.PatternComponent
* @generated
*/
public Adapter createPatternComponentAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link com.irtsaintexupery.pseim.pseim.PatternPort <em>Pattern Port</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see com.irtsaintexupery.pseim.pseim.PatternPort
* @generated
*/
public Adapter createPatternPortAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link com.irtsaintexupery.pseim.pseim.PatternLink <em>Pattern Link</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see com.irtsaintexupery.pseim.pseim.PatternLink
* @generated
*/
public Adapter createPatternLinkAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link com.irtsaintexupery.pseim.pseim.MultiplicityElement <em>Multiplicity Element</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see com.irtsaintexupery.pseim.pseim.MultiplicityElement
* @generated
*/
public Adapter createMultiplicityElementAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link com.irtsaintexupery.pseim.pseim.IdentifiedElement <em>Identified Element</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see com.irtsaintexupery.pseim.pseim.IdentifiedElement
* @generated
*/
public Adapter createIdentifiedElementAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link com.irtsaintexupery.pseim.seim.IdentifiedElement <em>Identified Element</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see com.irtsaintexupery.pseim.seim.IdentifiedElement
* @generated
*/
public Adapter createSeim_IdentifiedElementAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link com.irtsaintexupery.pseim.seim.NamedElement <em>Named Element</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see com.irtsaintexupery.pseim.seim.NamedElement
* @generated
*/
public Adapter createNamedElementAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link com.irtsaintexupery.pseim.seim.PropertyHolder <em>Property Holder</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see com.irtsaintexupery.pseim.seim.PropertyHolder
* @generated
*/
public Adapter createPropertyHolderAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link com.irtsaintexupery.pseim.seim.Model <em>Model</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see com.irtsaintexupery.pseim.seim.Model
* @generated
*/
public Adapter createModelAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link com.irtsaintexupery.pseim.seim.Element <em>Element</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see com.irtsaintexupery.pseim.seim.Element
* @generated
*/
public Adapter createElementAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link com.irtsaintexupery.pseim.seim.GraphElement <em>Graph Element</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see com.irtsaintexupery.pseim.seim.GraphElement
* @generated
*/
public Adapter createGraphElementAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link com.irtsaintexupery.pseim.seim.Component <em>Component</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see com.irtsaintexupery.pseim.seim.Component
* @generated
*/
public Adapter createComponentAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link com.irtsaintexupery.pseim.seim.BorderElement <em>Border Element</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see com.irtsaintexupery.pseim.seim.BorderElement
* @generated
*/
public Adapter createBorderElementAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link com.irtsaintexupery.pseim.seim.Port <em>Port</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see com.irtsaintexupery.pseim.seim.Port
* @generated
*/
public Adapter createPortAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link com.irtsaintexupery.pseim.seim.Link <em>Link</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see com.irtsaintexupery.pseim.seim.Link
* @generated
*/
public Adapter createLinkAdapter() {
return null;
}
/**
* Creates a new adapter for the default case.
* <!-- begin-user-doc -->
* This default implementation returns null.
* <!-- end-user-doc -->
* @return the new adapter.
* @generated
*/
public Adapter createEObjectAdapter() {
return null;
}
} //PseimAdapterFactory

View File

@@ -0,0 +1,500 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.pseim.util;
import com.irtsaintexupery.pseim.pseim.*;
import com.irtsaintexupery.pseim.seim.BorderElement;
import com.irtsaintexupery.pseim.seim.Component;
import com.irtsaintexupery.pseim.seim.Element;
import com.irtsaintexupery.pseim.seim.GraphElement;
import com.irtsaintexupery.pseim.seim.Link;
import com.irtsaintexupery.pseim.seim.Model;
import com.irtsaintexupery.pseim.seim.NamedElement;
import com.irtsaintexupery.pseim.seim.Port;
import com.irtsaintexupery.pseim.seim.PropertyHolder;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.util.Switch;
/**
* <!-- begin-user-doc -->
* The <b>Switch</b> for the model's inheritance hierarchy.
* It supports the call {@link #doSwitch(EObject) doSwitch(object)}
* to invoke the <code>caseXXX</code> method for each class of the model,
* starting with the actual class of the object
* and proceeding up the inheritance hierarchy
* until a non-null result is returned,
* which is the result of the switch.
* <!-- end-user-doc -->
* @see com.irtsaintexupery.pseim.pseim.PseimPackage
* @generated
*/
public class PseimSwitch<T> extends Switch<T> {
/**
* The cached model package
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static PseimPackage modelPackage;
/**
* Creates an instance of the switch.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PseimSwitch() {
if (modelPackage == null) {
modelPackage = PseimPackage.eINSTANCE;
}
}
/**
* Checks whether this is a switch for the given package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param ePackage the package in question.
* @return whether this is a switch for the given package.
* @generated
*/
@Override
protected boolean isSwitchFor(EPackage ePackage) {
return ePackage == modelPackage;
}
/**
* Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the first non-null result returned by a <code>caseXXX</code> call.
* @generated
*/
@Override
protected T doSwitch(int classifierID, EObject theEObject) {
switch (classifierID) {
case PseimPackage.LIBRARY: {
Library library = (Library) theEObject;
T result = caseLibrary(library);
if (result == null)
result = caseNamedElement(library);
if (result == null)
result = caseSeim_IdentifiedElement(library);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case PseimPackage.PATTERN: {
Pattern pattern = (Pattern) theEObject;
T result = casePattern(pattern);
if (result == null)
result = caseModel(pattern);
if (result == null)
result = casePropertyHolder(pattern);
if (result == null)
result = caseNamedElement(pattern);
if (result == null)
result = caseSeim_IdentifiedElement(pattern);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case PseimPackage.CARDINALITY_ELEMENT: {
CardinalityElement cardinalityElement = (CardinalityElement) theEObject;
T result = caseCardinalityElement(cardinalityElement);
if (result == null)
result = casePropertyHolder(cardinalityElement);
if (result == null)
result = caseNamedElement(cardinalityElement);
if (result == null)
result = caseSeim_IdentifiedElement(cardinalityElement);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case PseimPackage.PATTERN_COMPONENT: {
PatternComponent patternComponent = (PatternComponent) theEObject;
T result = casePatternComponent(patternComponent);
if (result == null)
result = caseMultiplicityElement(patternComponent);
if (result == null)
result = caseIdentifiedElement(patternComponent);
if (result == null)
result = caseComponent(patternComponent);
if (result == null)
result = caseGraphElement(patternComponent);
if (result == null)
result = caseElement(patternComponent);
if (result == null)
result = casePropertyHolder(patternComponent);
if (result == null)
result = caseNamedElement(patternComponent);
if (result == null)
result = caseSeim_IdentifiedElement(patternComponent);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case PseimPackage.PATTERN_PORT: {
PatternPort patternPort = (PatternPort) theEObject;
T result = casePatternPort(patternPort);
if (result == null)
result = caseMultiplicityElement(patternPort);
if (result == null)
result = caseIdentifiedElement(patternPort);
if (result == null)
result = casePort(patternPort);
if (result == null)
result = caseBorderElement(patternPort);
if (result == null)
result = caseElement(patternPort);
if (result == null)
result = casePropertyHolder(patternPort);
if (result == null)
result = caseNamedElement(patternPort);
if (result == null)
result = caseSeim_IdentifiedElement(patternPort);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case PseimPackage.PATTERN_LINK: {
PatternLink patternLink = (PatternLink) theEObject;
T result = casePatternLink(patternLink);
if (result == null)
result = caseIdentifiedElement(patternLink);
if (result == null)
result = caseLink(patternLink);
if (result == null)
result = caseGraphElement(patternLink);
if (result == null)
result = caseElement(patternLink);
if (result == null)
result = casePropertyHolder(patternLink);
if (result == null)
result = caseNamedElement(patternLink);
if (result == null)
result = caseSeim_IdentifiedElement(patternLink);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case PseimPackage.MULTIPLICITY_ELEMENT: {
MultiplicityElement multiplicityElement = (MultiplicityElement) theEObject;
T result = caseMultiplicityElement(multiplicityElement);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case PseimPackage.IDENTIFIED_ELEMENT: {
IdentifiedElement identifiedElement = (IdentifiedElement) theEObject;
T result = caseIdentifiedElement(identifiedElement);
if (result == null)
result = defaultCase(theEObject);
return result;
}
default:
return defaultCase(theEObject);
}
}
/**
* Returns the result of interpreting the object as an instance of '<em>Library</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Library</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseLibrary(Library object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Pattern</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Pattern</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T casePattern(Pattern object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Cardinality Element</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Cardinality Element</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseCardinalityElement(CardinalityElement object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Pattern Component</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Pattern Component</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T casePatternComponent(PatternComponent object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Pattern Port</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Pattern Port</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T casePatternPort(PatternPort object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Pattern Link</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Pattern Link</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T casePatternLink(PatternLink object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Multiplicity Element</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Multiplicity Element</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseMultiplicityElement(MultiplicityElement object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Identified Element</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Identified Element</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseIdentifiedElement(IdentifiedElement object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Identified Element</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Identified Element</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseSeim_IdentifiedElement(com.irtsaintexupery.pseim.seim.IdentifiedElement object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Named Element</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Named Element</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseNamedElement(NamedElement object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Property Holder</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Property Holder</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T casePropertyHolder(PropertyHolder object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Model</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Model</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseModel(Model object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Element</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Element</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseElement(Element object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Graph Element</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Graph Element</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseGraphElement(GraphElement object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Component</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Component</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseComponent(Component object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Border Element</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Border Element</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseBorderElement(BorderElement object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Port</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Port</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T casePort(Port object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Link</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Link</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseLink(Link object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch, but this is the last case anyway.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>EObject</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject)
* @generated
*/
@Override
public T defaultCase(EObject object) {
return null;
}
} //PseimSwitch

View File

@@ -0,0 +1,533 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.pseim.util;
import com.irtsaintexupery.pseim.pseim.*;
import com.irtsaintexupery.pseim.seim.util.SeimValidator;
import java.util.Map;
import org.eclipse.emf.common.util.Diagnostic;
import org.eclipse.emf.common.util.DiagnosticChain;
import org.eclipse.emf.common.util.ResourceLocator;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.util.EObjectValidator;
/**
* <!-- begin-user-doc -->
* The <b>Validator</b> for the model.
* <!-- end-user-doc -->
* @see com.irtsaintexupery.pseim.pseim.PseimPackage
* @generated
*/
public class PseimValidator extends EObjectValidator {
/**
* The cached model package
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final PseimValidator INSTANCE = new PseimValidator();
/**
* A constant for the {@link org.eclipse.emf.common.util.Diagnostic#getSource() source} of diagnostic {@link org.eclipse.emf.common.util.Diagnostic#getCode() codes} from this package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.emf.common.util.Diagnostic#getSource()
* @see org.eclipse.emf.common.util.Diagnostic#getCode()
* @generated
*/
public static final String DIAGNOSTIC_SOURCE = "com.irtsaintexupery.pseim.pseim";
/**
* A constant with a fixed name that can be used as the base value for additional hand written constants.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static final int GENERATED_DIAGNOSTIC_CODE_COUNT = 0;
/**
* A constant with a fixed name that can be used as the base value for additional hand written constants in a derived class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static final int DIAGNOSTIC_CODE_COUNT = GENERATED_DIAGNOSTIC_CODE_COUNT;
/**
* The cached base package validator.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected SeimValidator seimValidator;
/**
* Creates an instance of the switch.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PseimValidator() {
super();
seimValidator = SeimValidator.INSTANCE;
}
/**
* Returns the package of this validator switch.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EPackage getEPackage() {
return PseimPackage.eINSTANCE;
}
/**
* Calls <code>validateXXX</code> for the corresponding classifier of the model.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected boolean validate(int classifierID, Object value, DiagnosticChain diagnostics,
Map<Object, Object> context) {
switch (classifierID) {
case PseimPackage.LIBRARY:
return validateLibrary((Library) value, diagnostics, context);
case PseimPackage.PATTERN:
return validatePattern((Pattern) value, diagnostics, context);
case PseimPackage.CARDINALITY_ELEMENT:
return validateCardinalityElement((CardinalityElement) value, diagnostics, context);
case PseimPackage.PATTERN_COMPONENT:
return validatePatternComponent((PatternComponent) value, diagnostics, context);
case PseimPackage.PATTERN_PORT:
return validatePatternPort((PatternPort) value, diagnostics, context);
case PseimPackage.PATTERN_LINK:
return validatePatternLink((PatternLink) value, diagnostics, context);
case PseimPackage.MULTIPLICITY_ELEMENT:
return validateMultiplicityElement((MultiplicityElement) value, diagnostics, context);
case PseimPackage.IDENTIFIED_ELEMENT:
return validateIdentifiedElement((IdentifiedElement) value, diagnostics, context);
case PseimPackage.PATTERN_TYPE_HS:
return validatePatternTypeHS((PatternTypeHS) value, diagnostics, context);
case PseimPackage.PATTERN_TYPE_FAILURE_MODE:
return validatePatternTypeFailureMode((PatternTypeFailureMode) value, diagnostics, context);
case PseimPackage.SAFETY_TACTIC:
return validateSafetyTactic((SafetyTactic) value, diagnostics, context);
case PseimPackage.LINK_TYPE:
return validateLinkType((LinkType) value, diagnostics, context);
case PseimPackage.PATTERN_PORT_DIRECTION:
return validatePatternPortDirection((PatternPortDirection) value, diagnostics, context);
default:
return true;
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean validateLibrary(Library library, DiagnosticChain diagnostics, Map<Object, Object> context) {
if (!validate_NoCircularContainment(library, diagnostics, context))
return false;
boolean result = validate_EveryMultiplicityConforms(library, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryDataValueConforms(library, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryReferenceIsContained(library, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryBidirectionalReferenceIsPaired(library, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryProxyResolves(library, diagnostics, context);
if (result || diagnostics != null)
result &= validate_UniqueID(library, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryKeyUnique(library, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryMapEntryUnique(library, diagnostics, context);
if (result || diagnostics != null)
result &= seimValidator.validateIdentifiedElement_uidNotEmpty(library, diagnostics, context);
if (result || diagnostics != null)
result &= seimValidator.validateNamedElement_nameNotEmpty(library, diagnostics, context);
return result;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean validatePattern(Pattern pattern, DiagnosticChain diagnostics, Map<Object, Object> context) {
if (!validate_NoCircularContainment(pattern, diagnostics, context))
return false;
boolean result = validate_EveryMultiplicityConforms(pattern, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryDataValueConforms(pattern, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryReferenceIsContained(pattern, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryBidirectionalReferenceIsPaired(pattern, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryProxyResolves(pattern, diagnostics, context);
if (result || diagnostics != null)
result &= validate_UniqueID(pattern, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryKeyUnique(pattern, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryMapEntryUnique(pattern, diagnostics, context);
if (result || diagnostics != null)
result &= seimValidator.validateIdentifiedElement_uidNotEmpty(pattern, diagnostics, context);
if (result || diagnostics != null)
result &= seimValidator.validateNamedElement_nameNotEmpty(pattern, diagnostics, context);
if (result || diagnostics != null)
result &= seimValidator.validatePropertyHolder_uniqueKeys(pattern, diagnostics, context);
return result;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean validateCardinalityElement(CardinalityElement cardinalityElement, DiagnosticChain diagnostics,
Map<Object, Object> context) {
if (!validate_NoCircularContainment(cardinalityElement, diagnostics, context))
return false;
boolean result = validate_EveryMultiplicityConforms(cardinalityElement, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryDataValueConforms(cardinalityElement, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryReferenceIsContained(cardinalityElement, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryBidirectionalReferenceIsPaired(cardinalityElement, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryProxyResolves(cardinalityElement, diagnostics, context);
if (result || diagnostics != null)
result &= validate_UniqueID(cardinalityElement, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryKeyUnique(cardinalityElement, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryMapEntryUnique(cardinalityElement, diagnostics, context);
if (result || diagnostics != null)
result &= seimValidator.validateIdentifiedElement_uidNotEmpty(cardinalityElement, diagnostics, context);
if (result || diagnostics != null)
result &= seimValidator.validateNamedElement_nameNotEmpty(cardinalityElement, diagnostics, context);
if (result || diagnostics != null)
result &= seimValidator.validatePropertyHolder_uniqueKeys(cardinalityElement, diagnostics, context);
return result;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean validatePatternComponent(PatternComponent patternComponent, DiagnosticChain diagnostics,
Map<Object, Object> context) {
if (!validate_NoCircularContainment(patternComponent, diagnostics, context))
return false;
boolean result = validate_EveryMultiplicityConforms(patternComponent, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryDataValueConforms(patternComponent, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryReferenceIsContained(patternComponent, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryBidirectionalReferenceIsPaired(patternComponent, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryProxyResolves(patternComponent, diagnostics, context);
if (result || diagnostics != null)
result &= validate_UniqueID(patternComponent, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryKeyUnique(patternComponent, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryMapEntryUnique(patternComponent, diagnostics, context);
if (result || diagnostics != null)
result &= validateMultiplicityElement_cardinalityAsElementOrMult(patternComponent, diagnostics, context);
if (result || diagnostics != null)
result &= seimValidator.validateIdentifiedElement_uidNotEmpty(patternComponent, diagnostics, context);
if (result || diagnostics != null)
result &= seimValidator.validateNamedElement_nameNotEmpty(patternComponent, diagnostics, context);
if (result || diagnostics != null)
result &= seimValidator.validatePropertyHolder_uniqueKeys(patternComponent, diagnostics, context);
if (result || diagnostics != null)
result &= validatePatternComponent_contentIsPatternContent(patternComponent, diagnostics, context);
return result;
}
/**
* The cached validation expression for the contentIsPatternContent constraint of '<em>Pattern Component</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static final String PATTERN_COMPONENT__CONTENT_IS_PATTERN_CONTENT__EEXPRESSION = "content->forAll(c | c.oclIsTypeOf(PatternComponent) or c.oclIsTypeOf(PatternPort) or c.oclIsTypeOf(PatternLink))";
/**
* Validates the contentIsPatternContent constraint of '<em>Pattern Component</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean validatePatternComponent_contentIsPatternContent(PatternComponent patternComponent,
DiagnosticChain diagnostics, Map<Object, Object> context) {
return validate(PseimPackage.Literals.PATTERN_COMPONENT, patternComponent, diagnostics, context,
"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot", "contentIsPatternContent",
PATTERN_COMPONENT__CONTENT_IS_PATTERN_CONTENT__EEXPRESSION, Diagnostic.ERROR, DIAGNOSTIC_SOURCE, 0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean validatePatternPort(PatternPort patternPort, DiagnosticChain diagnostics,
Map<Object, Object> context) {
if (!validate_NoCircularContainment(patternPort, diagnostics, context))
return false;
boolean result = validate_EveryMultiplicityConforms(patternPort, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryDataValueConforms(patternPort, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryReferenceIsContained(patternPort, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryBidirectionalReferenceIsPaired(patternPort, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryProxyResolves(patternPort, diagnostics, context);
if (result || diagnostics != null)
result &= validate_UniqueID(patternPort, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryKeyUnique(patternPort, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryMapEntryUnique(patternPort, diagnostics, context);
if (result || diagnostics != null)
result &= validateMultiplicityElement_cardinalityAsElementOrMult(patternPort, diagnostics, context);
if (result || diagnostics != null)
result &= seimValidator.validateIdentifiedElement_uidNotEmpty(patternPort, diagnostics, context);
if (result || diagnostics != null)
result &= seimValidator.validateNamedElement_nameNotEmpty(patternPort, diagnostics, context);
if (result || diagnostics != null)
result &= seimValidator.validatePropertyHolder_uniqueKeys(patternPort, diagnostics, context);
return result;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean validatePatternLink(PatternLink patternLink, DiagnosticChain diagnostics,
Map<Object, Object> context) {
if (!validate_NoCircularContainment(patternLink, diagnostics, context))
return false;
boolean result = validate_EveryMultiplicityConforms(patternLink, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryDataValueConforms(patternLink, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryReferenceIsContained(patternLink, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryBidirectionalReferenceIsPaired(patternLink, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryProxyResolves(patternLink, diagnostics, context);
if (result || diagnostics != null)
result &= validate_UniqueID(patternLink, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryKeyUnique(patternLink, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryMapEntryUnique(patternLink, diagnostics, context);
if (result || diagnostics != null)
result &= seimValidator.validateIdentifiedElement_uidNotEmpty(patternLink, diagnostics, context);
if (result || diagnostics != null)
result &= seimValidator.validateNamedElement_nameNotEmpty(patternLink, diagnostics, context);
if (result || diagnostics != null)
result &= seimValidator.validatePropertyHolder_uniqueKeys(patternLink, diagnostics, context);
if (result || diagnostics != null)
result &= validatePatternLink_srcIsPatternPort(patternLink, diagnostics, context);
if (result || diagnostics != null)
result &= validatePatternLink_dstIsPatternPort(patternLink, diagnostics, context);
return result;
}
/**
* The cached validation expression for the srcIsPatternPort constraint of '<em>Pattern Link</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static final String PATTERN_LINK__SRC_IS_PATTERN_PORT__EEXPRESSION = "src.oclIsTypeOf(PatternLink)";
/**
* Validates the srcIsPatternPort constraint of '<em>Pattern Link</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean validatePatternLink_srcIsPatternPort(PatternLink patternLink, DiagnosticChain diagnostics,
Map<Object, Object> context) {
return validate(PseimPackage.Literals.PATTERN_LINK, patternLink, diagnostics, context,
"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot", "srcIsPatternPort",
PATTERN_LINK__SRC_IS_PATTERN_PORT__EEXPRESSION, Diagnostic.ERROR, DIAGNOSTIC_SOURCE, 0);
}
/**
* The cached validation expression for the dstIsPatternPort constraint of '<em>Pattern Link</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static final String PATTERN_LINK__DST_IS_PATTERN_PORT__EEXPRESSION = "dst.oclIsTypeOf(PatternLink)";
/**
* Validates the dstIsPatternPort constraint of '<em>Pattern Link</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean validatePatternLink_dstIsPatternPort(PatternLink patternLink, DiagnosticChain diagnostics,
Map<Object, Object> context) {
return validate(PseimPackage.Literals.PATTERN_LINK, patternLink, diagnostics, context,
"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot", "dstIsPatternPort",
PATTERN_LINK__DST_IS_PATTERN_PORT__EEXPRESSION, Diagnostic.ERROR, DIAGNOSTIC_SOURCE, 0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean validateMultiplicityElement(MultiplicityElement multiplicityElement, DiagnosticChain diagnostics,
Map<Object, Object> context) {
if (!validate_NoCircularContainment(multiplicityElement, diagnostics, context))
return false;
boolean result = validate_EveryMultiplicityConforms(multiplicityElement, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryDataValueConforms(multiplicityElement, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryReferenceIsContained(multiplicityElement, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryBidirectionalReferenceIsPaired(multiplicityElement, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryProxyResolves(multiplicityElement, diagnostics, context);
if (result || diagnostics != null)
result &= validate_UniqueID(multiplicityElement, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryKeyUnique(multiplicityElement, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryMapEntryUnique(multiplicityElement, diagnostics, context);
if (result || diagnostics != null)
result &= validateMultiplicityElement_cardinalityAsElementOrMult(multiplicityElement, diagnostics, context);
return result;
}
/**
* The cached validation expression for the cardinalityAsElementOrMult constraint of '<em>Multiplicity Element</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static final String MULTIPLICITY_ELEMENT__CARDINALITY_AS_ELEMENT_OR_MULT__EEXPRESSION = "(not (cardinalityElement.oclIsUndefined())) implies multiplicityValue = 1";
/**
* Validates the cardinalityAsElementOrMult constraint of '<em>Multiplicity Element</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean validateMultiplicityElement_cardinalityAsElementOrMult(MultiplicityElement multiplicityElement,
DiagnosticChain diagnostics, Map<Object, Object> context) {
return validate(PseimPackage.Literals.MULTIPLICITY_ELEMENT, multiplicityElement, diagnostics, context,
"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot", "cardinalityAsElementOrMult",
MULTIPLICITY_ELEMENT__CARDINALITY_AS_ELEMENT_OR_MULT__EEXPRESSION, Diagnostic.ERROR, DIAGNOSTIC_SOURCE,
0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean validateIdentifiedElement(IdentifiedElement identifiedElement, DiagnosticChain diagnostics,
Map<Object, Object> context) {
return validate_EveryDefaultConstraint(identifiedElement, diagnostics, context);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean validatePatternTypeHS(PatternTypeHS patternTypeHS, DiagnosticChain diagnostics,
Map<Object, Object> context) {
return true;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean validatePatternTypeFailureMode(PatternTypeFailureMode patternTypeFailureMode,
DiagnosticChain diagnostics, Map<Object, Object> context) {
return true;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean validateSafetyTactic(SafetyTactic safetyTactic, DiagnosticChain diagnostics,
Map<Object, Object> context) {
return true;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean validateLinkType(LinkType linkType, DiagnosticChain diagnostics, Map<Object, Object> context) {
return true;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean validatePatternPortDirection(PatternPortDirection patternPortDirection, DiagnosticChain diagnostics,
Map<Object, Object> context) {
return true;
}
/**
* Returns the resource locator that will be used to fetch messages for this validator's diagnostics.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public ResourceLocator getResourceLocator() {
// TODO
// Specialize this to return a resource locator for messages specific to this validator.
// Ensure that you remove @generated or mark it @generated NOT
return super.getResourceLocator();
}
} //PseimValidator

View File

@@ -0,0 +1,29 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
* Pierre Virelizier (IRT Saint Exupéry)
* Julien Baclet (IRT Saint Exupéry)
* Pierre Gaufillet (IRT Saint Exupéry)
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.seim;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Basic Property</b></em>'.
* <!-- end-user-doc -->
*
*
* @see com.irtsaintexupery.pseim.seim.SeimPackage#getBasicProperty()
* @model interface="true" abstract="true"
* @generated
*/
public interface BasicProperty extends Property {
} // BasicProperty

View File

@@ -0,0 +1,62 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
* Pierre Virelizier (IRT Saint Exupéry)
* Julien Baclet (IRT Saint Exupéry)
* Pierre Gaufillet (IRT Saint Exupéry)
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.seim;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Boolean Property</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link com.irtsaintexupery.pseim.seim.BooleanProperty#isValue <em>Value</em>}</li>
* </ul>
*
* @see com.irtsaintexupery.pseim.seim.SeimPackage#getBooleanProperty()
* @model
* @generated
*/
public interface BooleanProperty extends BasicProperty {
/**
* Returns the value of the '<em><b>Value</b></em>' attribute.
* The default value is <code>"false"</code>.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Value</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Value</em>' attribute.
* @see #setValue(boolean)
* @see com.irtsaintexupery.pseim.seim.SeimPackage#getBooleanProperty_Value()
* @model default="false" required="true"
* @generated
*/
boolean isValue();
/**
* Sets the value of the '{@link com.irtsaintexupery.pseim.seim.BooleanProperty#isValue <em>Value</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Value</em>' attribute.
* @see #isValue()
* @generated
*/
void setValue(boolean value);
} // BooleanProperty

View File

@@ -0,0 +1,29 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
* Pierre Virelizier (IRT Saint Exupéry)
* Julien Baclet (IRT Saint Exupéry)
* Pierre Gaufillet (IRT Saint Exupéry)
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.seim;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Border Element</b></em>'.
* <!-- end-user-doc -->
*
*
* @see com.irtsaintexupery.pseim.seim.SeimPackage#getBorderElement()
* @model interface="true" abstract="true"
* @generated
*/
public interface BorderElement extends Element {
} // BorderElement

View File

@@ -0,0 +1,53 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
* Pierre Virelizier (IRT Saint Exupéry)
* Julien Baclet (IRT Saint Exupéry)
* Pierre Gaufillet (IRT Saint Exupéry)
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.seim;
import org.eclipse.emf.common.util.EList;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Component</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link com.irtsaintexupery.pseim.seim.Component#getContent <em>Content</em>}</li>
* </ul>
*
* @see com.irtsaintexupery.pseim.seim.SeimPackage#getComponent()
* @model
* @generated
*/
public interface Component extends GraphElement {
/**
* Returns the value of the '<em><b>Content</b></em>' containment reference list.
* The list contents are of type {@link com.irtsaintexupery.pseim.seim.Element}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Content</em>' containment reference list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Content</em>' containment reference list.
* @see com.irtsaintexupery.pseim.seim.SeimPackage#getComponent_Content()
* @model containment="true"
* @generated
*/
EList<Element> getContent();
} // Component

View File

@@ -0,0 +1,29 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
* Pierre Virelizier (IRT Saint Exupéry)
* Julien Baclet (IRT Saint Exupéry)
* Pierre Gaufillet (IRT Saint Exupéry)
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.seim;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Element</b></em>'.
* <!-- end-user-doc -->
*
*
* @see com.irtsaintexupery.pseim.seim.SeimPackage#getElement()
* @model interface="true" abstract="true"
* @generated
*/
public interface Element extends PropertyHolder {
} // Element

View File

@@ -0,0 +1,29 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
* Pierre Virelizier (IRT Saint Exupéry)
* Julien Baclet (IRT Saint Exupéry)
* Pierre Gaufillet (IRT Saint Exupéry)
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.seim;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Graph Element</b></em>'.
* <!-- end-user-doc -->
*
*
* @see com.irtsaintexupery.pseim.seim.SeimPackage#getGraphElement()
* @model interface="true" abstract="true"
* @generated
*/
public interface GraphElement extends Element {
} // GraphElement

View File

@@ -0,0 +1,65 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
* Pierre Virelizier (IRT Saint Exupéry)
* Julien Baclet (IRT Saint Exupéry)
* Pierre Gaufillet (IRT Saint Exupéry)
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.seim;
import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Identified Element</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link com.irtsaintexupery.pseim.seim.IdentifiedElement#getUid <em>Uid</em>}</li>
* </ul>
*
* @see com.irtsaintexupery.pseim.seim.SeimPackage#getIdentifiedElement()
* @model interface="true" abstract="true"
* annotation="http://www.eclipse.org/emf/2002/Ecore constraints='uidNotEmpty'"
* annotation="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot uidNotEmpty='uid &lt;&gt; \'\''"
* @generated
*/
public interface IdentifiedElement extends EObject {
/**
* Returns the value of the '<em><b>Uid</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Uid</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Uid</em>' attribute.
* @see #isSetUid()
* @see com.irtsaintexupery.pseim.seim.SeimPackage#getIdentifiedElement_Uid()
* @model unsettable="true" id="true" changeable="false"
* @generated
*/
String getUid();
/**
* Returns whether the value of the '{@link com.irtsaintexupery.pseim.seim.IdentifiedElement#getUid <em>Uid</em>}' attribute is set.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return whether the value of the '<em>Uid</em>' attribute is set.
* @see #getUid()
* @generated
*/
boolean isSetUid();
} // IdentifiedElement

View File

@@ -0,0 +1,62 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
* Pierre Virelizier (IRT Saint Exupéry)
* Julien Baclet (IRT Saint Exupéry)
* Pierre Gaufillet (IRT Saint Exupéry)
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.seim;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Integer Property</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link com.irtsaintexupery.pseim.seim.IntegerProperty#getValue <em>Value</em>}</li>
* </ul>
*
* @see com.irtsaintexupery.pseim.seim.SeimPackage#getIntegerProperty()
* @model
* @generated
*/
public interface IntegerProperty extends BasicProperty {
/**
* Returns the value of the '<em><b>Value</b></em>' attribute.
* The default value is <code>"0"</code>.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Value</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Value</em>' attribute.
* @see #setValue(int)
* @see com.irtsaintexupery.pseim.seim.SeimPackage#getIntegerProperty_Value()
* @model default="0" required="true"
* @generated
*/
int getValue();
/**
* Sets the value of the '{@link com.irtsaintexupery.pseim.seim.IntegerProperty#getValue <em>Value</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Value</em>' attribute.
* @see #getValue()
* @generated
*/
void setValue(int value);
} // IntegerProperty

View File

@@ -0,0 +1,88 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
* Pierre Virelizier (IRT Saint Exupéry)
* Julien Baclet (IRT Saint Exupéry)
* Pierre Gaufillet (IRT Saint Exupéry)
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.seim;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Link</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link com.irtsaintexupery.pseim.seim.Link#getSrc <em>Src</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.seim.Link#getDst <em>Dst</em>}</li>
* </ul>
*
* @see com.irtsaintexupery.pseim.seim.SeimPackage#getLink()
* @model
* @generated
*/
public interface Link extends GraphElement {
/**
* Returns the value of the '<em><b>Src</b></em>' reference.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Src</em>' reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Src</em>' reference.
* @see #setSrc(Port)
* @see com.irtsaintexupery.pseim.seim.SeimPackage#getLink_Src()
* @model
* @generated
*/
Port getSrc();
/**
* Sets the value of the '{@link com.irtsaintexupery.pseim.seim.Link#getSrc <em>Src</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Src</em>' reference.
* @see #getSrc()
* @generated
*/
void setSrc(Port value);
/**
* Returns the value of the '<em><b>Dst</b></em>' reference.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Dst</em>' reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Dst</em>' reference.
* @see #setDst(Port)
* @see com.irtsaintexupery.pseim.seim.SeimPackage#getLink_Dst()
* @model
* @generated
*/
Port getDst();
/**
* Sets the value of the '{@link com.irtsaintexupery.pseim.seim.Link#getDst <em>Dst</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Dst</em>' reference.
* @see #getDst()
* @generated
*/
void setDst(Port value);
} // Link

View File

@@ -0,0 +1,53 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
* Pierre Virelizier (IRT Saint Exupéry)
* Julien Baclet (IRT Saint Exupéry)
* Pierre Gaufillet (IRT Saint Exupéry)
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.seim;
import org.eclipse.emf.common.util.EList;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Model</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link com.irtsaintexupery.pseim.seim.Model#getModelElements <em>Model Elements</em>}</li>
* </ul>
*
* @see com.irtsaintexupery.pseim.seim.SeimPackage#getModel()
* @model
* @generated
*/
public interface Model extends PropertyHolder {
/**
* Returns the value of the '<em><b>Model Elements</b></em>' containment reference list.
* The list contents are of type {@link com.irtsaintexupery.pseim.seim.GraphElement}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Model Elements</em>' containment reference list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Model Elements</em>' containment reference list.
* @see com.irtsaintexupery.pseim.seim.SeimPackage#getModel_ModelElements()
* @model containment="true"
* @generated
*/
EList<GraphElement> getModelElements();
} // Model

View File

@@ -0,0 +1,63 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
* Pierre Virelizier (IRT Saint Exupéry)
* Julien Baclet (IRT Saint Exupéry)
* Pierre Gaufillet (IRT Saint Exupéry)
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.seim;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Named Element</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link com.irtsaintexupery.pseim.seim.NamedElement#getName <em>Name</em>}</li>
* </ul>
*
* @see com.irtsaintexupery.pseim.seim.SeimPackage#getNamedElement()
* @model interface="true" abstract="true"
* annotation="http://www.eclipse.org/emf/2002/Ecore constraints='nameNotEmpty'"
* annotation="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot nameNotEmpty='name &lt;&gt; \'\''"
* @generated
*/
public interface NamedElement extends IdentifiedElement {
/**
* Returns the value of the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Name</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Name</em>' attribute.
* @see #setName(String)
* @see com.irtsaintexupery.pseim.seim.SeimPackage#getNamedElement_Name()
* @model
* @generated
*/
String getName();
/**
* Sets the value of the '{@link com.irtsaintexupery.pseim.seim.NamedElement#getName <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Name</em>' attribute.
* @see #getName()
* @generated
*/
void setName(String value);
} // NamedElement

View File

@@ -0,0 +1,64 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
* Pierre Virelizier (IRT Saint Exupéry)
* Julien Baclet (IRT Saint Exupéry)
* Pierre Gaufillet (IRT Saint Exupéry)
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.seim;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Port</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link com.irtsaintexupery.pseim.seim.Port#getDirection <em>Direction</em>}</li>
* </ul>
*
* @see com.irtsaintexupery.pseim.seim.SeimPackage#getPort()
* @model
* @generated
*/
public interface Port extends BorderElement {
/**
* Returns the value of the '<em><b>Direction</b></em>' attribute.
* The literals are from the enumeration {@link com.irtsaintexupery.pseim.seim.PortDirection}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Direction</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Direction</em>' attribute.
* @see com.irtsaintexupery.pseim.seim.PortDirection
* @see #setDirection(PortDirection)
* @see com.irtsaintexupery.pseim.seim.SeimPackage#getPort_Direction()
* @model required="true"
* @generated
*/
PortDirection getDirection();
/**
* Sets the value of the '{@link com.irtsaintexupery.pseim.seim.Port#getDirection <em>Direction</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Direction</em>' attribute.
* @see com.irtsaintexupery.pseim.seim.PortDirection
* @see #getDirection()
* @generated
*/
void setDirection(PortDirection value);
} // Port

View File

@@ -0,0 +1,279 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
* Pierre Virelizier (IRT Saint Exupéry)
* Julien Baclet (IRT Saint Exupéry)
* Pierre Gaufillet (IRT Saint Exupéry)
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.seim;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import org.eclipse.emf.common.util.Enumerator;
/**
* <!-- begin-user-doc -->
* A representation of the literals of the enumeration '<em><b>Port Direction</b></em>',
* and utility methods for working with them.
* <!-- end-user-doc -->
* @see com.irtsaintexupery.pseim.seim.SeimPackage#getPortDirection()
* @model
* @generated
*/
public enum PortDirection implements Enumerator {
/**
* The '<em><b>UNSPECIFIED</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #UNSPECIFIED_VALUE
* @generated
* @ordered
*/
UNSPECIFIED(3, "UNSPECIFIED", "UNSPECIFIED"),
/**
* The '<em><b>IN</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #IN_VALUE
* @generated
* @ordered
*/
IN(0, "IN", "IN"),
/**
* The '<em><b>OUT</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #OUT_VALUE
* @generated
* @ordered
*/
OUT(1, "OUT", "OUT"),
/**
* The '<em><b>INOUT</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #INOUT_VALUE
* @generated
* @ordered
*/
INOUT(2, "INOUT", "INOUT");
/**
* The '<em><b>UNSPECIFIED</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>UNSPECIFIED</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #UNSPECIFIED
* @model
* @generated
* @ordered
*/
public static final int UNSPECIFIED_VALUE = 3;
/**
* The '<em><b>IN</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>IN</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #IN
* @model
* @generated
* @ordered
*/
public static final int IN_VALUE = 0;
/**
* The '<em><b>OUT</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>OUT</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #OUT
* @model
* @generated
* @ordered
*/
public static final int OUT_VALUE = 1;
/**
* The '<em><b>INOUT</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>INOUT</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #INOUT
* @model
* @generated
* @ordered
*/
public static final int INOUT_VALUE = 2;
/**
* An array of all the '<em><b>Port Direction</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static final PortDirection[] VALUES_ARRAY = new PortDirection[] { UNSPECIFIED, IN, OUT, INOUT, };
/**
* A public read-only list of all the '<em><b>Port Direction</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final List<PortDirection> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
/**
* Returns the '<em><b>Port Direction</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 PortDirection get(String literal) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
PortDirection result = VALUES_ARRAY[i];
if (result.toString().equals(literal)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Port Direction</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 PortDirection getByName(String name) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
PortDirection result = VALUES_ARRAY[i];
if (result.getName().equals(name)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Port Direction</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 PortDirection get(int value) {
switch (value) {
case UNSPECIFIED_VALUE:
return UNSPECIFIED;
case IN_VALUE:
return IN;
case OUT_VALUE:
return OUT;
case INOUT_VALUE:
return INOUT;
}
return null;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private final int value;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private final String name;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private final String literal;
/**
* Only this class can construct instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private PortDirection(int value, String name, String literal) {
this.value = value;
this.name = name;
this.literal = literal;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public int getValue() {
return value;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getName() {
return name;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getLiteral() {
return literal;
}
/**
* Returns the literal value of the enumerator, which is its string representation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
return literal;
}
} //PortDirection

View File

@@ -0,0 +1,63 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
* Pierre Virelizier (IRT Saint Exupéry)
* Julien Baclet (IRT Saint Exupéry)
* Pierre Gaufillet (IRT Saint Exupéry)
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.seim;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Property</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link com.irtsaintexupery.pseim.seim.Property#getKey <em>Key</em>}</li>
* </ul>
*
* @see com.irtsaintexupery.pseim.seim.SeimPackage#getProperty()
* @model interface="true" abstract="true"
* annotation="http://www.eclipse.org/emf/2002/Ecore constraints='keyNotNull'"
* annotation="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot keyNotNull='key &lt;&gt; \'\''"
* @generated
*/
public interface Property extends IdentifiedElement {
/**
* Returns the value of the '<em><b>Key</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Key</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Key</em>' attribute.
* @see #setKey(String)
* @see com.irtsaintexupery.pseim.seim.SeimPackage#getProperty_Key()
* @model required="true"
* @generated
*/
String getKey();
/**
* Sets the value of the '{@link com.irtsaintexupery.pseim.seim.Property#getKey <em>Key</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Key</em>' attribute.
* @see #getKey()
* @generated
*/
void setKey(String value);
} // Property

View File

@@ -0,0 +1,55 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
* Pierre Virelizier (IRT Saint Exupéry)
* Julien Baclet (IRT Saint Exupéry)
* Pierre Gaufillet (IRT Saint Exupéry)
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.seim;
import org.eclipse.emf.common.util.EList;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Property Holder</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link com.irtsaintexupery.pseim.seim.PropertyHolder#getProperties <em>Properties</em>}</li>
* </ul>
*
* @see com.irtsaintexupery.pseim.seim.SeimPackage#getPropertyHolder()
* @model interface="true" abstract="true"
* annotation="http://www.eclipse.org/emf/2002/Ecore constraints='uniqueKeys'"
* annotation="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot uniqueKeys='properties-&gt;forAll(p1, p2 | p1 &lt;&gt; p2 implies p1.key &lt;&gt; p2.key)'"
* @generated
*/
public interface PropertyHolder extends NamedElement {
/**
* Returns the value of the '<em><b>Properties</b></em>' containment reference list.
* The list contents are of type {@link com.irtsaintexupery.pseim.seim.Property}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Properties</em>' containment reference list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Properties</em>' containment reference list.
* @see com.irtsaintexupery.pseim.seim.SeimPackage#getPropertyHolder_Properties()
* @model containment="true"
* @generated
*/
EList<Property> getProperties();
} // PropertyHolder

View File

@@ -0,0 +1,61 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
* Pierre Virelizier (IRT Saint Exupéry)
* Julien Baclet (IRT Saint Exupéry)
* Pierre Gaufillet (IRT Saint Exupéry)
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.seim;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Reference Property</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link com.irtsaintexupery.pseim.seim.ReferenceProperty#getRef <em>Ref</em>}</li>
* </ul>
*
* @see com.irtsaintexupery.pseim.seim.SeimPackage#getReferenceProperty()
* @model
* @generated
*/
public interface ReferenceProperty extends Property {
/**
* Returns the value of the '<em><b>Ref</b></em>' reference.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Ref</em>' reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Ref</em>' reference.
* @see #setRef(PropertyHolder)
* @see com.irtsaintexupery.pseim.seim.SeimPackage#getReferenceProperty_Ref()
* @model required="true"
* @generated
*/
PropertyHolder getRef();
/**
* Sets the value of the '{@link com.irtsaintexupery.pseim.seim.ReferenceProperty#getRef <em>Ref</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Ref</em>' reference.
* @see #getRef()
* @generated
*/
void setRef(PropertyHolder value);
} // ReferenceProperty

View File

@@ -0,0 +1,118 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
* Pierre Virelizier (IRT Saint Exupéry)
* Julien Baclet (IRT Saint Exupéry)
* Pierre Gaufillet (IRT Saint Exupéry)
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.seim;
import org.eclipse.emf.ecore.EFactory;
/**
* <!-- begin-user-doc -->
* The <b>Factory</b> for the model.
* It provides a create method for each non-abstract class of the model.
* <!-- end-user-doc -->
* @see com.irtsaintexupery.pseim.seim.SeimPackage
* @generated
*/
public interface SeimFactory extends EFactory {
/**
* The singleton instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
SeimFactory eINSTANCE = com.irtsaintexupery.pseim.seim.impl.SeimFactoryImpl.init();
/**
* Returns a new object of class '<em>Component</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Component</em>'.
* @generated
*/
Component createComponent();
/**
* Returns a new object of class '<em>Port</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Port</em>'.
* @generated
*/
Port createPort();
/**
* Returns a new object of class '<em>Link</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Link</em>'.
* @generated
*/
Link createLink();
/**
* Returns a new object of class '<em>Integer Property</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Integer Property</em>'.
* @generated
*/
IntegerProperty createIntegerProperty();
/**
* Returns a new object of class '<em>String Property</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>String Property</em>'.
* @generated
*/
StringProperty createStringProperty();
/**
* Returns a new object of class '<em>Boolean Property</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Boolean Property</em>'.
* @generated
*/
BooleanProperty createBooleanProperty();
/**
* Returns a new object of class '<em>Reference Property</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Reference Property</em>'.
* @generated
*/
ReferenceProperty createReferenceProperty();
/**
* Returns a new object of class '<em>Model</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Model</em>'.
* @generated
*/
Model createModel();
/**
* Returns the package supported by this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the package supported by this factory.
* @generated
*/
SeimPackage getSeimPackage();
} //SeimFactory

View File

@@ -0,0 +1,62 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
* Pierre Virelizier (IRT Saint Exupéry)
* Julien Baclet (IRT Saint Exupéry)
* Pierre Gaufillet (IRT Saint Exupéry)
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.seim;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>String Property</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link com.irtsaintexupery.pseim.seim.StringProperty#getValue <em>Value</em>}</li>
* </ul>
*
* @see com.irtsaintexupery.pseim.seim.SeimPackage#getStringProperty()
* @model
* @generated
*/
public interface StringProperty extends BasicProperty {
/**
* Returns the value of the '<em><b>Value</b></em>' attribute.
* The default value is <code>"\'\'"</code>.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Value</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Value</em>' attribute.
* @see #setValue(String)
* @see com.irtsaintexupery.pseim.seim.SeimPackage#getStringProperty_Value()
* @model default="\'\'" required="true"
* @generated
*/
String getValue();
/**
* Sets the value of the '{@link com.irtsaintexupery.pseim.seim.StringProperty#getValue <em>Value</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Value</em>' attribute.
* @see #getValue()
* @generated
*/
void setValue(String value);
} // StringProperty

View File

@@ -0,0 +1,289 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
* Pierre Virelizier (IRT Saint Exupéry)
* Julien Baclet (IRT Saint Exupéry)
* Pierre Gaufillet (IRT Saint Exupéry)
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.seim.impl;
import com.irtsaintexupery.pseim.seim.BooleanProperty;
import com.irtsaintexupery.pseim.seim.SeimPackage;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Boolean Property</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link com.irtsaintexupery.pseim.seim.impl.BooleanPropertyImpl#getUid <em>Uid</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.seim.impl.BooleanPropertyImpl#getKey <em>Key</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.seim.impl.BooleanPropertyImpl#isValue <em>Value</em>}</li>
* </ul>
*
* @generated
*/
public class BooleanPropertyImpl extends MinimalEObjectImpl.Container implements BooleanProperty {
/**
* The default value of the '{@link #getUid() <em>Uid</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getUid()
* @generated
* @ordered
*/
protected static final String UID_EDEFAULT = null;
/**
* The cached value of the '{@link #getUid() <em>Uid</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getUid()
* @generated
* @ordered
*/
protected String uid = UID_EDEFAULT;
/**
* This is true if the Uid attribute has been set.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
protected boolean uidESet;
/**
* The default value of the '{@link #getKey() <em>Key</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getKey()
* @generated
* @ordered
*/
protected static final String KEY_EDEFAULT = null;
/**
* The cached value of the '{@link #getKey() <em>Key</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getKey()
* @generated
* @ordered
*/
protected String key = KEY_EDEFAULT;
/**
* The default value of the '{@link #isValue() <em>Value</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #isValue()
* @generated
* @ordered
*/
protected static final boolean VALUE_EDEFAULT = false;
/**
* The cached value of the '{@link #isValue() <em>Value</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #isValue()
* @generated
* @ordered
*/
protected boolean value = VALUE_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected BooleanPropertyImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return SeimPackage.Literals.BOOLEAN_PROPERTY;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getUid() {
return uid;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean isSetUid() {
return uidESet;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getKey() {
return key;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setKey(String newKey) {
String oldKey = key;
key = newKey;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, SeimPackage.BOOLEAN_PROPERTY__KEY, oldKey, key));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean isValue() {
return value;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setValue(boolean newValue) {
boolean oldValue = value;
value = newValue;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, SeimPackage.BOOLEAN_PROPERTY__VALUE, oldValue,
value));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case SeimPackage.BOOLEAN_PROPERTY__UID:
return getUid();
case SeimPackage.BOOLEAN_PROPERTY__KEY:
return getKey();
case SeimPackage.BOOLEAN_PROPERTY__VALUE:
return isValue();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case SeimPackage.BOOLEAN_PROPERTY__KEY:
setKey((String) newValue);
return;
case SeimPackage.BOOLEAN_PROPERTY__VALUE:
setValue((Boolean) newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case SeimPackage.BOOLEAN_PROPERTY__KEY:
setKey(KEY_EDEFAULT);
return;
case SeimPackage.BOOLEAN_PROPERTY__VALUE:
setValue(VALUE_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case SeimPackage.BOOLEAN_PROPERTY__UID:
return isSetUid();
case SeimPackage.BOOLEAN_PROPERTY__KEY:
return KEY_EDEFAULT == null ? key != null : !KEY_EDEFAULT.equals(key);
case SeimPackage.BOOLEAN_PROPERTY__VALUE:
return value != VALUE_EDEFAULT;
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
if (eIsProxy())
return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (uid: ");
if (uidESet)
result.append(uid);
else
result.append("<unset>");
result.append(", key: ");
result.append(key);
result.append(", value: ");
result.append(value);
result.append(')');
return result.toString();
}
} //BooleanPropertyImpl

View File

@@ -0,0 +1,330 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
* Pierre Virelizier (IRT Saint Exupéry)
* Julien Baclet (IRT Saint Exupéry)
* Pierre Gaufillet (IRT Saint Exupéry)
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.seim.impl;
import com.irtsaintexupery.pseim.seim.Component;
import com.irtsaintexupery.pseim.seim.Element;
import com.irtsaintexupery.pseim.seim.Property;
import com.irtsaintexupery.pseim.seim.SeimPackage;
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.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Component</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link com.irtsaintexupery.pseim.seim.impl.ComponentImpl#getUid <em>Uid</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.seim.impl.ComponentImpl#getName <em>Name</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.seim.impl.ComponentImpl#getProperties <em>Properties</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.seim.impl.ComponentImpl#getContent <em>Content</em>}</li>
* </ul>
*
* @generated
*/
public class ComponentImpl extends MinimalEObjectImpl.Container implements Component {
/**
* The default value of the '{@link #getUid() <em>Uid</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getUid()
* @generated
* @ordered
*/
protected static final String UID_EDEFAULT = null;
/**
* The cached value of the '{@link #getUid() <em>Uid</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getUid()
* @generated
* @ordered
*/
protected String uid = UID_EDEFAULT;
/**
* This is true if the Uid attribute has been set.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
protected boolean uidESet;
/**
* The default value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getName()
* @generated
* @ordered
*/
protected static final String NAME_EDEFAULT = null;
/**
* The cached value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getName()
* @generated
* @ordered
*/
protected String name = NAME_EDEFAULT;
/**
* The cached value of the '{@link #getProperties() <em>Properties</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getProperties()
* @generated
* @ordered
*/
protected EList<Property> properties;
/**
* The cached value of the '{@link #getContent() <em>Content</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getContent()
* @generated
* @ordered
*/
protected EList<Element> content;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ComponentImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return SeimPackage.Literals.COMPONENT;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getUid() {
return uid;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean isSetUid() {
return uidESet;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getName() {
return name;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setName(String newName) {
String oldName = name;
name = newName;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, SeimPackage.COMPONENT__NAME, oldName, name));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<Property> getProperties() {
if (properties == null) {
properties = new EObjectContainmentEList<Property>(Property.class, this, SeimPackage.COMPONENT__PROPERTIES);
}
return properties;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<Element> getContent() {
if (content == null) {
content = new EObjectContainmentEList<Element>(Element.class, this, SeimPackage.COMPONENT__CONTENT);
}
return content;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case SeimPackage.COMPONENT__PROPERTIES:
return ((InternalEList<?>) getProperties()).basicRemove(otherEnd, msgs);
case SeimPackage.COMPONENT__CONTENT:
return ((InternalEList<?>) getContent()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case SeimPackage.COMPONENT__UID:
return getUid();
case SeimPackage.COMPONENT__NAME:
return getName();
case SeimPackage.COMPONENT__PROPERTIES:
return getProperties();
case SeimPackage.COMPONENT__CONTENT:
return getContent();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case SeimPackage.COMPONENT__NAME:
setName((String) newValue);
return;
case SeimPackage.COMPONENT__PROPERTIES:
getProperties().clear();
getProperties().addAll((Collection<? extends Property>) newValue);
return;
case SeimPackage.COMPONENT__CONTENT:
getContent().clear();
getContent().addAll((Collection<? extends Element>) newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case SeimPackage.COMPONENT__NAME:
setName(NAME_EDEFAULT);
return;
case SeimPackage.COMPONENT__PROPERTIES:
getProperties().clear();
return;
case SeimPackage.COMPONENT__CONTENT:
getContent().clear();
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case SeimPackage.COMPONENT__UID:
return isSetUid();
case SeimPackage.COMPONENT__NAME:
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
case SeimPackage.COMPONENT__PROPERTIES:
return properties != null && !properties.isEmpty();
case SeimPackage.COMPONENT__CONTENT:
return content != null && !content.isEmpty();
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
if (eIsProxy())
return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (uid: ");
if (uidESet)
result.append(uid);
else
result.append("<unset>");
result.append(", name: ");
result.append(name);
result.append(')');
return result.toString();
}
} //ComponentImpl

View File

@@ -0,0 +1,289 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
* Pierre Virelizier (IRT Saint Exupéry)
* Julien Baclet (IRT Saint Exupéry)
* Pierre Gaufillet (IRT Saint Exupéry)
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.seim.impl;
import com.irtsaintexupery.pseim.seim.IntegerProperty;
import com.irtsaintexupery.pseim.seim.SeimPackage;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Integer Property</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link com.irtsaintexupery.pseim.seim.impl.IntegerPropertyImpl#getUid <em>Uid</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.seim.impl.IntegerPropertyImpl#getKey <em>Key</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.seim.impl.IntegerPropertyImpl#getValue <em>Value</em>}</li>
* </ul>
*
* @generated
*/
public class IntegerPropertyImpl extends MinimalEObjectImpl.Container implements IntegerProperty {
/**
* The default value of the '{@link #getUid() <em>Uid</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getUid()
* @generated
* @ordered
*/
protected static final String UID_EDEFAULT = null;
/**
* The cached value of the '{@link #getUid() <em>Uid</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getUid()
* @generated
* @ordered
*/
protected String uid = UID_EDEFAULT;
/**
* This is true if the Uid attribute has been set.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
protected boolean uidESet;
/**
* The default value of the '{@link #getKey() <em>Key</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getKey()
* @generated
* @ordered
*/
protected static final String KEY_EDEFAULT = null;
/**
* The cached value of the '{@link #getKey() <em>Key</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getKey()
* @generated
* @ordered
*/
protected String key = KEY_EDEFAULT;
/**
* The default value of the '{@link #getValue() <em>Value</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getValue()
* @generated
* @ordered
*/
protected static final int VALUE_EDEFAULT = 0;
/**
* The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getValue()
* @generated
* @ordered
*/
protected int value = VALUE_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected IntegerPropertyImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return SeimPackage.Literals.INTEGER_PROPERTY;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getUid() {
return uid;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean isSetUid() {
return uidESet;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getKey() {
return key;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setKey(String newKey) {
String oldKey = key;
key = newKey;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, SeimPackage.INTEGER_PROPERTY__KEY, oldKey, key));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public int getValue() {
return value;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setValue(int newValue) {
int oldValue = value;
value = newValue;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, SeimPackage.INTEGER_PROPERTY__VALUE, oldValue,
value));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case SeimPackage.INTEGER_PROPERTY__UID:
return getUid();
case SeimPackage.INTEGER_PROPERTY__KEY:
return getKey();
case SeimPackage.INTEGER_PROPERTY__VALUE:
return getValue();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case SeimPackage.INTEGER_PROPERTY__KEY:
setKey((String) newValue);
return;
case SeimPackage.INTEGER_PROPERTY__VALUE:
setValue((Integer) newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case SeimPackage.INTEGER_PROPERTY__KEY:
setKey(KEY_EDEFAULT);
return;
case SeimPackage.INTEGER_PROPERTY__VALUE:
setValue(VALUE_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case SeimPackage.INTEGER_PROPERTY__UID:
return isSetUid();
case SeimPackage.INTEGER_PROPERTY__KEY:
return KEY_EDEFAULT == null ? key != null : !KEY_EDEFAULT.equals(key);
case SeimPackage.INTEGER_PROPERTY__VALUE:
return value != VALUE_EDEFAULT;
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
if (eIsProxy())
return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (uid: ");
if (uidESet)
result.append(uid);
else
result.append("<unset>");
result.append(", key: ");
result.append(key);
result.append(", value: ");
result.append(value);
result.append(')');
return result.toString();
}
} //IntegerPropertyImpl

View File

@@ -0,0 +1,416 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
* Pierre Virelizier (IRT Saint Exupéry)
* Julien Baclet (IRT Saint Exupéry)
* Pierre Gaufillet (IRT Saint Exupéry)
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.seim.impl;
import com.irtsaintexupery.pseim.seim.Link;
import com.irtsaintexupery.pseim.seim.Port;
import com.irtsaintexupery.pseim.seim.Property;
import com.irtsaintexupery.pseim.seim.SeimPackage;
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.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Link</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link com.irtsaintexupery.pseim.seim.impl.LinkImpl#getUid <em>Uid</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.seim.impl.LinkImpl#getName <em>Name</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.seim.impl.LinkImpl#getProperties <em>Properties</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.seim.impl.LinkImpl#getSrc <em>Src</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.seim.impl.LinkImpl#getDst <em>Dst</em>}</li>
* </ul>
*
* @generated
*/
public class LinkImpl extends MinimalEObjectImpl.Container implements Link {
/**
* The default value of the '{@link #getUid() <em>Uid</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getUid()
* @generated
* @ordered
*/
protected static final String UID_EDEFAULT = null;
/**
* The cached value of the '{@link #getUid() <em>Uid</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getUid()
* @generated
* @ordered
*/
protected String uid = UID_EDEFAULT;
/**
* This is true if the Uid attribute has been set.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
protected boolean uidESet;
/**
* The default value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getName()
* @generated
* @ordered
*/
protected static final String NAME_EDEFAULT = null;
/**
* The cached value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getName()
* @generated
* @ordered
*/
protected String name = NAME_EDEFAULT;
/**
* The cached value of the '{@link #getProperties() <em>Properties</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getProperties()
* @generated
* @ordered
*/
protected EList<Property> properties;
/**
* The cached value of the '{@link #getSrc() <em>Src</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getSrc()
* @generated
* @ordered
*/
protected Port src;
/**
* The cached value of the '{@link #getDst() <em>Dst</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getDst()
* @generated
* @ordered
*/
protected Port dst;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected LinkImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return SeimPackage.Literals.LINK;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getUid() {
return uid;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean isSetUid() {
return uidESet;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getName() {
return name;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setName(String newName) {
String oldName = name;
name = newName;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, SeimPackage.LINK__NAME, oldName, name));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<Property> getProperties() {
if (properties == null) {
properties = new EObjectContainmentEList<Property>(Property.class, this, SeimPackage.LINK__PROPERTIES);
}
return properties;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Port getSrc() {
if (src != null && src.eIsProxy()) {
InternalEObject oldSrc = (InternalEObject) src;
src = (Port) eResolveProxy(oldSrc);
if (src != oldSrc) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, SeimPackage.LINK__SRC, oldSrc, src));
}
}
return src;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Port basicGetSrc() {
return src;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setSrc(Port newSrc) {
Port oldSrc = src;
src = newSrc;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, SeimPackage.LINK__SRC, oldSrc, src));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Port getDst() {
if (dst != null && dst.eIsProxy()) {
InternalEObject oldDst = (InternalEObject) dst;
dst = (Port) eResolveProxy(oldDst);
if (dst != oldDst) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, SeimPackage.LINK__DST, oldDst, dst));
}
}
return dst;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Port basicGetDst() {
return dst;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setDst(Port newDst) {
Port oldDst = dst;
dst = newDst;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, SeimPackage.LINK__DST, oldDst, dst));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case SeimPackage.LINK__PROPERTIES:
return ((InternalEList<?>) getProperties()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case SeimPackage.LINK__UID:
return getUid();
case SeimPackage.LINK__NAME:
return getName();
case SeimPackage.LINK__PROPERTIES:
return getProperties();
case SeimPackage.LINK__SRC:
if (resolve)
return getSrc();
return basicGetSrc();
case SeimPackage.LINK__DST:
if (resolve)
return getDst();
return basicGetDst();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case SeimPackage.LINK__NAME:
setName((String) newValue);
return;
case SeimPackage.LINK__PROPERTIES:
getProperties().clear();
getProperties().addAll((Collection<? extends Property>) newValue);
return;
case SeimPackage.LINK__SRC:
setSrc((Port) newValue);
return;
case SeimPackage.LINK__DST:
setDst((Port) newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case SeimPackage.LINK__NAME:
setName(NAME_EDEFAULT);
return;
case SeimPackage.LINK__PROPERTIES:
getProperties().clear();
return;
case SeimPackage.LINK__SRC:
setSrc((Port) null);
return;
case SeimPackage.LINK__DST:
setDst((Port) null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case SeimPackage.LINK__UID:
return isSetUid();
case SeimPackage.LINK__NAME:
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
case SeimPackage.LINK__PROPERTIES:
return properties != null && !properties.isEmpty();
case SeimPackage.LINK__SRC:
return src != null;
case SeimPackage.LINK__DST:
return dst != null;
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
if (eIsProxy())
return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (uid: ");
if (uidESet)
result.append(uid);
else
result.append("<unset>");
result.append(", name: ");
result.append(name);
result.append(')');
return result.toString();
}
} //LinkImpl

View File

@@ -0,0 +1,331 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
* Pierre Virelizier (IRT Saint Exupéry)
* Julien Baclet (IRT Saint Exupéry)
* Pierre Gaufillet (IRT Saint Exupéry)
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.seim.impl;
import com.irtsaintexupery.pseim.seim.GraphElement;
import com.irtsaintexupery.pseim.seim.Model;
import com.irtsaintexupery.pseim.seim.Property;
import com.irtsaintexupery.pseim.seim.SeimPackage;
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.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Model</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link com.irtsaintexupery.pseim.seim.impl.ModelImpl#getUid <em>Uid</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.seim.impl.ModelImpl#getName <em>Name</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.seim.impl.ModelImpl#getProperties <em>Properties</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.seim.impl.ModelImpl#getModelElements <em>Model Elements</em>}</li>
* </ul>
*
* @generated
*/
public class ModelImpl extends MinimalEObjectImpl.Container implements Model {
/**
* The default value of the '{@link #getUid() <em>Uid</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getUid()
* @generated
* @ordered
*/
protected static final String UID_EDEFAULT = null;
/**
* The cached value of the '{@link #getUid() <em>Uid</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getUid()
* @generated
* @ordered
*/
protected String uid = UID_EDEFAULT;
/**
* This is true if the Uid attribute has been set.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
protected boolean uidESet;
/**
* The default value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getName()
* @generated
* @ordered
*/
protected static final String NAME_EDEFAULT = null;
/**
* The cached value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getName()
* @generated
* @ordered
*/
protected String name = NAME_EDEFAULT;
/**
* The cached value of the '{@link #getProperties() <em>Properties</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getProperties()
* @generated
* @ordered
*/
protected EList<Property> properties;
/**
* The cached value of the '{@link #getModelElements() <em>Model Elements</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getModelElements()
* @generated
* @ordered
*/
protected EList<GraphElement> modelElements;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ModelImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return SeimPackage.Literals.MODEL;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getUid() {
return uid;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean isSetUid() {
return uidESet;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getName() {
return name;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setName(String newName) {
String oldName = name;
name = newName;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, SeimPackage.MODEL__NAME, oldName, name));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<Property> getProperties() {
if (properties == null) {
properties = new EObjectContainmentEList<Property>(Property.class, this, SeimPackage.MODEL__PROPERTIES);
}
return properties;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<GraphElement> getModelElements() {
if (modelElements == null) {
modelElements = new EObjectContainmentEList<GraphElement>(GraphElement.class, this,
SeimPackage.MODEL__MODEL_ELEMENTS);
}
return modelElements;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case SeimPackage.MODEL__PROPERTIES:
return ((InternalEList<?>) getProperties()).basicRemove(otherEnd, msgs);
case SeimPackage.MODEL__MODEL_ELEMENTS:
return ((InternalEList<?>) getModelElements()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case SeimPackage.MODEL__UID:
return getUid();
case SeimPackage.MODEL__NAME:
return getName();
case SeimPackage.MODEL__PROPERTIES:
return getProperties();
case SeimPackage.MODEL__MODEL_ELEMENTS:
return getModelElements();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case SeimPackage.MODEL__NAME:
setName((String) newValue);
return;
case SeimPackage.MODEL__PROPERTIES:
getProperties().clear();
getProperties().addAll((Collection<? extends Property>) newValue);
return;
case SeimPackage.MODEL__MODEL_ELEMENTS:
getModelElements().clear();
getModelElements().addAll((Collection<? extends GraphElement>) newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case SeimPackage.MODEL__NAME:
setName(NAME_EDEFAULT);
return;
case SeimPackage.MODEL__PROPERTIES:
getProperties().clear();
return;
case SeimPackage.MODEL__MODEL_ELEMENTS:
getModelElements().clear();
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case SeimPackage.MODEL__UID:
return isSetUid();
case SeimPackage.MODEL__NAME:
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
case SeimPackage.MODEL__PROPERTIES:
return properties != null && !properties.isEmpty();
case SeimPackage.MODEL__MODEL_ELEMENTS:
return modelElements != null && !modelElements.isEmpty();
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
if (eIsProxy())
return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (uid: ");
if (uidESet)
result.append(uid);
else
result.append("<unset>");
result.append(", name: ");
result.append(name);
result.append(')');
return result.toString();
}
} //ModelImpl

View File

@@ -0,0 +1,349 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
* Pierre Virelizier (IRT Saint Exupéry)
* Julien Baclet (IRT Saint Exupéry)
* Pierre Gaufillet (IRT Saint Exupéry)
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.seim.impl;
import com.irtsaintexupery.pseim.seim.Port;
import com.irtsaintexupery.pseim.seim.PortDirection;
import com.irtsaintexupery.pseim.seim.Property;
import com.irtsaintexupery.pseim.seim.SeimPackage;
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.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Port</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link com.irtsaintexupery.pseim.seim.impl.PortImpl#getUid <em>Uid</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.seim.impl.PortImpl#getName <em>Name</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.seim.impl.PortImpl#getProperties <em>Properties</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.seim.impl.PortImpl#getDirection <em>Direction</em>}</li>
* </ul>
*
* @generated
*/
public class PortImpl extends MinimalEObjectImpl.Container implements Port {
/**
* The default value of the '{@link #getUid() <em>Uid</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getUid()
* @generated
* @ordered
*/
protected static final String UID_EDEFAULT = null;
/**
* The cached value of the '{@link #getUid() <em>Uid</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getUid()
* @generated
* @ordered
*/
protected String uid = UID_EDEFAULT;
/**
* This is true if the Uid attribute has been set.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
protected boolean uidESet;
/**
* The default value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getName()
* @generated
* @ordered
*/
protected static final String NAME_EDEFAULT = null;
/**
* The cached value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getName()
* @generated
* @ordered
*/
protected String name = NAME_EDEFAULT;
/**
* The cached value of the '{@link #getProperties() <em>Properties</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getProperties()
* @generated
* @ordered
*/
protected EList<Property> properties;
/**
* The default value of the '{@link #getDirection() <em>Direction</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getDirection()
* @generated
* @ordered
*/
protected static final PortDirection DIRECTION_EDEFAULT = PortDirection.UNSPECIFIED;
/**
* The cached value of the '{@link #getDirection() <em>Direction</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getDirection()
* @generated
* @ordered
*/
protected PortDirection direction = DIRECTION_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected PortImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return SeimPackage.Literals.PORT;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getUid() {
return uid;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean isSetUid() {
return uidESet;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getName() {
return name;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setName(String newName) {
String oldName = name;
name = newName;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, SeimPackage.PORT__NAME, oldName, name));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<Property> getProperties() {
if (properties == null) {
properties = new EObjectContainmentEList<Property>(Property.class, this, SeimPackage.PORT__PROPERTIES);
}
return properties;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PortDirection getDirection() {
return direction;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setDirection(PortDirection newDirection) {
PortDirection oldDirection = direction;
direction = newDirection == null ? DIRECTION_EDEFAULT : newDirection;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, SeimPackage.PORT__DIRECTION, oldDirection,
direction));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case SeimPackage.PORT__PROPERTIES:
return ((InternalEList<?>) getProperties()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case SeimPackage.PORT__UID:
return getUid();
case SeimPackage.PORT__NAME:
return getName();
case SeimPackage.PORT__PROPERTIES:
return getProperties();
case SeimPackage.PORT__DIRECTION:
return getDirection();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case SeimPackage.PORT__NAME:
setName((String) newValue);
return;
case SeimPackage.PORT__PROPERTIES:
getProperties().clear();
getProperties().addAll((Collection<? extends Property>) newValue);
return;
case SeimPackage.PORT__DIRECTION:
setDirection((PortDirection) newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case SeimPackage.PORT__NAME:
setName(NAME_EDEFAULT);
return;
case SeimPackage.PORT__PROPERTIES:
getProperties().clear();
return;
case SeimPackage.PORT__DIRECTION:
setDirection(DIRECTION_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case SeimPackage.PORT__UID:
return isSetUid();
case SeimPackage.PORT__NAME:
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
case SeimPackage.PORT__PROPERTIES:
return properties != null && !properties.isEmpty();
case SeimPackage.PORT__DIRECTION:
return direction != DIRECTION_EDEFAULT;
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
if (eIsProxy())
return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (uid: ");
if (uidESet)
result.append(uid);
else
result.append("<unset>");
result.append(", name: ");
result.append(name);
result.append(", direction: ");
result.append(direction);
result.append(')');
return result.toString();
}
} //PortImpl

View File

@@ -0,0 +1,298 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
* Pierre Virelizier (IRT Saint Exupéry)
* Julien Baclet (IRT Saint Exupéry)
* Pierre Gaufillet (IRT Saint Exupéry)
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.seim.impl;
import com.irtsaintexupery.pseim.seim.PropertyHolder;
import com.irtsaintexupery.pseim.seim.ReferenceProperty;
import com.irtsaintexupery.pseim.seim.SeimPackage;
import org.eclipse.emf.common.notify.Notification;
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;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Reference Property</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link com.irtsaintexupery.pseim.seim.impl.ReferencePropertyImpl#getUid <em>Uid</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.seim.impl.ReferencePropertyImpl#getKey <em>Key</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.seim.impl.ReferencePropertyImpl#getRef <em>Ref</em>}</li>
* </ul>
*
* @generated
*/
public class ReferencePropertyImpl extends MinimalEObjectImpl.Container implements ReferenceProperty {
/**
* The default value of the '{@link #getUid() <em>Uid</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getUid()
* @generated
* @ordered
*/
protected static final String UID_EDEFAULT = null;
/**
* The cached value of the '{@link #getUid() <em>Uid</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getUid()
* @generated
* @ordered
*/
protected String uid = UID_EDEFAULT;
/**
* This is true if the Uid attribute has been set.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
protected boolean uidESet;
/**
* The default value of the '{@link #getKey() <em>Key</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getKey()
* @generated
* @ordered
*/
protected static final String KEY_EDEFAULT = null;
/**
* The cached value of the '{@link #getKey() <em>Key</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getKey()
* @generated
* @ordered
*/
protected String key = KEY_EDEFAULT;
/**
* The cached value of the '{@link #getRef() <em>Ref</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getRef()
* @generated
* @ordered
*/
protected PropertyHolder ref;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ReferencePropertyImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return SeimPackage.Literals.REFERENCE_PROPERTY;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getUid() {
return uid;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean isSetUid() {
return uidESet;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getKey() {
return key;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setKey(String newKey) {
String oldKey = key;
key = newKey;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, SeimPackage.REFERENCE_PROPERTY__KEY, oldKey, key));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PropertyHolder getRef() {
if (ref != null && ref.eIsProxy()) {
InternalEObject oldRef = (InternalEObject) ref;
ref = (PropertyHolder) eResolveProxy(oldRef);
if (ref != oldRef) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, SeimPackage.REFERENCE_PROPERTY__REF,
oldRef, ref));
}
}
return ref;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PropertyHolder basicGetRef() {
return ref;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setRef(PropertyHolder newRef) {
PropertyHolder oldRef = ref;
ref = newRef;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, SeimPackage.REFERENCE_PROPERTY__REF, oldRef, ref));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case SeimPackage.REFERENCE_PROPERTY__UID:
return getUid();
case SeimPackage.REFERENCE_PROPERTY__KEY:
return getKey();
case SeimPackage.REFERENCE_PROPERTY__REF:
if (resolve)
return getRef();
return basicGetRef();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case SeimPackage.REFERENCE_PROPERTY__KEY:
setKey((String) newValue);
return;
case SeimPackage.REFERENCE_PROPERTY__REF:
setRef((PropertyHolder) newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case SeimPackage.REFERENCE_PROPERTY__KEY:
setKey(KEY_EDEFAULT);
return;
case SeimPackage.REFERENCE_PROPERTY__REF:
setRef((PropertyHolder) null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case SeimPackage.REFERENCE_PROPERTY__UID:
return isSetUid();
case SeimPackage.REFERENCE_PROPERTY__KEY:
return KEY_EDEFAULT == null ? key != null : !KEY_EDEFAULT.equals(key);
case SeimPackage.REFERENCE_PROPERTY__REF:
return ref != null;
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
if (eIsProxy())
return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (uid: ");
if (uidESet)
result.append(uid);
else
result.append("<unset>");
result.append(", key: ");
result.append(key);
result.append(')');
return result.toString();
}
} //ReferencePropertyImpl

View File

@@ -0,0 +1,254 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
* Pierre Virelizier (IRT Saint Exupéry)
* Julien Baclet (IRT Saint Exupéry)
* Pierre Gaufillet (IRT Saint Exupéry)
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.seim.impl;
import com.irtsaintexupery.pseim.seim.*;
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;
import org.eclipse.emf.ecore.util.EcoreUtil;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Factory</b>.
* <!-- end-user-doc -->
* @generated
*/
public class SeimFactoryImpl extends EFactoryImpl implements SeimFactory {
/**
* Creates the default factory implementation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static SeimFactory init() {
try {
SeimFactory theSeimFactory = (SeimFactory) EPackage.Registry.INSTANCE.getEFactory(SeimPackage.eNS_URI);
if (theSeimFactory != null) {
return theSeimFactory;
}
} catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new SeimFactoryImpl();
}
/**
* Creates an instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public SeimFactoryImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
case SeimPackage.COMPONENT:
return createComponent();
case SeimPackage.PORT:
return createPort();
case SeimPackage.LINK:
return createLink();
case SeimPackage.INTEGER_PROPERTY:
return createIntegerProperty();
case SeimPackage.STRING_PROPERTY:
return createStringProperty();
case SeimPackage.BOOLEAN_PROPERTY:
return createBooleanProperty();
case SeimPackage.REFERENCE_PROPERTY:
return createReferenceProperty();
case SeimPackage.MODEL:
return createModel();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object createFromString(EDataType eDataType, String initialValue) {
switch (eDataType.getClassifierID()) {
case SeimPackage.PORT_DIRECTION:
return createPortDirectionFromString(eDataType, initialValue);
default:
throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String convertToString(EDataType eDataType, Object instanceValue) {
switch (eDataType.getClassifierID()) {
case SeimPackage.PORT_DIRECTION:
return convertPortDirectionToString(eDataType, instanceValue);
default:
throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
public Component createComponent() {
ComponentImpl component = new ComponentImpl();
component.uid = EcoreUtil.generateUUID();
return component;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
public Port createPort() {
PortImpl port = new PortImpl();
port.uid = EcoreUtil.generateUUID();
return port;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
public Link createLink() {
LinkImpl link = new LinkImpl();
link.uid = EcoreUtil.generateUUID();
return link;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
public IntegerProperty createIntegerProperty() {
IntegerPropertyImpl integerProperty = new IntegerPropertyImpl();
integerProperty.uid = EcoreUtil.generateUUID();
return integerProperty;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
public StringProperty createStringProperty() {
StringPropertyImpl stringProperty = new StringPropertyImpl();
stringProperty.uid = EcoreUtil.generateUUID();
return stringProperty;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
public BooleanProperty createBooleanProperty() {
BooleanPropertyImpl booleanProperty = new BooleanPropertyImpl();
booleanProperty.uid = EcoreUtil.generateUUID();
return booleanProperty;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
public ReferenceProperty createReferenceProperty() {
ReferencePropertyImpl referenceProperty = new ReferencePropertyImpl();
referenceProperty.uid = EcoreUtil.generateUUID();
return referenceProperty;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
public Model createModel() {
ModelImpl model = new ModelImpl();
model.uid = EcoreUtil.generateUUID();
return model;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PortDirection createPortDirectionFromString(EDataType eDataType, String initialValue) {
PortDirection result = PortDirection.get(initialValue);
if (result == null)
throw new IllegalArgumentException(
"The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
return result;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String convertPortDirectionToString(EDataType eDataType, Object instanceValue) {
return instanceValue == null ? null : instanceValue.toString();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public SeimPackage getSeimPackage() {
return (SeimPackage) getEPackage();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @deprecated
* @generated
*/
@Deprecated
public static SeimPackage getPackage() {
return SeimPackage.eINSTANCE;
}
} //SeimFactoryImpl

View File

@@ -0,0 +1,778 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
* Pierre Virelizier (IRT Saint Exupéry)
* Julien Baclet (IRT Saint Exupéry)
* Pierre Gaufillet (IRT Saint Exupéry)
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.seim.impl;
import com.irtsaintexupery.pseim.seim.BasicProperty;
import com.irtsaintexupery.pseim.seim.BooleanProperty;
import com.irtsaintexupery.pseim.seim.BorderElement;
import com.irtsaintexupery.pseim.seim.Component;
import com.irtsaintexupery.pseim.seim.Element;
import com.irtsaintexupery.pseim.seim.GraphElement;
import com.irtsaintexupery.pseim.seim.IdentifiedElement;
import com.irtsaintexupery.pseim.seim.IntegerProperty;
import com.irtsaintexupery.pseim.seim.Link;
import com.irtsaintexupery.pseim.seim.Model;
import com.irtsaintexupery.pseim.seim.NamedElement;
import com.irtsaintexupery.pseim.seim.Port;
import com.irtsaintexupery.pseim.seim.PortDirection;
import com.irtsaintexupery.pseim.seim.Property;
import com.irtsaintexupery.pseim.seim.PropertyHolder;
import com.irtsaintexupery.pseim.seim.ReferenceProperty;
import com.irtsaintexupery.pseim.seim.SeimFactory;
import com.irtsaintexupery.pseim.seim.SeimPackage;
import com.irtsaintexupery.pseim.seim.StringProperty;
import com.irtsaintexupery.pseim.seim.util.SeimValidator;
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.EValidator;
import org.eclipse.emf.ecore.impl.EPackageImpl;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Package</b>.
* <!-- end-user-doc -->
* @generated
*/
public class SeimPackageImpl extends EPackageImpl implements SeimPackage {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass componentEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass portEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass linkEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass graphElementEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass propertyEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass basicPropertyEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass integerPropertyEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass stringPropertyEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass booleanPropertyEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass referencePropertyEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass propertyHolderEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass namedElementEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass identifiedElementEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass modelEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass borderElementEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass elementEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EEnum portDirectionEEnum = null;
/**
* Creates an instance of the model <b>Package</b>, registered with
* {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
* package URI value.
* <p>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.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.emf.ecore.EPackage.Registry
* @see com.irtsaintexupery.pseim.seim.SeimPackage#eNS_URI
* @see #init()
* @generated
*/
private SeimPackageImpl() {
super(eNS_URI, SeimFactory.eINSTANCE);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static boolean isInited = false;
/**
* Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
*
* <p>This method is used to initialize {@link SeimPackage#eINSTANCE} when that field is accessed.
* Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #eNS_URI
* @see #createPackageContents()
* @see #initializePackageContents()
* @generated
*/
public static SeimPackage init() {
if (isInited)
return (SeimPackage) EPackage.Registry.INSTANCE.getEPackage(SeimPackage.eNS_URI);
// Obtain or create and register package
SeimPackageImpl theSeimPackage = (SeimPackageImpl) (EPackage.Registry.INSTANCE
.get(eNS_URI) instanceof SeimPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI)
: new SeimPackageImpl());
isInited = true;
// Create package meta-data objects
theSeimPackage.createPackageContents();
// Initialize created meta-data
theSeimPackage.initializePackageContents();
// Register package validator
EValidator.Registry.INSTANCE.put(theSeimPackage, new EValidator.Descriptor() {
public EValidator getEValidator() {
return SeimValidator.INSTANCE;
}
});
// Mark meta-data to indicate it can't be changed
theSeimPackage.freeze();
// Update the registry and return the package
EPackage.Registry.INSTANCE.put(SeimPackage.eNS_URI, theSeimPackage);
return theSeimPackage;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getComponent() {
return componentEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getComponent_Content() {
return (EReference) componentEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getPort() {
return portEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getPort_Direction() {
return (EAttribute) portEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getLink() {
return linkEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getLink_Src() {
return (EReference) linkEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getLink_Dst() {
return (EReference) linkEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getGraphElement() {
return graphElementEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getProperty() {
return propertyEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getProperty_Key() {
return (EAttribute) propertyEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getBasicProperty() {
return basicPropertyEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getIntegerProperty() {
return integerPropertyEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getIntegerProperty_Value() {
return (EAttribute) integerPropertyEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getStringProperty() {
return stringPropertyEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getStringProperty_Value() {
return (EAttribute) stringPropertyEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getBooleanProperty() {
return booleanPropertyEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getBooleanProperty_Value() {
return (EAttribute) booleanPropertyEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getReferenceProperty() {
return referencePropertyEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getReferenceProperty_Ref() {
return (EReference) referencePropertyEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getPropertyHolder() {
return propertyHolderEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getPropertyHolder_Properties() {
return (EReference) propertyHolderEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getNamedElement() {
return namedElementEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getNamedElement_Name() {
return (EAttribute) namedElementEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getIdentifiedElement() {
return identifiedElementEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getIdentifiedElement_Uid() {
return (EAttribute) identifiedElementEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getModel() {
return modelEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getModel_ModelElements() {
return (EReference) modelEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getBorderElement() {
return borderElementEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getElement() {
return elementEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EEnum getPortDirection() {
return portDirectionEEnum;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public SeimFactory getSeimFactory() {
return (SeimFactory) getEFactoryInstance();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @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.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void createPackageContents() {
if (isCreated)
return;
isCreated = true;
// Create classes and their features
componentEClass = createEClass(COMPONENT);
createEReference(componentEClass, COMPONENT__CONTENT);
portEClass = createEClass(PORT);
createEAttribute(portEClass, PORT__DIRECTION);
linkEClass = createEClass(LINK);
createEReference(linkEClass, LINK__SRC);
createEReference(linkEClass, LINK__DST);
graphElementEClass = createEClass(GRAPH_ELEMENT);
propertyEClass = createEClass(PROPERTY);
createEAttribute(propertyEClass, PROPERTY__KEY);
basicPropertyEClass = createEClass(BASIC_PROPERTY);
integerPropertyEClass = createEClass(INTEGER_PROPERTY);
createEAttribute(integerPropertyEClass, INTEGER_PROPERTY__VALUE);
stringPropertyEClass = createEClass(STRING_PROPERTY);
createEAttribute(stringPropertyEClass, STRING_PROPERTY__VALUE);
booleanPropertyEClass = createEClass(BOOLEAN_PROPERTY);
createEAttribute(booleanPropertyEClass, BOOLEAN_PROPERTY__VALUE);
referencePropertyEClass = createEClass(REFERENCE_PROPERTY);
createEReference(referencePropertyEClass, REFERENCE_PROPERTY__REF);
propertyHolderEClass = createEClass(PROPERTY_HOLDER);
createEReference(propertyHolderEClass, PROPERTY_HOLDER__PROPERTIES);
namedElementEClass = createEClass(NAMED_ELEMENT);
createEAttribute(namedElementEClass, NAMED_ELEMENT__NAME);
identifiedElementEClass = createEClass(IDENTIFIED_ELEMENT);
createEAttribute(identifiedElementEClass, IDENTIFIED_ELEMENT__UID);
modelEClass = createEClass(MODEL);
createEReference(modelEClass, MODEL__MODEL_ELEMENTS);
borderElementEClass = createEClass(BORDER_ELEMENT);
elementEClass = createEClass(ELEMENT);
// Create enums
portDirectionEEnum = createEEnum(PORT_DIRECTION);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @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.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @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
componentEClass.getESuperTypes().add(this.getGraphElement());
portEClass.getESuperTypes().add(this.getBorderElement());
linkEClass.getESuperTypes().add(this.getGraphElement());
graphElementEClass.getESuperTypes().add(this.getElement());
propertyEClass.getESuperTypes().add(this.getIdentifiedElement());
basicPropertyEClass.getESuperTypes().add(this.getProperty());
integerPropertyEClass.getESuperTypes().add(this.getBasicProperty());
stringPropertyEClass.getESuperTypes().add(this.getBasicProperty());
booleanPropertyEClass.getESuperTypes().add(this.getBasicProperty());
referencePropertyEClass.getESuperTypes().add(this.getProperty());
propertyHolderEClass.getESuperTypes().add(this.getNamedElement());
namedElementEClass.getESuperTypes().add(this.getIdentifiedElement());
modelEClass.getESuperTypes().add(this.getPropertyHolder());
borderElementEClass.getESuperTypes().add(this.getElement());
elementEClass.getESuperTypes().add(this.getPropertyHolder());
// Initialize classes, features, and operations; add parameters
initEClass(componentEClass, Component.class, "Component", !IS_ABSTRACT, !IS_INTERFACE,
IS_GENERATED_INSTANCE_CLASS);
initEReference(getComponent_Content(), this.getElement(), null, "content", null, 0, -1, Component.class,
!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE,
IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(portEClass, Port.class, "Port", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getPort_Direction(), this.getPortDirection(), "direction", null, 1, 1, Port.class, !IS_TRANSIENT,
!IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(linkEClass, Link.class, "Link", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getLink_Src(), this.getPort(), null, "src", null, 0, 1, Link.class, !IS_TRANSIENT, !IS_VOLATILE,
IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getLink_Dst(), this.getPort(), null, "dst", null, 0, 1, Link.class, !IS_TRANSIENT, !IS_VOLATILE,
IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(graphElementEClass, GraphElement.class, "GraphElement", IS_ABSTRACT, IS_INTERFACE,
IS_GENERATED_INSTANCE_CLASS);
initEClass(propertyEClass, Property.class, "Property", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getProperty_Key(), ecorePackage.getEString(), "key", null, 1, 1, Property.class, !IS_TRANSIENT,
!IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(basicPropertyEClass, BasicProperty.class, "BasicProperty", IS_ABSTRACT, IS_INTERFACE,
IS_GENERATED_INSTANCE_CLASS);
initEClass(integerPropertyEClass, IntegerProperty.class, "IntegerProperty", !IS_ABSTRACT, !IS_INTERFACE,
IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getIntegerProperty_Value(), ecorePackage.getEInt(), "value", "0", 1, 1, IntegerProperty.class,
!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(stringPropertyEClass, StringProperty.class, "StringProperty", !IS_ABSTRACT, !IS_INTERFACE,
IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getStringProperty_Value(), ecorePackage.getEString(), "value", "\'\'", 1, 1,
StringProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
!IS_DERIVED, IS_ORDERED);
initEClass(booleanPropertyEClass, BooleanProperty.class, "BooleanProperty", !IS_ABSTRACT, !IS_INTERFACE,
IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getBooleanProperty_Value(), ecorePackage.getEBoolean(), "value", "false", 1, 1,
BooleanProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
!IS_DERIVED, IS_ORDERED);
initEClass(referencePropertyEClass, ReferenceProperty.class, "ReferenceProperty", !IS_ABSTRACT, !IS_INTERFACE,
IS_GENERATED_INSTANCE_CLASS);
initEReference(getReferenceProperty_Ref(), this.getPropertyHolder(), null, "ref", null, 1, 1,
ReferenceProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES,
!IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(propertyHolderEClass, PropertyHolder.class, "PropertyHolder", IS_ABSTRACT, IS_INTERFACE,
IS_GENERATED_INSTANCE_CLASS);
initEReference(getPropertyHolder_Properties(), this.getProperty(), null, "properties", null, 0, -1,
PropertyHolder.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES,
!IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(namedElementEClass, NamedElement.class, "NamedElement", IS_ABSTRACT, IS_INTERFACE,
IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getNamedElement_Name(), ecorePackage.getEString(), "name", null, 0, 1, NamedElement.class,
!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(identifiedElementEClass, IdentifiedElement.class, "IdentifiedElement", IS_ABSTRACT, IS_INTERFACE,
IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getIdentifiedElement_Uid(), ecorePackage.getEString(), "uid", null, 0, 1,
IdentifiedElement.class, !IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, IS_UNSETTABLE, IS_ID, IS_UNIQUE,
!IS_DERIVED, IS_ORDERED);
initEClass(modelEClass, Model.class, "Model", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getModel_ModelElements(), this.getGraphElement(), null, "modelElements", null, 0, -1,
Model.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES,
!IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(borderElementEClass, BorderElement.class, "BorderElement", IS_ABSTRACT, IS_INTERFACE,
IS_GENERATED_INSTANCE_CLASS);
initEClass(elementEClass, Element.class, "Element", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
// Initialize enums and add enum literals
initEEnum(portDirectionEEnum, PortDirection.class, "PortDirection");
addEEnumLiteral(portDirectionEEnum, PortDirection.UNSPECIFIED);
addEEnumLiteral(portDirectionEEnum, PortDirection.IN);
addEEnumLiteral(portDirectionEEnum, PortDirection.OUT);
addEEnumLiteral(portDirectionEEnum, PortDirection.INOUT);
// Create resource
createResource(eNS_URI);
// Create annotations
// http://www.eclipse.org/OCL/Import
createImportAnnotations();
// http://www.eclipse.org/emf/2002/Ecore
createEcoreAnnotations();
// http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot
createPivotAnnotations();
}
/**
* Initializes the annotations for <b>http://www.eclipse.org/OCL/Import</b>.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void createImportAnnotations() {
String source = "http://www.eclipse.org/OCL/Import";
addAnnotation(this, source, new String[] { "ecore", "http://www.eclipse.org/emf/2002/Ecore" });
}
/**
* Initializes the annotations for <b>http://www.eclipse.org/emf/2002/Ecore</b>.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void createEcoreAnnotations() {
String source = "http://www.eclipse.org/emf/2002/Ecore";
addAnnotation(this, source,
new String[] { "invocationDelegates", "http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot",
"settingDelegates", "http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot", "validationDelegates",
"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot" });
addAnnotation(propertyEClass, source, new String[] { "constraints", "keyNotNull" });
addAnnotation(propertyHolderEClass, source, new String[] { "constraints", "uniqueKeys" });
addAnnotation(namedElementEClass, source, new String[] { "constraints", "nameNotEmpty" });
addAnnotation(identifiedElementEClass, source, new String[] { "constraints", "uidNotEmpty" });
}
/**
* Initializes the annotations for <b>http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot</b>.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void createPivotAnnotations() {
String source = "http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot";
addAnnotation(propertyEClass, source, new String[] { "keyNotNull", "key <> \'\'" });
addAnnotation(propertyHolderEClass, source,
new String[] { "uniqueKeys", "properties->forAll(p1, p2 | p1 <> p2 implies p1.key <> p2.key)" });
addAnnotation(namedElementEClass, source, new String[] { "nameNotEmpty", "name <> \'\'" });
addAnnotation(identifiedElementEClass, source, new String[] { "uidNotEmpty", "uid <> \'\'" });
}
} //SeimPackageImpl

View File

@@ -0,0 +1,288 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
* Pierre Virelizier (IRT Saint Exupéry)
* Julien Baclet (IRT Saint Exupéry)
* Pierre Gaufillet (IRT Saint Exupéry)
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.seim.impl;
import com.irtsaintexupery.pseim.seim.SeimPackage;
import com.irtsaintexupery.pseim.seim.StringProperty;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>String Property</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link com.irtsaintexupery.pseim.seim.impl.StringPropertyImpl#getUid <em>Uid</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.seim.impl.StringPropertyImpl#getKey <em>Key</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.seim.impl.StringPropertyImpl#getValue <em>Value</em>}</li>
* </ul>
*
* @generated
*/
public class StringPropertyImpl extends MinimalEObjectImpl.Container implements StringProperty {
/**
* The default value of the '{@link #getUid() <em>Uid</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getUid()
* @generated
* @ordered
*/
protected static final String UID_EDEFAULT = null;
/**
* The cached value of the '{@link #getUid() <em>Uid</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getUid()
* @generated
* @ordered
*/
protected String uid = UID_EDEFAULT;
/**
* This is true if the Uid attribute has been set.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
protected boolean uidESet;
/**
* The default value of the '{@link #getKey() <em>Key</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getKey()
* @generated
* @ordered
*/
protected static final String KEY_EDEFAULT = null;
/**
* The cached value of the '{@link #getKey() <em>Key</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getKey()
* @generated
* @ordered
*/
protected String key = KEY_EDEFAULT;
/**
* The default value of the '{@link #getValue() <em>Value</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getValue()
* @generated
* @ordered
*/
protected static final String VALUE_EDEFAULT = "\'\'";
/**
* The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getValue()
* @generated
* @ordered
*/
protected String value = VALUE_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected StringPropertyImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return SeimPackage.Literals.STRING_PROPERTY;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getUid() {
return uid;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean isSetUid() {
return uidESet;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getKey() {
return key;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setKey(String newKey) {
String oldKey = key;
key = newKey;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, SeimPackage.STRING_PROPERTY__KEY, oldKey, key));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getValue() {
return value;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setValue(String newValue) {
String oldValue = value;
value = newValue;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, SeimPackage.STRING_PROPERTY__VALUE, oldValue, value));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case SeimPackage.STRING_PROPERTY__UID:
return getUid();
case SeimPackage.STRING_PROPERTY__KEY:
return getKey();
case SeimPackage.STRING_PROPERTY__VALUE:
return getValue();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case SeimPackage.STRING_PROPERTY__KEY:
setKey((String) newValue);
return;
case SeimPackage.STRING_PROPERTY__VALUE:
setValue((String) newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case SeimPackage.STRING_PROPERTY__KEY:
setKey(KEY_EDEFAULT);
return;
case SeimPackage.STRING_PROPERTY__VALUE:
setValue(VALUE_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case SeimPackage.STRING_PROPERTY__UID:
return isSetUid();
case SeimPackage.STRING_PROPERTY__KEY:
return KEY_EDEFAULT == null ? key != null : !KEY_EDEFAULT.equals(key);
case SeimPackage.STRING_PROPERTY__VALUE:
return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
if (eIsProxy())
return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (uid: ");
if (uidESet)
result.append(uid);
else
result.append("<unset>");
result.append(", key: ");
result.append(key);
result.append(", value: ");
result.append(value);
result.append(')');
return result.toString();
}
} //StringPropertyImpl

View File

@@ -0,0 +1,417 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
* Pierre Virelizier (IRT Saint Exupéry)
* Julien Baclet (IRT Saint Exupéry)
* Pierre Gaufillet (IRT Saint Exupéry)
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.seim.util;
import com.irtsaintexupery.pseim.seim.*;
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.Notifier;
import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc -->
* The <b>Adapter Factory</b> for the model.
* It provides an adapter <code>createXXX</code> method for each class of the model.
* <!-- end-user-doc -->
* @see com.irtsaintexupery.pseim.seim.SeimPackage
* @generated
*/
public class SeimAdapterFactory extends AdapterFactoryImpl {
/**
* The cached model package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static SeimPackage modelPackage;
/**
* Creates an instance of the adapter factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public SeimAdapterFactory() {
if (modelPackage == null) {
modelPackage = SeimPackage.eINSTANCE;
}
}
/**
* Returns whether this factory is applicable for the type of the object.
* <!-- begin-user-doc -->
* This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
* <!-- end-user-doc -->
* @return whether this factory is applicable for the type of the object.
* @generated
*/
@Override
public boolean isFactoryForType(Object object) {
if (object == modelPackage) {
return true;
}
if (object instanceof EObject) {
return ((EObject) object).eClass().getEPackage() == modelPackage;
}
return false;
}
/**
* The switch that delegates to the <code>createXXX</code> methods.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected SeimSwitch<Adapter> modelSwitch = new SeimSwitch<Adapter>() {
@Override
public Adapter caseComponent(Component object) {
return createComponentAdapter();
}
@Override
public Adapter casePort(Port object) {
return createPortAdapter();
}
@Override
public Adapter caseLink(Link object) {
return createLinkAdapter();
}
@Override
public Adapter caseGraphElement(GraphElement object) {
return createGraphElementAdapter();
}
@Override
public Adapter caseProperty(Property object) {
return createPropertyAdapter();
}
@Override
public Adapter caseBasicProperty(BasicProperty object) {
return createBasicPropertyAdapter();
}
@Override
public Adapter caseIntegerProperty(IntegerProperty object) {
return createIntegerPropertyAdapter();
}
@Override
public Adapter caseStringProperty(StringProperty object) {
return createStringPropertyAdapter();
}
@Override
public Adapter caseBooleanProperty(BooleanProperty object) {
return createBooleanPropertyAdapter();
}
@Override
public Adapter caseReferenceProperty(ReferenceProperty object) {
return createReferencePropertyAdapter();
}
@Override
public Adapter casePropertyHolder(PropertyHolder object) {
return createPropertyHolderAdapter();
}
@Override
public Adapter caseNamedElement(NamedElement object) {
return createNamedElementAdapter();
}
@Override
public Adapter caseIdentifiedElement(IdentifiedElement object) {
return createIdentifiedElementAdapter();
}
@Override
public Adapter caseModel(Model object) {
return createModelAdapter();
}
@Override
public Adapter caseBorderElement(BorderElement object) {
return createBorderElementAdapter();
}
@Override
public Adapter caseElement(Element object) {
return createElementAdapter();
}
@Override
public Adapter defaultCase(EObject object) {
return createEObjectAdapter();
}
};
/**
* Creates an adapter for the <code>target</code>.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param target the object to adapt.
* @return the adapter for the <code>target</code>.
* @generated
*/
@Override
public Adapter createAdapter(Notifier target) {
return modelSwitch.doSwitch((EObject) target);
}
/**
* Creates a new adapter for an object of class '{@link com.irtsaintexupery.pseim.seim.Component <em>Component</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see com.irtsaintexupery.pseim.seim.Component
* @generated
*/
public Adapter createComponentAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link com.irtsaintexupery.pseim.seim.Port <em>Port</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see com.irtsaintexupery.pseim.seim.Port
* @generated
*/
public Adapter createPortAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link com.irtsaintexupery.pseim.seim.Link <em>Link</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see com.irtsaintexupery.pseim.seim.Link
* @generated
*/
public Adapter createLinkAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link com.irtsaintexupery.pseim.seim.GraphElement <em>Graph Element</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see com.irtsaintexupery.pseim.seim.GraphElement
* @generated
*/
public Adapter createGraphElementAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link com.irtsaintexupery.pseim.seim.Property <em>Property</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see com.irtsaintexupery.pseim.seim.Property
* @generated
*/
public Adapter createPropertyAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link com.irtsaintexupery.pseim.seim.BasicProperty <em>Basic Property</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see com.irtsaintexupery.pseim.seim.BasicProperty
* @generated
*/
public Adapter createBasicPropertyAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link com.irtsaintexupery.pseim.seim.IntegerProperty <em>Integer Property</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see com.irtsaintexupery.pseim.seim.IntegerProperty
* @generated
*/
public Adapter createIntegerPropertyAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link com.irtsaintexupery.pseim.seim.StringProperty <em>String Property</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see com.irtsaintexupery.pseim.seim.StringProperty
* @generated
*/
public Adapter createStringPropertyAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link com.irtsaintexupery.pseim.seim.BooleanProperty <em>Boolean Property</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see com.irtsaintexupery.pseim.seim.BooleanProperty
* @generated
*/
public Adapter createBooleanPropertyAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link com.irtsaintexupery.pseim.seim.ReferenceProperty <em>Reference Property</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see com.irtsaintexupery.pseim.seim.ReferenceProperty
* @generated
*/
public Adapter createReferencePropertyAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link com.irtsaintexupery.pseim.seim.PropertyHolder <em>Property Holder</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see com.irtsaintexupery.pseim.seim.PropertyHolder
* @generated
*/
public Adapter createPropertyHolderAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link com.irtsaintexupery.pseim.seim.NamedElement <em>Named Element</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see com.irtsaintexupery.pseim.seim.NamedElement
* @generated
*/
public Adapter createNamedElementAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link com.irtsaintexupery.pseim.seim.IdentifiedElement <em>Identified Element</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see com.irtsaintexupery.pseim.seim.IdentifiedElement
* @generated
*/
public Adapter createIdentifiedElementAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link com.irtsaintexupery.pseim.seim.Model <em>Model</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see com.irtsaintexupery.pseim.seim.Model
* @generated
*/
public Adapter createModelAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link com.irtsaintexupery.pseim.seim.BorderElement <em>Border Element</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see com.irtsaintexupery.pseim.seim.BorderElement
* @generated
*/
public Adapter createBorderElementAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link com.irtsaintexupery.pseim.seim.Element <em>Element</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see com.irtsaintexupery.pseim.seim.Element
* @generated
*/
public Adapter createElementAdapter() {
return null;
}
/**
* Creates a new adapter for the default case.
* <!-- begin-user-doc -->
* This default implementation returns null.
* <!-- end-user-doc -->
* @return the new adapter.
* @generated
*/
public Adapter createEObjectAdapter() {
return null;
}
} //SeimAdapterFactory

View File

@@ -0,0 +1,547 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
* Pierre Virelizier (IRT Saint Exupéry)
* Julien Baclet (IRT Saint Exupéry)
* Pierre Gaufillet (IRT Saint Exupéry)
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.seim.util;
import com.irtsaintexupery.pseim.seim.*;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.util.Switch;
/**
* <!-- begin-user-doc -->
* The <b>Switch</b> for the model's inheritance hierarchy.
* It supports the call {@link #doSwitch(EObject) doSwitch(object)}
* to invoke the <code>caseXXX</code> method for each class of the model,
* starting with the actual class of the object
* and proceeding up the inheritance hierarchy
* until a non-null result is returned,
* which is the result of the switch.
* <!-- end-user-doc -->
* @see com.irtsaintexupery.pseim.seim.SeimPackage
* @generated
*/
public class SeimSwitch<T> extends Switch<T> {
/**
* The cached model package
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static SeimPackage modelPackage;
/**
* Creates an instance of the switch.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public SeimSwitch() {
if (modelPackage == null) {
modelPackage = SeimPackage.eINSTANCE;
}
}
/**
* Checks whether this is a switch for the given package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param ePackage the package in question.
* @return whether this is a switch for the given package.
* @generated
*/
@Override
protected boolean isSwitchFor(EPackage ePackage) {
return ePackage == modelPackage;
}
/**
* Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the first non-null result returned by a <code>caseXXX</code> call.
* @generated
*/
@Override
protected T doSwitch(int classifierID, EObject theEObject) {
switch (classifierID) {
case SeimPackage.COMPONENT: {
Component component = (Component) theEObject;
T result = caseComponent(component);
if (result == null)
result = caseGraphElement(component);
if (result == null)
result = caseElement(component);
if (result == null)
result = casePropertyHolder(component);
if (result == null)
result = caseNamedElement(component);
if (result == null)
result = caseIdentifiedElement(component);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case SeimPackage.PORT: {
Port port = (Port) theEObject;
T result = casePort(port);
if (result == null)
result = caseBorderElement(port);
if (result == null)
result = caseElement(port);
if (result == null)
result = casePropertyHolder(port);
if (result == null)
result = caseNamedElement(port);
if (result == null)
result = caseIdentifiedElement(port);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case SeimPackage.LINK: {
Link link = (Link) theEObject;
T result = caseLink(link);
if (result == null)
result = caseGraphElement(link);
if (result == null)
result = caseElement(link);
if (result == null)
result = casePropertyHolder(link);
if (result == null)
result = caseNamedElement(link);
if (result == null)
result = caseIdentifiedElement(link);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case SeimPackage.GRAPH_ELEMENT: {
GraphElement graphElement = (GraphElement) theEObject;
T result = caseGraphElement(graphElement);
if (result == null)
result = caseElement(graphElement);
if (result == null)
result = casePropertyHolder(graphElement);
if (result == null)
result = caseNamedElement(graphElement);
if (result == null)
result = caseIdentifiedElement(graphElement);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case SeimPackage.PROPERTY: {
Property property = (Property) theEObject;
T result = caseProperty(property);
if (result == null)
result = caseIdentifiedElement(property);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case SeimPackage.BASIC_PROPERTY: {
BasicProperty basicProperty = (BasicProperty) theEObject;
T result = caseBasicProperty(basicProperty);
if (result == null)
result = caseProperty(basicProperty);
if (result == null)
result = caseIdentifiedElement(basicProperty);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case SeimPackage.INTEGER_PROPERTY: {
IntegerProperty integerProperty = (IntegerProperty) theEObject;
T result = caseIntegerProperty(integerProperty);
if (result == null)
result = caseBasicProperty(integerProperty);
if (result == null)
result = caseProperty(integerProperty);
if (result == null)
result = caseIdentifiedElement(integerProperty);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case SeimPackage.STRING_PROPERTY: {
StringProperty stringProperty = (StringProperty) theEObject;
T result = caseStringProperty(stringProperty);
if (result == null)
result = caseBasicProperty(stringProperty);
if (result == null)
result = caseProperty(stringProperty);
if (result == null)
result = caseIdentifiedElement(stringProperty);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case SeimPackage.BOOLEAN_PROPERTY: {
BooleanProperty booleanProperty = (BooleanProperty) theEObject;
T result = caseBooleanProperty(booleanProperty);
if (result == null)
result = caseBasicProperty(booleanProperty);
if (result == null)
result = caseProperty(booleanProperty);
if (result == null)
result = caseIdentifiedElement(booleanProperty);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case SeimPackage.REFERENCE_PROPERTY: {
ReferenceProperty referenceProperty = (ReferenceProperty) theEObject;
T result = caseReferenceProperty(referenceProperty);
if (result == null)
result = caseProperty(referenceProperty);
if (result == null)
result = caseIdentifiedElement(referenceProperty);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case SeimPackage.PROPERTY_HOLDER: {
PropertyHolder propertyHolder = (PropertyHolder) theEObject;
T result = casePropertyHolder(propertyHolder);
if (result == null)
result = caseNamedElement(propertyHolder);
if (result == null)
result = caseIdentifiedElement(propertyHolder);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case SeimPackage.NAMED_ELEMENT: {
NamedElement namedElement = (NamedElement) theEObject;
T result = caseNamedElement(namedElement);
if (result == null)
result = caseIdentifiedElement(namedElement);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case SeimPackage.IDENTIFIED_ELEMENT: {
IdentifiedElement identifiedElement = (IdentifiedElement) theEObject;
T result = caseIdentifiedElement(identifiedElement);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case SeimPackage.MODEL: {
Model model = (Model) theEObject;
T result = caseModel(model);
if (result == null)
result = casePropertyHolder(model);
if (result == null)
result = caseNamedElement(model);
if (result == null)
result = caseIdentifiedElement(model);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case SeimPackage.BORDER_ELEMENT: {
BorderElement borderElement = (BorderElement) theEObject;
T result = caseBorderElement(borderElement);
if (result == null)
result = caseElement(borderElement);
if (result == null)
result = casePropertyHolder(borderElement);
if (result == null)
result = caseNamedElement(borderElement);
if (result == null)
result = caseIdentifiedElement(borderElement);
if (result == null)
result = defaultCase(theEObject);
return result;
}
case SeimPackage.ELEMENT: {
Element element = (Element) theEObject;
T result = caseElement(element);
if (result == null)
result = casePropertyHolder(element);
if (result == null)
result = caseNamedElement(element);
if (result == null)
result = caseIdentifiedElement(element);
if (result == null)
result = defaultCase(theEObject);
return result;
}
default:
return defaultCase(theEObject);
}
}
/**
* Returns the result of interpreting the object as an instance of '<em>Component</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Component</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseComponent(Component object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Port</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Port</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T casePort(Port object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Link</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Link</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseLink(Link object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Graph Element</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Graph Element</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseGraphElement(GraphElement object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Property</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Property</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseProperty(Property object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Basic Property</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Basic Property</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseBasicProperty(BasicProperty object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Integer Property</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Integer Property</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseIntegerProperty(IntegerProperty object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>String Property</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>String Property</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseStringProperty(StringProperty object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Boolean Property</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Boolean Property</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseBooleanProperty(BooleanProperty object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Reference Property</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Reference Property</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseReferenceProperty(ReferenceProperty object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Property Holder</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Property Holder</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T casePropertyHolder(PropertyHolder object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Named Element</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Named Element</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseNamedElement(NamedElement object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Identified Element</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Identified Element</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseIdentifiedElement(IdentifiedElement object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Model</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Model</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseModel(Model object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Border Element</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Border Element</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseBorderElement(BorderElement object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Element</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Element</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseElement(Element object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch, but this is the last case anyway.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>EObject</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject)
* @generated
*/
@Override
public T defaultCase(EObject object) {
return null;
}
} //SeimSwitch

View File

@@ -0,0 +1,754 @@
/*******************************************************************************
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0
*
* Contributors:
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation
* Pierre Virelizier (IRT Saint Exupéry)
* Julien Baclet (IRT Saint Exupéry)
* Pierre Gaufillet (IRT Saint Exupéry)
*******************************************************************************/
/**
*/
package com.irtsaintexupery.pseim.seim.util;
import com.irtsaintexupery.pseim.seim.*;
import java.util.Map;
import org.eclipse.emf.common.util.Diagnostic;
import org.eclipse.emf.common.util.DiagnosticChain;
import org.eclipse.emf.common.util.ResourceLocator;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.util.EObjectValidator;
/**
* <!-- begin-user-doc -->
* The <b>Validator</b> for the model.
* <!-- end-user-doc -->
* @see com.irtsaintexupery.pseim.seim.SeimPackage
* @generated
*/
public class SeimValidator extends EObjectValidator {
/**
* The cached model package
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final SeimValidator INSTANCE = new SeimValidator();
/**
* A constant for the {@link org.eclipse.emf.common.util.Diagnostic#getSource() source} of diagnostic {@link org.eclipse.emf.common.util.Diagnostic#getCode() codes} from this package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.emf.common.util.Diagnostic#getSource()
* @see org.eclipse.emf.common.util.Diagnostic#getCode()
* @generated
*/
public static final String DIAGNOSTIC_SOURCE = "com.irtsaintexupery.pseim.seim";
/**
* A constant with a fixed name that can be used as the base value for additional hand written constants.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static final int GENERATED_DIAGNOSTIC_CODE_COUNT = 0;
/**
* A constant with a fixed name that can be used as the base value for additional hand written constants in a derived class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static final int DIAGNOSTIC_CODE_COUNT = GENERATED_DIAGNOSTIC_CODE_COUNT;
/**
* Creates an instance of the switch.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public SeimValidator() {
super();
}
/**
* Returns the package of this validator switch.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EPackage getEPackage() {
return SeimPackage.eINSTANCE;
}
/**
* Calls <code>validateXXX</code> for the corresponding classifier of the model.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected boolean validate(int classifierID, Object value, DiagnosticChain diagnostics,
Map<Object, Object> context) {
switch (classifierID) {
case SeimPackage.COMPONENT:
return validateComponent((Component) value, diagnostics, context);
case SeimPackage.PORT:
return validatePort((Port) value, diagnostics, context);
case SeimPackage.LINK:
return validateLink((Link) value, diagnostics, context);
case SeimPackage.GRAPH_ELEMENT:
return validateGraphElement((GraphElement) value, diagnostics, context);
case SeimPackage.PROPERTY:
return validateProperty((Property) value, diagnostics, context);
case SeimPackage.BASIC_PROPERTY:
return validateBasicProperty((BasicProperty) value, diagnostics, context);
case SeimPackage.INTEGER_PROPERTY:
return validateIntegerProperty((IntegerProperty) value, diagnostics, context);
case SeimPackage.STRING_PROPERTY:
return validateStringProperty((StringProperty) value, diagnostics, context);
case SeimPackage.BOOLEAN_PROPERTY:
return validateBooleanProperty((BooleanProperty) value, diagnostics, context);
case SeimPackage.REFERENCE_PROPERTY:
return validateReferenceProperty((ReferenceProperty) value, diagnostics, context);
case SeimPackage.PROPERTY_HOLDER:
return validatePropertyHolder((PropertyHolder) value, diagnostics, context);
case SeimPackage.NAMED_ELEMENT:
return validateNamedElement((NamedElement) value, diagnostics, context);
case SeimPackage.IDENTIFIED_ELEMENT:
return validateIdentifiedElement((IdentifiedElement) value, diagnostics, context);
case SeimPackage.MODEL:
return validateModel((Model) value, diagnostics, context);
case SeimPackage.BORDER_ELEMENT:
return validateBorderElement((BorderElement) value, diagnostics, context);
case SeimPackage.ELEMENT:
return validateElement((Element) value, diagnostics, context);
case SeimPackage.PORT_DIRECTION:
return validatePortDirection((PortDirection) value, diagnostics, context);
default:
return true;
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean validateComponent(Component component, DiagnosticChain diagnostics, Map<Object, Object> context) {
if (!validate_NoCircularContainment(component, diagnostics, context))
return false;
boolean result = validate_EveryMultiplicityConforms(component, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryDataValueConforms(component, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryReferenceIsContained(component, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryBidirectionalReferenceIsPaired(component, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryProxyResolves(component, diagnostics, context);
if (result || diagnostics != null)
result &= validate_UniqueID(component, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryKeyUnique(component, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryMapEntryUnique(component, diagnostics, context);
if (result || diagnostics != null)
result &= validateIdentifiedElement_uidNotEmpty(component, diagnostics, context);
if (result || diagnostics != null)
result &= validateNamedElement_nameNotEmpty(component, diagnostics, context);
if (result || diagnostics != null)
result &= validatePropertyHolder_uniqueKeys(component, diagnostics, context);
return result;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean validatePort(Port port, DiagnosticChain diagnostics, Map<Object, Object> context) {
if (!validate_NoCircularContainment(port, diagnostics, context))
return false;
boolean result = validate_EveryMultiplicityConforms(port, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryDataValueConforms(port, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryReferenceIsContained(port, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryBidirectionalReferenceIsPaired(port, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryProxyResolves(port, diagnostics, context);
if (result || diagnostics != null)
result &= validate_UniqueID(port, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryKeyUnique(port, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryMapEntryUnique(port, diagnostics, context);
if (result || diagnostics != null)
result &= validateIdentifiedElement_uidNotEmpty(port, diagnostics, context);
if (result || diagnostics != null)
result &= validateNamedElement_nameNotEmpty(port, diagnostics, context);
if (result || diagnostics != null)
result &= validatePropertyHolder_uniqueKeys(port, diagnostics, context);
return result;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean validateLink(Link link, DiagnosticChain diagnostics, Map<Object, Object> context) {
if (!validate_NoCircularContainment(link, diagnostics, context))
return false;
boolean result = validate_EveryMultiplicityConforms(link, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryDataValueConforms(link, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryReferenceIsContained(link, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryBidirectionalReferenceIsPaired(link, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryProxyResolves(link, diagnostics, context);
if (result || diagnostics != null)
result &= validate_UniqueID(link, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryKeyUnique(link, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryMapEntryUnique(link, diagnostics, context);
if (result || diagnostics != null)
result &= validateIdentifiedElement_uidNotEmpty(link, diagnostics, context);
if (result || diagnostics != null)
result &= validateNamedElement_nameNotEmpty(link, diagnostics, context);
if (result || diagnostics != null)
result &= validatePropertyHolder_uniqueKeys(link, diagnostics, context);
return result;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean validateGraphElement(GraphElement graphElement, DiagnosticChain diagnostics,
Map<Object, Object> context) {
if (!validate_NoCircularContainment(graphElement, diagnostics, context))
return false;
boolean result = validate_EveryMultiplicityConforms(graphElement, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryDataValueConforms(graphElement, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryReferenceIsContained(graphElement, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryBidirectionalReferenceIsPaired(graphElement, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryProxyResolves(graphElement, diagnostics, context);
if (result || diagnostics != null)
result &= validate_UniqueID(graphElement, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryKeyUnique(graphElement, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryMapEntryUnique(graphElement, diagnostics, context);
if (result || diagnostics != null)
result &= validateIdentifiedElement_uidNotEmpty(graphElement, diagnostics, context);
if (result || diagnostics != null)
result &= validateNamedElement_nameNotEmpty(graphElement, diagnostics, context);
if (result || diagnostics != null)
result &= validatePropertyHolder_uniqueKeys(graphElement, diagnostics, context);
return result;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean validateProperty(Property property, DiagnosticChain diagnostics, Map<Object, Object> context) {
if (!validate_NoCircularContainment(property, diagnostics, context))
return false;
boolean result = validate_EveryMultiplicityConforms(property, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryDataValueConforms(property, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryReferenceIsContained(property, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryBidirectionalReferenceIsPaired(property, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryProxyResolves(property, diagnostics, context);
if (result || diagnostics != null)
result &= validate_UniqueID(property, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryKeyUnique(property, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryMapEntryUnique(property, diagnostics, context);
if (result || diagnostics != null)
result &= validateIdentifiedElement_uidNotEmpty(property, diagnostics, context);
if (result || diagnostics != null)
result &= validateProperty_keyNotNull(property, diagnostics, context);
return result;
}
/**
* The cached validation expression for the keyNotNull constraint of '<em>Property</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static final String PROPERTY__KEY_NOT_NULL__EEXPRESSION = "key <> ''";
/**
* Validates the keyNotNull constraint of '<em>Property</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean validateProperty_keyNotNull(Property property, DiagnosticChain diagnostics,
Map<Object, Object> context) {
return validate(SeimPackage.Literals.PROPERTY, property, diagnostics, context,
"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot", "keyNotNull", PROPERTY__KEY_NOT_NULL__EEXPRESSION,
Diagnostic.ERROR, DIAGNOSTIC_SOURCE, 0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean validateBasicProperty(BasicProperty basicProperty, DiagnosticChain diagnostics,
Map<Object, Object> context) {
if (!validate_NoCircularContainment(basicProperty, diagnostics, context))
return false;
boolean result = validate_EveryMultiplicityConforms(basicProperty, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryDataValueConforms(basicProperty, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryReferenceIsContained(basicProperty, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryBidirectionalReferenceIsPaired(basicProperty, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryProxyResolves(basicProperty, diagnostics, context);
if (result || diagnostics != null)
result &= validate_UniqueID(basicProperty, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryKeyUnique(basicProperty, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryMapEntryUnique(basicProperty, diagnostics, context);
if (result || diagnostics != null)
result &= validateIdentifiedElement_uidNotEmpty(basicProperty, diagnostics, context);
if (result || diagnostics != null)
result &= validateProperty_keyNotNull(basicProperty, diagnostics, context);
return result;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean validateIntegerProperty(IntegerProperty integerProperty, DiagnosticChain diagnostics,
Map<Object, Object> context) {
if (!validate_NoCircularContainment(integerProperty, diagnostics, context))
return false;
boolean result = validate_EveryMultiplicityConforms(integerProperty, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryDataValueConforms(integerProperty, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryReferenceIsContained(integerProperty, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryBidirectionalReferenceIsPaired(integerProperty, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryProxyResolves(integerProperty, diagnostics, context);
if (result || diagnostics != null)
result &= validate_UniqueID(integerProperty, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryKeyUnique(integerProperty, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryMapEntryUnique(integerProperty, diagnostics, context);
if (result || diagnostics != null)
result &= validateIdentifiedElement_uidNotEmpty(integerProperty, diagnostics, context);
if (result || diagnostics != null)
result &= validateProperty_keyNotNull(integerProperty, diagnostics, context);
return result;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean validateStringProperty(StringProperty stringProperty, DiagnosticChain diagnostics,
Map<Object, Object> context) {
if (!validate_NoCircularContainment(stringProperty, diagnostics, context))
return false;
boolean result = validate_EveryMultiplicityConforms(stringProperty, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryDataValueConforms(stringProperty, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryReferenceIsContained(stringProperty, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryBidirectionalReferenceIsPaired(stringProperty, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryProxyResolves(stringProperty, diagnostics, context);
if (result || diagnostics != null)
result &= validate_UniqueID(stringProperty, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryKeyUnique(stringProperty, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryMapEntryUnique(stringProperty, diagnostics, context);
if (result || diagnostics != null)
result &= validateIdentifiedElement_uidNotEmpty(stringProperty, diagnostics, context);
if (result || diagnostics != null)
result &= validateProperty_keyNotNull(stringProperty, diagnostics, context);
return result;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean validateBooleanProperty(BooleanProperty booleanProperty, DiagnosticChain diagnostics,
Map<Object, Object> context) {
if (!validate_NoCircularContainment(booleanProperty, diagnostics, context))
return false;
boolean result = validate_EveryMultiplicityConforms(booleanProperty, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryDataValueConforms(booleanProperty, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryReferenceIsContained(booleanProperty, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryBidirectionalReferenceIsPaired(booleanProperty, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryProxyResolves(booleanProperty, diagnostics, context);
if (result || diagnostics != null)
result &= validate_UniqueID(booleanProperty, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryKeyUnique(booleanProperty, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryMapEntryUnique(booleanProperty, diagnostics, context);
if (result || diagnostics != null)
result &= validateIdentifiedElement_uidNotEmpty(booleanProperty, diagnostics, context);
if (result || diagnostics != null)
result &= validateProperty_keyNotNull(booleanProperty, diagnostics, context);
return result;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean validateReferenceProperty(ReferenceProperty referenceProperty, DiagnosticChain diagnostics,
Map<Object, Object> context) {
if (!validate_NoCircularContainment(referenceProperty, diagnostics, context))
return false;
boolean result = validate_EveryMultiplicityConforms(referenceProperty, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryDataValueConforms(referenceProperty, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryReferenceIsContained(referenceProperty, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryBidirectionalReferenceIsPaired(referenceProperty, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryProxyResolves(referenceProperty, diagnostics, context);
if (result || diagnostics != null)
result &= validate_UniqueID(referenceProperty, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryKeyUnique(referenceProperty, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryMapEntryUnique(referenceProperty, diagnostics, context);
if (result || diagnostics != null)
result &= validateIdentifiedElement_uidNotEmpty(referenceProperty, diagnostics, context);
if (result || diagnostics != null)
result &= validateProperty_keyNotNull(referenceProperty, diagnostics, context);
return result;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean validatePropertyHolder(PropertyHolder propertyHolder, DiagnosticChain diagnostics,
Map<Object, Object> context) {
if (!validate_NoCircularContainment(propertyHolder, diagnostics, context))
return false;
boolean result = validate_EveryMultiplicityConforms(propertyHolder, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryDataValueConforms(propertyHolder, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryReferenceIsContained(propertyHolder, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryBidirectionalReferenceIsPaired(propertyHolder, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryProxyResolves(propertyHolder, diagnostics, context);
if (result || diagnostics != null)
result &= validate_UniqueID(propertyHolder, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryKeyUnique(propertyHolder, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryMapEntryUnique(propertyHolder, diagnostics, context);
if (result || diagnostics != null)
result &= validateIdentifiedElement_uidNotEmpty(propertyHolder, diagnostics, context);
if (result || diagnostics != null)
result &= validateNamedElement_nameNotEmpty(propertyHolder, diagnostics, context);
if (result || diagnostics != null)
result &= validatePropertyHolder_uniqueKeys(propertyHolder, diagnostics, context);
return result;
}
/**
* The cached validation expression for the uniqueKeys constraint of '<em>Property Holder</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static final String PROPERTY_HOLDER__UNIQUE_KEYS__EEXPRESSION = "properties->forAll(p1, p2 | p1 <> p2 implies p1.key <> p2.key)";
/**
* Validates the uniqueKeys constraint of '<em>Property Holder</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean validatePropertyHolder_uniqueKeys(PropertyHolder propertyHolder, DiagnosticChain diagnostics,
Map<Object, Object> context) {
return validate(SeimPackage.Literals.PROPERTY_HOLDER, propertyHolder, diagnostics, context,
"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot", "uniqueKeys",
PROPERTY_HOLDER__UNIQUE_KEYS__EEXPRESSION, Diagnostic.ERROR, DIAGNOSTIC_SOURCE, 0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean validateNamedElement(NamedElement namedElement, DiagnosticChain diagnostics,
Map<Object, Object> context) {
if (!validate_NoCircularContainment(namedElement, diagnostics, context))
return false;
boolean result = validate_EveryMultiplicityConforms(namedElement, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryDataValueConforms(namedElement, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryReferenceIsContained(namedElement, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryBidirectionalReferenceIsPaired(namedElement, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryProxyResolves(namedElement, diagnostics, context);
if (result || diagnostics != null)
result &= validate_UniqueID(namedElement, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryKeyUnique(namedElement, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryMapEntryUnique(namedElement, diagnostics, context);
if (result || diagnostics != null)
result &= validateIdentifiedElement_uidNotEmpty(namedElement, diagnostics, context);
if (result || diagnostics != null)
result &= validateNamedElement_nameNotEmpty(namedElement, diagnostics, context);
return result;
}
/**
* The cached validation expression for the nameNotEmpty constraint of '<em>Named Element</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static final String NAMED_ELEMENT__NAME_NOT_EMPTY__EEXPRESSION = "name <> ''";
/**
* Validates the nameNotEmpty constraint of '<em>Named Element</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean validateNamedElement_nameNotEmpty(NamedElement namedElement, DiagnosticChain diagnostics,
Map<Object, Object> context) {
return validate(SeimPackage.Literals.NAMED_ELEMENT, namedElement, diagnostics, context,
"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot", "nameNotEmpty",
NAMED_ELEMENT__NAME_NOT_EMPTY__EEXPRESSION, Diagnostic.ERROR, DIAGNOSTIC_SOURCE, 0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean validateIdentifiedElement(IdentifiedElement identifiedElement, DiagnosticChain diagnostics,
Map<Object, Object> context) {
if (!validate_NoCircularContainment(identifiedElement, diagnostics, context))
return false;
boolean result = validate_EveryMultiplicityConforms(identifiedElement, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryDataValueConforms(identifiedElement, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryReferenceIsContained(identifiedElement, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryBidirectionalReferenceIsPaired(identifiedElement, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryProxyResolves(identifiedElement, diagnostics, context);
if (result || diagnostics != null)
result &= validate_UniqueID(identifiedElement, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryKeyUnique(identifiedElement, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryMapEntryUnique(identifiedElement, diagnostics, context);
if (result || diagnostics != null)
result &= validateIdentifiedElement_uidNotEmpty(identifiedElement, diagnostics, context);
return result;
}
/**
* The cached validation expression for the uidNotEmpty constraint of '<em>Identified Element</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static final String IDENTIFIED_ELEMENT__UID_NOT_EMPTY__EEXPRESSION = "uid <> ''";
/**
* Validates the uidNotEmpty constraint of '<em>Identified Element</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean validateIdentifiedElement_uidNotEmpty(IdentifiedElement identifiedElement,
DiagnosticChain diagnostics, Map<Object, Object> context) {
return validate(SeimPackage.Literals.IDENTIFIED_ELEMENT, identifiedElement, diagnostics, context,
"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot", "uidNotEmpty",
IDENTIFIED_ELEMENT__UID_NOT_EMPTY__EEXPRESSION, Diagnostic.ERROR, DIAGNOSTIC_SOURCE, 0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean validateModel(Model model, DiagnosticChain diagnostics, Map<Object, Object> context) {
if (!validate_NoCircularContainment(model, diagnostics, context))
return false;
boolean result = validate_EveryMultiplicityConforms(model, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryDataValueConforms(model, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryReferenceIsContained(model, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryBidirectionalReferenceIsPaired(model, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryProxyResolves(model, diagnostics, context);
if (result || diagnostics != null)
result &= validate_UniqueID(model, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryKeyUnique(model, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryMapEntryUnique(model, diagnostics, context);
if (result || diagnostics != null)
result &= validateIdentifiedElement_uidNotEmpty(model, diagnostics, context);
if (result || diagnostics != null)
result &= validateNamedElement_nameNotEmpty(model, diagnostics, context);
if (result || diagnostics != null)
result &= validatePropertyHolder_uniqueKeys(model, diagnostics, context);
return result;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean validateBorderElement(BorderElement borderElement, DiagnosticChain diagnostics,
Map<Object, Object> context) {
if (!validate_NoCircularContainment(borderElement, diagnostics, context))
return false;
boolean result = validate_EveryMultiplicityConforms(borderElement, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryDataValueConforms(borderElement, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryReferenceIsContained(borderElement, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryBidirectionalReferenceIsPaired(borderElement, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryProxyResolves(borderElement, diagnostics, context);
if (result || diagnostics != null)
result &= validate_UniqueID(borderElement, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryKeyUnique(borderElement, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryMapEntryUnique(borderElement, diagnostics, context);
if (result || diagnostics != null)
result &= validateIdentifiedElement_uidNotEmpty(borderElement, diagnostics, context);
if (result || diagnostics != null)
result &= validateNamedElement_nameNotEmpty(borderElement, diagnostics, context);
if (result || diagnostics != null)
result &= validatePropertyHolder_uniqueKeys(borderElement, diagnostics, context);
return result;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean validateElement(Element element, DiagnosticChain diagnostics, Map<Object, Object> context) {
if (!validate_NoCircularContainment(element, diagnostics, context))
return false;
boolean result = validate_EveryMultiplicityConforms(element, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryDataValueConforms(element, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryReferenceIsContained(element, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryBidirectionalReferenceIsPaired(element, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryProxyResolves(element, diagnostics, context);
if (result || diagnostics != null)
result &= validate_UniqueID(element, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryKeyUnique(element, diagnostics, context);
if (result || diagnostics != null)
result &= validate_EveryMapEntryUnique(element, diagnostics, context);
if (result || diagnostics != null)
result &= validateIdentifiedElement_uidNotEmpty(element, diagnostics, context);
if (result || diagnostics != null)
result &= validateNamedElement_nameNotEmpty(element, diagnostics, context);
if (result || diagnostics != null)
result &= validatePropertyHolder_uniqueKeys(element, diagnostics, context);
return result;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean validatePortDirection(PortDirection portDirection, DiagnosticChain diagnostics,
Map<Object, Object> context) {
return true;
}
/**
* Returns the resource locator that will be used to fetch messages for this validator's diagnostics.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public ResourceLocator getResourceLocator() {
// TODO
// Specialize this to return a resource locator for messages specific to this validator.
// Ensure that you remove @generated or mark it @generated NOT
return super.getResourceLocator();
}
} //SeimValidator