Work on *.core.profile.esfsafetyconcepts plug-in.
Override ESFSafetyConceptsfactory and SSafetyArtifacts class.
Change-Id: I8e01cefc4a390b3bbd7eff1cd6d7d75f90867aea
diff --git a/core/profile/org.polarsys.esf.core.profile.esfsafetyconcepts/plugin.xml b/core/profile/org.polarsys.esf.core.profile.esfsafetyconcepts/plugin.xml
index 8e3767b..893ce9c 100644
--- a/core/profile/org.polarsys.esf.core.profile.esfsafetyconcepts/plugin.xml
+++ b/core/profile/org.polarsys.esf.core.profile.esfsafetyconcepts/plugin.xml
@@ -68,5 +68,12 @@
uri="http://www.polarsys.org/esf/0.7.0/ESFSafetyConcepts/SRecommendations">
</profile>
</extension>
+ <extension
+ point="org.eclipse.emf.ecore.factory_override">
+ <factory
+ class="org.polarsys.esf.esfsafetyconcepts.impl.MESFSafetyConceptsFactory"
+ uri="http://www.polarsys.org/esf/0.7.0/ESFSafetyConcepts">
+ </factory>
+ </extension>
</plugin>
diff --git a/core/profile/org.polarsys.esf.core.profile.esfsafetyconcepts/src/main/java/org/polarsys/esf/esfsafetyconcepts/IMESFSafetyConceptsFactory.java b/core/profile/org.polarsys.esf.core.profile.esfsafetyconcepts/src/main/java/org/polarsys/esf/esfsafetyconcepts/IMESFSafetyConceptsFactory.java
new file mode 100644
index 0000000..f229552
--- /dev/null
+++ b/core/profile/org.polarsys.esf.core.profile.esfsafetyconcepts/src/main/java/org/polarsys/esf/esfsafetyconcepts/IMESFSafetyConceptsFactory.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2016 ALL4TEC & 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:
+ * ALL4TEC & CEA LIST - initial API and implementation
+ *******************************************************************************/
+package org.polarsys.esf.esfsafetyconcepts;
+
+import org.polarsys.esf.esfsafetyconcepts.impl.MESFSafetyConceptsFactory;
+
+/**
+ * This interface can override the generated interface {@link IESFSafetyConceptsFactory}.
+ *
+ * @author $Author: ymunoz $
+ * @version $Revision: 186 $
+ */
+public interface IMESFSafetyConceptsFactory
+ extends IESFSafetyConceptsFactory {
+
+ /**
+ * Specialise the eINSTANCE initialisation with the new interface type
+ * (overridden in the override_factory extension).
+ */
+ IMESFSafetyConceptsFactory INSTANCE = MESFSafetyConceptsFactory.init();
+
+ @Override
+ IMSSafetyArtifacts createSSafetyArtifacts();
+
+}
diff --git a/core/profile/org.polarsys.esf.core.profile.esfsafetyconcepts/src/main/java/org/polarsys/esf/esfsafetyconcepts/IMSSafetyArtifacts.java b/core/profile/org.polarsys.esf.core.profile.esfsafetyconcepts/src/main/java/org/polarsys/esf/esfsafetyconcepts/IMSSafetyArtifacts.java
new file mode 100644
index 0000000..cbf0e86
--- /dev/null
+++ b/core/profile/org.polarsys.esf.core.profile.esfsafetyconcepts/src/main/java/org/polarsys/esf/esfsafetyconcepts/IMSSafetyArtifacts.java
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * Copyright (c) 2016 ALL4TEC & 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:
+ * ALL4TEC & CEA LIST - initial API and implementation
+ *******************************************************************************/
+package org.polarsys.esf.esfsafetyconcepts;
+
+/**
+ * This interface can override the generated interface {@link ISSafetyArtifacts} and
+ * will be used by the custom factory.
+ *
+ * @author $Author: ymunoz $
+ * @version $Revision: 176 $
+ */
+public interface IMSSafetyArtifacts
+ extends ISSafetyArtifacts {
+
+}
diff --git a/core/profile/org.polarsys.esf.core.profile.esfsafetyconcepts/src/main/java/org/polarsys/esf/esfsafetyconcepts/impl/MESFSafetyConceptsFactory.java b/core/profile/org.polarsys.esf.core.profile.esfsafetyconcepts/src/main/java/org/polarsys/esf/esfsafetyconcepts/impl/MESFSafetyConceptsFactory.java
new file mode 100644
index 0000000..acbdb37
--- /dev/null
+++ b/core/profile/org.polarsys.esf.core.profile.esfsafetyconcepts/src/main/java/org/polarsys/esf/esfsafetyconcepts/impl/MESFSafetyConceptsFactory.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2016 ALL4TEC & 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:
+ * ALL4TEC & CEA LIST - initial API and implementation
+ *******************************************************************************/
+package org.polarsys.esf.esfsafetyconcepts.impl;
+
+import org.polarsys.esf.esfsafetyconcepts.IESFSafetyConceptsFactory;
+import org.polarsys.esf.esfsafetyconcepts.IMESFSafetyConceptsFactory;
+import org.polarsys.esf.esfsafetyconcepts.IMSSafetyArtifacts;
+
+/**
+ * This factory overrides the generated factory {@link ESFSafetyConceptsFactory}
+ * and returns the new generated interfaces.
+ *
+ * @author $Author: ymunoz $
+ * @version $Revision: 186 $
+ */
+public class MESFSafetyConceptsFactory
+ extends ESFSafetyConceptsFactory
+ implements IMESFSafetyConceptsFactory {
+
+ /**
+ * Default constructor.
+ */
+ public MESFSafetyConceptsFactory() {
+ super();
+ }
+
+ /**
+ * @return The initialised factory
+ */
+ public static IMESFSafetyConceptsFactory init() {
+ IESFSafetyConceptsFactory vFactory = ESFSafetyConceptsFactory.init();
+
+ // Check if the factory returned by the standard implementation can suit,
+ // otherwise create a new instance
+ if (!(vFactory instanceof IMESFSafetyConceptsFactory)) {
+ vFactory = new MESFSafetyConceptsFactory();
+ }
+
+ return (IMESFSafetyConceptsFactory) vFactory;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public IMSSafetyArtifacts createSSafetyArtifacts() {
+ IMSSafetyArtifacts vSSafetyArtifacts = new MSSafetyArtifacts();
+ return vSSafetyArtifacts;
+ }
+}
diff --git a/core/profile/org.polarsys.esf.core.profile.esfsafetyconcepts/src/main/java/org/polarsys/esf/esfsafetyconcepts/impl/MSSafetyArtifacts.java b/core/profile/org.polarsys.esf.core.profile.esfsafetyconcepts/src/main/java/org/polarsys/esf/esfsafetyconcepts/impl/MSSafetyArtifacts.java
new file mode 100644
index 0000000..3824930
--- /dev/null
+++ b/core/profile/org.polarsys.esf.core.profile.esfsafetyconcepts/src/main/java/org/polarsys/esf/esfsafetyconcepts/impl/MSSafetyArtifacts.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2016 ALL4TEC & 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:
+ * ALL4TEC & CEA LIST - initial API and implementation
+ *******************************************************************************/
+package org.polarsys.esf.esfsafetyconcepts.impl;
+
+import org.polarsys.esf.esfcore.impl.GenericAbstractSElement;
+import org.polarsys.esf.esfsafetyconcepts.IMSSafetyArtifacts;
+
+/**
+ * This class can override the generated class {@link MSSafetyArtifacts} and will be
+ * used by the custom factory.
+ *
+ * @author $Author: ymunoz $
+ * @version $Revision: 168 $
+ */
+public class MSSafetyArtifacts
+ extends SSafetyArtifacts
+ implements IMSSafetyArtifacts {
+
+ /**
+ * Default constructor.
+ */
+ public MSSafetyArtifacts() {
+ super();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getName() {
+ return GenericAbstractSElement.getName(getBase_Package());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getUUID() {
+ return GenericAbstractSElement.getUUID(getBase_Package());
+ }
+}