Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'extraplugins/marte/org.eclipse.papyrus.marte.static.profile/src/org/eclipse/papyrus/MARTE/MARTE_DesignModel/HRM/HwLogical/HwDevice/util')
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.marte.static.profile/src/org/eclipse/papyrus/MARTE/MARTE_DesignModel/HRM/HwLogical/HwDevice/util/HwDeviceAdapterFactory.java281
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.marte.static.profile/src/org/eclipse/papyrus/MARTE/MARTE_DesignModel/HRM/HwLogical/HwDevice/util/HwDeviceResourceFactoryImpl.java63
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.marte.static.profile/src/org/eclipse/papyrus/MARTE/MARTE_DesignModel/HRM/HwLogical/HwDevice/util/HwDeviceResourceImpl.java39
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.marte.static.profile/src/org/eclipse/papyrus/MARTE/MARTE_DesignModel/HRM/HwLogical/HwDevice/util/HwDeviceSwitch.java313
-rw-r--r--extraplugins/marte/org.eclipse.papyrus.marte.static.profile/src/org/eclipse/papyrus/MARTE/MARTE_DesignModel/HRM/HwLogical/HwDevice/util/HwDeviceXMLProcessor.java61
5 files changed, 757 insertions, 0 deletions
diff --git a/extraplugins/marte/org.eclipse.papyrus.marte.static.profile/src/org/eclipse/papyrus/MARTE/MARTE_DesignModel/HRM/HwLogical/HwDevice/util/HwDeviceAdapterFactory.java b/extraplugins/marte/org.eclipse.papyrus.marte.static.profile/src/org/eclipse/papyrus/MARTE/MARTE_DesignModel/HRM/HwLogical/HwDevice/util/HwDeviceAdapterFactory.java
new file mode 100644
index 00000000000..0b210061cb0
--- /dev/null
+++ b/extraplugins/marte/org.eclipse.papyrus.marte.static.profile/src/org/eclipse/papyrus/MARTE/MARTE_DesignModel/HRM/HwLogical/HwDevice/util/HwDeviceAdapterFactory.java
@@ -0,0 +1,281 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Chokri MRAIDHA (CEA LIST) chokri.mraidha@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.MARTE.MARTE_DesignModel.HRM.HwLogical.HwDevice.util;
+
+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;
+
+import org.eclipse.papyrus.MARTE.MARTE_DesignModel.HRM.HwGeneral.HwResource;
+
+import org.eclipse.papyrus.MARTE.MARTE_DesignModel.HRM.HwLogical.HwDevice.*;
+
+import org.eclipse.papyrus.MARTE.MARTE_Foundations.GRM.DeviceResource;
+import org.eclipse.papyrus.MARTE.MARTE_Foundations.GRM.ProcessingResource;
+import org.eclipse.papyrus.MARTE.MARTE_Foundations.GRM.Resource;
+
+/**
+ * <!-- 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 org.eclipse.papyrus.MARTE.MARTE_DesignModel.HRM.HwLogical.HwDevice.HwDevicePackage
+ * @generated
+ */
+public class HwDeviceAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static HwDevicePackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public HwDeviceAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = HwDevicePackage.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 HwDeviceSwitch<Adapter> modelSwitch =
+ new HwDeviceSwitch<Adapter>() {
+ @Override
+ public Adapter caseHwDevice(HwDevice object) {
+ return createHwDeviceAdapter();
+ }
+ @Override
+ public Adapter caseHwI_O(HwI_O object) {
+ return createHwI_OAdapter();
+ }
+ @Override
+ public Adapter caseHwSupport(HwSupport object) {
+ return createHwSupportAdapter();
+ }
+ @Override
+ public Adapter caseHWActuator(HWActuator object) {
+ return createHWActuatorAdapter();
+ }
+ @Override
+ public Adapter caseHWSensor(HWSensor object) {
+ return createHWSensorAdapter();
+ }
+ @Override
+ public Adapter caseResource(Resource object) {
+ return createResourceAdapter();
+ }
+ @Override
+ public Adapter caseHwResource(HwResource object) {
+ return createHwResourceAdapter();
+ }
+ @Override
+ public Adapter caseProcessingResource(ProcessingResource object) {
+ return createProcessingResourceAdapter();
+ }
+ @Override
+ public Adapter caseDeviceResource(DeviceResource object) {
+ return createDeviceResourceAdapter();
+ }
+ @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 org.eclipse.papyrus.MARTE.MARTE_DesignModel.HRM.HwLogical.HwDevice.HwDevice <em>Hw Device</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 org.eclipse.papyrus.MARTE.MARTE_DesignModel.HRM.HwLogical.HwDevice.HwDevice
+ * @generated
+ */
+ public Adapter createHwDeviceAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.MARTE.MARTE_DesignModel.HRM.HwLogical.HwDevice.HwI_O <em>Hw IO</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 org.eclipse.papyrus.MARTE.MARTE_DesignModel.HRM.HwLogical.HwDevice.HwI_O
+ * @generated
+ */
+ public Adapter createHwI_OAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.MARTE.MARTE_DesignModel.HRM.HwLogical.HwDevice.HwSupport <em>Hw Support</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 org.eclipse.papyrus.MARTE.MARTE_DesignModel.HRM.HwLogical.HwDevice.HwSupport
+ * @generated
+ */
+ public Adapter createHwSupportAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.MARTE.MARTE_DesignModel.HRM.HwLogical.HwDevice.HWActuator <em>HW Actuator</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 org.eclipse.papyrus.MARTE.MARTE_DesignModel.HRM.HwLogical.HwDevice.HWActuator
+ * @generated
+ */
+ public Adapter createHWActuatorAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.MARTE.MARTE_DesignModel.HRM.HwLogical.HwDevice.HWSensor <em>HW Sensor</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 org.eclipse.papyrus.MARTE.MARTE_DesignModel.HRM.HwLogical.HwDevice.HWSensor
+ * @generated
+ */
+ public Adapter createHWSensorAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.MARTE.MARTE_Foundations.GRM.Resource <em>Resource</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 org.eclipse.papyrus.MARTE.MARTE_Foundations.GRM.Resource
+ * @generated
+ */
+ public Adapter createResourceAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.MARTE.MARTE_DesignModel.HRM.HwGeneral.HwResource <em>Hw Resource</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 org.eclipse.papyrus.MARTE.MARTE_DesignModel.HRM.HwGeneral.HwResource
+ * @generated
+ */
+ public Adapter createHwResourceAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.MARTE.MARTE_Foundations.GRM.ProcessingResource <em>Processing Resource</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 org.eclipse.papyrus.MARTE.MARTE_Foundations.GRM.ProcessingResource
+ * @generated
+ */
+ public Adapter createProcessingResourceAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.MARTE.MARTE_Foundations.GRM.DeviceResource <em>Device Resource</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 org.eclipse.papyrus.MARTE.MARTE_Foundations.GRM.DeviceResource
+ * @generated
+ */
+ public Adapter createDeviceResourceAdapter() {
+ 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;
+ }
+
+} //HwDeviceAdapterFactory
diff --git a/extraplugins/marte/org.eclipse.papyrus.marte.static.profile/src/org/eclipse/papyrus/MARTE/MARTE_DesignModel/HRM/HwLogical/HwDevice/util/HwDeviceResourceFactoryImpl.java b/extraplugins/marte/org.eclipse.papyrus.marte.static.profile/src/org/eclipse/papyrus/MARTE/MARTE_DesignModel/HRM/HwLogical/HwDevice/util/HwDeviceResourceFactoryImpl.java
new file mode 100644
index 00000000000..d263715e5c9
--- /dev/null
+++ b/extraplugins/marte/org.eclipse.papyrus.marte.static.profile/src/org/eclipse/papyrus/MARTE/MARTE_DesignModel/HRM/HwLogical/HwDevice/util/HwDeviceResourceFactoryImpl.java
@@ -0,0 +1,63 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Chokri MRAIDHA (CEA LIST) chokri.mraidha@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.MARTE.MARTE_DesignModel.HRM.HwLogical.HwDevice.util;
+
+import org.eclipse.emf.common.util.URI;
+
+import org.eclipse.emf.ecore.resource.Resource;
+
+import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
+
+import org.eclipse.emf.ecore.xmi.XMLResource;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Resource Factory</b> associated with the package.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.MARTE.MARTE_DesignModel.HRM.HwLogical.HwDevice.util.HwDeviceResourceImpl
+ * @generated
+ */
+public class HwDeviceResourceFactoryImpl extends ResourceFactoryImpl {
+ /**
+ * Creates an instance of the resource factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public HwDeviceResourceFactoryImpl() {
+ super();
+ }
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Resource createResource(URI uri) {
+ XMLResource result = new HwDeviceResourceImpl(uri);
+ result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+ result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+
+ result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE);
+
+ result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+ result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+
+ result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE);
+ return result;
+ }
+
+} //HwDeviceResourceFactoryImpl
diff --git a/extraplugins/marte/org.eclipse.papyrus.marte.static.profile/src/org/eclipse/papyrus/MARTE/MARTE_DesignModel/HRM/HwLogical/HwDevice/util/HwDeviceResourceImpl.java b/extraplugins/marte/org.eclipse.papyrus.marte.static.profile/src/org/eclipse/papyrus/MARTE/MARTE_DesignModel/HRM/HwLogical/HwDevice/util/HwDeviceResourceImpl.java
new file mode 100644
index 00000000000..aecd9bf354d
--- /dev/null
+++ b/extraplugins/marte/org.eclipse.papyrus.marte.static.profile/src/org/eclipse/papyrus/MARTE/MARTE_DesignModel/HRM/HwLogical/HwDevice/util/HwDeviceResourceImpl.java
@@ -0,0 +1,39 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Chokri MRAIDHA (CEA LIST) chokri.mraidha@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.MARTE.MARTE_DesignModel.HRM.HwLogical.HwDevice.util;
+
+import org.eclipse.emf.common.util.URI;
+
+import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Resource </b> associated with the package.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.MARTE.MARTE_DesignModel.HRM.HwLogical.HwDevice.util.HwDeviceResourceFactoryImpl
+ * @generated
+ */
+public class HwDeviceResourceImpl extends XMLResourceImpl {
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param uri the URI of the new resource.
+ * @generated
+ */
+ public HwDeviceResourceImpl(URI uri) {
+ super(uri);
+ }
+
+} //HwDeviceResourceImpl
diff --git a/extraplugins/marte/org.eclipse.papyrus.marte.static.profile/src/org/eclipse/papyrus/MARTE/MARTE_DesignModel/HRM/HwLogical/HwDevice/util/HwDeviceSwitch.java b/extraplugins/marte/org.eclipse.papyrus.marte.static.profile/src/org/eclipse/papyrus/MARTE/MARTE_DesignModel/HRM/HwLogical/HwDevice/util/HwDeviceSwitch.java
new file mode 100644
index 00000000000..cfbafc78dd6
--- /dev/null
+++ b/extraplugins/marte/org.eclipse.papyrus.marte.static.profile/src/org/eclipse/papyrus/MARTE/MARTE_DesignModel/HRM/HwLogical/HwDevice/util/HwDeviceSwitch.java
@@ -0,0 +1,313 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Chokri MRAIDHA (CEA LIST) chokri.mraidha@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.MARTE.MARTE_DesignModel.HRM.HwLogical.HwDevice.util;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.papyrus.MARTE.MARTE_DesignModel.HRM.HwGeneral.HwResource;
+
+import org.eclipse.papyrus.MARTE.MARTE_DesignModel.HRM.HwLogical.HwDevice.*;
+
+import org.eclipse.papyrus.MARTE.MARTE_Foundations.GRM.DeviceResource;
+import org.eclipse.papyrus.MARTE.MARTE_Foundations.GRM.ProcessingResource;
+import org.eclipse.papyrus.MARTE.MARTE_Foundations.GRM.Resource;
+
+/**
+ * <!-- 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 org.eclipse.papyrus.MARTE.MARTE_DesignModel.HRM.HwLogical.HwDevice.HwDevicePackage
+ * @generated
+ */
+public class HwDeviceSwitch<T> {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static HwDevicePackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public HwDeviceSwitch() {
+ if (modelPackage == null) {
+ modelPackage = HwDevicePackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * 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
+ */
+ public T doSwitch(EObject theEObject) {
+ return doSwitch(theEObject.eClass(), theEObject);
+ }
+
+ /**
+ * 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
+ */
+ protected T doSwitch(EClass theEClass, EObject theEObject) {
+ if (theEClass.eContainer() == modelPackage) {
+ return doSwitch(theEClass.getClassifierID(), theEObject);
+ }
+ else {
+ List<EClass> eSuperTypes = theEClass.getESuperTypes();
+ return
+ eSuperTypes.isEmpty() ?
+ defaultCase(theEObject) :
+ doSwitch(eSuperTypes.get(0), theEObject);
+ }
+ }
+
+ /**
+ * 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
+ */
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case HwDevicePackage.HW_DEVICE: {
+ HwDevice hwDevice = (HwDevice)theEObject;
+ T result = caseHwDevice(hwDevice);
+ if (result == null) result = caseHwResource(hwDevice);
+ if (result == null) result = caseDeviceResource(hwDevice);
+ if (result == null) result = caseProcessingResource(hwDevice);
+ if (result == null) result = caseResource(hwDevice);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case HwDevicePackage.HW_IO: {
+ HwI_O hwI_O = (HwI_O)theEObject;
+ T result = caseHwI_O(hwI_O);
+ if (result == null) result = caseHwDevice(hwI_O);
+ if (result == null) result = caseHwResource(hwI_O);
+ if (result == null) result = caseDeviceResource(hwI_O);
+ if (result == null) result = caseProcessingResource(hwI_O);
+ if (result == null) result = caseResource(hwI_O);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case HwDevicePackage.HW_SUPPORT: {
+ HwSupport hwSupport = (HwSupport)theEObject;
+ T result = caseHwSupport(hwSupport);
+ if (result == null) result = caseHwDevice(hwSupport);
+ if (result == null) result = caseHwResource(hwSupport);
+ if (result == null) result = caseDeviceResource(hwSupport);
+ if (result == null) result = caseProcessingResource(hwSupport);
+ if (result == null) result = caseResource(hwSupport);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case HwDevicePackage.HW_ACTUATOR: {
+ HWActuator hwActuator = (HWActuator)theEObject;
+ T result = caseHWActuator(hwActuator);
+ if (result == null) result = caseHwI_O(hwActuator);
+ if (result == null) result = caseHwDevice(hwActuator);
+ if (result == null) result = caseHwResource(hwActuator);
+ if (result == null) result = caseDeviceResource(hwActuator);
+ if (result == null) result = caseProcessingResource(hwActuator);
+ if (result == null) result = caseResource(hwActuator);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case HwDevicePackage.HW_SENSOR: {
+ HWSensor hwSensor = (HWSensor)theEObject;
+ T result = caseHWSensor(hwSensor);
+ if (result == null) result = caseHwI_O(hwSensor);
+ if (result == null) result = caseHwDevice(hwSensor);
+ if (result == null) result = caseHwResource(hwSensor);
+ if (result == null) result = caseDeviceResource(hwSensor);
+ if (result == null) result = caseProcessingResource(hwSensor);
+ if (result == null) result = caseResource(hwSensor);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Hw Device</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>Hw Device</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseHwDevice(HwDevice object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Hw IO</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>Hw IO</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseHwI_O(HwI_O object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Hw Support</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>Hw Support</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseHwSupport(HwSupport object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>HW Actuator</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>HW Actuator</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseHWActuator(HWActuator object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>HW Sensor</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>HW Sensor</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseHWSensor(HWSensor object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Resource</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>Resource</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseResource(Resource object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Hw Resource</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>Hw Resource</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseHwResource(HwResource object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Processing Resource</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>Processing Resource</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseProcessingResource(ProcessingResource object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Device Resource</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>Device Resource</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseDeviceResource(DeviceResource 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
+ */
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} //HwDeviceSwitch
diff --git a/extraplugins/marte/org.eclipse.papyrus.marte.static.profile/src/org/eclipse/papyrus/MARTE/MARTE_DesignModel/HRM/HwLogical/HwDevice/util/HwDeviceXMLProcessor.java b/extraplugins/marte/org.eclipse.papyrus.marte.static.profile/src/org/eclipse/papyrus/MARTE/MARTE_DesignModel/HRM/HwLogical/HwDevice/util/HwDeviceXMLProcessor.java
new file mode 100644
index 00000000000..e551058285a
--- /dev/null
+++ b/extraplugins/marte/org.eclipse.papyrus.marte.static.profile/src/org/eclipse/papyrus/MARTE/MARTE_DesignModel/HRM/HwLogical/HwDevice/util/HwDeviceXMLProcessor.java
@@ -0,0 +1,61 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Chokri MRAIDHA (CEA LIST) chokri.mraidha@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.MARTE.MARTE_DesignModel.HRM.HwLogical.HwDevice.util;
+
+import java.util.Map;
+
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.resource.Resource;
+
+import org.eclipse.emf.ecore.xmi.util.XMLProcessor;
+
+import org.eclipse.papyrus.MARTE.MARTE_DesignModel.HRM.HwLogical.HwDevice.HwDevicePackage;
+
+/**
+ * This class contains helper methods to serialize and deserialize XML documents
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class HwDeviceXMLProcessor extends XMLProcessor {
+
+ /**
+ * Public constructor to instantiate the helper.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public HwDeviceXMLProcessor() {
+ super((EPackage.Registry.INSTANCE));
+ HwDevicePackage.eINSTANCE.eClass();
+ }
+
+ /**
+ * Register for "*" and "xml" file extensions the HwDeviceResourceFactoryImpl factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected Map<String, Resource.Factory> getRegistrations() {
+ if (registrations == null) {
+ super.getRegistrations();
+ registrations.put(XML_EXTENSION, new HwDeviceResourceFactoryImpl());
+ registrations.put(STAR_EXTENSION, new HwDeviceResourceFactoryImpl());
+ }
+ return registrations;
+ }
+
+} //HwDeviceXMLProcessor

Back to the top