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,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