Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 83161 Details for
Bug 203477
Transportation Network Definition and Implementation Needs to be Clarified
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
Patch containing new edge definitions
bug203477_EdgeDef.patch (text/plain), 130.24 KB, created by
Justin Lessler
on 2007-11-17 16:49:04 EST
(
hide
)
Description:
Patch containing new edge definitions
Filename:
MIME Type:
Creator:
Justin Lessler
Created:
2007-11-17 16:49:04 EST
Size:
130.24 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ohf.stem.tests.definitions >Index: .classpath >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.ohf/plugins/org.eclipse.ohf.stem.tests.definitions/.classpath,v >retrieving revision 1.1 >diff -u -r1.1 .classpath >--- .classpath 27 Mar 2007 19:44:55 -0000 1.1 >+++ .classpath 17 Nov 2007 21:40:56 -0000 >@@ -3,5 +3,7 @@ > <classpathentry kind="src" path="src"/> > <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> > <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> >+ <classpathentry kind="src" path="/org.eclipse.ohf.stem.tests.util"/> >+ <classpathentry kind="src" path="/org.eclipse.ohf.stem.tests.core"/> > <classpathentry kind="output" path="bin"/> > </classpath> >Index: src/org/eclipse/ohf/stem/definitions/edges/tests/MigrationEdgeLabelValueTest.java >=================================================================== >RCS file: src/org/eclipse/ohf/stem/definitions/edges/tests/MigrationEdgeLabelValueTest.java >diff -N src/org/eclipse/ohf/stem/definitions/edges/tests/MigrationEdgeLabelValueTest.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ohf/stem/definitions/edges/tests/MigrationEdgeLabelValueTest.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,125 @@ >+/** >+ * <copyright> >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ohf.stem.definitions.edges.tests; >+ >+ >+import junit.textui.TestRunner; >+ >+import org.eclipse.ohf.stem.core.graph.tests.LabelValueTest; >+import org.eclipse.ohf.stem.definitions.edges.EdgesFactory; >+import org.eclipse.ohf.stem.definitions.edges.MigrationEdgeLabelValue; >+import org.eclipse.ohf.stem.definitions.edges.impl.MigrationEdgeLabelValueImpl; >+ >+/** >+ * <!-- begin-user-doc --> >+ * A test case for the model object '<em><b>Migration Edge Label Value</b></em>'. >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+public class MigrationEdgeLabelValueTest extends LabelValueTest { >+ /**Migration rates to use in the tests*/ >+ static final double MIGRATION_RATE = 0.5; >+ >+ /** >+ * The fixture for this Migration Edge Label Value test case. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ protected MigrationEdgeLabelValue fixture = null; >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ public static void main(String[] args) { >+ TestRunner.run(MigrationEdgeLabelValueTest.class); >+ } >+ >+ /** >+ * Constructs a new Migration Edge Label Value test case with the given name. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ public MigrationEdgeLabelValueTest(String name) { >+ super(name); >+ } >+ >+ /** >+ * Sets the fixture for this Migration Edge Label Value test case. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ protected void setFixture(MigrationEdgeLabelValue fixture) { >+ this.fixture = fixture; >+ } >+ >+ /** >+ * Returns the fixture for this Migration Edge Label Value test case. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ protected MigrationEdgeLabelValue getFixture() { >+ return fixture; >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @see junit.framework.TestCase#setUp() >+ * @generated >+ */ >+ @Override >+ protected void setUp() throws Exception { >+ setFixture(EdgesFactory.eINSTANCE.createMigrationEdgeLabelValue()); >+ } >+ >+ >+ /** >+ * Make sure the fixture makes sense. >+ */ >+ public void testFixture() { >+ final MigrationEdgeLabelValue migrationLabelValue = getFixture(); >+ assertNotNull(migrationLabelValue); >+ assertTrue(((MigrationEdgeLabelValueImpl) migrationLabelValue).sane()); >+ >+ /*Make sure we can set the value*/ >+ migrationLabelValue.setMigrationRate(MIGRATION_RATE); >+ assertTrue(migrationLabelValue.getMigrationRate()==MIGRATION_RATE); >+ >+ } // testFixture >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @see junit.framework.TestCase#tearDown() >+ * @generated >+ */ >+ @Override >+ protected void tearDown() throws Exception { >+ setFixture(null); >+ } >+ >+ /** >+ * Make sure reset reverts the label value to its default >+ */ >+ @Override >+ public void testReset() { >+ MigrationEdgeLabelValue migrationLabelValue = getFixture(); >+ double oldValue = migrationLabelValue.getMigrationRate(); >+ migrationLabelValue.setMigrationRate(MIGRATION_RATE); >+ assertFalse(migrationLabelValue.getMigrationRate()==oldValue); >+ migrationLabelValue.reset(); >+ assertTrue(migrationLabelValue.getMigrationRate()==oldValue); >+ >+ } >+ >+} //MigrationEdgeLabelValueTest >Index: src/org/eclipse/ohf/stem/definitions/edges/tests/MixingEdgeTest.java >=================================================================== >RCS file: src/org/eclipse/ohf/stem/definitions/edges/tests/MixingEdgeTest.java >diff -N src/org/eclipse/ohf/stem/definitions/edges/tests/MixingEdgeTest.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ohf/stem/definitions/edges/tests/MixingEdgeTest.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,138 @@ >+/** >+ * <copyright> >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ohf.stem.definitions.edges.tests; >+ >+import junit.textui.TestRunner; >+ >+import org.eclipse.ohf.stem.core.graph.Node; >+import org.eclipse.ohf.stem.core.graph.tests.EdgeTest; >+import org.eclipse.ohf.stem.definitions.edges.EdgesFactory; >+import org.eclipse.ohf.stem.definitions.edges.MixingEdge; >+import org.eclipse.ohf.stem.definitions.edges.MixingEdgeLabel; >+import org.eclipse.ohf.stem.tests.util.TestUtil; >+ >+ >+ >+/** >+ * <!-- begin-user-doc --> >+ * A test case for the model object '<em><b>Mixing Edge</b></em>'. >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+public class MixingEdgeTest extends EdgeTest { >+ >+ static MixingEdgeLabel TEST_LABEL = EdgesFactory.eINSTANCE.createMixingEdgeLabel(); >+ >+ /** >+ * The fixture for this Mixing Edge test case. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ protected MixingEdge fixture = null; >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ public static void main(String[] args) { >+ TestRunner.run(MixingEdgeTest.class); >+ } >+ >+ /** >+ * Constructs a new Mixing Edge test case with the given name. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ public MixingEdgeTest(String name) { >+ super(name); >+ } >+ >+ /** >+ * Sets the fixture for this Mixing Edge test case. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ protected void setFixture(MixingEdge fixture) { >+ this.fixture = fixture; >+ } >+ >+ /** >+ * Creates the fixture. We need to have nodes on both sides in order to be sane(). >+ * >+ * */ >+ public MixingEdge createFixture() { >+ final Node nodeA = TestUtil.createStaticallyLabeledNode(); >+ final Node nodeB = TestUtil.createStaticallyLabeledNode(); >+ MixingEdge mixingEdge = EdgesFactory.eINSTANCE.createMixingEdge(); >+ mixingEdge.setNodeAURI(nodeA.getURI()); >+ mixingEdge.setNodeBURI(nodeB.getURI()); >+ >+ //Make sure the node stuff is all cool. >+ mixingEdge.setA(nodeA); >+ mixingEdge.setB(nodeB); >+ nodeA.getEdges().add(mixingEdge); >+ nodeB.getEdges().add(mixingEdge); >+ >+ return mixingEdge; >+ } >+ >+ /** >+ * Returns the fixture for this Mixing Edge test case. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ protected MixingEdge getFixture() { >+ return fixture; >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @see junit.framework.TestCase#setUp() >+ * @generated NOT >+ */ >+ @Override >+ protected void setUp() throws Exception { >+ setFixture(createFixture()); >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @see junit.framework.TestCase#tearDown() >+ * @generated >+ */ >+ @Override >+ protected void tearDown() throws Exception { >+ setFixture(null); >+ } >+ >+ /**Perform basic tests on this fixture*/ >+ public void testFixture() { >+ MixingEdge mixingEdge = getFixture(); >+ assertNotNull(mixingEdge); >+ assertTrue(mixingEdge.sane()); >+ assertFalse(mixingEdge.isDirected()); >+ >+ assertNotNull(mixingEdge.getLabel()); >+ } >+ >+ /**Test setting the label*/ >+ public void testSetLabel() { >+ MixingEdge mixingEdge = getFixture(); >+ assertFalse(mixingEdge.getLabel() == TEST_LABEL); >+ mixingEdge.setLabel(TEST_LABEL); >+ assertTrue(mixingEdge.getLabel()==TEST_LABEL); >+ assertTrue(mixingEdge.sane()); >+ } >+ >+} //MixingEdgeTest >Index: src/org/eclipse/ohf/stem/definitions/edges/tests/EdgesTests.java >=================================================================== >RCS file: src/org/eclipse/ohf/stem/definitions/edges/tests/EdgesTests.java >diff -N src/org/eclipse/ohf/stem/definitions/edges/tests/EdgesTests.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ohf/stem/definitions/edges/tests/EdgesTests.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,56 @@ >+/** >+ * <copyright> >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ohf.stem.definitions.edges.tests; >+ >+import junit.framework.Test; >+import junit.framework.TestSuite; >+ >+import junit.textui.TestRunner; >+ >+/** >+ * <!-- begin-user-doc --> >+ * A test suite for the '<em><b>edges</b></em>' package. >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+public class EdgesTests extends TestSuite { >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ public static void main(String[] args) { >+ TestRunner.run(suite()); >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ public static Test suite() { >+ TestSuite suite = new EdgesTests("edges Tests"); >+ suite.addTestSuite(MigrationEdgeTest.class); >+ suite.addTestSuite(MigrationEdgeLabelTest.class); >+ suite.addTestSuite(MigrationEdgeLabelValueTest.class); >+ suite.addTestSuite(MixingEdgeTest.class); >+ suite.addTestSuite(MixingEdgeLabelTest.class); >+ suite.addTestSuite(MixingEdgeLabelValueTest.class); >+ return suite; >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ public EdgesTests(String name) { >+ super(name); >+ } >+ >+} //EdgesTests >Index: src/org/eclipse/ohf/stem/definitions/edges/tests/MixingEdgeLabelTest.java >=================================================================== >RCS file: src/org/eclipse/ohf/stem/definitions/edges/tests/MixingEdgeLabelTest.java >diff -N src/org/eclipse/ohf/stem/definitions/edges/tests/MixingEdgeLabelTest.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ohf/stem/definitions/edges/tests/MixingEdgeLabelTest.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,105 @@ >+/** >+ * <copyright> >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ohf.stem.definitions.edges.tests; >+ >+import junit.textui.TestRunner; >+ >+import org.eclipse.ohf.stem.core.graph.tests.EdgeLabelTest; >+import org.eclipse.ohf.stem.definitions.edges.EdgesFactory; >+import org.eclipse.ohf.stem.definitions.edges.MixingEdgeLabel; >+ >+ >+/** >+ * <!-- begin-user-doc --> >+ * A test case for the model object '<em><b>Mixing Edge Label</b></em>'. >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+public class MixingEdgeLabelTest extends EdgeLabelTest { >+ >+ /** >+ * The fixture for this Mixing Edge Label test case. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ protected MixingEdgeLabel fixture = null; >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ public static void main(String[] args) { >+ TestRunner.run(MixingEdgeLabelTest.class); >+ } >+ >+ /** >+ * Constructs a new Mixing Edge Label test case with the given name. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ public MixingEdgeLabelTest(String name) { >+ super(name); >+ } >+ >+ /** >+ * Sets the fixture for this Mixing Edge Label test case. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ protected void setFixture(MixingEdgeLabel fixture) { >+ this.fixture = fixture; >+ } >+ >+ /** >+ * Returns the fixture for this Mixing Edge Label test case. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ protected MixingEdgeLabel getFixture() { >+ return fixture; >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @see junit.framework.TestCase#setUp() >+ * @generated >+ */ >+ @Override >+ protected void setUp() throws Exception { >+ setFixture(EdgesFactory.eINSTANCE.createMixingEdgeLabel()); >+ } >+ >+ /** >+ * Make sure the fixture makes sense. >+ */ >+ public void testFixture() { >+ final MixingEdgeLabel mixingEdgeLabel = getFixture(); >+ assertNotNull(mixingEdgeLabel); >+ assertTrue(mixingEdgeLabel.sane()); >+ >+ assertNotNull(mixingEdgeLabel.getCurrentValue()); >+ } // testFixture >+ >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @see junit.framework.TestCase#tearDown() >+ * @generated >+ */ >+ @Override >+ protected void tearDown() throws Exception { >+ setFixture(null); >+ } >+ >+} //MixingEdgeLabelTest >Index: src/org/eclipse/ohf/stem/definitions/edges/tests/EdgesExample.java >=================================================================== >RCS file: src/org/eclipse/ohf/stem/definitions/edges/tests/EdgesExample.java >diff -N src/org/eclipse/ohf/stem/definitions/edges/tests/EdgesExample.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ohf/stem/definitions/edges/tests/EdgesExample.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,125 @@ >+/** >+ * <copyright> >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ohf.stem.definitions.edges.tests; >+ >+import java.io.File; >+import java.io.IOException; >+ >+import org.eclipse.emf.common.util.Diagnostic; >+import org.eclipse.emf.common.util.URI; >+ >+import org.eclipse.emf.ecore.EObject; >+ >+import org.eclipse.emf.ecore.resource.Resource; >+import org.eclipse.emf.ecore.resource.ResourceSet; >+ >+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; >+ >+import org.eclipse.emf.ecore.util.Diagnostician; >+ >+import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl; >+ >+import org.eclipse.ohf.stem.definitions.edges.EdgesFactory; >+import org.eclipse.ohf.stem.definitions.edges.EdgesPackage; >+import org.eclipse.ohf.stem.definitions.edges.MigrationEdge; >+ >+/** >+ * <!-- begin-user-doc --> >+ * A sample utility for the '<em><b>edges</b></em>' package. >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+public class EdgesExample { >+ /** >+ * <!-- begin-user-doc --> >+ * Load all the argument file paths or URIs as instances of the model. >+ * <!-- end-user-doc --> >+ * @param args the file paths or URIs. >+ * @generated >+ */ >+ public static void main(String[] args) { >+ // Create a resource set to hold the resources. >+ // >+ ResourceSet resourceSet = new ResourceSetImpl(); >+ >+ // Register the appropriate resource factory to handle all file extensions. >+ // >+ resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put >+ (Resource.Factory.Registry.DEFAULT_EXTENSION, >+ new XMIResourceFactoryImpl()); >+ >+ // Register the package to ensure it is available during loading. >+ // >+ resourceSet.getPackageRegistry().put >+ (EdgesPackage.eNS_URI, >+ EdgesPackage.eINSTANCE); >+ >+ // If there are no arguments, emit an appropriate usage message. >+ // >+ if (args.length == 0) { >+ System.out.println("Enter a list of file paths or URIs that have content like this:"); >+ try { >+ Resource resource = resourceSet.createResource(URI.createURI("http:///My.edges")); >+ MigrationEdge root = EdgesFactory.eINSTANCE.createMigrationEdge(); >+ resource.getContents().add(root); >+ resource.save(System.out, null); >+ } >+ catch (IOException exception) { >+ exception.printStackTrace(); >+ } >+ } >+ else { >+ // Iterate over all the arguments. >+ // >+ for (int i = 0; i < args.length; ++i) { >+ // Construct the URI for the instance file. >+ // The argument is treated as a file path only if it denotes an existing file. >+ // Otherwise, it's directly treated as a URL. >+ // >+ File file = new File(args[i]); >+ URI uri = file.isFile() ? URI.createFileURI(file.getAbsolutePath()): URI.createURI(args[0]); >+ >+ try { >+ // Demand load resource for this file. >+ // >+ Resource resource = resourceSet.getResource(uri, true); >+ System.out.println("Loaded " + uri); >+ >+ // Validate the contents of the loaded resource. >+ // >+ for (EObject eObject : resource.getContents()) { >+ Diagnostic diagnostic = Diagnostician.INSTANCE.validate(eObject); >+ if (diagnostic.getSeverity() != Diagnostic.OK) { >+ printDiagnostic(diagnostic, ""); >+ } >+ } >+ } >+ catch (RuntimeException exception) { >+ System.out.println("Problem loading " + uri); >+ exception.printStackTrace(); >+ } >+ } >+ } >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * Prints diagnostics with indentation. >+ * <!-- end-user-doc --> >+ * @param diagnostic the diagnostic to print. >+ * @param indent the indentation for printing. >+ * @generated >+ */ >+ protected static void printDiagnostic(Diagnostic diagnostic, String indent) { >+ System.out.print(indent); >+ System.out.println(diagnostic.getMessage()); >+ for (Diagnostic child : diagnostic.getChildren()) { >+ printDiagnostic(child, indent + " "); >+ } >+ } >+ >+} //EdgesExample >Index: src/org/eclipse/ohf/stem/definitions/edges/tests/MigrationEdgeLabelTest.java >=================================================================== >RCS file: src/org/eclipse/ohf/stem/definitions/edges/tests/MigrationEdgeLabelTest.java >diff -N src/org/eclipse/ohf/stem/definitions/edges/tests/MigrationEdgeLabelTest.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ohf/stem/definitions/edges/tests/MigrationEdgeLabelTest.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,104 @@ >+/** >+ * <copyright> >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ohf.stem.definitions.edges.tests; >+ >+import junit.textui.TestRunner; >+ >+import org.eclipse.ohf.stem.core.graph.tests.EdgeLabelTest; >+import org.eclipse.ohf.stem.definitions.edges.EdgesFactory; >+import org.eclipse.ohf.stem.definitions.edges.MigrationEdgeLabel; >+ >+/** >+ * <!-- begin-user-doc --> >+ * A test case for the model object '<em><b>Migration Edge Label</b></em>'. >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+public class MigrationEdgeLabelTest extends EdgeLabelTest { >+ >+ /** >+ * The fixture for this Migration Edge Label test case. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ protected MigrationEdgeLabel fixture = null; >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ public static void main(String[] args) { >+ TestRunner.run(MigrationEdgeLabelTest.class); >+ } >+ >+ /** >+ * Constructs a new Migration Edge Label test case with the given name. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ public MigrationEdgeLabelTest(String name) { >+ super(name); >+ } >+ >+ /** >+ * Sets the fixture for this Migration Edge Label test case. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ protected void setFixture(MigrationEdgeLabel fixture) { >+ this.fixture = fixture; >+ } >+ >+ /** >+ * Returns the fixture for this Migration Edge Label test case. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ protected MigrationEdgeLabel getFixture() { >+ return fixture; >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @see junit.framework.TestCase#setUp() >+ * @generated >+ */ >+ @Override >+ protected void setUp() throws Exception { >+ setFixture(EdgesFactory.eINSTANCE.createMigrationEdgeLabel()); >+ } >+ >+ /** >+ * Make sure the fixture makes sense. >+ */ >+ public void testFixture() { >+ final MigrationEdgeLabel migrationEdgeLabel = getFixture(); >+ assertNotNull(migrationEdgeLabel); >+ assertTrue(migrationEdgeLabel.sane()); >+ >+ assertNotNull(migrationEdgeLabel.getCurrentValue()); >+ } // testFixture >+ >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @see junit.framework.TestCase#tearDown() >+ * @generated >+ */ >+ @Override >+ protected void tearDown() throws Exception { >+ setFixture(null); >+ } >+ >+} //MigrationEdgeLabelTest >Index: src/org/eclipse/ohf/stem/definitions/edges/tests/MixingEdgeLabelValueTest.java >=================================================================== >RCS file: src/org/eclipse/ohf/stem/definitions/edges/tests/MixingEdgeLabelValueTest.java >diff -N src/org/eclipse/ohf/stem/definitions/edges/tests/MixingEdgeLabelValueTest.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ohf/stem/definitions/edges/tests/MixingEdgeLabelValueTest.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,125 @@ >+/** >+ * <copyright> >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ohf.stem.definitions.edges.tests; >+ >+import junit.textui.TestRunner; >+ >+import org.eclipse.ohf.stem.core.graph.tests.LabelValueTest; >+import org.eclipse.ohf.stem.definitions.edges.EdgesFactory; >+import org.eclipse.ohf.stem.definitions.edges.MixingEdgeLabelValue; >+import org.eclipse.ohf.stem.definitions.edges.impl.MixingEdgeLabelValueImpl; >+ >+/** >+ * <!-- begin-user-doc --> >+ * A test case for the model object '<em><b>Mixing Edge Label Value</b></em>'. >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+public class MixingEdgeLabelValueTest extends LabelValueTest { >+ >+ static double MIXING_RATE = .001; >+ >+ /** >+ * The fixture for this Mixing Edge Label Value test case. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ protected MixingEdgeLabelValue fixture = null; >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ public static void main(String[] args) { >+ TestRunner.run(MixingEdgeLabelValueTest.class); >+ } >+ >+ /** >+ * Constructs a new Mixing Edge Label Value test case with the given name. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ public MixingEdgeLabelValueTest(String name) { >+ super(name); >+ } >+ >+ /** >+ * Sets the fixture for this Mixing Edge Label Value test case. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ protected void setFixture(MixingEdgeLabelValue fixture) { >+ this.fixture = fixture; >+ } >+ >+ /** >+ * Returns the fixture for this Mixing Edge Label Value test case. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ protected MixingEdgeLabelValue getFixture() { >+ return fixture; >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @see junit.framework.TestCase#setUp() >+ * @generated >+ */ >+ @Override >+ protected void setUp() throws Exception { >+ setFixture(EdgesFactory.eINSTANCE.createMixingEdgeLabelValue()); >+ } >+ >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @see junit.framework.TestCase#tearDown() >+ * @generated >+ */ >+ @Override >+ protected void tearDown() throws Exception { >+ setFixture(null); >+ } >+ >+ >+ /** >+ * Make sure the fixture makes sense. >+ */ >+ public void testFixture() { >+ final MixingEdgeLabelValue mixingLabelValue = getFixture(); >+ assertNotNull(mixingLabelValue); >+ assertTrue(((MixingEdgeLabelValueImpl) mixingLabelValue).sane()); >+ >+ /*Make sure we can set the value*/ >+ mixingLabelValue.setMixingRate(MIXING_RATE); >+ assertTrue(mixingLabelValue.getMixingRate()==MIXING_RATE); >+ >+ } // testFixture >+ >+ /** >+ * Make sure reset reverts the label value to its default >+ */ >+ @Override >+ public void testReset() { >+ MixingEdgeLabelValue mixingLabelValue = getFixture(); >+ double oldValue = mixingLabelValue.getMixingRate(); >+ mixingLabelValue.setMixingRate(MIXING_RATE); >+ assertFalse(mixingLabelValue.getMixingRate()==oldValue); >+ mixingLabelValue.reset(); >+ assertTrue(mixingLabelValue.getMixingRate()==oldValue); >+ >+ } >+ >+} //MixingEdgeLabelValueTest >Index: src/org/eclipse/ohf/stem/definitions/edges/tests/DefinitionsAllTests.java >=================================================================== >RCS file: src/org/eclipse/ohf/stem/definitions/edges/tests/DefinitionsAllTests.java >diff -N src/org/eclipse/ohf/stem/definitions/edges/tests/DefinitionsAllTests.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ohf/stem/definitions/edges/tests/DefinitionsAllTests.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,57 @@ >+/** >+ * <copyright> >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ohf.stem.definitions.edges.tests; >+ >+import junit.framework.Test; >+import junit.framework.TestSuite; >+ >+import junit.textui.TestRunner; >+ >+import org.eclipse.ohf.stem.definitions.labels.tests.LabelsTests; >+ >+import org.eclipse.ohf.stem.definitions.nodes.tests.NodesTests; >+ >+/** >+ * <!-- begin-user-doc --> >+ * A test suite for the '<em><b>Definitions</b></em>' model. >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+public class DefinitionsAllTests extends TestSuite { >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ public static void main(String[] args) { >+ TestRunner.run(suite()); >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ public static Test suite() { >+ TestSuite suite = new DefinitionsAllTests("Definitions Tests"); >+ suite.addTest(EdgesTests.suite()); >+ suite.addTest(LabelsTests.suite()); >+ suite.addTest(NodesTests.suite()); >+ return suite; >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ public DefinitionsAllTests(String name) { >+ super(name); >+ } >+ >+} //DefinitionsAllTests >Index: src/org/eclipse/ohf/stem/definitions/edges/tests/MigrationEdgeTest.java >=================================================================== >RCS file: src/org/eclipse/ohf/stem/definitions/edges/tests/MigrationEdgeTest.java >diff -N src/org/eclipse/ohf/stem/definitions/edges/tests/MigrationEdgeTest.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ohf/stem/definitions/edges/tests/MigrationEdgeTest.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,154 @@ >+/** >+ * <copyright> >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ohf.stem.definitions.edges.tests; >+ >+import junit.textui.TestRunner; >+ >+import org.eclipse.ohf.stem.core.graph.Edge; >+import org.eclipse.ohf.stem.core.graph.Node; >+import org.eclipse.ohf.stem.definitions.edges.EdgesFactory; >+import org.eclipse.ohf.stem.definitions.edges.MigrationEdge; >+import org.eclipse.ohf.stem.definitions.edges.MigrationEdgeLabel; >+import org.eclipse.ohf.stem.tests.util.TestUtil; >+import org.eclipse.ohf.stem.core.graph.tests.EdgeTest; >+ >+/** >+ * <!-- begin-user-doc --> >+ * A test case for the model object '<em><b>Migration Edge</b></em>'. >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+public class MigrationEdgeTest extends EdgeTest { >+ >+ /**Static label for use in tests*/ >+ static MigrationEdgeLabel TEST_LABEL = EdgesFactory.eINSTANCE.createMigrationEdgeLabel(); >+ >+ /** >+ * The fixture for this Migration Edge test case. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ protected MigrationEdge fixture = null; >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ public static void main(String[] args) { >+ TestRunner.run(MigrationEdgeTest.class); >+ } >+ >+ /** >+ * Constructs a new Migration Edge test case with the given name. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ public MigrationEdgeTest(String name) { >+ super(name); >+ } >+ >+ /** >+ * Sets the fixture for this Migration Edge test case. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ protected void setFixture(MigrationEdge fixture) { >+ this.fixture = fixture; >+ } >+ >+ /** >+ * Returns the fixture for this Migration Edge test case. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ protected MigrationEdge getFixture() { >+ return fixture; >+ } >+ >+ /** >+ * Creates the fixture. We need to have nodes on both sides in order to be sane(). >+ * >+ * */ >+ public MigrationEdge createFixture() { >+ final Node nodeA = TestUtil.createStaticallyLabeledNode(); >+ final Node nodeB = TestUtil.createStaticallyLabeledNode(); >+ MigrationEdge migrationEdge = EdgesFactory.eINSTANCE.createMigrationEdge(); >+ migrationEdge.setNodeAURI(nodeA.getURI()); >+ migrationEdge.setNodeBURI(nodeB.getURI()); >+ >+ //Make sure the node relations are cool >+ migrationEdge.setA(nodeA); >+ migrationEdge.setB(nodeB); >+ nodeA.getEdges().add(migrationEdge); >+ nodeB.getEdges().add(migrationEdge); >+ >+ >+ return migrationEdge; >+ } >+ >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @see junit.framework.TestCase#setUp() >+ * @generated NOT >+ */ >+ @Override >+ protected void setUp() throws Exception { >+ setFixture(createFixture()); >+ } >+ >+ /**Perform basic tests on this fixture*/ >+ public void testFixture() { >+ MigrationEdge migrationEdge = getFixture(); >+ assertNotNull(migrationEdge); >+ assertTrue(migrationEdge.sane()); >+ assertTrue(migrationEdge.isDirected()); >+ >+ assertNotNull(migrationEdge.getLabel()); >+ } >+ >+ /**Test setting the label*/ >+ public void testSetLabel() { >+ MigrationEdge migrationEdge = getFixture(); >+ assertFalse(migrationEdge.getLabel() == TEST_LABEL); >+ migrationEdge.setLabel(TEST_LABEL); >+ assertTrue(migrationEdge.getLabel()==TEST_LABEL); >+ assertTrue(migrationEdge.sane()); >+ } >+ >+ /**Test Directed*/ >+ public void testIsDirectedAt__Node() { >+ final Edge edge = getFixture(); >+ final Node nodeA = edge.getA(); >+ final Node nodeB = edge.getB(); >+ >+ edge.setDirected(true); >+ assertTrue(edge.isDirected()); >+ >+ assertFalse(edge.isDirectedAt(nodeA)); >+ assertTrue(edge.isDirectedAt(nodeB)); >+ } >+ >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @see junit.framework.TestCase#tearDown() >+ * @generated >+ */ >+ @Override >+ protected void tearDown() throws Exception { >+ setFixture(null); >+ } >+ >+} //MigrationEdgeTest >#P org.eclipse.ohf.stem.definitions >Index: model/definitions.genmodel >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.ohf/plugins/org.eclipse.ohf.stem.definitions/model/definitions.genmodel,v >retrieving revision 1.2 >diff -u -r1.2 definitions.genmodel >--- model/definitions.genmodel 30 Apr 2007 16:56:25 -0000 1.2 >+++ model/definitions.genmodel 17 Nov 2007 21:40:57 -0000 >@@ -7,6 +7,19 @@ > modelName="Definitions" testsDirectory="/org.eclipse.ohf.stem.tests.definitions/src" > importerID="org.eclipse.emf.importer.java" complianceLevel="5.0" usedGenPackages="../../org.eclipse.ohf.stem.core/model/core.genmodel#//graph ../../org.eclipse.ohf.stem.core/model/core.genmodel#//common ../../org.eclipse.ohf.stem.core/model/core.genmodel#//model"> > <foreignModel>@model</foreignModel> >+ <genPackages prefix="Edges" basePackage="org.eclipse.ohf.stem.definitions" disposableProviderFactory="true" >+ ecorePackage="edges.ecore#/"> >+ <genClasses ecoreClass="edges.ecore#//MigrationEdge"/> >+ <genClasses ecoreClass="edges.ecore#//MigrationEdgeLabel"/> >+ <genClasses ecoreClass="edges.ecore#//MigrationEdgeLabelValue"> >+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute edges.ecore#//MigrationEdgeLabelValue/migrationRate"/> >+ </genClasses> >+ <genClasses ecoreClass="edges.ecore#//MixingEdge"/> >+ <genClasses ecoreClass="edges.ecore#//MixingEdgeLabel"/> >+ <genClasses ecoreClass="edges.ecore#//MixingEdgeLabelValue"> >+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute edges.ecore#//MixingEdgeLabelValue/mixingRate"/> >+ </genClasses> >+ </genPackages> > <genPackages prefix="Labels" basePackage="org.eclipse.ohf.stem.definitions" disposableProviderFactory="true" > ecorePackage="labels.ecore#/"> > <genEnums ecoreEnum="labels.ecore#//RelativePhysicalRelationship"> >Index: META-INF/MANIFEST.MF >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.ohf/plugins/org.eclipse.ohf.stem.definitions/META-INF/MANIFEST.MF,v >retrieving revision 1.4 >diff -u -r1.4 MANIFEST.MF >--- META-INF/MANIFEST.MF 8 Aug 2007 19:18:51 -0000 1.4 >+++ META-INF/MANIFEST.MF 17 Nov 2007 21:40:56 -0000 >@@ -13,6 +13,9 @@ > org.eclipse.ohf.stem.definitions.adapters.spatial, > org.eclipse.ohf.stem.definitions.adapters.spatial.geo, > org.eclipse.ohf.stem.definitions.adapters.spatial.geo.preferences, >+ org.eclipse.ohf.stem.definitions.edges, >+ org.eclipse.ohf.stem.definitions.edges.impl, >+ org.eclipse.ohf.stem.definitions.edges.util, > org.eclipse.ohf.stem.definitions.labels, > org.eclipse.ohf.stem.definitions.labels.impl, > org.eclipse.ohf.stem.definitions.labels.presentation, >Index: model/edges.ecore >=================================================================== >RCS file: model/edges.ecore >diff -N model/edges.ecore >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ model/edges.ecore 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,17 @@ >+<?xml version="1.0" encoding="UTF-8"?> >+<ecore:EPackage xmi:version="2.0" >+ xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="edges" >+ nsURI="http:///org/eclipse/ohf/stem/definitions/edges.ecore" nsPrefix="org.eclipse.ohf.stem.definitions.edges"> >+ <eClassifiers xsi:type="ecore:EClass" name="MigrationEdge" eSuperTypes="../../org.eclipse.ohf.stem.core/model/graph.ecore#//Edge"/> >+ <eClassifiers xsi:type="ecore:EClass" name="MigrationEdgeLabel" eSuperTypes="../../org.eclipse.ohf.stem.core/model/graph.ecore#//EdgeLabel"/> >+ <eClassifiers xsi:type="ecore:EClass" name="MigrationEdgeLabelValue" eSuperTypes="../../org.eclipse.ohf.stem.core/model/graph.ecore#//LabelValue"> >+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="migrationRate" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble" >+ defaultValueLiteral="0.0"/> >+ </eClassifiers> >+ <eClassifiers xsi:type="ecore:EClass" name="MixingEdge" eSuperTypes="../../org.eclipse.ohf.stem.core/model/graph.ecore#//Edge"/> >+ <eClassifiers xsi:type="ecore:EClass" name="MixingEdgeLabel" eSuperTypes="../../org.eclipse.ohf.stem.core/model/graph.ecore#//EdgeLabel"/> >+ <eClassifiers xsi:type="ecore:EClass" name="MixingEdgeLabelValue" eSuperTypes="../../org.eclipse.ohf.stem.core/model/graph.ecore#//LabelValue"> >+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="mixingRate" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble"/> >+ </eClassifiers> >+</ecore:EPackage> >Index: src/org/eclipse/ohf/stem/definitions/edges/EdgesPackage.java >=================================================================== >RCS file: src/org/eclipse/ohf/stem/definitions/edges/EdgesPackage.java >diff -N src/org/eclipse/ohf/stem/definitions/edges/EdgesPackage.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ohf/stem/definitions/edges/EdgesPackage.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,667 @@ >+/** >+ * <copyright> >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ohf.stem.definitions.edges; >+ >+import org.eclipse.emf.ecore.EAttribute; >+import org.eclipse.emf.ecore.EClass; >+import org.eclipse.emf.ecore.EPackage; >+import org.eclipse.emf.ecore.EReference; >+ >+import org.eclipse.ohf.stem.core.graph.GraphPackage; >+ >+/** >+ * <!-- begin-user-doc --> >+ * The <b>Package</b> for the model. >+ * It contains accessors for the meta objects to represent >+ * <ul> >+ * <li>each class,</li> >+ * <li>each feature of each class,</li> >+ * <li>each enum,</li> >+ * <li>and each data type</li> >+ * </ul> >+ * <!-- end-user-doc --> >+ * @see org.eclipse.ohf.stem.definitions.edges.EdgesFactory >+ * @model kind="package" >+ * @generated >+ */ >+public interface EdgesPackage extends EPackage { >+ /** >+ * The package name. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ String eNAME = "edges"; >+ >+ /** >+ * The package namespace URI. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ String eNS_URI = "http:///org/eclipse/ohf/stem/definitions/edges.ecore"; >+ >+ /** >+ * The package namespace name. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ String eNS_PREFIX = "org.eclipse.ohf.stem.definitions.edges"; >+ >+ /** >+ * The singleton instance of the package. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ EdgesPackage eINSTANCE = org.eclipse.ohf.stem.definitions.edges.impl.EdgesPackageImpl.init(); >+ >+ /** >+ * The meta object id for the '{@link org.eclipse.ohf.stem.definitions.edges.impl.MigrationEdgeImpl <em>Migration Edge</em>}' class. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @see org.eclipse.ohf.stem.definitions.edges.impl.MigrationEdgeImpl >+ * @see org.eclipse.ohf.stem.definitions.edges.impl.EdgesPackageImpl#getMigrationEdge() >+ * @generated >+ */ >+ int MIGRATION_EDGE = 0; >+ >+ /** >+ * The feature id for the '<em><b>URI</b></em>' attribute. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ * @ordered >+ */ >+ int MIGRATION_EDGE__URI = GraphPackage.EDGE__URI; >+ >+ /** >+ * The feature id for the '<em><b>Type URI</b></em>' attribute. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ * @ordered >+ */ >+ int MIGRATION_EDGE__TYPE_URI = GraphPackage.EDGE__TYPE_URI; >+ >+ /** >+ * The feature id for the '<em><b>Dublin Core</b></em>' containment reference. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ * @ordered >+ */ >+ int MIGRATION_EDGE__DUBLIN_CORE = GraphPackage.EDGE__DUBLIN_CORE; >+ >+ /** >+ * The feature id for the '<em><b>A</b></em>' reference. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ * @ordered >+ */ >+ int MIGRATION_EDGE__A = GraphPackage.EDGE__A; >+ >+ /** >+ * The feature id for the '<em><b>Node AURI</b></em>' attribute. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ * @ordered >+ */ >+ int MIGRATION_EDGE__NODE_AURI = GraphPackage.EDGE__NODE_AURI; >+ >+ /** >+ * The feature id for the '<em><b>B</b></em>' reference. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ * @ordered >+ */ >+ int MIGRATION_EDGE__B = GraphPackage.EDGE__B; >+ >+ /** >+ * The feature id for the '<em><b>Node BURI</b></em>' attribute. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ * @ordered >+ */ >+ int MIGRATION_EDGE__NODE_BURI = GraphPackage.EDGE__NODE_BURI; >+ >+ /** >+ * The feature id for the '<em><b>Label</b></em>' containment reference. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ * @ordered >+ */ >+ int MIGRATION_EDGE__LABEL = GraphPackage.EDGE__LABEL; >+ >+ /** >+ * The feature id for the '<em><b>Directed</b></em>' attribute. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ * @ordered >+ */ >+ int MIGRATION_EDGE__DIRECTED = GraphPackage.EDGE__DIRECTED; >+ >+ /** >+ * The number of structural features of the '<em>Migration Edge</em>' class. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ * @ordered >+ */ >+ int MIGRATION_EDGE_FEATURE_COUNT = GraphPackage.EDGE_FEATURE_COUNT + 0; >+ >+ /** >+ * The meta object id for the '{@link org.eclipse.ohf.stem.definitions.edges.impl.MigrationEdgeLabelImpl <em>Migration Edge Label</em>}' class. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @see org.eclipse.ohf.stem.definitions.edges.impl.MigrationEdgeLabelImpl >+ * @see org.eclipse.ohf.stem.definitions.edges.impl.EdgesPackageImpl#getMigrationEdgeLabel() >+ * @generated >+ */ >+ int MIGRATION_EDGE_LABEL = 1; >+ >+ /** >+ * The feature id for the '<em><b>URI</b></em>' attribute. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ * @ordered >+ */ >+ int MIGRATION_EDGE_LABEL__URI = GraphPackage.EDGE_LABEL__URI; >+ >+ /** >+ * The feature id for the '<em><b>Type URI</b></em>' attribute. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ * @ordered >+ */ >+ int MIGRATION_EDGE_LABEL__TYPE_URI = GraphPackage.EDGE_LABEL__TYPE_URI; >+ >+ /** >+ * The feature id for the '<em><b>Dublin Core</b></em>' containment reference. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ * @ordered >+ */ >+ int MIGRATION_EDGE_LABEL__DUBLIN_CORE = GraphPackage.EDGE_LABEL__DUBLIN_CORE; >+ >+ /** >+ * The feature id for the '<em><b>URI Of Identifiable To Be Labeled</b></em>' attribute. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ * @ordered >+ */ >+ int MIGRATION_EDGE_LABEL__URI_OF_IDENTIFIABLE_TO_BE_LABELED = GraphPackage.EDGE_LABEL__URI_OF_IDENTIFIABLE_TO_BE_LABELED; >+ >+ /** >+ * The feature id for the '<em><b>Current Value</b></em>' containment reference. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ * @ordered >+ */ >+ int MIGRATION_EDGE_LABEL__CURRENT_VALUE = GraphPackage.EDGE_LABEL__CURRENT_VALUE; >+ >+ /** >+ * The feature id for the '<em><b>Identifiable</b></em>' reference. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ * @ordered >+ */ >+ int MIGRATION_EDGE_LABEL__IDENTIFIABLE = GraphPackage.EDGE_LABEL__IDENTIFIABLE; >+ >+ /** >+ * The feature id for the '<em><b>Edge</b></em>' container reference. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ * @ordered >+ */ >+ int MIGRATION_EDGE_LABEL__EDGE = GraphPackage.EDGE_LABEL__EDGE; >+ >+ /** >+ * The number of structural features of the '<em>Migration Edge Label</em>' class. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ * @ordered >+ */ >+ int MIGRATION_EDGE_LABEL_FEATURE_COUNT = GraphPackage.EDGE_LABEL_FEATURE_COUNT + 0; >+ >+ /** >+ * The meta object id for the '{@link org.eclipse.ohf.stem.definitions.edges.impl.MigrationEdgeLabelValueImpl <em>Migration Edge Label Value</em>}' class. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @see org.eclipse.ohf.stem.definitions.edges.impl.MigrationEdgeLabelValueImpl >+ * @see org.eclipse.ohf.stem.definitions.edges.impl.EdgesPackageImpl#getMigrationEdgeLabelValue() >+ * @generated >+ */ >+ int MIGRATION_EDGE_LABEL_VALUE = 2; >+ >+ /** >+ * The feature id for the '<em><b>Migration Rate</b></em>' attribute. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ * @ordered >+ */ >+ int MIGRATION_EDGE_LABEL_VALUE__MIGRATION_RATE = GraphPackage.LABEL_VALUE_FEATURE_COUNT + 0; >+ >+ /** >+ * The number of structural features of the '<em>Migration Edge Label Value</em>' class. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ * @ordered >+ */ >+ int MIGRATION_EDGE_LABEL_VALUE_FEATURE_COUNT = GraphPackage.LABEL_VALUE_FEATURE_COUNT + 1; >+ >+ /** >+ * The meta object id for the '{@link org.eclipse.ohf.stem.definitions.edges.impl.MixingEdgeImpl <em>Mixing Edge</em>}' class. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @see org.eclipse.ohf.stem.definitions.edges.impl.MixingEdgeImpl >+ * @see org.eclipse.ohf.stem.definitions.edges.impl.EdgesPackageImpl#getMixingEdge() >+ * @generated >+ */ >+ int MIXING_EDGE = 3; >+ >+ /** >+ * The feature id for the '<em><b>URI</b></em>' attribute. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ * @ordered >+ */ >+ int MIXING_EDGE__URI = GraphPackage.EDGE__URI; >+ >+ /** >+ * The feature id for the '<em><b>Type URI</b></em>' attribute. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ * @ordered >+ */ >+ int MIXING_EDGE__TYPE_URI = GraphPackage.EDGE__TYPE_URI; >+ >+ /** >+ * The feature id for the '<em><b>Dublin Core</b></em>' containment reference. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ * @ordered >+ */ >+ int MIXING_EDGE__DUBLIN_CORE = GraphPackage.EDGE__DUBLIN_CORE; >+ >+ /** >+ * The feature id for the '<em><b>A</b></em>' reference. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ * @ordered >+ */ >+ int MIXING_EDGE__A = GraphPackage.EDGE__A; >+ >+ /** >+ * The feature id for the '<em><b>Node AURI</b></em>' attribute. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ * @ordered >+ */ >+ int MIXING_EDGE__NODE_AURI = GraphPackage.EDGE__NODE_AURI; >+ >+ /** >+ * The feature id for the '<em><b>B</b></em>' reference. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ * @ordered >+ */ >+ int MIXING_EDGE__B = GraphPackage.EDGE__B; >+ >+ /** >+ * The feature id for the '<em><b>Node BURI</b></em>' attribute. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ * @ordered >+ */ >+ int MIXING_EDGE__NODE_BURI = GraphPackage.EDGE__NODE_BURI; >+ >+ /** >+ * The feature id for the '<em><b>Label</b></em>' containment reference. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ * @ordered >+ */ >+ int MIXING_EDGE__LABEL = GraphPackage.EDGE__LABEL; >+ >+ /** >+ * The feature id for the '<em><b>Directed</b></em>' attribute. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ * @ordered >+ */ >+ int MIXING_EDGE__DIRECTED = GraphPackage.EDGE__DIRECTED; >+ >+ /** >+ * The number of structural features of the '<em>Mixing Edge</em>' class. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ * @ordered >+ */ >+ int MIXING_EDGE_FEATURE_COUNT = GraphPackage.EDGE_FEATURE_COUNT + 0; >+ >+ /** >+ * The meta object id for the '{@link org.eclipse.ohf.stem.definitions.edges.impl.MixingEdgeLabelImpl <em>Mixing Edge Label</em>}' class. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @see org.eclipse.ohf.stem.definitions.edges.impl.MixingEdgeLabelImpl >+ * @see org.eclipse.ohf.stem.definitions.edges.impl.EdgesPackageImpl#getMixingEdgeLabel() >+ * @generated >+ */ >+ int MIXING_EDGE_LABEL = 4; >+ >+ /** >+ * The feature id for the '<em><b>URI</b></em>' attribute. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ * @ordered >+ */ >+ int MIXING_EDGE_LABEL__URI = GraphPackage.EDGE_LABEL__URI; >+ >+ /** >+ * The feature id for the '<em><b>Type URI</b></em>' attribute. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ * @ordered >+ */ >+ int MIXING_EDGE_LABEL__TYPE_URI = GraphPackage.EDGE_LABEL__TYPE_URI; >+ >+ /** >+ * The feature id for the '<em><b>Dublin Core</b></em>' containment reference. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ * @ordered >+ */ >+ int MIXING_EDGE_LABEL__DUBLIN_CORE = GraphPackage.EDGE_LABEL__DUBLIN_CORE; >+ >+ /** >+ * The feature id for the '<em><b>URI Of Identifiable To Be Labeled</b></em>' attribute. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ * @ordered >+ */ >+ int MIXING_EDGE_LABEL__URI_OF_IDENTIFIABLE_TO_BE_LABELED = GraphPackage.EDGE_LABEL__URI_OF_IDENTIFIABLE_TO_BE_LABELED; >+ >+ /** >+ * The feature id for the '<em><b>Current Value</b></em>' containment reference. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ * @ordered >+ */ >+ int MIXING_EDGE_LABEL__CURRENT_VALUE = GraphPackage.EDGE_LABEL__CURRENT_VALUE; >+ >+ /** >+ * The feature id for the '<em><b>Identifiable</b></em>' reference. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ * @ordered >+ */ >+ int MIXING_EDGE_LABEL__IDENTIFIABLE = GraphPackage.EDGE_LABEL__IDENTIFIABLE; >+ >+ /** >+ * The feature id for the '<em><b>Edge</b></em>' container reference. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ * @ordered >+ */ >+ int MIXING_EDGE_LABEL__EDGE = GraphPackage.EDGE_LABEL__EDGE; >+ >+ /** >+ * The number of structural features of the '<em>Mixing Edge Label</em>' class. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ * @ordered >+ */ >+ int MIXING_EDGE_LABEL_FEATURE_COUNT = GraphPackage.EDGE_LABEL_FEATURE_COUNT + 0; >+ >+ /** >+ * The meta object id for the '{@link org.eclipse.ohf.stem.definitions.edges.impl.MixingEdgeLabelValueImpl <em>Mixing Edge Label Value</em>}' class. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @see org.eclipse.ohf.stem.definitions.edges.impl.MixingEdgeLabelValueImpl >+ * @see org.eclipse.ohf.stem.definitions.edges.impl.EdgesPackageImpl#getMixingEdgeLabelValue() >+ * @generated >+ */ >+ int MIXING_EDGE_LABEL_VALUE = 5; >+ >+ /** >+ * The feature id for the '<em><b>Mixing Rate</b></em>' attribute. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ * @ordered >+ */ >+ int MIXING_EDGE_LABEL_VALUE__MIXING_RATE = GraphPackage.LABEL_VALUE_FEATURE_COUNT + 0; >+ >+ /** >+ * The number of structural features of the '<em>Mixing Edge Label Value</em>' class. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ * @ordered >+ */ >+ int MIXING_EDGE_LABEL_VALUE_FEATURE_COUNT = GraphPackage.LABEL_VALUE_FEATURE_COUNT + 1; >+ >+ >+ /** >+ * Returns the meta object for class '{@link org.eclipse.ohf.stem.definitions.edges.MigrationEdge <em>Migration Edge</em>}'. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @return the meta object for class '<em>Migration Edge</em>'. >+ * @see org.eclipse.ohf.stem.definitions.edges.MigrationEdge >+ * @generated >+ */ >+ EClass getMigrationEdge(); >+ >+ /** >+ * Returns the meta object for class '{@link org.eclipse.ohf.stem.definitions.edges.MigrationEdgeLabel <em>Migration Edge Label</em>}'. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @return the meta object for class '<em>Migration Edge Label</em>'. >+ * @see org.eclipse.ohf.stem.definitions.edges.MigrationEdgeLabel >+ * @generated >+ */ >+ EClass getMigrationEdgeLabel(); >+ >+ /** >+ * Returns the meta object for class '{@link org.eclipse.ohf.stem.definitions.edges.MigrationEdgeLabelValue <em>Migration Edge Label Value</em>}'. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @return the meta object for class '<em>Migration Edge Label Value</em>'. >+ * @see org.eclipse.ohf.stem.definitions.edges.MigrationEdgeLabelValue >+ * @generated >+ */ >+ EClass getMigrationEdgeLabelValue(); >+ >+ /** >+ * Returns the meta object for the attribute '{@link org.eclipse.ohf.stem.definitions.edges.MigrationEdgeLabelValue#getMigrationRate <em>Migration Rate</em>}'. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @return the meta object for the attribute '<em>Migration Rate</em>'. >+ * @see org.eclipse.ohf.stem.definitions.edges.MigrationEdgeLabelValue#getMigrationRate() >+ * @see #getMigrationEdgeLabelValue() >+ * @generated >+ */ >+ EAttribute getMigrationEdgeLabelValue_MigrationRate(); >+ >+ /** >+ * Returns the meta object for class '{@link org.eclipse.ohf.stem.definitions.edges.MixingEdge <em>Mixing Edge</em>}'. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @return the meta object for class '<em>Mixing Edge</em>'. >+ * @see org.eclipse.ohf.stem.definitions.edges.MixingEdge >+ * @generated >+ */ >+ EClass getMixingEdge(); >+ >+ /** >+ * Returns the meta object for class '{@link org.eclipse.ohf.stem.definitions.edges.MixingEdgeLabel <em>Mixing Edge Label</em>}'. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @return the meta object for class '<em>Mixing Edge Label</em>'. >+ * @see org.eclipse.ohf.stem.definitions.edges.MixingEdgeLabel >+ * @generated >+ */ >+ EClass getMixingEdgeLabel(); >+ >+ /** >+ * Returns the meta object for class '{@link org.eclipse.ohf.stem.definitions.edges.MixingEdgeLabelValue <em>Mixing Edge Label Value</em>}'. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @return the meta object for class '<em>Mixing Edge Label Value</em>'. >+ * @see org.eclipse.ohf.stem.definitions.edges.MixingEdgeLabelValue >+ * @generated >+ */ >+ EClass getMixingEdgeLabelValue(); >+ >+ /** >+ * Returns the meta object for the attribute '{@link org.eclipse.ohf.stem.definitions.edges.MixingEdgeLabelValue#getMixingRate <em>Mixing Rate</em>}'. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @return the meta object for the attribute '<em>Mixing Rate</em>'. >+ * @see org.eclipse.ohf.stem.definitions.edges.MixingEdgeLabelValue#getMixingRate() >+ * @see #getMixingEdgeLabelValue() >+ * @generated >+ */ >+ EAttribute getMixingEdgeLabelValue_MixingRate(); >+ >+ /** >+ * Returns the factory that creates the instances of the model. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @return the factory that creates the instances of the model. >+ * @generated >+ */ >+ EdgesFactory getEdgesFactory(); >+ >+ /** >+ * <!-- begin-user-doc --> >+ * Defines literals for the meta objects that represent >+ * <ul> >+ * <li>each class,</li> >+ * <li>each feature of each class,</li> >+ * <li>each enum,</li> >+ * <li>and each data type</li> >+ * </ul> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ interface Literals { >+ /** >+ * The meta object literal for the '{@link org.eclipse.ohf.stem.definitions.edges.impl.MigrationEdgeImpl <em>Migration Edge</em>}' class. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @see org.eclipse.ohf.stem.definitions.edges.impl.MigrationEdgeImpl >+ * @see org.eclipse.ohf.stem.definitions.edges.impl.EdgesPackageImpl#getMigrationEdge() >+ * @generated >+ */ >+ EClass MIGRATION_EDGE = eINSTANCE.getMigrationEdge(); >+ >+ /** >+ * The meta object literal for the '{@link org.eclipse.ohf.stem.definitions.edges.impl.MigrationEdgeLabelImpl <em>Migration Edge Label</em>}' class. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @see org.eclipse.ohf.stem.definitions.edges.impl.MigrationEdgeLabelImpl >+ * @see org.eclipse.ohf.stem.definitions.edges.impl.EdgesPackageImpl#getMigrationEdgeLabel() >+ * @generated >+ */ >+ EClass MIGRATION_EDGE_LABEL = eINSTANCE.getMigrationEdgeLabel(); >+ >+ /** >+ * The meta object literal for the '{@link org.eclipse.ohf.stem.definitions.edges.impl.MigrationEdgeLabelValueImpl <em>Migration Edge Label Value</em>}' class. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @see org.eclipse.ohf.stem.definitions.edges.impl.MigrationEdgeLabelValueImpl >+ * @see org.eclipse.ohf.stem.definitions.edges.impl.EdgesPackageImpl#getMigrationEdgeLabelValue() >+ * @generated >+ */ >+ EClass MIGRATION_EDGE_LABEL_VALUE = eINSTANCE.getMigrationEdgeLabelValue(); >+ >+ /** >+ * The meta object literal for the '<em><b>Migration Rate</b></em>' attribute feature. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ EAttribute MIGRATION_EDGE_LABEL_VALUE__MIGRATION_RATE = eINSTANCE.getMigrationEdgeLabelValue_MigrationRate(); >+ >+ /** >+ * The meta object literal for the '{@link org.eclipse.ohf.stem.definitions.edges.impl.MixingEdgeImpl <em>Mixing Edge</em>}' class. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @see org.eclipse.ohf.stem.definitions.edges.impl.MixingEdgeImpl >+ * @see org.eclipse.ohf.stem.definitions.edges.impl.EdgesPackageImpl#getMixingEdge() >+ * @generated >+ */ >+ EClass MIXING_EDGE = eINSTANCE.getMixingEdge(); >+ >+ /** >+ * The meta object literal for the '{@link org.eclipse.ohf.stem.definitions.edges.impl.MixingEdgeLabelImpl <em>Mixing Edge Label</em>}' class. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @see org.eclipse.ohf.stem.definitions.edges.impl.MixingEdgeLabelImpl >+ * @see org.eclipse.ohf.stem.definitions.edges.impl.EdgesPackageImpl#getMixingEdgeLabel() >+ * @generated >+ */ >+ EClass MIXING_EDGE_LABEL = eINSTANCE.getMixingEdgeLabel(); >+ >+ /** >+ * The meta object literal for the '{@link org.eclipse.ohf.stem.definitions.edges.impl.MixingEdgeLabelValueImpl <em>Mixing Edge Label Value</em>}' class. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @see org.eclipse.ohf.stem.definitions.edges.impl.MixingEdgeLabelValueImpl >+ * @see org.eclipse.ohf.stem.definitions.edges.impl.EdgesPackageImpl#getMixingEdgeLabelValue() >+ * @generated >+ */ >+ EClass MIXING_EDGE_LABEL_VALUE = eINSTANCE.getMixingEdgeLabelValue(); >+ >+ /** >+ * The meta object literal for the '<em><b>Mixing Rate</b></em>' attribute feature. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ EAttribute MIXING_EDGE_LABEL_VALUE__MIXING_RATE = eINSTANCE.getMixingEdgeLabelValue_MixingRate(); >+ >+ } >+ >+} //EdgesPackage >Index: src/org/eclipse/ohf/stem/definitions/edges/MigrationEdgeLabel.java >=================================================================== >RCS file: src/org/eclipse/ohf/stem/definitions/edges/MigrationEdgeLabel.java >diff -N src/org/eclipse/ohf/stem/definitions/edges/MigrationEdgeLabel.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ohf/stem/definitions/edges/MigrationEdgeLabel.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,41 @@ >+package org.eclipse.ohf.stem.definitions.edges; >+ >+/******************************************************************************* >+ * Copyright (c) 2006 IBM Corporation and others. >+ * 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: >+ * IBM Corporation - initial API and implementation >+ *******************************************************************************/ >+ >+import org.eclipse.ohf.stem.core.graph.EdgeLabel; >+ >+ >+/** >+ * Defines a directed edge that represents migration between two nodes. Migration >+ * denotes movement of the population between two nodes (i.e., the home node of >+ * migrating population changes). >+ * @author jlessler >+ * @model >+ */ >+ >+public interface MigrationEdgeLabel extends EdgeLabel { >+ >+ >+ /** >+ * This is the segment of the type URI that prefixes all other segments in a >+ * migration relationship label type URI. >+ */ >+ String URI_TYPE_MIGRATION_RELATIONSHIP_LABEL_SEGMENT = URI_TYPE_LABEL_SEGMENT >+ + "/migration"; >+ >+ >+ /**Make the current value stuff have to be MixingEdgeLabelValues >+ * */ >+ MigrationEdgeLabelValue getCurrentValue(); >+ void setCurrentValue(MigrationEdgeLabelValue val); >+ >+} >Index: src/org/eclipse/ohf/stem/definitions/edges/impl/EdgesFactoryImpl.java >=================================================================== >RCS file: src/org/eclipse/ohf/stem/definitions/edges/impl/EdgesFactoryImpl.java >diff -N src/org/eclipse/ohf/stem/definitions/edges/impl/EdgesFactoryImpl.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ohf/stem/definitions/edges/impl/EdgesFactoryImpl.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,154 @@ >+/** >+ * <copyright> >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ohf.stem.definitions.edges.impl; >+ >+import org.eclipse.emf.ecore.EClass; >+import org.eclipse.emf.ecore.EObject; >+import org.eclipse.emf.ecore.EPackage; >+ >+import org.eclipse.emf.ecore.impl.EFactoryImpl; >+ >+import org.eclipse.emf.ecore.plugin.EcorePlugin; >+ >+import org.eclipse.ohf.stem.definitions.edges.*; >+ >+/** >+ * <!-- begin-user-doc --> >+ * An implementation of the model <b>Factory</b>. >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+public class EdgesFactoryImpl extends EFactoryImpl implements EdgesFactory { >+ /** >+ * Creates the default factory implementation. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ public static EdgesFactory init() { >+ try { >+ EdgesFactory theEdgesFactory = (EdgesFactory)EPackage.Registry.INSTANCE.getEFactory("http:///org/eclipse/ohf/stem/definitions/edges.ecore"); >+ if (theEdgesFactory != null) { >+ return theEdgesFactory; >+ } >+ } >+ catch (Exception exception) { >+ EcorePlugin.INSTANCE.log(exception); >+ } >+ return new EdgesFactoryImpl(); >+ } >+ >+ /** >+ * Creates an instance of the factory. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ public EdgesFactoryImpl() { >+ super(); >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ @Override >+ public EObject create(EClass eClass) { >+ switch (eClass.getClassifierID()) { >+ case EdgesPackage.MIGRATION_EDGE: return createMigrationEdge(); >+ case EdgesPackage.MIGRATION_EDGE_LABEL: return createMigrationEdgeLabel(); >+ case EdgesPackage.MIGRATION_EDGE_LABEL_VALUE: return createMigrationEdgeLabelValue(); >+ case EdgesPackage.MIXING_EDGE: return createMixingEdge(); >+ case EdgesPackage.MIXING_EDGE_LABEL: return createMixingEdgeLabel(); >+ case EdgesPackage.MIXING_EDGE_LABEL_VALUE: return createMixingEdgeLabelValue(); >+ default: >+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); >+ } >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ public MigrationEdge createMigrationEdge() { >+ MigrationEdgeImpl migrationEdge = new MigrationEdgeImpl(); >+ return migrationEdge; >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ public MigrationEdgeLabel createMigrationEdgeLabel() { >+ MigrationEdgeLabelImpl migrationEdgeLabel = new MigrationEdgeLabelImpl(); >+ return migrationEdgeLabel; >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ public MigrationEdgeLabelValue createMigrationEdgeLabelValue() { >+ MigrationEdgeLabelValueImpl migrationEdgeLabelValue = new MigrationEdgeLabelValueImpl(); >+ return migrationEdgeLabelValue; >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ public MixingEdge createMixingEdge() { >+ MixingEdgeImpl mixingEdge = new MixingEdgeImpl(); >+ return mixingEdge; >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ public MixingEdgeLabel createMixingEdgeLabel() { >+ MixingEdgeLabelImpl mixingEdgeLabel = new MixingEdgeLabelImpl(); >+ return mixingEdgeLabel; >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ public MixingEdgeLabelValue createMixingEdgeLabelValue() { >+ MixingEdgeLabelValueImpl mixingEdgeLabelValue = new MixingEdgeLabelValueImpl(); >+ return mixingEdgeLabelValue; >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ public EdgesPackage getEdgesPackage() { >+ return (EdgesPackage)getEPackage(); >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @deprecated >+ * @generated >+ */ >+ @Deprecated >+ public static EdgesPackage getPackage() { >+ return EdgesPackage.eINSTANCE; >+ } >+ >+} //EdgesFactoryImpl >Index: src/org/eclipse/ohf/stem/definitions/edges/MixingEdge.java >=================================================================== >RCS file: src/org/eclipse/ohf/stem/definitions/edges/MixingEdge.java >diff -N src/org/eclipse/ohf/stem/definitions/edges/MixingEdge.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ohf/stem/definitions/edges/MixingEdge.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,37 @@ >+/******************************************************************************* >+ * Copyright (c) 2007 IBM Corporation and others. >+ * 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: >+ * IBM Corporation - initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.ohf.stem.definitions.edges; >+ >+import org.eclipse.ohf.stem.core.graph.Edge; >+ >+/** >+ * A mixing edge. A mixing edge must have the property that: >+ * - it is undirected >+ * - getLabel() returns a mixing edge label >+ * @author jlessler >+ * >+ * @model >+ */ >+public interface MixingEdge extends Edge { >+ >+ /** >+ * This is the segment of the type URI that prefixes all other segments in a >+ * mixing edge URI. >+ */ >+ public String URI_TYPE_MIXING_EDGE_SEGMENT = URI_TYPE_EDGE_SEGMENT + "/mixing"; >+ >+ >+ /**Overrides getLabel() to enforce the returning of a mixing edge label >+ */ >+ MixingEdgeLabel getLabel(); >+ void setLabel(MixingEdgeLabel lbl); >+ >+} >Index: src/org/eclipse/ohf/stem/definitions/edges/impl/MixingEdgeLabelValueImpl.java >=================================================================== >RCS file: src/org/eclipse/ohf/stem/definitions/edges/impl/MixingEdgeLabelValueImpl.java >diff -N src/org/eclipse/ohf/stem/definitions/edges/impl/MixingEdgeLabelValueImpl.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ohf/stem/definitions/edges/impl/MixingEdgeLabelValueImpl.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,174 @@ >+/** >+ * <copyright> >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ohf.stem.definitions.edges.impl; >+ >+import org.eclipse.emf.common.notify.Notification; >+ >+import org.eclipse.emf.ecore.EClass; >+ >+import org.eclipse.emf.ecore.impl.ENotificationImpl; >+ >+import org.eclipse.ohf.stem.core.graph.impl.LabelValueImpl; >+ >+import org.eclipse.ohf.stem.definitions.edges.EdgesPackage; >+import org.eclipse.ohf.stem.definitions.edges.MixingEdgeLabelValue; >+ >+/** >+ * <!-- begin-user-doc --> >+ * An implementation of the model object '<em><b>Mixing Edge Label Value</b></em>'. >+ * <!-- end-user-doc --> >+ * <p> >+ * The following features are implemented: >+ * <ul> >+ * <li>{@link org.eclipse.ohf.stem.definitions.edges.impl.MixingEdgeLabelValueImpl#getMixingRate <em>Mixing Rate</em>}</li> >+ * </ul> >+ * </p> >+ * >+ * @generated >+ */ >+public class MixingEdgeLabelValueImpl extends LabelValueImpl implements MixingEdgeLabelValue { >+ /** >+ * The default value of the '{@link #getMixingRate() <em>Mixing Rate</em>}' attribute. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @see #getMixingRate() >+ * @generated >+ * @ordered >+ */ >+ protected static final double MIXING_RATE_EDEFAULT = 0.0; >+ >+ /** >+ * The cached value of the '{@link #getMixingRate() <em>Mixing Rate</em>}' attribute. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @see #getMixingRate() >+ * @generated >+ * @ordered >+ */ >+ protected double mixingRate = MIXING_RATE_EDEFAULT; >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ protected MixingEdgeLabelValueImpl() { >+ super(); >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ @Override >+ protected EClass eStaticClass() { >+ return EdgesPackage.Literals.MIXING_EDGE_LABEL_VALUE; >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ public double getMixingRate() { >+ return mixingRate; >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ public void setMixingRate(double newMixingRate) { >+ double oldMixingRate = mixingRate; >+ mixingRate = newMixingRate; >+ if (eNotificationRequired()) >+ eNotify(new ENotificationImpl(this, Notification.SET, EdgesPackage.MIXING_EDGE_LABEL_VALUE__MIXING_RATE, oldMixingRate, mixingRate)); >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ @Override >+ public Object eGet(int featureID, boolean resolve, boolean coreType) { >+ switch (featureID) { >+ case EdgesPackage.MIXING_EDGE_LABEL_VALUE__MIXING_RATE: >+ return new Double(getMixingRate()); >+ } >+ return super.eGet(featureID, resolve, coreType); >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ @Override >+ public void eSet(int featureID, Object newValue) { >+ switch (featureID) { >+ case EdgesPackage.MIXING_EDGE_LABEL_VALUE__MIXING_RATE: >+ setMixingRate(((Double)newValue).doubleValue()); >+ return; >+ } >+ super.eSet(featureID, newValue); >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ @Override >+ public void eUnset(int featureID) { >+ switch (featureID) { >+ case EdgesPackage.MIXING_EDGE_LABEL_VALUE__MIXING_RATE: >+ setMixingRate(MIXING_RATE_EDEFAULT); >+ return; >+ } >+ super.eUnset(featureID); >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ @Override >+ public boolean eIsSet(int featureID) { >+ switch (featureID) { >+ case EdgesPackage.MIXING_EDGE_LABEL_VALUE__MIXING_RATE: >+ return mixingRate != MIXING_RATE_EDEFAULT; >+ } >+ return super.eIsSet(featureID); >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ @Override >+ public String toString() { >+ if (eIsProxy()) return super.toString(); >+ >+ StringBuffer result = new StringBuffer(super.toString()); >+ result.append(" (mixingRate: "); >+ result.append(mixingRate); >+ result.append(')'); >+ return result.toString(); >+ } >+ >+ /**for reset set the rate to the default rate.*/ >+ public void reset() { >+ setMixingRate(MIXING_RATE_EDEFAULT); >+ } >+ >+ >+} //MixingEdgeLabelValueImpl >Index: src/org/eclipse/ohf/stem/definitions/edges/MixingEdgeLabel.java >=================================================================== >RCS file: src/org/eclipse/ohf/stem/definitions/edges/MixingEdgeLabel.java >diff -N src/org/eclipse/ohf/stem/definitions/edges/MixingEdgeLabel.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ohf/stem/definitions/edges/MixingEdgeLabel.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,39 @@ >+package org.eclipse.ohf.stem.definitions.edges; >+ >+ >+/******************************************************************************* >+ * Copyright (c) 2006 IBM Corporation and others. >+ * 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: >+ * IBM Corporation - initial API and implementation >+ *******************************************************************************/ >+ >+import org.eclipse.ohf.stem.core.graph.EdgeLabel; >+ >+ >+/** >+ * Defines a mixing edge. Mixing edges are undirected and defines some rate of >+ * contact between members of two populations in which the home population of >+ * the individuals involved does not change. >+ * >+ * @model >+ * */ >+public interface MixingEdgeLabel extends EdgeLabel { >+ >+ /** >+ * This is the segment of the type URI that prefixes all other segments in a >+ * mixing relationship label type URI. >+ */ >+ String URI_TYPE_MIXING_RELATIONSHIP_LABEL_SEGMENT = URI_TYPE_LABEL_SEGMENT >+ + "/mixing"; >+ >+ /**Make the current value stuff have to be MixingEdgeLabelValues >+ * */ >+ MixingEdgeLabelValue getCurrentValue(); >+ void setCurrentValue(MixingEdgeLabelValue val); >+ >+} >Index: src/org/eclipse/ohf/stem/definitions/edges/EdgesFactory.java >=================================================================== >RCS file: src/org/eclipse/ohf/stem/definitions/edges/EdgesFactory.java >diff -N src/org/eclipse/ohf/stem/definitions/edges/EdgesFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ohf/stem/definitions/edges/EdgesFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,91 @@ >+/** >+ * <copyright> >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ohf.stem.definitions.edges; >+ >+import org.eclipse.emf.ecore.EFactory; >+ >+/** >+ * <!-- begin-user-doc --> >+ * The <b>Factory</b> for the model. >+ * It provides a create method for each non-abstract class of the model. >+ * <!-- end-user-doc --> >+ * @see org.eclipse.ohf.stem.definitions.edges.EdgesPackage >+ * @generated >+ */ >+public interface EdgesFactory extends EFactory { >+ /** >+ * The singleton instance of the factory. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ EdgesFactory eINSTANCE = org.eclipse.ohf.stem.definitions.edges.impl.EdgesFactoryImpl.init(); >+ >+ /** >+ * Returns a new object of class '<em>Migration Edge</em>'. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @return a new object of class '<em>Migration Edge</em>'. >+ * @generated >+ */ >+ MigrationEdge createMigrationEdge(); >+ >+ /** >+ * Returns a new object of class '<em>Migration Edge Label</em>'. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @return a new object of class '<em>Migration Edge Label</em>'. >+ * @generated >+ */ >+ MigrationEdgeLabel createMigrationEdgeLabel(); >+ >+ /** >+ * Returns a new object of class '<em>Migration Edge Label Value</em>'. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @return a new object of class '<em>Migration Edge Label Value</em>'. >+ * @generated >+ */ >+ MigrationEdgeLabelValue createMigrationEdgeLabelValue(); >+ >+ /** >+ * Returns a new object of class '<em>Mixing Edge</em>'. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @return a new object of class '<em>Mixing Edge</em>'. >+ * @generated >+ */ >+ MixingEdge createMixingEdge(); >+ >+ /** >+ * Returns a new object of class '<em>Mixing Edge Label</em>'. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @return a new object of class '<em>Mixing Edge Label</em>'. >+ * @generated >+ */ >+ MixingEdgeLabel createMixingEdgeLabel(); >+ >+ /** >+ * Returns a new object of class '<em>Mixing Edge Label Value</em>'. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @return a new object of class '<em>Mixing Edge Label Value</em>'. >+ * @generated >+ */ >+ MixingEdgeLabelValue createMixingEdgeLabelValue(); >+ >+ /** >+ * Returns the package supported by this factory. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @return the package supported by this factory. >+ * @generated >+ */ >+ EdgesPackage getEdgesPackage(); >+ >+} //EdgesFactory >Index: src/org/eclipse/ohf/stem/definitions/edges/MixingEdgeLabelValue.java >=================================================================== >RCS file: src/org/eclipse/ohf/stem/definitions/edges/MixingEdgeLabelValue.java >diff -N src/org/eclipse/ohf/stem/definitions/edges/MixingEdgeLabelValue.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ohf/stem/definitions/edges/MixingEdgeLabelValue.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,40 @@ >+package org.eclipse.ohf.stem.definitions.edges; >+ >+ >+/******************************************************************************* >+ * Copyright (c) 2006 IBM Corporation and others. >+ * 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: >+ * IBM Corporation - initial API and implementation >+ *******************************************************************************/ >+ >+import org.eclipse.ohf.stem.core.graph.LabelValue; >+ >+ >+/**Label value denoting the rate of mixing between two populations. >+ * >+ * @model*/ >+public interface MixingEdgeLabelValue extends LabelValue { >+ >+ >+ >+ /**The rate of mixing between the two populations. >+ * >+ * @model*/ >+ double getMixingRate(); >+ >+ /** >+ * Sets the value of the '{@link org.eclipse.ohf.stem.definitions.edges.MixingEdgeLabelValue#getMixingRate <em>Mixing Rate</em>}' attribute. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @param value the new value of the '<em>Mixing Rate</em>' attribute. >+ * @see #getMixingRate() >+ * @generated >+ */ >+ void setMixingRate(double value); >+ >+} >Index: src/org/eclipse/ohf/stem/definitions/edges/MigrationEdge.java >=================================================================== >RCS file: src/org/eclipse/ohf/stem/definitions/edges/MigrationEdge.java >diff -N src/org/eclipse/ohf/stem/definitions/edges/MigrationEdge.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ohf/stem/definitions/edges/MigrationEdge.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,40 @@ >+/******************************************************************************* >+ * Copyright (c) 2007 IBM Corporation and others. >+ * 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: >+ * IBM Corporation - initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.ohf.stem.definitions.edges; >+ >+import org.eclipse.ohf.stem.core.graph.Edge; >+ >+/** >+ * An edge representing migration between >+ * two areas. These edges have the following restrictions: >+ * -getLabel() must return a migration edge label >+ * -isDirected() must return true >+ * >+ * @author jlessler >+ * >+ * @model >+ */ >+public interface MigrationEdge extends Edge { >+ >+ /** >+ * This is the segment of the type URI that prefixes all other segments in a >+ * migration edge URI. >+ */ >+ public String URI_TYPE_MIGRATION_EDGE_SEGMENT = URI_TYPE_EDGE_SEGMENT + "/migration"; >+ >+ >+ >+ /**Overrides getLabel() to enforce the returning of a migration edge label >+ **/ >+ MigrationEdgeLabel getLabel(); >+ void setLabel(MigrationEdgeLabel lbl); >+ >+} >Index: src/org/eclipse/ohf/stem/definitions/edges/impl/EdgesPackageImpl.java >=================================================================== >RCS file: src/org/eclipse/ohf/stem/definitions/edges/impl/EdgesPackageImpl.java >diff -N src/org/eclipse/ohf/stem/definitions/edges/impl/EdgesPackageImpl.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ohf/stem/definitions/edges/impl/EdgesPackageImpl.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,341 @@ >+/** >+ * <copyright> >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ohf.stem.definitions.edges.impl; >+ >+import org.eclipse.emf.ecore.EAttribute; >+import org.eclipse.emf.ecore.EClass; >+import org.eclipse.emf.ecore.EPackage; >+import org.eclipse.emf.ecore.EReference; >+ >+import org.eclipse.emf.ecore.impl.EPackageImpl; >+ >+import org.eclipse.ohf.stem.core.common.CommonPackage; >+ >+import org.eclipse.ohf.stem.core.graph.GraphPackage; >+ >+import org.eclipse.ohf.stem.core.model.ModelPackage; >+ >+import org.eclipse.ohf.stem.definitions.edges.EdgesFactory; >+import org.eclipse.ohf.stem.definitions.edges.EdgesPackage; >+import org.eclipse.ohf.stem.definitions.edges.MigrationEdge; >+import org.eclipse.ohf.stem.definitions.edges.MigrationEdgeLabel; >+import org.eclipse.ohf.stem.definitions.edges.MigrationEdgeLabelValue; >+import org.eclipse.ohf.stem.definitions.edges.MixingEdge; >+import org.eclipse.ohf.stem.definitions.edges.MixingEdgeLabel; >+import org.eclipse.ohf.stem.definitions.edges.MixingEdgeLabelValue; >+ >+import org.eclipse.ohf.stem.definitions.labels.LabelsPackage; >+ >+import org.eclipse.ohf.stem.definitions.labels.impl.LabelsPackageImpl; >+ >+import org.eclipse.ohf.stem.definitions.nodes.NodesPackage; >+ >+import org.eclipse.ohf.stem.definitions.nodes.impl.NodesPackageImpl; >+ >+/** >+ * <!-- begin-user-doc --> >+ * An implementation of the model <b>Package</b>. >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+public class EdgesPackageImpl extends EPackageImpl implements EdgesPackage { >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ private EClass migrationEdgeEClass = null; >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ private EClass migrationEdgeLabelEClass = null; >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ private EClass migrationEdgeLabelValueEClass = null; >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ private EClass mixingEdgeEClass = null; >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ private EClass mixingEdgeLabelEClass = null; >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ private EClass mixingEdgeLabelValueEClass = null; >+ >+ /** >+ * Creates an instance of the model <b>Package</b>, registered with >+ * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package >+ * package URI value. >+ * <p>Note: the correct way to create the package is via the static >+ * factory method {@link #init init()}, which also performs >+ * initialization of the package, or returns the registered package, >+ * if one already exists. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @see org.eclipse.emf.ecore.EPackage.Registry >+ * @see org.eclipse.ohf.stem.definitions.edges.EdgesPackage#eNS_URI >+ * @see #init() >+ * @generated >+ */ >+ private EdgesPackageImpl() { >+ super(eNS_URI, EdgesFactory.eINSTANCE); >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ private static boolean isInited = false; >+ >+ /** >+ * Creates, registers, and initializes the <b>Package</b> for this >+ * model, and for any others upon which it depends. Simple >+ * dependencies are satisfied by calling this method on all >+ * dependent packages before doing anything else. This method drives >+ * initialization for interdependent packages directly, in parallel >+ * with this package, itself. >+ * <p>Of this package and its interdependencies, all packages which >+ * have not yet been registered by their URI values are first created >+ * and registered. The packages are then initialized in two steps: >+ * meta-model objects for all of the packages are created before any >+ * are initialized, since one package's meta-model objects may refer to >+ * those of another. >+ * <p>Invocation of this method will not affect any packages that have >+ * already been initialized. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @see #eNS_URI >+ * @see #createPackageContents() >+ * @see #initializePackageContents() >+ * @generated >+ */ >+ public static EdgesPackage init() { >+ if (isInited) return (EdgesPackage)EPackage.Registry.INSTANCE.getEPackage(EdgesPackage.eNS_URI); >+ >+ // Obtain or create and register package >+ EdgesPackageImpl theEdgesPackage = (EdgesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof EdgesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new EdgesPackageImpl()); >+ >+ isInited = true; >+ >+ // Initialize simple dependencies >+ GraphPackage.eINSTANCE.eClass(); >+ CommonPackage.eINSTANCE.eClass(); >+ ModelPackage.eINSTANCE.eClass(); >+ >+ // Obtain or create and register interdependencies >+ LabelsPackageImpl theLabelsPackage = (LabelsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(LabelsPackage.eNS_URI) instanceof LabelsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(LabelsPackage.eNS_URI) : LabelsPackage.eINSTANCE); >+ NodesPackageImpl theNodesPackage = (NodesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(NodesPackage.eNS_URI) instanceof NodesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(NodesPackage.eNS_URI) : NodesPackage.eINSTANCE); >+ >+ // Create package meta-data objects >+ theEdgesPackage.createPackageContents(); >+ theLabelsPackage.createPackageContents(); >+ theNodesPackage.createPackageContents(); >+ >+ // Initialize created meta-data >+ theEdgesPackage.initializePackageContents(); >+ theLabelsPackage.initializePackageContents(); >+ theNodesPackage.initializePackageContents(); >+ >+ // Mark meta-data to indicate it can't be changed >+ theEdgesPackage.freeze(); >+ >+ return theEdgesPackage; >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ public EClass getMigrationEdge() { >+ return migrationEdgeEClass; >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ public EClass getMigrationEdgeLabel() { >+ return migrationEdgeLabelEClass; >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ public EClass getMigrationEdgeLabelValue() { >+ return migrationEdgeLabelValueEClass; >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ public EAttribute getMigrationEdgeLabelValue_MigrationRate() { >+ return (EAttribute)migrationEdgeLabelValueEClass.getEStructuralFeatures().get(0); >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ public EClass getMixingEdge() { >+ return mixingEdgeEClass; >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ public EClass getMixingEdgeLabel() { >+ return mixingEdgeLabelEClass; >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ public EClass getMixingEdgeLabelValue() { >+ return mixingEdgeLabelValueEClass; >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ public EAttribute getMixingEdgeLabelValue_MixingRate() { >+ return (EAttribute)mixingEdgeLabelValueEClass.getEStructuralFeatures().get(0); >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ public EdgesFactory getEdgesFactory() { >+ return (EdgesFactory)getEFactoryInstance(); >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ private boolean isCreated = false; >+ >+ /** >+ * Creates the meta-model objects for the package. This method is >+ * guarded to have no affect on any invocation but its first. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ public void createPackageContents() { >+ if (isCreated) return; >+ isCreated = true; >+ >+ // Create classes and their features >+ migrationEdgeEClass = createEClass(MIGRATION_EDGE); >+ >+ migrationEdgeLabelEClass = createEClass(MIGRATION_EDGE_LABEL); >+ >+ migrationEdgeLabelValueEClass = createEClass(MIGRATION_EDGE_LABEL_VALUE); >+ createEAttribute(migrationEdgeLabelValueEClass, MIGRATION_EDGE_LABEL_VALUE__MIGRATION_RATE); >+ >+ mixingEdgeEClass = createEClass(MIXING_EDGE); >+ >+ mixingEdgeLabelEClass = createEClass(MIXING_EDGE_LABEL); >+ >+ mixingEdgeLabelValueEClass = createEClass(MIXING_EDGE_LABEL_VALUE); >+ createEAttribute(mixingEdgeLabelValueEClass, MIXING_EDGE_LABEL_VALUE__MIXING_RATE); >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ private boolean isInitialized = false; >+ >+ /** >+ * Complete the initialization of the package and its meta-model. This >+ * method is guarded to have no affect on any invocation but its first. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ public void initializePackageContents() { >+ if (isInitialized) return; >+ isInitialized = true; >+ >+ // Initialize package >+ setName(eNAME); >+ setNsPrefix(eNS_PREFIX); >+ setNsURI(eNS_URI); >+ >+ // Obtain other dependent packages >+ GraphPackage theGraphPackage = (GraphPackage)EPackage.Registry.INSTANCE.getEPackage(GraphPackage.eNS_URI); >+ >+ // Create type parameters >+ >+ // Set bounds for type parameters >+ >+ // Add supertypes to classes >+ migrationEdgeEClass.getESuperTypes().add(theGraphPackage.getEdge()); >+ migrationEdgeLabelEClass.getESuperTypes().add(theGraphPackage.getEdgeLabel()); >+ migrationEdgeLabelValueEClass.getESuperTypes().add(theGraphPackage.getLabelValue()); >+ mixingEdgeEClass.getESuperTypes().add(theGraphPackage.getEdge()); >+ mixingEdgeLabelEClass.getESuperTypes().add(theGraphPackage.getEdgeLabel()); >+ mixingEdgeLabelValueEClass.getESuperTypes().add(theGraphPackage.getLabelValue()); >+ >+ // Initialize classes and features; add operations and parameters >+ initEClass(migrationEdgeEClass, MigrationEdge.class, "MigrationEdge", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); >+ >+ initEClass(migrationEdgeLabelEClass, MigrationEdgeLabel.class, "MigrationEdgeLabel", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); >+ >+ initEClass(migrationEdgeLabelValueEClass, MigrationEdgeLabelValue.class, "MigrationEdgeLabelValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); >+ initEAttribute(getMigrationEdgeLabelValue_MigrationRate(), ecorePackage.getEDouble(), "migrationRate", "0.0", 0, 1, MigrationEdgeLabelValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); >+ >+ initEClass(mixingEdgeEClass, MixingEdge.class, "MixingEdge", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); >+ >+ initEClass(mixingEdgeLabelEClass, MixingEdgeLabel.class, "MixingEdgeLabel", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); >+ >+ initEClass(mixingEdgeLabelValueEClass, MixingEdgeLabelValue.class, "MixingEdgeLabelValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); >+ initEAttribute(getMixingEdgeLabelValue_MixingRate(), ecorePackage.getEDouble(), "mixingRate", null, 0, 1, MixingEdgeLabelValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); >+ >+ // Create resource >+ createResource(eNS_URI); >+ } >+ >+} //EdgesPackageImpl >Index: src/org/eclipse/ohf/stem/definitions/edges/impl/MigrationEdgeLabelValueImpl.java >=================================================================== >RCS file: src/org/eclipse/ohf/stem/definitions/edges/impl/MigrationEdgeLabelValueImpl.java >diff -N src/org/eclipse/ohf/stem/definitions/edges/impl/MigrationEdgeLabelValueImpl.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ohf/stem/definitions/edges/impl/MigrationEdgeLabelValueImpl.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,174 @@ >+/** >+ * <copyright> >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ohf.stem.definitions.edges.impl; >+ >+import org.eclipse.emf.common.notify.Notification; >+ >+import org.eclipse.emf.ecore.EClass; >+ >+import org.eclipse.emf.ecore.impl.ENotificationImpl; >+ >+import org.eclipse.ohf.stem.core.graph.impl.LabelValueImpl; >+ >+import org.eclipse.ohf.stem.definitions.edges.EdgesPackage; >+import org.eclipse.ohf.stem.definitions.edges.MigrationEdgeLabelValue; >+ >+/** >+ * <!-- begin-user-doc --> >+ * An implementation of the model object '<em><b>Migration Edge Label Value</b></em>'. >+ * <!-- end-user-doc --> >+ * <p> >+ * The following features are implemented: >+ * <ul> >+ * <li>{@link org.eclipse.ohf.stem.definitions.edges.impl.MigrationEdgeLabelValueImpl#getMigrationRate <em>Migration Rate</em>}</li> >+ * </ul> >+ * </p> >+ * >+ * @generated >+ */ >+public class MigrationEdgeLabelValueImpl extends LabelValueImpl implements MigrationEdgeLabelValue { >+ /** >+ * The default value of the '{@link #getMigrationRate() <em>Migration Rate</em>}' attribute. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @see #getMigrationRate() >+ * @generated >+ * @ordered >+ */ >+ protected static final double MIGRATION_RATE_EDEFAULT = 0.0; >+ >+ /** >+ * The cached value of the '{@link #getMigrationRate() <em>Migration Rate</em>}' attribute. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @see #getMigrationRate() >+ * @generated >+ * @ordered >+ */ >+ protected double migrationRate = MIGRATION_RATE_EDEFAULT; >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ protected MigrationEdgeLabelValueImpl() { >+ super(); >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ @Override >+ protected EClass eStaticClass() { >+ return EdgesPackage.Literals.MIGRATION_EDGE_LABEL_VALUE; >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ public double getMigrationRate() { >+ return migrationRate; >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ public void setMigrationRate(double newMigrationRate) { >+ double oldMigrationRate = migrationRate; >+ migrationRate = newMigrationRate; >+ if (eNotificationRequired()) >+ eNotify(new ENotificationImpl(this, Notification.SET, EdgesPackage.MIGRATION_EDGE_LABEL_VALUE__MIGRATION_RATE, oldMigrationRate, migrationRate)); >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ @Override >+ public Object eGet(int featureID, boolean resolve, boolean coreType) { >+ switch (featureID) { >+ case EdgesPackage.MIGRATION_EDGE_LABEL_VALUE__MIGRATION_RATE: >+ return new Double(getMigrationRate()); >+ } >+ return super.eGet(featureID, resolve, coreType); >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ @Override >+ public void eSet(int featureID, Object newValue) { >+ switch (featureID) { >+ case EdgesPackage.MIGRATION_EDGE_LABEL_VALUE__MIGRATION_RATE: >+ setMigrationRate(((Double)newValue).doubleValue()); >+ return; >+ } >+ super.eSet(featureID, newValue); >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ @Override >+ public void eUnset(int featureID) { >+ switch (featureID) { >+ case EdgesPackage.MIGRATION_EDGE_LABEL_VALUE__MIGRATION_RATE: >+ setMigrationRate(MIGRATION_RATE_EDEFAULT); >+ return; >+ } >+ super.eUnset(featureID); >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ @Override >+ public boolean eIsSet(int featureID) { >+ switch (featureID) { >+ case EdgesPackage.MIGRATION_EDGE_LABEL_VALUE__MIGRATION_RATE: >+ return migrationRate != MIGRATION_RATE_EDEFAULT; >+ } >+ return super.eIsSet(featureID); >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ @Override >+ public String toString() { >+ if (eIsProxy()) return super.toString(); >+ >+ StringBuffer result = new StringBuffer(super.toString()); >+ result.append(" (migrationRate: "); >+ result.append(migrationRate); >+ result.append(')'); >+ return result.toString(); >+ } >+ >+ /**Resets the value for this migration edge to the default value. Is this really the correct behavior? >+ * do we really want to go to the model start state?*/ >+ public void reset() { >+ setMigrationRate(MIGRATION_RATE_EDEFAULT); >+ } >+ >+} //MigrationEdgeLabelValueImpl >Index: src/org/eclipse/ohf/stem/definitions/edges/util/EdgesSwitch.java >=================================================================== >RCS file: src/org/eclipse/ohf/stem/definitions/edges/util/EdgesSwitch.java >diff -N src/org/eclipse/ohf/stem/definitions/edges/util/EdgesSwitch.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ohf/stem/definitions/edges/util/EdgesSwitch.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,347 @@ >+/** >+ * <copyright> >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ohf.stem.definitions.edges.util; >+ >+import java.util.List; >+ >+import org.eclipse.emf.ecore.EClass; >+import org.eclipse.emf.ecore.EObject; >+ >+import org.eclipse.ohf.stem.core.common.Identifiable; >+import org.eclipse.ohf.stem.core.common.SanityChecker; >+ >+import org.eclipse.ohf.stem.core.graph.Edge; >+import org.eclipse.ohf.stem.core.graph.EdgeLabel; >+import org.eclipse.ohf.stem.core.graph.Label; >+import org.eclipse.ohf.stem.core.graph.LabelValue; >+ >+import org.eclipse.ohf.stem.definitions.edges.*; >+ >+/** >+ * <!-- 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.ohf.stem.definitions.edges.EdgesPackage >+ * @generated >+ */ >+public class EdgesSwitch<T> { >+ /** >+ * The cached model package >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ protected static EdgesPackage modelPackage; >+ >+ /** >+ * Creates an instance of the switch. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ public EdgesSwitch() { >+ if (modelPackage == null) { >+ modelPackage = EdgesPackage.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 EdgesPackage.MIGRATION_EDGE: { >+ MigrationEdge migrationEdge = (MigrationEdge)theEObject; >+ T result = caseMigrationEdge(migrationEdge); >+ if (result == null) result = caseEdge(migrationEdge); >+ if (result == null) result = caseIdentifiable(migrationEdge); >+ if (result == null) result = defaultCase(theEObject); >+ return result; >+ } >+ case EdgesPackage.MIGRATION_EDGE_LABEL: { >+ MigrationEdgeLabel migrationEdgeLabel = (MigrationEdgeLabel)theEObject; >+ T result = caseMigrationEdgeLabel(migrationEdgeLabel); >+ if (result == null) result = caseEdgeLabel(migrationEdgeLabel); >+ if (result == null) result = caseLabel(migrationEdgeLabel); >+ if (result == null) result = caseIdentifiable(migrationEdgeLabel); >+ if (result == null) result = defaultCase(theEObject); >+ return result; >+ } >+ case EdgesPackage.MIGRATION_EDGE_LABEL_VALUE: { >+ MigrationEdgeLabelValue migrationEdgeLabelValue = (MigrationEdgeLabelValue)theEObject; >+ T result = caseMigrationEdgeLabelValue(migrationEdgeLabelValue); >+ if (result == null) result = caseLabelValue(migrationEdgeLabelValue); >+ if (result == null) result = caseSanityChecker(migrationEdgeLabelValue); >+ if (result == null) result = defaultCase(theEObject); >+ return result; >+ } >+ case EdgesPackage.MIXING_EDGE: { >+ MixingEdge mixingEdge = (MixingEdge)theEObject; >+ T result = caseMixingEdge(mixingEdge); >+ if (result == null) result = caseEdge(mixingEdge); >+ if (result == null) result = caseIdentifiable(mixingEdge); >+ if (result == null) result = defaultCase(theEObject); >+ return result; >+ } >+ case EdgesPackage.MIXING_EDGE_LABEL: { >+ MixingEdgeLabel mixingEdgeLabel = (MixingEdgeLabel)theEObject; >+ T result = caseMixingEdgeLabel(mixingEdgeLabel); >+ if (result == null) result = caseEdgeLabel(mixingEdgeLabel); >+ if (result == null) result = caseLabel(mixingEdgeLabel); >+ if (result == null) result = caseIdentifiable(mixingEdgeLabel); >+ if (result == null) result = defaultCase(theEObject); >+ return result; >+ } >+ case EdgesPackage.MIXING_EDGE_LABEL_VALUE: { >+ MixingEdgeLabelValue mixingEdgeLabelValue = (MixingEdgeLabelValue)theEObject; >+ T result = caseMixingEdgeLabelValue(mixingEdgeLabelValue); >+ if (result == null) result = caseLabelValue(mixingEdgeLabelValue); >+ if (result == null) result = caseSanityChecker(mixingEdgeLabelValue); >+ if (result == null) result = defaultCase(theEObject); >+ return result; >+ } >+ default: return defaultCase(theEObject); >+ } >+ } >+ >+ /** >+ * Returns the result of interpreting the object as an instance of '<em>Migration Edge</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>Migration Edge</em>'. >+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) >+ * @generated >+ */ >+ public T caseMigrationEdge(MigrationEdge object) { >+ return null; >+ } >+ >+ /** >+ * Returns the result of interpreting the object as an instance of '<em>Migration Edge Label</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>Migration Edge Label</em>'. >+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) >+ * @generated >+ */ >+ public T caseMigrationEdgeLabel(MigrationEdgeLabel object) { >+ return null; >+ } >+ >+ /** >+ * Returns the result of interpreting the object as an instance of '<em>Migration Edge Label Value</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>Migration Edge Label Value</em>'. >+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) >+ * @generated >+ */ >+ public T caseMigrationEdgeLabelValue(MigrationEdgeLabelValue object) { >+ return null; >+ } >+ >+ /** >+ * Returns the result of interpreting the object as an instance of '<em>Mixing Edge</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>Mixing Edge</em>'. >+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) >+ * @generated >+ */ >+ public T caseMixingEdge(MixingEdge object) { >+ return null; >+ } >+ >+ /** >+ * Returns the result of interpreting the object as an instance of '<em>Mixing Edge Label</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>Mixing Edge Label</em>'. >+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) >+ * @generated >+ */ >+ public T caseMixingEdgeLabel(MixingEdgeLabel object) { >+ return null; >+ } >+ >+ /** >+ * Returns the result of interpreting the object as an instance of '<em>Mixing Edge Label Value</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>Mixing Edge Label Value</em>'. >+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) >+ * @generated >+ */ >+ public T caseMixingEdgeLabelValue(MixingEdgeLabelValue object) { >+ return null; >+ } >+ >+ /** >+ * Returns the result of interpreting the object as an instance of '<em>Identifiable</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>Identifiable</em>'. >+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) >+ * @generated >+ */ >+ public T caseIdentifiable(Identifiable object) { >+ return null; >+ } >+ >+ /** >+ * Returns the result of interpreting the object as an instance of '<em>Edge</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>Edge</em>'. >+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) >+ * @generated >+ */ >+ public T caseEdge(Edge object) { >+ return null; >+ } >+ >+ /** >+ * Returns the result of interpreting the object as an instance of '<em>Label</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>Label</em>'. >+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) >+ * @generated >+ */ >+ public T caseLabel(Label object) { >+ return null; >+ } >+ >+ /** >+ * Returns the result of interpreting the object as an instance of '<em>Edge Label</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>Edge Label</em>'. >+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) >+ * @generated >+ */ >+ public T caseEdgeLabel(EdgeLabel object) { >+ return null; >+ } >+ >+ /** >+ * Returns the result of interpreting the object as an instance of '<em>Sanity Checker</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>Sanity Checker</em>'. >+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) >+ * @generated >+ */ >+ public T caseSanityChecker(SanityChecker object) { >+ return null; >+ } >+ >+ /** >+ * Returns the result of interpreting the object as an instance of '<em>Label Value</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>Label Value</em>'. >+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) >+ * @generated >+ */ >+ public T caseLabelValue(LabelValue 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; >+ } >+ >+} //EdgesSwitch >Index: src/org/eclipse/ohf/stem/definitions/edges/MigrationEdgeLabelValue.java >=================================================================== >RCS file: src/org/eclipse/ohf/stem/definitions/edges/MigrationEdgeLabelValue.java >diff -N src/org/eclipse/ohf/stem/definitions/edges/MigrationEdgeLabelValue.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ohf/stem/definitions/edges/MigrationEdgeLabelValue.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,43 @@ >+package org.eclipse.ohf.stem.definitions.edges; >+ >+/******************************************************************************* >+ * Copyright (c) 2006 IBM Corporation and others. >+ * 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: >+ * IBM Corporation - initial API and implementation >+ *******************************************************************************/ >+ >+import org.eclipse.ohf.stem.core.graph.LabelValue; >+ >+ >+/** >+ * Represents the rate of migration between two nodes. This is a >+ * number between 0 and infinity >+ * >+ * @author jlessler >+ * >+ *@model >+ */ >+public interface MigrationEdgeLabelValue extends LabelValue { >+ >+ /**Returns the migration rate >+ * @return a number between 0 and infinity >+ * >+ * @model default="0.0"*/ >+ double getMigrationRate(); >+ >+ /** >+ * Sets the value of the '{@link org.eclipse.ohf.stem.definitions.edges.MigrationEdgeLabelValue#getMigrationRate <em>Migration Rate</em>}' attribute. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @param value the new value of the '<em>Migration Rate</em>' attribute. >+ * @see #getMigrationRate() >+ * @generated >+ */ >+ void setMigrationRate(double value); >+ >+} >Index: src/org/eclipse/ohf/stem/definitions/edges/impl/MixingEdgeImpl.java >=================================================================== >RCS file: src/org/eclipse/ohf/stem/definitions/edges/impl/MixingEdgeImpl.java >diff -N src/org/eclipse/ohf/stem/definitions/edges/impl/MixingEdgeImpl.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ohf/stem/definitions/edges/impl/MixingEdgeImpl.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,83 @@ >+/** >+ * <copyright> >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ohf.stem.definitions.edges.impl; >+ >+import org.eclipse.emf.ecore.EClass; >+ >+import org.eclipse.ohf.stem.core.STEMURI; >+import org.eclipse.ohf.stem.core.graph.impl.EdgeImpl; >+ >+import org.eclipse.ohf.stem.definitions.edges.EdgesFactory; >+import org.eclipse.ohf.stem.definitions.edges.EdgesPackage; >+import org.eclipse.ohf.stem.definitions.edges.MixingEdge; >+import org.eclipse.ohf.stem.definitions.edges.MixingEdgeLabel; >+ >+/** >+ * <!-- begin-user-doc --> >+ * An implementation of the model object '<em><b>Mixing Edge</b></em>'. >+ * <!-- end-user-doc --> >+ * <p> >+ * </p> >+ * >+ * @generated >+ */ >+public class MixingEdgeImpl extends EdgeImpl implements MixingEdge { >+ >+ /** >+ * This is used to generate unique URI's for each MixingEdge generated >+ */ >+ static int mixingEdgeCounter = 0; >+ >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated NOT >+ */ >+ protected MixingEdgeImpl() { >+ super(); >+ >+ //set the URI >+ setURI(STEMURI.createURI(URI_TYPE_MIXING_EDGE_SEGMENT + "/" >+ + Integer.toString(mixingEdgeCounter++))); >+ >+ //Make a label >+ setLabel(EdgesFactory.eINSTANCE.createMixingEdgeLabel()); >+ >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ @Override >+ protected EClass eStaticClass() { >+ return EdgesPackage.Literals.MIXING_EDGE; >+ } >+ >+ >+ /*** >+ * Override setter for setDirected so that it will blow up if anyone tries to make it directed (when assertions are on). >+ */ >+ public void setDirected(boolean isDirected) { >+ assert(isDirected==false); >+ super.setDirected(isDirected); >+ } >+ >+ /**Overrides methods from EdgeImpl correctly >+ * for correct return types*/ >+ public MixingEdgeLabel getLabel() { >+ return (MixingEdgeLabel)super.getLabel(); >+ } >+ public void setLabel(MixingEdgeLabel lbl) { >+ //just deal with making sure the URI labeling scheme is correct here. >+ lbl.setURIOfIdentifiableToBeLabeled(this.getURI()); >+ super.setLabel(lbl); >+ } >+ >+} //MixingEdgeImpl >Index: src/org/eclipse/ohf/stem/definitions/edges/util/EdgesAdapterFactory.java >=================================================================== >RCS file: src/org/eclipse/ohf/stem/definitions/edges/util/EdgesAdapterFactory.java >diff -N src/org/eclipse/ohf/stem/definitions/edges/util/EdgesAdapterFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ohf/stem/definitions/edges/util/EdgesAdapterFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,330 @@ >+/** >+ * <copyright> >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ohf.stem.definitions.edges.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.ohf.stem.core.common.Identifiable; >+import org.eclipse.ohf.stem.core.common.SanityChecker; >+ >+import org.eclipse.ohf.stem.core.graph.Edge; >+import org.eclipse.ohf.stem.core.graph.EdgeLabel; >+import org.eclipse.ohf.stem.core.graph.Label; >+import org.eclipse.ohf.stem.core.graph.LabelValue; >+ >+import org.eclipse.ohf.stem.definitions.edges.*; >+ >+/** >+ * <!-- 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.ohf.stem.definitions.edges.EdgesPackage >+ * @generated >+ */ >+public class EdgesAdapterFactory extends AdapterFactoryImpl { >+ /** >+ * The cached model package. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ protected static EdgesPackage modelPackage; >+ >+ /** >+ * Creates an instance of the adapter factory. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ public EdgesAdapterFactory() { >+ if (modelPackage == null) { >+ modelPackage = EdgesPackage.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 the delegates to the <code>createXXX</code> methods. >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ protected EdgesSwitch<Adapter> modelSwitch = >+ new EdgesSwitch<Adapter>() { >+ @Override >+ public Adapter caseMigrationEdge(MigrationEdge object) { >+ return createMigrationEdgeAdapter(); >+ } >+ @Override >+ public Adapter caseMigrationEdgeLabel(MigrationEdgeLabel object) { >+ return createMigrationEdgeLabelAdapter(); >+ } >+ @Override >+ public Adapter caseMigrationEdgeLabelValue(MigrationEdgeLabelValue object) { >+ return createMigrationEdgeLabelValueAdapter(); >+ } >+ @Override >+ public Adapter caseMixingEdge(MixingEdge object) { >+ return createMixingEdgeAdapter(); >+ } >+ @Override >+ public Adapter caseMixingEdgeLabel(MixingEdgeLabel object) { >+ return createMixingEdgeLabelAdapter(); >+ } >+ @Override >+ public Adapter caseMixingEdgeLabelValue(MixingEdgeLabelValue object) { >+ return createMixingEdgeLabelValueAdapter(); >+ } >+ @Override >+ public Adapter caseIdentifiable(Identifiable object) { >+ return createIdentifiableAdapter(); >+ } >+ @Override >+ public Adapter caseEdge(Edge object) { >+ return createEdgeAdapter(); >+ } >+ @Override >+ public Adapter caseLabel(Label object) { >+ return createLabelAdapter(); >+ } >+ @Override >+ public Adapter caseEdgeLabel(EdgeLabel object) { >+ return createEdgeLabelAdapter(); >+ } >+ @Override >+ public Adapter caseSanityChecker(SanityChecker object) { >+ return createSanityCheckerAdapter(); >+ } >+ @Override >+ public Adapter caseLabelValue(LabelValue object) { >+ return createLabelValueAdapter(); >+ } >+ @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.ohf.stem.definitions.edges.MigrationEdge <em>Migration Edge</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.ohf.stem.definitions.edges.MigrationEdge >+ * @generated >+ */ >+ public Adapter createMigrationEdgeAdapter() { >+ return null; >+ } >+ >+ /** >+ * Creates a new adapter for an object of class '{@link org.eclipse.ohf.stem.definitions.edges.MigrationEdgeLabel <em>Migration Edge Label</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.ohf.stem.definitions.edges.MigrationEdgeLabel >+ * @generated >+ */ >+ public Adapter createMigrationEdgeLabelAdapter() { >+ return null; >+ } >+ >+ /** >+ * Creates a new adapter for an object of class '{@link org.eclipse.ohf.stem.definitions.edges.MigrationEdgeLabelValue <em>Migration Edge Label Value</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.ohf.stem.definitions.edges.MigrationEdgeLabelValue >+ * @generated >+ */ >+ public Adapter createMigrationEdgeLabelValueAdapter() { >+ return null; >+ } >+ >+ /** >+ * Creates a new adapter for an object of class '{@link org.eclipse.ohf.stem.definitions.edges.MixingEdge <em>Mixing Edge</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.ohf.stem.definitions.edges.MixingEdge >+ * @generated >+ */ >+ public Adapter createMixingEdgeAdapter() { >+ return null; >+ } >+ >+ /** >+ * Creates a new adapter for an object of class '{@link org.eclipse.ohf.stem.definitions.edges.MixingEdgeLabel <em>Mixing Edge Label</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.ohf.stem.definitions.edges.MixingEdgeLabel >+ * @generated >+ */ >+ public Adapter createMixingEdgeLabelAdapter() { >+ return null; >+ } >+ >+ /** >+ * Creates a new adapter for an object of class '{@link org.eclipse.ohf.stem.definitions.edges.MixingEdgeLabelValue <em>Mixing Edge Label Value</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.ohf.stem.definitions.edges.MixingEdgeLabelValue >+ * @generated >+ */ >+ public Adapter createMixingEdgeLabelValueAdapter() { >+ return null; >+ } >+ >+ /** >+ * Creates a new adapter for an object of class '{@link org.eclipse.ohf.stem.core.common.Identifiable <em>Identifiable</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.ohf.stem.core.common.Identifiable >+ * @generated >+ */ >+ public Adapter createIdentifiableAdapter() { >+ return null; >+ } >+ >+ /** >+ * Creates a new adapter for an object of class '{@link org.eclipse.ohf.stem.core.graph.Edge <em>Edge</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.ohf.stem.core.graph.Edge >+ * @generated >+ */ >+ public Adapter createEdgeAdapter() { >+ return null; >+ } >+ >+ /** >+ * Creates a new adapter for an object of class '{@link org.eclipse.ohf.stem.core.graph.Label <em>Label</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.ohf.stem.core.graph.Label >+ * @generated >+ */ >+ public Adapter createLabelAdapter() { >+ return null; >+ } >+ >+ /** >+ * Creates a new adapter for an object of class '{@link org.eclipse.ohf.stem.core.graph.EdgeLabel <em>Edge Label</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.ohf.stem.core.graph.EdgeLabel >+ * @generated >+ */ >+ public Adapter createEdgeLabelAdapter() { >+ return null; >+ } >+ >+ /** >+ * Creates a new adapter for an object of class '{@link org.eclipse.ohf.stem.core.common.SanityChecker <em>Sanity Checker</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.ohf.stem.core.common.SanityChecker >+ * @generated >+ */ >+ public Adapter createSanityCheckerAdapter() { >+ return null; >+ } >+ >+ /** >+ * Creates a new adapter for an object of class '{@link org.eclipse.ohf.stem.core.graph.LabelValue <em>Label Value</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.ohf.stem.core.graph.LabelValue >+ * @generated >+ */ >+ public Adapter createLabelValueAdapter() { >+ 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; >+ } >+ >+} //EdgesAdapterFactory >Index: src/org/eclipse/ohf/stem/definitions/edges/impl/MigrationEdgeLabelImpl.java >=================================================================== >RCS file: src/org/eclipse/ohf/stem/definitions/edges/impl/MigrationEdgeLabelImpl.java >diff -N src/org/eclipse/ohf/stem/definitions/edges/impl/MigrationEdgeLabelImpl.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ohf/stem/definitions/edges/impl/MigrationEdgeLabelImpl.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,58 @@ >+/** >+ * <copyright> >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ohf.stem.definitions.edges.impl; >+ >+import org.eclipse.emf.ecore.EClass; >+ >+import org.eclipse.ohf.stem.core.graph.impl.EdgeLabelImpl; >+ >+import org.eclipse.ohf.stem.definitions.edges.EdgesFactory; >+import org.eclipse.ohf.stem.definitions.edges.EdgesPackage; >+import org.eclipse.ohf.stem.definitions.edges.MigrationEdgeLabel; >+import org.eclipse.ohf.stem.definitions.edges.MigrationEdgeLabelValue; >+ >+/** >+ * <!-- begin-user-doc --> >+ * An implementation of the model object '<em><b>Migration Edge Label</b></em>'. >+ * <!-- end-user-doc --> >+ * <p> >+ * </p> >+ * >+ * @generated >+ */ >+public class MigrationEdgeLabelImpl extends EdgeLabelImpl implements MigrationEdgeLabel { >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ protected MigrationEdgeLabelImpl() { >+ super(); >+ setCurrentValue(EdgesFactory.eINSTANCE.createMigrationEdgeLabelValue()); >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ @Override >+ protected EClass eStaticClass() { >+ return EdgesPackage.Literals.MIGRATION_EDGE_LABEL; >+ } >+ >+ /**Make the current value stuff have to be MixingEdgeLabelValues >+ * */ >+ public MigrationEdgeLabelValue getCurrentValue() { >+ return((MigrationEdgeLabelValue)super.getCurrentValue()); >+ } >+ >+ public void setCurrentValue(MigrationEdgeLabelValue val) { >+ super.setCurrentValue(val); >+ } >+ >+} //MigrationEdgeLabelImpl >Index: src/org/eclipse/ohf/stem/definitions/edges/impl/MigrationEdgeImpl.java >=================================================================== >RCS file: src/org/eclipse/ohf/stem/definitions/edges/impl/MigrationEdgeImpl.java >diff -N src/org/eclipse/ohf/stem/definitions/edges/impl/MigrationEdgeImpl.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ohf/stem/definitions/edges/impl/MigrationEdgeImpl.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,89 @@ >+/** >+ * <copyright> >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ohf.stem.definitions.edges.impl; >+ >+import org.eclipse.emf.ecore.EClass; >+ >+import org.eclipse.ohf.stem.core.STEMURI; >+import org.eclipse.ohf.stem.core.graph.impl.EdgeImpl; >+ >+import org.eclipse.ohf.stem.definitions.edges.EdgesFactory; >+import org.eclipse.ohf.stem.definitions.edges.EdgesPackage; >+import org.eclipse.ohf.stem.definitions.edges.MigrationEdge; >+import org.eclipse.ohf.stem.definitions.edges.MigrationEdgeLabel; >+ >+/** >+ * <!-- begin-user-doc --> >+ * An implementation of the model object '<em><b>Migration Edge</b></em>'. >+ * <!-- end-user-doc --> >+ * <p> >+ * </p> >+ * >+ * @generated >+ */ >+public class MigrationEdgeImpl extends EdgeImpl implements MigrationEdge { >+ >+ /** >+ * This is used to generate unique URI's for each MigrationEdge generated >+ */ >+ static int migrationEdgeCounter = 0; >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated NOT >+ */ >+ protected MigrationEdgeImpl() { >+ super(); >+ >+ //set the URI >+ setURI(STEMURI.createURI(URI_TYPE_MIGRATION_EDGE_SEGMENT + "/" >+ + Integer.toString(migrationEdgeCounter++))); >+ >+ //Make a label >+ setLabel(EdgesFactory.eINSTANCE.createMigrationEdgeLabel()); >+ >+ //this edge must be directed >+ setDirected(true); >+ >+ } >+ >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ @Override >+ protected EClass eStaticClass() { >+ return EdgesPackage.Literals.MIGRATION_EDGE; >+ } >+ >+ /*** >+ * Override setter for setDirected so that it will blow up if anyone tries to make it directed (when assertions are on). >+ */ >+ public void setDirected(boolean isDirected) { >+ assert(isDirected==true); >+ super.setDirected(isDirected); >+ } >+ >+ >+ /**Override to make getEdge return the >+ * correct type.*/ >+ public MigrationEdgeLabel getLabel() { >+ return (MigrationEdgeLabel)super.getLabel(); >+ } >+ >+ public void setLabel(MigrationEdgeLabel lbl) { >+ //just deal with making sure the URI labeling scheme is correct here. >+ lbl.setURIOfIdentifiableToBeLabeled(this.getURI()); >+ >+ super.setLabel(lbl); >+ } >+ >+ >+} //MigrationEdgeImpl >Index: src/org/eclipse/ohf/stem/definitions/edges/impl/MixingEdgeLabelImpl.java >=================================================================== >RCS file: src/org/eclipse/ohf/stem/definitions/edges/impl/MixingEdgeLabelImpl.java >diff -N src/org/eclipse/ohf/stem/definitions/edges/impl/MixingEdgeLabelImpl.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ohf/stem/definitions/edges/impl/MixingEdgeLabelImpl.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,63 @@ >+/** >+ * <copyright> >+ * </copyright> >+ * >+ * $Id$ >+ */ >+package org.eclipse.ohf.stem.definitions.edges.impl; >+ >+import org.eclipse.emf.common.notify.Notification; >+ >+import org.eclipse.emf.ecore.EClass; >+import org.eclipse.emf.ecore.InternalEObject; >+ >+import org.eclipse.emf.ecore.impl.ENotificationImpl; >+ >+import org.eclipse.ohf.stem.core.graph.impl.EdgeLabelImpl; >+ >+import org.eclipse.ohf.stem.definitions.edges.EdgesFactory; >+import org.eclipse.ohf.stem.definitions.edges.EdgesPackage; >+import org.eclipse.ohf.stem.definitions.edges.MixingEdgeLabel; >+import org.eclipse.ohf.stem.definitions.edges.MixingEdgeLabelValue; >+ >+/** >+ * <!-- begin-user-doc --> >+ * An implementation of the model object '<em><b>Mixing Edge Label</b></em>'. >+ * <!-- end-user-doc --> >+ * <p> >+ * </p> >+ * >+ * @generated >+ */ >+public class MixingEdgeLabelImpl extends EdgeLabelImpl implements MixingEdgeLabel { >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated NOT >+ */ >+ protected MixingEdgeLabelImpl() { >+ super(); >+ >+ //set the MixingEdgeLabel >+ setCurrentValue(EdgesFactory.eINSTANCE.createMixingEdgeLabelValue()); >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ @Override >+ protected EClass eStaticClass() { >+ return EdgesPackage.Literals.MIXING_EDGE_LABEL; >+ } >+ >+ /**Methods need to make this return edge labels properly*/ >+ public MixingEdgeLabelValue getCurrentValue() { >+ return (MixingEdgeLabelValue)super.getCurrentValue(); >+ } >+ public void setCurrentValue(MixingEdgeLabelValue val) { >+ super.setCurrentValue(val); >+ } >+ >+} //MixingEdgeLabelImpl
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 203477
:
79145
|
79786
| 83161 |
83162
|
83277
|
83278