Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikaël Barbero2012-11-09 11:49:50 -0500
committerMikaël Barbero2012-11-09 11:49:50 -0500
commite2fc59b092c364abe8de0f0876ba13380603f508 (patch)
treec20950f88f2838db714d52c637265a645cd5fab0 /plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit
parente56e5e6db75e30c0e8811a766a5245c6cfcd41dd (diff)
downloadorg.eclipse.emf.compare-e2fc59b092c364abe8de0f0876ba13380603f508.tar.gz
org.eclipse.emf.compare-e2fc59b092c364abe8de0f0876ba13380603f508.tar.xz
org.eclipse.emf.compare-e2fc59b092c364abe8de0f0876ba13380603f508.zip
add some test for compare.edit (esp. getChildren() of ItemProvider)
Diffstat (limited to 'plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit')
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/AbstractTestCompareItemProviderAdapter.java124
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/AllEditTests.java25
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/TestAttributeChangeItemProviderSpec.java44
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/TestComparisonItemProviderSpec.java54
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/TestMatchItemProviderSpec.java145
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/TestReferenceChangeItemProviderSpec.java202
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/data/ResourceScopeProvider.java27
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/data/ecore/a1/EcoreA1InputData.java22
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/data/ecore/a1/extlibraryLeft.ecore109
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/data/ecore/a1/extlibraryOrigin.ecore111
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/data/ecore/a1/extlibraryRight.ecore112
11 files changed, 975 insertions, 0 deletions
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/AbstractTestCompareItemProviderAdapter.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/AbstractTestCompareItemProviderAdapter.java
new file mode 100644
index 000000000..5addcdf05
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/AbstractTestCompareItemProviderAdapter.java
@@ -0,0 +1,124 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.emf.compare.tests.edit;
+
+import static com.google.common.collect.Iterables.filter;
+import static com.google.common.collect.Iterables.find;
+import static com.google.common.collect.Lists.newArrayList;
+
+import com.google.common.base.Objects;
+import com.google.common.base.Predicate;
+
+import java.io.IOException;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.compare.Comparison;
+import org.eclipse.emf.compare.EMFCompare;
+import org.eclipse.emf.compare.Match;
+import org.eclipse.emf.compare.ReferenceChange;
+import org.eclipse.emf.compare.provider.CompareItemProviderAdapterFactory;
+import org.eclipse.emf.compare.provider.spec.CompareItemProviderAdapterFactorySpec;
+import org.eclipse.emf.compare.scope.IComparisonScope;
+import org.eclipse.emf.compare.tests.edit.data.ResourceScopeProvider;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.junit.Before;
+
+/**
+ * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
+ */
+public class AbstractTestCompareItemProviderAdapter {
+
+ protected CompareItemProviderAdapterFactory compareItemProviderAdapterFactory;
+
+ @Before
+ public void before() throws IOException {
+ compareItemProviderAdapterFactory = new CompareItemProviderAdapterFactorySpec();
+ }
+
+ /**
+ * @return the comparison
+ * @throws IOException
+ */
+ protected static Comparison getComparison(ResourceScopeProvider scopeProvider) throws IOException {
+ IComparisonScope scope = EMFCompare.createDefaultScope(scopeProvider.getLeft(), scopeProvider
+ .getRight(), scopeProvider.getOrigin());
+ return EMFCompare.builder().build().compare(scope);
+ }
+
+ protected Match getMatchWithFeatureValue(Collection<?> c, final String featureName, final Object value) {
+ Iterable<Match> matches = filter(c, Match.class);
+ Predicate<Match> predicate = hasFeatureValue(featureName, value);
+ return find(matches, predicate);
+ }
+
+ protected ReferenceChange getReferenceChangeWithFeatureValue(Collection<?> c, final String featureName,
+ final Object value) {
+ Iterable<ReferenceChange> matches = filter(c, ReferenceChange.class);
+ Predicate<ReferenceChange> predicate = new Predicate<ReferenceChange>() {
+ public boolean apply(ReferenceChange referenceChange) {
+ EObject referenceChangeValue = referenceChange.getValue();
+ if (referenceChangeValue != null) {
+ return Objects.equal(eGet(referenceChangeValue, featureName), value);
+ }
+ return false;
+ }
+ };
+ return find(matches, predicate);
+ }
+
+ protected Predicate<Match> hasFeatureValue(final String featureName, final Object value) {
+ Predicate<Match> predicate = new Predicate<Match>() {
+ public boolean apply(Match match) {
+ final boolean ret;
+ final EObject left = match.getLeft();
+ final EObject right = match.getRight();
+ final EObject origin = match.getOrigin();
+ if (left != null) {
+ ret = Objects.equal(value, eGet(left, featureName));
+ } else if (right != null) {
+ ret = Objects.equal(value, eGet(right, featureName));
+ } else if (origin != null) {
+ ret = Objects.equal(value, eGet(origin, featureName));
+ } else {
+ ret = false;
+ }
+ return ret;
+ }
+ };
+ return predicate;
+ }
+
+ protected Object eGet(EObject eObject, String featureName) {
+ EStructuralFeature eStructuralFeature = eObject.eClass().getEStructuralFeature(featureName);
+ return eObject.eGet(eStructuralFeature);
+ }
+
+ protected List<Notifier> eAllChildren(Notifier notifier) {
+ List<Notifier> ret = newArrayList();
+ ITreeItemContentProvider contentProvider = adaptAsITreItemContentProvider(notifier);
+ Iterable<Notifier> children = filter(contentProvider.getChildren(notifier), Notifier.class);
+ for (Notifier child : children) {
+ ret.add(child);
+ ret.addAll(eAllChildren(child));
+ }
+ return ret;
+ }
+
+ protected ITreeItemContentProvider adaptAsITreItemContentProvider(Notifier notifier) {
+ ITreeItemContentProvider contentProvider = (ITreeItemContentProvider)compareItemProviderAdapterFactory
+ .adapt(notifier, ITreeItemContentProvider.class);
+ return contentProvider;
+ }
+}
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/AllEditTests.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/AllEditTests.java
new file mode 100644
index 000000000..fd44ab880
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/AllEditTests.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.emf.compare.tests.edit;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+
+/**
+ * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
+ */
+@RunWith(Suite.class)
+@SuiteClasses({TestComparisonItemProviderSpec.class, TestMatchItemProviderSpec.class,
+ TestAttributeChangeItemProviderSpec.class, TestReferenceChangeItemProviderSpec.class })
+public class AllEditTests {
+
+}
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/TestAttributeChangeItemProviderSpec.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/TestAttributeChangeItemProviderSpec.java
new file mode 100644
index 000000000..adb46c237
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/TestAttributeChangeItemProviderSpec.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.emf.compare.tests.edit;
+
+import static com.google.common.collect.Iterables.filter;
+import static com.google.common.collect.Iterators.filter;
+import static com.google.common.collect.Lists.newArrayList;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.util.List;
+
+import org.eclipse.emf.compare.AttributeChange;
+import org.eclipse.emf.compare.Comparison;
+import org.eclipse.emf.compare.tests.edit.data.ecore.a1.EcoreA1InputData;
+import org.junit.Test;
+
+/**
+ * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
+ */
+public class TestAttributeChangeItemProviderSpec extends AbstractTestCompareItemProviderAdapter {
+
+ @Test
+ public void testGetChildren_EcoreA1() throws IOException {
+ Comparison comparison = getComparison(new EcoreA1InputData());
+
+ List<AttributeChange> eAllContent_AttributeChange = newArrayList(filter(comparison.eAllContents(),
+ AttributeChange.class));
+ List<AttributeChange> eAllChildren_AttributeChange = newArrayList(filter(eAllChildren(comparison),
+ AttributeChange.class));
+
+ assertEquals(eAllContent_AttributeChange.size(), eAllChildren_AttributeChange.size());
+ assertTrue(eAllChildren_AttributeChange.containsAll(eAllContent_AttributeChange));
+ }
+}
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/TestComparisonItemProviderSpec.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/TestComparisonItemProviderSpec.java
new file mode 100644
index 000000000..1ba8f54cf
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/TestComparisonItemProviderSpec.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.emf.compare.tests.edit;
+
+import static com.google.common.collect.Iterables.filter;
+import static com.google.common.collect.Iterables.size;
+import static org.junit.Assert.assertEquals;
+
+import java.io.IOException;
+import java.util.Collection;
+
+import org.eclipse.emf.compare.Comparison;
+import org.eclipse.emf.compare.Match;
+import org.eclipse.emf.compare.MatchResource;
+import org.eclipse.emf.compare.provider.ComparisonItemProvider;
+import org.eclipse.emf.compare.provider.spec.ComparisonItemProviderSpec;
+import org.eclipse.emf.compare.tests.edit.data.ecore.a1.EcoreA1InputData;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
+ */
+public class TestComparisonItemProviderSpec extends AbstractTestCompareItemProviderAdapter {
+
+ private ComparisonItemProvider itemProvider;
+
+ @Override
+ @Before
+ public void before() throws IOException {
+ super.before();
+ itemProvider = (ComparisonItemProviderSpec)compareItemProviderAdapterFactory
+ .createComparisonAdapter();
+ }
+
+ @Test
+ public void testGetChildren_EcoreA1() throws IOException {
+ Comparison comparison = getComparison(new EcoreA1InputData());
+
+ Collection<?> children = itemProvider.getChildren(comparison);
+
+ assertEquals(2, children.size());
+ assertEquals(1, size(filter(children, Match.class)));
+ assertEquals(1, size(filter(children, MatchResource.class)));
+ }
+}
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/TestMatchItemProviderSpec.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/TestMatchItemProviderSpec.java
new file mode 100644
index 000000000..3f9507a72
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/TestMatchItemProviderSpec.java
@@ -0,0 +1,145 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.emf.compare.tests.edit;
+
+import static com.google.common.collect.Iterables.filter;
+import static com.google.common.collect.Iterables.size;
+import static org.junit.Assert.assertEquals;
+
+import java.io.IOException;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.compare.Comparison;
+import org.eclipse.emf.compare.Diff;
+import org.eclipse.emf.compare.Match;
+import org.eclipse.emf.compare.provider.MatchItemProvider;
+import org.eclipse.emf.compare.provider.spec.MatchItemProviderSpec;
+import org.eclipse.emf.compare.tests.edit.data.ecore.a1.EcoreA1InputData;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
+ */
+public class TestMatchItemProviderSpec extends AbstractTestCompareItemProviderAdapter {
+
+ private MatchItemProvider itemProvider;
+
+ @Override
+ @Before
+ public void before() throws IOException {
+ super.before();
+ itemProvider = (MatchItemProviderSpec)compareItemProviderAdapterFactory.createMatchAdapter();
+ }
+
+ @Test
+ public void testGetChildren_EcoreA1() throws IOException {
+ Match ePackageMatch = getEcoreA1_EPackageMatch();
+
+ Collection<?> ePackageMatchChildren = itemProvider.getChildren(ePackageMatch);
+ assertEquals(9, ePackageMatchChildren.size());
+ assertEquals(4, size(filter(ePackageMatchChildren, Diff.class)));
+ assertEquals(5, size(filter(ePackageMatchChildren, Match.class)));
+ }
+
+ static Match getEcoreA1_EPackageMatch() throws IOException {
+ Comparison comparison = getComparison(new EcoreA1InputData());
+
+ List<Match> matches = comparison.getMatches();
+ Match ePackageMatch = matches.get(0);
+ return ePackageMatch;
+ }
+
+ @Test
+ public void testGetChildren_AudioVisualItem() throws IOException {
+ Match ePackageMatch = getEcoreA1_EPackageMatch();
+
+ Collection<?> ePackage_MatchChildren = itemProvider.getChildren(ePackageMatch);
+ Match audioVisualItem_Match = getMatchWithFeatureValue(ePackage_MatchChildren, "name",
+ "AudioVisualItem");
+ Collection<?> audioVisualItem_MatchChildren = itemProvider.getChildren(audioVisualItem_Match);
+
+ assertEquals(3, audioVisualItem_MatchChildren.size());
+ assertEquals(2, size(filter(audioVisualItem_MatchChildren, Diff.class)));
+ assertEquals(1, size(filter(audioVisualItem_MatchChildren, Match.class)));
+ }
+
+ @Test
+ public void testGetChildren_AudioVisualItem_lenght() throws IOException {
+ Match ePackageMatch = getEcoreA1_EPackageMatch();
+
+ Collection<?> ePackage_MatchChildren = itemProvider.getChildren(ePackageMatch);
+ Match audioVisualItem_Match = getMatchWithFeatureValue(ePackage_MatchChildren, "name",
+ "AudioVisualItem");
+ Collection<?> audioVisualItem_MatchChildren = itemProvider.getChildren(audioVisualItem_Match);
+ Match audioVisualItem_legnth_Match = getMatchWithFeatureValue(audioVisualItem_MatchChildren, "name",
+ "length");
+ Collection<?> audioVisualItem_legnth_MatchChildren = itemProvider
+ .getChildren(audioVisualItem_legnth_Match);
+
+ assertEquals(2, audioVisualItem_legnth_MatchChildren.size());
+ assertEquals(2, size(filter(audioVisualItem_legnth_MatchChildren, Diff.class)));
+ assertEquals(0, size(filter(audioVisualItem_legnth_MatchChildren, Match.class)));
+ }
+
+ @Test
+ public void testGetChildren_Book() throws IOException {
+ Match ePackageMatch = getEcoreA1_EPackageMatch();
+
+ Collection<?> ePackage_MatchChildren = itemProvider.getChildren(ePackageMatch);
+ Match book_Match = getMatchWithFeatureValue(ePackage_MatchChildren, "name", "Book");
+ Collection<?> book_MatchChildren = itemProvider.getChildren(book_Match);
+
+ assertEquals(3, book_MatchChildren.size());
+ assertEquals(3, size(filter(book_MatchChildren, Diff.class)));
+ assertEquals(0, size(filter(book_MatchChildren, Match.class)));
+ }
+
+ @Test
+ public void testGetChildren_BookCategory() throws IOException {
+ Match ePackageMatch = getEcoreA1_EPackageMatch();
+
+ Collection<?> ePackage_MatchChildren = itemProvider.getChildren(ePackageMatch);
+ Match bookCategory_Match = getMatchWithFeatureValue(ePackage_MatchChildren, "name", "BookCategory");
+ Collection<?> bookCategory_MatchChildren = itemProvider.getChildren(bookCategory_Match);
+
+ assertEquals(4, bookCategory_MatchChildren.size());
+ assertEquals(4, size(filter(bookCategory_MatchChildren, Diff.class)));
+ assertEquals(0, size(filter(bookCategory_MatchChildren, Match.class)));
+ }
+
+ @Test
+ public void testGetChildren_Borrowable() throws IOException {
+ Match ePackageMatch = getEcoreA1_EPackageMatch();
+
+ Collection<?> ePackage_MatchChildren = itemProvider.getChildren(ePackageMatch);
+ Match borrowable_Match = getMatchWithFeatureValue(ePackage_MatchChildren, "name", "Borrowable");
+ Collection<?> borrowable_MatchChildren = itemProvider.getChildren(borrowable_Match);
+
+ assertEquals(1, borrowable_MatchChildren.size());
+ assertEquals(1, size(filter(borrowable_MatchChildren, Diff.class)));
+ assertEquals(0, size(filter(borrowable_MatchChildren, Match.class)));
+ }
+
+ @Test
+ public void testGetChildren_Person() throws IOException {
+ Match ePackageMatch = getEcoreA1_EPackageMatch();
+
+ Collection<?> ePackage_MatchChildren = itemProvider.getChildren(ePackageMatch);
+ Match person_Match = getMatchWithFeatureValue(ePackage_MatchChildren, "name", "Person");
+ Collection<?> person_MatchChildren = itemProvider.getChildren(person_Match);
+
+ assertEquals(3, person_MatchChildren.size());
+ assertEquals(3, size(filter(person_MatchChildren, Diff.class)));
+ assertEquals(0, size(filter(person_MatchChildren, Match.class)));
+ }
+}
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/TestReferenceChangeItemProviderSpec.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/TestReferenceChangeItemProviderSpec.java
new file mode 100644
index 000000000..23380eff7
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/TestReferenceChangeItemProviderSpec.java
@@ -0,0 +1,202 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.emf.compare.tests.edit;
+
+import static com.google.common.collect.Iterables.filter;
+import static com.google.common.collect.Iterables.get;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.compare.Match;
+import org.eclipse.emf.compare.ReferenceChange;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.junit.Test;
+
+/**
+ * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
+ */
+public class TestReferenceChangeItemProviderSpec extends AbstractTestCompareItemProviderAdapter {
+
+ @Test
+ public void testGetChildren_AudioVisualItem() throws IOException {
+ Match ePackageMatch = TestMatchItemProviderSpec.getEcoreA1_EPackageMatch();
+
+ Collection<?> ePackage_MatchChildren = adaptAsITreItemContentProvider(ePackageMatch).getChildren(
+ ePackageMatch);
+ Match audioVisualItem_Match = getMatchWithFeatureValue(ePackage_MatchChildren, "name",
+ "AudioVisualItem");
+ Collection<?> audioVisualItem_MatchChildren = adaptAsITreItemContentProvider(audioVisualItem_Match)
+ .getChildren(audioVisualItem_Match);
+
+ ReferenceChange titleReferenceChange = getReferenceChangeWithFeatureValue(
+ audioVisualItem_MatchChildren, "name", "title");
+
+ Collection<?> titleReferenceChange_Children = adaptAsITreItemContentProvider(titleReferenceChange)
+ .getChildren(titleReferenceChange);
+
+ assertEquals(1, titleReferenceChange_Children.size());
+ Object child = get(titleReferenceChange_Children, 0);
+ assertTrue(child instanceof ReferenceChange);
+ assertEquals(EcorePackage.Literals.ETYPED_ELEMENT__ETYPE, ((ReferenceChange)child).getReference());
+
+ ReferenceChange titledItemReferenceChange = getReferenceChangeWithFeatureValue(
+ audioVisualItem_MatchChildren, "name", "TitledItem");
+ Collection<?> titledItemReferenceChange_Children = adaptAsITreItemContentProvider(
+ titledItemReferenceChange).getChildren(titledItemReferenceChange);
+ assertEquals(0, titledItemReferenceChange_Children.size());
+ }
+
+ @Test
+ public void testGetChildren_Book() throws IOException {
+ Match ePackageMatch = TestMatchItemProviderSpec.getEcoreA1_EPackageMatch();
+
+ Collection<?> ePackage_MatchChildren = adaptAsITreItemContentProvider(ePackageMatch).getChildren(
+ ePackageMatch);
+ Match book_Match = getMatchWithFeatureValue(ePackage_MatchChildren, "name", "Book");
+ Collection<?> book_MatchChildren = adaptAsITreItemContentProvider(book_Match).getChildren(book_Match);
+
+ ReferenceChange subtitleReferenceChange = getReferenceChangeWithFeatureValue(book_MatchChildren,
+ "name", "subtitle");
+
+ Collection<?> subtitleReferenceChange_Children = adaptAsITreItemContentProvider(
+ subtitleReferenceChange).getChildren(subtitleReferenceChange);
+
+ assertEquals(1, subtitleReferenceChange_Children.size());
+ Notifier child = (Notifier)get(subtitleReferenceChange_Children, 0);
+ assertTrue(child instanceof ReferenceChange);
+ assertEquals(EcorePackage.Literals.ETYPED_ELEMENT__ETYPE, ((ReferenceChange)child).getReference());
+ assertTrue(adaptAsITreItemContentProvider(child).getChildren(child).isEmpty());
+
+ ReferenceChange titleReferenceChange = getReferenceChangeWithFeatureValue(book_MatchChildren, "name",
+ "title");
+ Collection<?> titleReferenceChange_Children = adaptAsITreItemContentProvider(titleReferenceChange)
+ .getChildren(titleReferenceChange);
+ assertEquals(1, titleReferenceChange_Children.size());
+ child = (Notifier)get(titleReferenceChange_Children, 0);
+ assertTrue(child instanceof ReferenceChange);
+ assertEquals(EcorePackage.Literals.ETYPED_ELEMENT__ETYPE, ((ReferenceChange)child).getReference());
+ assertTrue(adaptAsITreItemContentProvider(child).getChildren(child).isEmpty());
+
+ ReferenceChange titledItemReferenceChange = getReferenceChangeWithFeatureValue(book_MatchChildren,
+ "name", "TitledItem");
+ Collection<?> titledItemReferenceChange_Children = adaptAsITreItemContentProvider(
+ titledItemReferenceChange).getChildren(titledItemReferenceChange);
+ assertEquals(0, titledItemReferenceChange_Children.size());
+ }
+
+ @Test
+ public void testGetChildren_Borrowable() throws IOException {
+ Match ePackageMatch = TestMatchItemProviderSpec.getEcoreA1_EPackageMatch();
+
+ Collection<?> ePackage_MatchChildren = adaptAsITreItemContentProvider(ePackageMatch).getChildren(
+ ePackageMatch);
+ Match borrowableCategory_Match = getMatchWithFeatureValue(ePackage_MatchChildren, "name",
+ "Borrowable");
+ Collection<?> borrowable_MatchChildren = adaptAsITreItemContentProvider(borrowableCategory_Match)
+ .getChildren(borrowableCategory_Match);
+
+ assertEquals(1, borrowable_MatchChildren.size());
+ }
+
+ @Test
+ public void testGetChildren_BookCategory() throws IOException {
+ Match ePackageMatch = TestMatchItemProviderSpec.getEcoreA1_EPackageMatch();
+
+ Collection<?> ePackage_MatchChildren = adaptAsITreItemContentProvider(ePackageMatch).getChildren(
+ ePackageMatch);
+ Match bookCategory_Match = getMatchWithFeatureValue(ePackage_MatchChildren, "name", "BookCategory");
+ Collection<?> bookCategory_MatchChildren = adaptAsITreItemContentProvider(bookCategory_Match)
+ .getChildren(bookCategory_Match);
+
+ ReferenceChange dictionaryReferenceChange = getReferenceChangeWithFeatureValue(
+ bookCategory_MatchChildren, "name", "Dictionary");
+ ReferenceChange encyclopediaReferenceChange = getReferenceChangeWithFeatureValue(
+ bookCategory_MatchChildren, "name", "Encyclopedia");
+ ReferenceChange mangaReferenceChange = getReferenceChangeWithFeatureValue(bookCategory_MatchChildren,
+ "name", "Manga");
+ ReferenceChange manhwaReferenceChange = getReferenceChangeWithFeatureValue(
+ bookCategory_MatchChildren, "name", "Manhwa");
+
+ assertTrue(adaptAsITreItemContentProvider(dictionaryReferenceChange).getChildren(
+ dictionaryReferenceChange).isEmpty());
+ assertTrue(adaptAsITreItemContentProvider(encyclopediaReferenceChange).getChildren(
+ encyclopediaReferenceChange).isEmpty());
+ assertTrue(adaptAsITreItemContentProvider(mangaReferenceChange).getChildren(mangaReferenceChange)
+ .isEmpty());
+ assertTrue(adaptAsITreItemContentProvider(manhwaReferenceChange).getChildren(manhwaReferenceChange)
+ .isEmpty());
+ }
+
+ @Test
+ public void testGetChildren_Magazine1() throws IOException {
+ Match ePackageMatch = TestMatchItemProviderSpec.getEcoreA1_EPackageMatch();
+
+ Collection<?> ePackage_MatchChildren = adaptAsITreItemContentProvider(ePackageMatch).getChildren(
+ ePackageMatch);
+
+ Collection<?> magazineChildren = null;
+ for (ReferenceChange referenceChange : filter(ePackage_MatchChildren, ReferenceChange.class)) {
+ EClass eClass = (EClass)referenceChange.getValue();
+ if ("Magazine".equals(eClass.getName())
+ && "CirculatingItem".equals(eClass.getESuperTypes().get(0).getName())) {
+ magazineChildren = adaptAsITreItemContentProvider(referenceChange).getChildren(
+ referenceChange);
+ assertEquals(3, magazineChildren.size());
+ break;
+ }
+ }
+ ReferenceChange magazineSuperTypeChange = getReferenceChangeWithFeatureValue(magazineChildren,
+ "name", "CirculatingItem");
+ assertTrue(adaptAsITreItemContentProvider(magazineSuperTypeChange).getChildren(
+ magazineSuperTypeChange).isEmpty());
+
+ ReferenceChange magazineSFChange1 = getReferenceChangeWithFeatureValue(magazineChildren, "name",
+ "pages");
+ assertEquals(1, adaptAsITreItemContentProvider(magazineSFChange1).getChildren(magazineSFChange1)
+ .size());
+
+ ReferenceChange magazineSFChange2 = getReferenceChangeWithFeatureValue(magazineChildren, "name",
+ "title");
+ assertEquals(1, adaptAsITreItemContentProvider(magazineSFChange2).getChildren(magazineSFChange2)
+ .size());
+ }
+
+ @Test
+ public void testGetChildren_Magazine2() throws IOException {
+ Match ePackageMatch = TestMatchItemProviderSpec.getEcoreA1_EPackageMatch();
+
+ Collection<?> ePackage_MatchChildren = adaptAsITreItemContentProvider(ePackageMatch).getChildren(
+ ePackageMatch);
+
+ Collection<?> magazineChildren = null;
+ for (ReferenceChange referenceChange : filter(ePackage_MatchChildren, ReferenceChange.class)) {
+ EClass eClass = (EClass)referenceChange.getValue();
+ if ("Magazine".equals(eClass.getName())
+ && "Periodical".equals(eClass.getESuperTypes().get(0).getName())) {
+ magazineChildren = adaptAsITreItemContentProvider(referenceChange).getChildren(
+ referenceChange);
+ assertEquals(1, magazineChildren.size());
+ break;
+ }
+ }
+ ReferenceChange magazineSuperTypeChange = getReferenceChangeWithFeatureValue(magazineChildren,
+ "name", "Periodical");
+ assertTrue(adaptAsITreItemContentProvider(magazineSuperTypeChange).getChildren(
+ magazineSuperTypeChange).isEmpty());
+ }
+
+ // still to add: Periodical, Person, TitleItem
+}
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/data/ResourceScopeProvider.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/data/ResourceScopeProvider.java
new file mode 100644
index 000000000..b3fe1515e
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/data/ResourceScopeProvider.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.emf.compare.tests.edit.data;
+
+import java.io.IOException;
+
+import org.eclipse.emf.ecore.resource.Resource;
+
+/**
+ * @author <a href="mailto:mikael.barbero@obeo.fr">Mikael Barbero</a>
+ */
+public interface ResourceScopeProvider {
+
+ Resource getLeft() throws IOException;
+
+ Resource getRight() throws IOException;
+
+ Resource getOrigin() throws IOException;
+}
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/data/ecore/a1/EcoreA1InputData.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/data/ecore/a1/EcoreA1InputData.java
new file mode 100644
index 000000000..34a63566c
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/data/ecore/a1/EcoreA1InputData.java
@@ -0,0 +1,22 @@
+package org.eclipse.emf.compare.tests.edit.data.ecore.a1;
+
+import java.io.IOException;
+
+import org.eclipse.emf.compare.tests.edit.data.ResourceScopeProvider;
+import org.eclipse.emf.compare.tests.framework.AbstractInputData;
+import org.eclipse.emf.ecore.resource.Resource;
+
+public class EcoreA1InputData extends AbstractInputData implements ResourceScopeProvider {
+
+ public Resource getLeft() throws IOException {
+ return loadFromClassLoader("extlibraryLeft.ecore");
+ }
+
+ public Resource getRight() throws IOException {
+ return loadFromClassLoader("extlibraryRight.ecore");
+ }
+
+ public Resource getOrigin() throws IOException {
+ return loadFromClassLoader("extlibraryOrigin.ecore");
+ }
+}
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/data/ecore/a1/extlibraryLeft.ecore b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/data/ecore/a1/extlibraryLeft.ecore
new file mode 100644
index 000000000..65e2fb1e1
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/data/ecore/a1/extlibraryLeft.ecore
@@ -0,0 +1,109 @@
+<?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" xmi:id="_14sTEG60EeGkd4g88tZXfA" name="extlibrary" nsURI="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0" nsPrefix="extlib">
+ <eClassifiers xsi:type="ecore:EClass" xmi:id="_146VgG60EeGkd4g88tZXfA" name="Book" eSuperTypes="_15LbQG60EeGkd4g88tZXfA">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="_146VgW60EeGkd4g88tZXfA" name="title">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="_146Vg260EeGkd4g88tZXfA" name="pages" defaultValueLiteral="100">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="_1468kW60EeGkd4g88tZXfA" name="category" eType="_15F7sG60EeGkd4g88tZXfA" unsettable="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" xmi:id="_148KsG60EeGkd4g88tZXfA" name="author" lowerBound="1" eType="_15CRUW60EeGkd4g88tZXfA" eOpposite="_15EGgG60EeGkd4g88tZXfA"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" xmi:id="_148KsW60EeGkd4g88tZXfA" name="Library" eSuperTypes="_15OelG60EeGkd4g88tZXfA">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="_148Ksm60EeGkd4g88tZXfA" name="name">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" xmi:id="_148xwW60EeGkd4g88tZXfA" name="writers" upperBound="-1" eType="_15CRUW60EeGkd4g88tZXfA" volatile="true" transient="true" derived="true" containment="true" resolveProxies="false">
+ <eAnnotations xmi:id="_148xwm60EeGkd4g88tZXfA" source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details xmi:id="_148xw260EeGkd4g88tZXfA" key="group" value="#people"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" xmi:id="_149Y0G60EeGkd4g88tZXfA" name="employees" upperBound="-1" eType="_15OekG60EeGkd4g88tZXfA" volatile="true" transient="true" derived="true" containment="true" resolveProxies="false">
+ <eAnnotations xmi:id="_149Y0W60EeGkd4g88tZXfA" source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details xmi:id="_149Y0m60EeGkd4g88tZXfA" key="group" value="#people"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" xmi:id="_15AcIG60EeGkd4g88tZXfA" name="borrowers" upperBound="-1" eType="_15NQcW60EeGkd4g88tZXfA" volatile="true" transient="true" derived="true" containment="true" resolveProxies="false">
+ <eAnnotations xmi:id="_15AcIW60EeGkd4g88tZXfA" source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details xmi:id="_15BDMG60EeGkd4g88tZXfA" key="group" value="#people"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" xmi:id="_15BDMW60EeGkd4g88tZXfA" name="stock" ordered="false" upperBound="-1" eType="_15Hw4m60EeGkd4g88tZXfA" containment="true" resolveProxies="false"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" xmi:id="_15BDMm60EeGkd4g88tZXfA" name="books" ordered="false" upperBound="-1" eType="_146VgG60EeGkd4g88tZXfA" transient="true" derived="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" xmi:id="_15BqQG60EeGkd4g88tZXfA" name="branches" upperBound="-1" eType="_148KsW60EeGkd4g88tZXfA" containment="true" eOpposite="_15BqQm60EeGkd4g88tZXfA"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" xmi:id="_15BqQm60EeGkd4g88tZXfA" name="parentBranch" eType="_148KsW60EeGkd4g88tZXfA" eOpposite="_15BqQG60EeGkd4g88tZXfA"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="_15BqRG60EeGkd4g88tZXfA" name="people" upperBound="-1">
+ <eAnnotations xmi:id="_15BqRW60EeGkd4g88tZXfA" source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details xmi:id="_15BqRm60EeGkd4g88tZXfA" key="kind" value="group"/>
+ </eAnnotations>
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" xmi:id="_15CRUW60EeGkd4g88tZXfA" name="Writer" eSuperTypes="_15N3gm60EeGkd4g88tZXfA">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="_15CRUm60EeGkd4g88tZXfA" name="name" volatile="true" transient="true">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" xmi:id="_15EGgG60EeGkd4g88tZXfA" name="books" upperBound="-1" eType="_146VgG60EeGkd4g88tZXfA" eOpposite="_148KsG60EeGkd4g88tZXfA"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EEnum" xmi:id="_15F7sG60EeGkd4g88tZXfA" name="BookCategory">
+ <eLiterals xmi:id="_15HJ0G60EeGkd4g88tZXfA" name="Mystery"/>
+ <eLiterals xmi:id="_15Hw4G60EeGkd4g88tZXfA" name="ScienceFiction" value="1"/>
+ <eLiterals xmi:id="_15Hw4W60EeGkd4g88tZXfA" name="Biography" value="2"/>
+ <eLiterals xmi:id="_XID4MG9IEeG7V_vNzpYwOw" name="Encyclopedia" value="3" literal="Encyclopedia"/>
+ <eLiterals xmi:id="_XIEfQG9IEeG7V_vNzpYwOw" name="Dictionary" value="4"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" xmi:id="_15Hw4m60EeGkd4g88tZXfA" name="Item" abstract="true">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="_15Hw4260EeGkd4g88tZXfA" name="publicationDate">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EDate"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" xmi:id="_15IX8G60EeGkd4g88tZXfA" name="Borrowable" abstract="true" interface="true">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="_15JmEG60EeGkd4g88tZXfA" name="copies" lowerBound="1">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" xmi:id="_15JmEm60EeGkd4g88tZXfA" name="borrowers" ordered="false" upperBound="-1" eType="_15NQcW60EeGkd4g88tZXfA" eOpposite="_15N3gG60EeGkd4g88tZXfA"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" xmi:id="_15LbQG60EeGkd4g88tZXfA" name="CirculatingItem" abstract="true" eSuperTypes="_15Hw4m60EeGkd4g88tZXfA _15IX8G60EeGkd4g88tZXfA"/>
+ <eClassifiers xsi:type="ecore:EClass" xmi:id="_15MCUG60EeGkd4g88tZXfA" name="AudioVisualItem" abstract="true" eSuperTypes="_15LbQG60EeGkd4g88tZXfA">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="_15MCUm60EeGkd4g88tZXfA" name="title">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="_15MCVG60EeGkd4g88tZXfA" name="length" lowerBound="1">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="_15MCVm60EeGkd4g88tZXfA" name="damaged">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" xmi:id="_15MpYW60EeGkd4g88tZXfA" name="BookOnTape" eSuperTypes="_15MCUG60EeGkd4g88tZXfA">
+ <eStructuralFeatures xsi:type="ecore:EReference" xmi:id="_15MpZG60EeGkd4g88tZXfA" name="author" eType="_15CRUW60EeGkd4g88tZXfA"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" xmi:id="_15MpZm60EeGkd4g88tZXfA" name="VideoCassette" eSuperTypes="_15MCUG60EeGkd4g88tZXfA">
+ <eStructuralFeatures xsi:type="ecore:EReference" xmi:id="_15NQcG60EeGkd4g88tZXfA" name="cast" upperBound="-1" eType="_15N3gm60EeGkd4g88tZXfA"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" xmi:id="_15NQcW60EeGkd4g88tZXfA" name="Borrower" eSuperTypes="_15N3gm60EeGkd4g88tZXfA">
+ <eStructuralFeatures xsi:type="ecore:EReference" xmi:id="_15N3gG60EeGkd4g88tZXfA" name="borrowed" upperBound="-1" eType="_15IX8G60EeGkd4g88tZXfA" eOpposite="_15JmEm60EeGkd4g88tZXfA"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" xmi:id="_15N3gm60EeGkd4g88tZXfA" name="Person" eSuperTypes="_15OelG60EeGkd4g88tZXfA">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="_XIJ-0G9IEeG7V_vNzpYwOw" name="fullName">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" xmi:id="_15OekG60EeGkd4g88tZXfA" name="Employee" eSuperTypes="_15N3gm60EeGkd4g88tZXfA">
+ <eStructuralFeatures xsi:type="ecore:EReference" xmi:id="_15Oekm60EeGkd4g88tZXfA" name="manager" eType="_15OekG60EeGkd4g88tZXfA"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" xmi:id="_15OelG60EeGkd4g88tZXfA" name="Addressable" abstract="true" interface="true">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="_15OelW60EeGkd4g88tZXfA" name="address">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" xmi:id="_XIKl4W9IEeG7V_vNzpYwOw" name="Magazine" eSuperTypes="_15LbQG60EeGkd4g88tZXfA">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="_XIKl429IEeG7V_vNzpYwOw" name="title">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="_XIKl5W9IEeG7V_vNzpYwOw" name="pages">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/data/ecore/a1/extlibraryOrigin.ecore b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/data/ecore/a1/extlibraryOrigin.ecore
new file mode 100644
index 000000000..980acf487
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/data/ecore/a1/extlibraryOrigin.ecore
@@ -0,0 +1,111 @@
+<?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" xmi:id="_14sTEG60EeGkd4g88tZXfA" name="extlibrary" nsURI="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0" nsPrefix="extlib">
+ <eClassifiers xsi:type="ecore:EClass" xmi:id="_146VgG60EeGkd4g88tZXfA" name="Book" eSuperTypes="_15LbQG60EeGkd4g88tZXfA">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="_146VgW60EeGkd4g88tZXfA" name="title">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="_146Vg260EeGkd4g88tZXfA" name="pages" defaultValueLiteral="100">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="_1468kW60EeGkd4g88tZXfA" name="category" eType="_15F7sG60EeGkd4g88tZXfA" unsettable="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" xmi:id="_148KsG60EeGkd4g88tZXfA" name="author" lowerBound="1" eType="_15CRUW60EeGkd4g88tZXfA" eOpposite="_15EGgG60EeGkd4g88tZXfA"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" xmi:id="_148KsW60EeGkd4g88tZXfA" name="Library" eSuperTypes="_15OelG60EeGkd4g88tZXfA">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="_148Ksm60EeGkd4g88tZXfA" name="name">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" xmi:id="_148xwW60EeGkd4g88tZXfA" name="writers" upperBound="-1" eType="_15CRUW60EeGkd4g88tZXfA" volatile="true" transient="true" derived="true" containment="true" resolveProxies="false">
+ <eAnnotations xmi:id="_148xwm60EeGkd4g88tZXfA" source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details xmi:id="_148xw260EeGkd4g88tZXfA" key="group" value="#people"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" xmi:id="_149Y0G60EeGkd4g88tZXfA" name="employees" upperBound="-1" eType="_15OekG60EeGkd4g88tZXfA" volatile="true" transient="true" derived="true" containment="true" resolveProxies="false">
+ <eAnnotations xmi:id="_149Y0W60EeGkd4g88tZXfA" source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details xmi:id="_149Y0m60EeGkd4g88tZXfA" key="group" value="#people"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" xmi:id="_15AcIG60EeGkd4g88tZXfA" name="borrowers" upperBound="-1" eType="_15NQcW60EeGkd4g88tZXfA" volatile="true" transient="true" derived="true" containment="true" resolveProxies="false">
+ <eAnnotations xmi:id="_15AcIW60EeGkd4g88tZXfA" source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details xmi:id="_15BDMG60EeGkd4g88tZXfA" key="group" value="#people"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" xmi:id="_15BDMW60EeGkd4g88tZXfA" name="stock" ordered="false" upperBound="-1" eType="_15Hw4m60EeGkd4g88tZXfA" containment="true" resolveProxies="false"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" xmi:id="_15BDMm60EeGkd4g88tZXfA" name="books" ordered="false" upperBound="-1" eType="_146VgG60EeGkd4g88tZXfA" transient="true" derived="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" xmi:id="_15BqQG60EeGkd4g88tZXfA" name="branches" upperBound="-1" eType="_148KsW60EeGkd4g88tZXfA" containment="true" eOpposite="_15BqQm60EeGkd4g88tZXfA"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" xmi:id="_15BqQm60EeGkd4g88tZXfA" name="parentBranch" eType="_148KsW60EeGkd4g88tZXfA" eOpposite="_15BqQG60EeGkd4g88tZXfA"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="_15BqRG60EeGkd4g88tZXfA" name="people" upperBound="-1">
+ <eAnnotations xmi:id="_15BqRW60EeGkd4g88tZXfA" source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details xmi:id="_15BqRm60EeGkd4g88tZXfA" key="kind" value="group"/>
+ </eAnnotations>
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" xmi:id="_15CRUW60EeGkd4g88tZXfA" name="Writer" eSuperTypes="_15N3gm60EeGkd4g88tZXfA">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="_15CRUm60EeGkd4g88tZXfA" name="name" volatile="true" transient="true">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" xmi:id="_15EGgG60EeGkd4g88tZXfA" name="books" upperBound="-1" eType="_146VgG60EeGkd4g88tZXfA" eOpposite="_148KsG60EeGkd4g88tZXfA"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EEnum" xmi:id="_15F7sG60EeGkd4g88tZXfA" name="BookCategory">
+ <eLiterals xmi:id="_15HJ0G60EeGkd4g88tZXfA" name="Mystery"/>
+ <eLiterals xmi:id="_15Hw4G60EeGkd4g88tZXfA" name="ScienceFiction" value="1"/>
+ <eLiterals xmi:id="_15Hw4W60EeGkd4g88tZXfA" name="Biography" value="2"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" xmi:id="_15Hw4m60EeGkd4g88tZXfA" name="Item" abstract="true">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="_15Hw4260EeGkd4g88tZXfA" name="publicationDate">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EDate"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" xmi:id="_15IX8G60EeGkd4g88tZXfA" name="Lendable" abstract="true" interface="true">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="_15JmEG60EeGkd4g88tZXfA" name="copies" lowerBound="1">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" xmi:id="_15JmEm60EeGkd4g88tZXfA" name="borrowers" ordered="false" upperBound="-1" eType="_15NQcW60EeGkd4g88tZXfA" eOpposite="_15N3gG60EeGkd4g88tZXfA"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" xmi:id="_15LbQG60EeGkd4g88tZXfA" name="CirculatingItem" abstract="true" eSuperTypes="_15Hw4m60EeGkd4g88tZXfA _15IX8G60EeGkd4g88tZXfA"/>
+ <eClassifiers xsi:type="ecore:EClass" xmi:id="_15LbQ260EeGkd4g88tZXfA" name="Periodical" abstract="true" eSuperTypes="_15Hw4m60EeGkd4g88tZXfA">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="_15LbRW60EeGkd4g88tZXfA" name="title">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="_15LbR260EeGkd4g88tZXfA" name="issuesPerYear" lowerBound="1">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" xmi:id="_15MCUG60EeGkd4g88tZXfA" name="AudioVisualItem" abstract="true" eSuperTypes="_15LbQG60EeGkd4g88tZXfA">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="_15MCUm60EeGkd4g88tZXfA" name="title">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="_15MCVG60EeGkd4g88tZXfA" name="minutesLength" lowerBound="1">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="_15MCVm60EeGkd4g88tZXfA" name="damaged">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" xmi:id="_15MpYW60EeGkd4g88tZXfA" name="BookOnTape" eSuperTypes="_15MCUG60EeGkd4g88tZXfA">
+ <eStructuralFeatures xsi:type="ecore:EReference" xmi:id="_15MpY260EeGkd4g88tZXfA" name="reader" eType="_15N3gm60EeGkd4g88tZXfA"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" xmi:id="_15MpZG60EeGkd4g88tZXfA" name="author" eType="_15CRUW60EeGkd4g88tZXfA"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" xmi:id="_15MpZm60EeGkd4g88tZXfA" name="VideoCassette" eSuperTypes="_15MCUG60EeGkd4g88tZXfA">
+ <eStructuralFeatures xsi:type="ecore:EReference" xmi:id="_15NQcG60EeGkd4g88tZXfA" name="cast" upperBound="-1" eType="_15N3gm60EeGkd4g88tZXfA"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" xmi:id="_15NQcW60EeGkd4g88tZXfA" name="Borrower" eSuperTypes="_15N3gm60EeGkd4g88tZXfA">
+ <eStructuralFeatures xsi:type="ecore:EReference" xmi:id="_15N3gG60EeGkd4g88tZXfA" name="borrowed" upperBound="-1" eType="_15IX8G60EeGkd4g88tZXfA" eOpposite="_15JmEm60EeGkd4g88tZXfA"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" xmi:id="_15N3gm60EeGkd4g88tZXfA" name="Person" eSuperTypes="_15OelG60EeGkd4g88tZXfA">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="_15N3g260EeGkd4g88tZXfA" name="firstName" lowerBound="1">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="_15N3hW60EeGkd4g88tZXfA" name="lastName" lowerBound="1">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" xmi:id="_15OekG60EeGkd4g88tZXfA" name="Employee" eSuperTypes="_15N3gm60EeGkd4g88tZXfA">
+ <eStructuralFeatures xsi:type="ecore:EReference" xmi:id="_15Oekm60EeGkd4g88tZXfA" name="manager" eType="_15OekG60EeGkd4g88tZXfA"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" xmi:id="_15OelG60EeGkd4g88tZXfA" name="Addressable" abstract="true" interface="true">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="_15OelW60EeGkd4g88tZXfA" name="address">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/data/ecore/a1/extlibraryRight.ecore b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/data/ecore/a1/extlibraryRight.ecore
new file mode 100644
index 000000000..f9cd2e823
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/edit/data/ecore/a1/extlibraryRight.ecore
@@ -0,0 +1,112 @@
+<?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" xmi:id="_14sTEG60EeGkd4g88tZXfA" name="extlibrary" nsURI="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0" nsPrefix="extlib">
+ <eClassifiers xsi:type="ecore:EClass" xmi:id="_146VgG60EeGkd4g88tZXfA" name="Book" eSuperTypes="_15LbQG60EeGkd4g88tZXfA _9M9ys29IEeGekPcBm25hwQ">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="_146Vg260EeGkd4g88tZXfA" name="pages" defaultValueLiteral="100">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="_1468kW60EeGkd4g88tZXfA" name="category" eType="_15F7sG60EeGkd4g88tZXfA" unsettable="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" xmi:id="_148KsG60EeGkd4g88tZXfA" name="author" lowerBound="1" eType="_15CRUW60EeGkd4g88tZXfA" eOpposite="_15EGgG60EeGkd4g88tZXfA"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="_9MlYMG9IEeGekPcBm25hwQ" name="subtitle">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" xmi:id="_148KsW60EeGkd4g88tZXfA" name="Library" eSuperTypes="_15OelG60EeGkd4g88tZXfA">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="_148Ksm60EeGkd4g88tZXfA" name="name">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" xmi:id="_148xwW60EeGkd4g88tZXfA" name="writers" upperBound="-1" eType="_15CRUW60EeGkd4g88tZXfA" volatile="true" transient="true" derived="true" containment="true" resolveProxies="false">
+ <eAnnotations xmi:id="_148xwm60EeGkd4g88tZXfA" source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details xmi:id="_148xw260EeGkd4g88tZXfA" key="group" value="#people"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" xmi:id="_149Y0G60EeGkd4g88tZXfA" name="employees" upperBound="-1" eType="_15OekG60EeGkd4g88tZXfA" volatile="true" transient="true" derived="true" containment="true" resolveProxies="false">
+ <eAnnotations xmi:id="_149Y0W60EeGkd4g88tZXfA" source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details xmi:id="_149Y0m60EeGkd4g88tZXfA" key="group" value="#people"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" xmi:id="_15AcIG60EeGkd4g88tZXfA" name="borrowers" upperBound="-1" eType="_15NQcW60EeGkd4g88tZXfA" volatile="true" transient="true" derived="true" containment="true" resolveProxies="false">
+ <eAnnotations xmi:id="_15AcIW60EeGkd4g88tZXfA" source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details xmi:id="_15BDMG60EeGkd4g88tZXfA" key="group" value="#people"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" xmi:id="_15BDMW60EeGkd4g88tZXfA" name="stock" ordered="false" upperBound="-1" eType="_15Hw4m60EeGkd4g88tZXfA" containment="true" resolveProxies="false"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" xmi:id="_15BDMm60EeGkd4g88tZXfA" name="books" ordered="false" upperBound="-1" eType="_146VgG60EeGkd4g88tZXfA" transient="true" derived="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" xmi:id="_15BqQG60EeGkd4g88tZXfA" name="branches" upperBound="-1" eType="_148KsW60EeGkd4g88tZXfA" containment="true" eOpposite="_15BqQm60EeGkd4g88tZXfA"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" xmi:id="_15BqQm60EeGkd4g88tZXfA" name="parentBranch" eType="_148KsW60EeGkd4g88tZXfA" eOpposite="_15BqQG60EeGkd4g88tZXfA"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="_15BqRG60EeGkd4g88tZXfA" name="people" upperBound="-1">
+ <eAnnotations xmi:id="_15BqRW60EeGkd4g88tZXfA" source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details xmi:id="_15BqRm60EeGkd4g88tZXfA" key="kind" value="group"/>
+ </eAnnotations>
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" xmi:id="_15CRUW60EeGkd4g88tZXfA" name="Writer" eSuperTypes="_15N3gm60EeGkd4g88tZXfA">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="_15CRUm60EeGkd4g88tZXfA" name="name" volatile="true" transient="true">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" xmi:id="_15EGgG60EeGkd4g88tZXfA" name="books" upperBound="-1" eType="_146VgG60EeGkd4g88tZXfA" eOpposite="_148KsG60EeGkd4g88tZXfA"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EEnum" xmi:id="_15F7sG60EeGkd4g88tZXfA" name="BookCategory">
+ <eLiterals xmi:id="_15HJ0G60EeGkd4g88tZXfA" name="Mystery"/>
+ <eLiterals xmi:id="_15Hw4G60EeGkd4g88tZXfA" name="ScienceFiction" value="1"/>
+ <eLiterals xmi:id="_15Hw4W60EeGkd4g88tZXfA" name="Biography" value="2"/>
+ <eLiterals xmi:id="_9Mw-YG9IEeGekPcBm25hwQ" name="Manga" value="3" literal="Manga"/>
+ <eLiterals xmi:id="_9Mw-YW9IEeGekPcBm25hwQ" name="Manhwa" value="5"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" xmi:id="_15Hw4m60EeGkd4g88tZXfA" name="Item" abstract="true">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="_15Hw4260EeGkd4g88tZXfA" name="publicationDate">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EDate"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" xmi:id="_15IX8G60EeGkd4g88tZXfA" name="Lendable" abstract="true" interface="true">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="_15JmEG60EeGkd4g88tZXfA" name="copies" lowerBound="1">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" xmi:id="_15JmEm60EeGkd4g88tZXfA" name="borrowers" ordered="false" upperBound="-1" eType="_15NQcW60EeGkd4g88tZXfA" eOpposite="_15N3gG60EeGkd4g88tZXfA"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" xmi:id="_15LbQG60EeGkd4g88tZXfA" name="CirculatingItem" abstract="true" eSuperTypes="_15Hw4m60EeGkd4g88tZXfA _15IX8G60EeGkd4g88tZXfA"/>
+ <eClassifiers xsi:type="ecore:EClass" xmi:id="_15LbQ260EeGkd4g88tZXfA" name="Periodical" abstract="true" eSuperTypes="_15Hw4m60EeGkd4g88tZXfA _9M9ys29IEeGekPcBm25hwQ">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="_15LbR260EeGkd4g88tZXfA" name="issuesPerYear" lowerBound="1">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" xmi:id="_15MCUG60EeGkd4g88tZXfA" name="AudioVisualItem" abstract="true" eSuperTypes="_15LbQG60EeGkd4g88tZXfA _9M9ys29IEeGekPcBm25hwQ">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="_15MCVG60EeGkd4g88tZXfA" name="minutes" lowerBound="1">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="_15MCVm60EeGkd4g88tZXfA" name="damaged">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" xmi:id="_15MpYW60EeGkd4g88tZXfA" name="BookOnTape" eSuperTypes="_15MCUG60EeGkd4g88tZXfA">
+ <eStructuralFeatures xsi:type="ecore:EReference" xmi:id="_15MpZG60EeGkd4g88tZXfA" name="author" eType="_15CRUW60EeGkd4g88tZXfA"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" xmi:id="_15MpZm60EeGkd4g88tZXfA" name="VideoCassette" eSuperTypes="_15MCUG60EeGkd4g88tZXfA">
+ <eStructuralFeatures xsi:type="ecore:EReference" xmi:id="_15NQcG60EeGkd4g88tZXfA" name="cast" upperBound="-1" eType="_15N3gm60EeGkd4g88tZXfA"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" xmi:id="_15NQcW60EeGkd4g88tZXfA" name="Borrower" eSuperTypes="_15N3gm60EeGkd4g88tZXfA">
+ <eStructuralFeatures xsi:type="ecore:EReference" xmi:id="_15N3gG60EeGkd4g88tZXfA" name="borrowed" upperBound="-1" eType="_15IX8G60EeGkd4g88tZXfA" eOpposite="_15JmEm60EeGkd4g88tZXfA"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" xmi:id="_15N3gm60EeGkd4g88tZXfA" name="Person" eSuperTypes="_15OelG60EeGkd4g88tZXfA">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="_15N3g260EeGkd4g88tZXfA" name="firstName" lowerBound="1">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="_15N3hW60EeGkd4g88tZXfA" name="familyName" lowerBound="1">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" xmi:id="_15OekG60EeGkd4g88tZXfA" name="Employee" eSuperTypes="_15N3gm60EeGkd4g88tZXfA">
+ <eStructuralFeatures xsi:type="ecore:EReference" xmi:id="_15Oekm60EeGkd4g88tZXfA" name="manager" eType="_15OekG60EeGkd4g88tZXfA"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" xmi:id="_15OelG60EeGkd4g88tZXfA" name="Addressable" abstract="true" interface="true">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="_15OelW60EeGkd4g88tZXfA" name="address">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" xmi:id="_9M9ysW9IEeGekPcBm25hwQ" name="Magazine" eSuperTypes="_15LbQ260EeGkd4g88tZXfA"/>
+ <eClassifiers xsi:type="ecore:EClass" xmi:id="_9M9ys29IEeGekPcBm25hwQ" name="TitledItem">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" xmi:id="_9M9ytG9IEeGekPcBm25hwQ" name="title">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+</ecore:EPackage>

Back to the top