Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'examples/minilibrary/org.eclipse.viatra.examples.library')
-rw-r--r--examples/minilibrary/org.eclipse.viatra.examples.library/.classpath7
-rw-r--r--examples/minilibrary/org.eclipse.viatra.examples.library/.project28
-rw-r--r--examples/minilibrary/org.eclipse.viatra.examples.library/META-INF/MANIFEST.MF15
-rw-r--r--examples/minilibrary/org.eclipse.viatra.examples.library/build.properties10
-rw-r--r--examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/Book.java117
-rw-r--r--examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/BookCategory.java268
-rw-r--r--examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/Library.java139
-rw-r--r--examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/LibraryFactory.java60
-rw-r--r--examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/LibraryPackage.java680
-rw-r--r--examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/Writer.java106
-rw-r--r--examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/impl/BookImpl.java329
-rw-r--r--examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/impl/LibraryFactoryImpl.java168
-rw-r--r--examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/impl/LibraryImpl.java391
-rw-r--r--examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/impl/LibraryPackageImpl.java402
-rw-r--r--examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/impl/WriterImpl.java287
-rw-r--r--examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/util/LibraryAdapterFactory.java156
-rw-r--r--examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/util/LibrarySwitch.java152
-rw-r--r--examples/minilibrary/org.eclipse.viatra.examples.library/model/library.ecore68
-rw-r--r--examples/minilibrary/org.eclipse.viatra.examples.library/model/library.genmodel43
-rw-r--r--examples/minilibrary/org.eclipse.viatra.examples.library/plugin.properties4
-rw-r--r--examples/minilibrary/org.eclipse.viatra.examples.library/plugin.xml17
21 files changed, 0 insertions, 3447 deletions
diff --git a/examples/minilibrary/org.eclipse.viatra.examples.library/.classpath b/examples/minilibrary/org.eclipse.viatra.examples.library/.classpath
deleted file mode 100644
index b39dac816..000000000
--- a/examples/minilibrary/org.eclipse.viatra.examples.library/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="emf-gen"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/examples/minilibrary/org.eclipse.viatra.examples.library/.project b/examples/minilibrary/org.eclipse.viatra.examples.library/.project
deleted file mode 100644
index c20e33d59..000000000
--- a/examples/minilibrary/org.eclipse.viatra.examples.library/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.viatra.examples.library</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/minilibrary/org.eclipse.viatra.examples.library/META-INF/MANIFEST.MF b/examples/minilibrary/org.eclipse.viatra.examples.library/META-INF/MANIFEST.MF
deleted file mode 100644
index 54481771f..000000000
--- a/examples/minilibrary/org.eclipse.viatra.examples.library/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,15 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.viatra.examples.library;singleton:=true
-Bundle-Version: 0.1.0.qualifier
-Bundle-ClassPath: .
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Export-Package: org.eclipse.viatra.examples.library,
- org.eclipse.viatra.examples.library.impl,
- org.eclipse.viatra.examples.library.util
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.emf.ecore;visibility:=reexport
-Bundle-ActivationPolicy: lazy
diff --git a/examples/minilibrary/org.eclipse.viatra.examples.library/build.properties b/examples/minilibrary/org.eclipse.viatra.examples.library/build.properties
deleted file mode 100644
index 1a11a799c..000000000
--- a/examples/minilibrary/org.eclipse.viatra.examples.library/build.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-
-bin.includes = .,\
- model/,\
- META-INF/,\
- plugin.xml,\
- plugin.properties
-jars.compile.order = .
-source.. = emf-gen/
-output.. = bin/
diff --git a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/Book.java b/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/Book.java
deleted file mode 100644
index ce12bf44c..000000000
--- a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/Book.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/**
- */
-package org.eclipse.viatra.examples.library;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Book</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * </p>
- * <ul>
- * <li>{@link org.eclipse.viatra.examples.library.Book#getTitle <em>Title</em>}</li>
- * <li>{@link org.eclipse.viatra.examples.library.Book#getPages <em>Pages</em>}</li>
- * <li>{@link org.eclipse.viatra.examples.library.Book#getCategory <em>Category</em>}</li>
- * <li>{@link org.eclipse.viatra.examples.library.Book#getAuthors <em>Authors</em>}</li>
- * </ul>
- *
- * @see org.eclipse.viatra.examples.library.LibraryPackage#getBook()
- * @model
- * @generated
- */
-public interface Book extends EObject {
- /**
- * Returns the value of the '<em><b>Title</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Title</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Title</em>' attribute.
- * @see #setTitle(String)
- * @see org.eclipse.viatra.examples.library.LibraryPackage#getBook_Title()
- * @model
- * @generated
- */
- String getTitle();
-
- /**
- * Sets the value of the '{@link org.eclipse.viatra.examples.library.Book#getTitle <em>Title</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Title</em>' attribute.
- * @see #getTitle()
- * @generated
- */
- void setTitle(String value);
-
- /**
- * Returns the value of the '<em><b>Pages</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Pages</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Pages</em>' attribute.
- * @see #setPages(int)
- * @see org.eclipse.viatra.examples.library.LibraryPackage#getBook_Pages()
- * @model
- * @generated
- */
- int getPages();
-
- /**
- * Sets the value of the '{@link org.eclipse.viatra.examples.library.Book#getPages <em>Pages</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Pages</em>' attribute.
- * @see #getPages()
- * @generated
- */
- void setPages(int value);
-
- /**
- * Returns the value of the '<em><b>Category</b></em>' attribute list.
- * The list contents are of type {@link org.eclipse.viatra.examples.library.BookCategory}.
- * The literals are from the enumeration {@link org.eclipse.viatra.examples.library.BookCategory}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Category</em>' attribute list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Category</em>' attribute list.
- * @see org.eclipse.viatra.examples.library.BookCategory
- * @see org.eclipse.viatra.examples.library.LibraryPackage#getBook_Category()
- * @model
- * @generated
- */
- EList<BookCategory> getCategory();
-
- /**
- * Returns the value of the '<em><b>Authors</b></em>' reference list.
- * The list contents are of type {@link org.eclipse.viatra.examples.library.Writer}.
- * It is bidirectional and its opposite is '{@link org.eclipse.viatra.examples.library.Writer#getBooks <em>Books</em>}'.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Authors</em>' reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Authors</em>' reference list.
- * @see org.eclipse.viatra.examples.library.LibraryPackage#getBook_Authors()
- * @see org.eclipse.viatra.examples.library.Writer#getBooks
- * @model opposite="books"
- * @generated
- */
- EList<Writer> getAuthors();
-
-} // Book
diff --git a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/BookCategory.java b/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/BookCategory.java
deleted file mode 100644
index 213394f6c..000000000
--- a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/BookCategory.java
+++ /dev/null
@@ -1,268 +0,0 @@
-/**
- */
-package org.eclipse.viatra.examples.library;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.emf.common.util.Enumerator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the literals of the enumeration '<em><b>Book Category</b></em>',
- * and utility methods for working with them.
- * <!-- end-user-doc -->
- * @see org.eclipse.viatra.examples.library.LibraryPackage#getBookCategory()
- * @model
- * @generated
- */
-public enum BookCategory implements Enumerator {
- /**
- * The '<em><b>Drama</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #DRAMA_VALUE
- * @generated
- * @ordered
- */
- DRAMA(0, "Drama", "Drama"),
-
- /**
- * The '<em><b>History</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #HISTORY_VALUE
- * @generated
- * @ordered
- */
- HISTORY(1, "History", "History"),
-
- /**
- * The '<em><b>Art</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #ART_VALUE
- * @generated
- * @ordered
- */
- ART(2, "Art", "Art"),
-
- /**
- * The '<em><b>Sci Fi</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #SCI_FI_VALUE
- * @generated
- * @ordered
- */
- SCI_FI(3, "SciFi", "SciFi");
-
- /**
- * The '<em><b>Drama</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>Drama</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #DRAMA
- * @model name="Drama"
- * @generated
- * @ordered
- */
- public static final int DRAMA_VALUE = 0;
-
- /**
- * The '<em><b>History</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>History</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #HISTORY
- * @model name="History"
- * @generated
- * @ordered
- */
- public static final int HISTORY_VALUE = 1;
-
- /**
- * The '<em><b>Art</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>Art</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #ART
- * @model name="Art"
- * @generated
- * @ordered
- */
- public static final int ART_VALUE = 2;
-
- /**
- * The '<em><b>Sci Fi</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>Sci Fi</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #SCI_FI
- * @model name="SciFi"
- * @generated
- * @ordered
- */
- public static final int SCI_FI_VALUE = 3;
-
- /**
- * An array of all the '<em><b>Book Category</b></em>' enumerators.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static final BookCategory[] VALUES_ARRAY =
- new BookCategory[] {
- DRAMA,
- HISTORY,
- ART,
- SCI_FI,
- };
-
- /**
- * A public read-only list of all the '<em><b>Book Category</b></em>' enumerators.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final List<BookCategory> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
-
- /**
- * Returns the '<em><b>Book Category</b></em>' literal with the specified literal value.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param literal the literal.
- * @return the matching enumerator or <code>null</code>.
- * @generated
- */
- public static BookCategory get(String literal) {
- for (int i = 0; i < VALUES_ARRAY.length; ++i) {
- BookCategory result = VALUES_ARRAY[i];
- if (result.toString().equals(literal)) {
- return result;
- }
- }
- return null;
- }
-
- /**
- * Returns the '<em><b>Book Category</b></em>' literal with the specified name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param name the name.
- * @return the matching enumerator or <code>null</code>.
- * @generated
- */
- public static BookCategory getByName(String name) {
- for (int i = 0; i < VALUES_ARRAY.length; ++i) {
- BookCategory result = VALUES_ARRAY[i];
- if (result.getName().equals(name)) {
- return result;
- }
- }
- return null;
- }
-
- /**
- * Returns the '<em><b>Book Category</b></em>' literal with the specified integer value.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the integer value.
- * @return the matching enumerator or <code>null</code>.
- * @generated
- */
- public static BookCategory get(int value) {
- switch (value) {
- case DRAMA_VALUE: return DRAMA;
- case HISTORY_VALUE: return HISTORY;
- case ART_VALUE: return ART;
- case SCI_FI_VALUE: return SCI_FI;
- }
- return null;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private final int value;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private final String name;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private final String literal;
-
- /**
- * Only this class can construct instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private BookCategory(int value, String name, String literal) {
- this.value = value;
- this.name = name;
- this.literal = literal;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public int getValue() {
- return value;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getName() {
- return name;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getLiteral() {
- return literal;
- }
-
- /**
- * Returns the literal value of the enumerator, which is its string representation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString() {
- return literal;
- }
-
-} //BookCategory
diff --git a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/Library.java b/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/Library.java
deleted file mode 100644
index 807d773b9..000000000
--- a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/Library.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- */
-package org.eclipse.viatra.examples.library;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Library</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * </p>
- * <ul>
- * <li>{@link org.eclipse.viatra.examples.library.Library#getAddress <em>Address</em>}</li>
- * <li>{@link org.eclipse.viatra.examples.library.Library#getWriters <em>Writers</em>}</li>
- * <li>{@link org.eclipse.viatra.examples.library.Library#getSumOfPages <em>Sum Of Pages</em>}</li>
- * <li>{@link org.eclipse.viatra.examples.library.Library#getBooks <em>Books</em>}</li>
- * <li>{@link org.eclipse.viatra.examples.library.Library#getRequestCount <em>Request Count</em>}</li>
- * <li>{@link org.eclipse.viatra.examples.library.Library#getSomeBooks <em>Some Books</em>}</li>
- * </ul>
- *
- * @see org.eclipse.viatra.examples.library.LibraryPackage#getLibrary()
- * @model features="internalRequestCount"
- * internalRequestCountDefault="1" internalRequestCountDataType="org.eclipse.emf.ecore.EInt" internalRequestCountTransient="true" internalRequestCountSuppressedGetVisibility="true" internalRequestCountSuppressedSetVisibility="true"
- * @generated
- */
-public interface Library extends EObject {
- /**
- * Returns the value of the '<em><b>Address</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Address</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Address</em>' attribute.
- * @see #setAddress(String)
- * @see org.eclipse.viatra.examples.library.LibraryPackage#getLibrary_Address()
- * @model
- * @generated
- */
- String getAddress();
-
- /**
- * Sets the value of the '{@link org.eclipse.viatra.examples.library.Library#getAddress <em>Address</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Address</em>' attribute.
- * @see #getAddress()
- * @generated
- */
- void setAddress(String value);
-
- /**
- * Returns the value of the '<em><b>Writers</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.viatra.examples.library.Writer}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Writers</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Writers</em>' containment reference list.
- * @see org.eclipse.viatra.examples.library.LibraryPackage#getLibrary_Writers()
- * @model containment="true"
- * @generated
- */
- EList<Writer> getWriters();
-
- /**
- * Returns the value of the '<em><b>Sum Of Pages</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Sum Of Pages</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Sum Of Pages</em>' attribute.
- * @see org.eclipse.viatra.examples.library.LibraryPackage#getLibrary_SumOfPages()
- * @model transient="true" changeable="false" volatile="true" derived="true"
- * annotation="http://www.eclipse.org/emf/2002/GenModel get='EList<Book> allBooks = getBooks();\r\nint sumOfPages = 0;\r\nfor (Book book : allBooks) {\r\n sumOfPages += book.getPages();\r\n}\r\nreturn sumOfPages;'"
- * @generated
- */
- int getSumOfPages();
-
- /**
- * Returns the value of the '<em><b>Books</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.viatra.examples.library.Book}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Books</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Books</em>' containment reference list.
- * @see org.eclipse.viatra.examples.library.LibraryPackage#getLibrary_Books()
- * @model containment="true"
- * @generated
- */
- EList<Book> getBooks();
-
- /**
- * Returns the value of the '<em><b>Request Count</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Request Count</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Request Count</em>' attribute.
- * @see org.eclipse.viatra.examples.library.LibraryPackage#getLibrary_RequestCount()
- * @model transient="true" changeable="false" volatile="true" derived="true"
- * annotation="http://www.eclipse.org/emf/2002/GenModel get='internalRequestCount++;\r\nreturn internalRequestCount;'"
- * @generated
- */
- int getRequestCount();
-
- /**
- * Returns the value of the '<em><b>Some Books</b></em>' reference list.
- * The list contents are of type {@link org.eclipse.viatra.examples.library.Book}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Some Books</em>' reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Some Books</em>' reference list.
- * @see org.eclipse.viatra.examples.library.LibraryPackage#getLibrary_SomeBooks()
- * @model transient="true" changeable="false" volatile="true" derived="true"
- * annotation="http://www.eclipse.org/emf/2002/GenModel get='int count = internalRequestCount;\r\njava.util.List<Book> someBooks = new java.util.ArrayList<Book>();\r\n\r\nBook[] books = getBooks().toArray(new Book[0]);\r\nfor (int i = 0; i < books.length; i++) {\r\n Book book = books[i];\r\n if(i%count == 0) {\r\n someBooks.add(book);\r\n }\r\n}\r\nreturn org.eclipse.emf.common.util.ECollections.asEList(someBooks);'"
- * @generated
- */
- EList<Book> getSomeBooks();
-
-} // Library
diff --git a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/LibraryFactory.java b/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/LibraryFactory.java
deleted file mode 100644
index ee2fc741b..000000000
--- a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/LibraryFactory.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- */
-package org.eclipse.viatra.examples.library;
-
-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.viatra.examples.library.LibraryPackage
- * @generated
- */
-public interface LibraryFactory extends EFactory {
- /**
- * The singleton instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- LibraryFactory eINSTANCE = org.eclipse.viatra.examples.library.impl.LibraryFactoryImpl.init();
-
- /**
- * Returns a new object of class '<em>Library</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Library</em>'.
- * @generated
- */
- Library createLibrary();
-
- /**
- * Returns a new object of class '<em>Book</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Book</em>'.
- * @generated
- */
- Book createBook();
-
- /**
- * Returns a new object of class '<em>Writer</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Writer</em>'.
- * @generated
- */
- Writer createWriter();
-
- /**
- * Returns the package supported by this factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the package supported by this factory.
- * @generated
- */
- LibraryPackage getLibraryPackage();
-
-} //LibraryFactory
diff --git a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/LibraryPackage.java b/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/LibraryPackage.java
deleted file mode 100644
index 8579fd77e..000000000
--- a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/LibraryPackage.java
+++ /dev/null
@@ -1,680 +0,0 @@
-/**
- */
-package org.eclipse.viatra.examples.library;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EEnum;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-
-/**
- * <!-- 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 operation of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- * <!-- end-user-doc -->
- * @see org.eclipse.viatra.examples.library.LibraryFactory
- * @model kind="package"
- * @generated
- */
-public interface LibraryPackage extends EPackage {
- /**
- * The package name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNAME = "library";
-
- /**
- * The package namespace URI.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNS_URI = "http://www.eclipse.org/viatra/examples/library/1.0";
-
- /**
- * The package namespace name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNS_PREFIX = "vlibrary";
-
- /**
- * The singleton instance of the package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- LibraryPackage eINSTANCE = org.eclipse.viatra.examples.library.impl.LibraryPackageImpl.init();
-
- /**
- * The meta object id for the '{@link org.eclipse.viatra.examples.library.impl.LibraryImpl <em>Library</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.viatra.examples.library.impl.LibraryImpl
- * @see org.eclipse.viatra.examples.library.impl.LibraryPackageImpl#getLibrary()
- * @generated
- */
- int LIBRARY = 0;
-
- /**
- * The feature id for the '<em><b>Address</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int LIBRARY__ADDRESS = 0;
-
- /**
- * The feature id for the '<em><b>Writers</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int LIBRARY__WRITERS = 1;
-
- /**
- * The feature id for the '<em><b>Sum Of Pages</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int LIBRARY__SUM_OF_PAGES = 2;
-
- /**
- * The feature id for the '<em><b>Books</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int LIBRARY__BOOKS = 3;
-
- /**
- * The feature id for the '<em><b>Internal Request Count</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int LIBRARY__INTERNAL_REQUEST_COUNT = 4;
-
- /**
- * The feature id for the '<em><b>Request Count</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int LIBRARY__REQUEST_COUNT = 5;
-
- /**
- * The feature id for the '<em><b>Some Books</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int LIBRARY__SOME_BOOKS = 6;
-
- /**
- * The number of structural features of the '<em>Library</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int LIBRARY_FEATURE_COUNT = 7;
-
- /**
- * The number of operations of the '<em>Library</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int LIBRARY_OPERATION_COUNT = 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.viatra.examples.library.impl.BookImpl <em>Book</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.viatra.examples.library.impl.BookImpl
- * @see org.eclipse.viatra.examples.library.impl.LibraryPackageImpl#getBook()
- * @generated
- */
- int BOOK = 1;
-
- /**
- * The feature id for the '<em><b>Title</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int BOOK__TITLE = 0;
-
- /**
- * The feature id for the '<em><b>Pages</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int BOOK__PAGES = 1;
-
- /**
- * The feature id for the '<em><b>Category</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int BOOK__CATEGORY = 2;
-
- /**
- * The feature id for the '<em><b>Authors</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int BOOK__AUTHORS = 3;
-
- /**
- * The number of structural features of the '<em>Book</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int BOOK_FEATURE_COUNT = 4;
-
- /**
- * The number of operations of the '<em>Book</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int BOOK_OPERATION_COUNT = 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.viatra.examples.library.impl.WriterImpl <em>Writer</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.viatra.examples.library.impl.WriterImpl
- * @see org.eclipse.viatra.examples.library.impl.LibraryPackageImpl#getWriter()
- * @generated
- */
- int WRITER = 2;
-
- /**
- * The feature id for the '<em><b>Books</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int WRITER__BOOKS = 0;
-
- /**
- * The feature id for the '<em><b>First Book</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int WRITER__FIRST_BOOK = 1;
-
- /**
- * The feature id for the '<em><b>Scifi Books</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int WRITER__SCIFI_BOOKS = 2;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int WRITER__NAME = 3;
-
- /**
- * The number of structural features of the '<em>Writer</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int WRITER_FEATURE_COUNT = 4;
-
- /**
- * The number of operations of the '<em>Writer</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int WRITER_OPERATION_COUNT = 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.viatra.examples.library.BookCategory <em>Book Category</em>}' enum.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.viatra.examples.library.BookCategory
- * @see org.eclipse.viatra.examples.library.impl.LibraryPackageImpl#getBookCategory()
- * @generated
- */
- int BOOK_CATEGORY = 3;
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.viatra.examples.library.Library <em>Library</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Library</em>'.
- * @see org.eclipse.viatra.examples.library.Library
- * @generated
- */
- EClass getLibrary();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.viatra.examples.library.Library#getAddress <em>Address</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Address</em>'.
- * @see org.eclipse.viatra.examples.library.Library#getAddress()
- * @see #getLibrary()
- * @generated
- */
- EAttribute getLibrary_Address();
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.viatra.examples.library.Library#getWriters <em>Writers</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Writers</em>'.
- * @see org.eclipse.viatra.examples.library.Library#getWriters()
- * @see #getLibrary()
- * @generated
- */
- EReference getLibrary_Writers();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.viatra.examples.library.Library#getSumOfPages <em>Sum Of Pages</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Sum Of Pages</em>'.
- * @see org.eclipse.viatra.examples.library.Library#getSumOfPages()
- * @see #getLibrary()
- * @generated
- */
- EAttribute getLibrary_SumOfPages();
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.viatra.examples.library.Library#getBooks <em>Books</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Books</em>'.
- * @see org.eclipse.viatra.examples.library.Library#getBooks()
- * @see #getLibrary()
- * @generated
- */
- EReference getLibrary_Books();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.viatra.examples.library.Library <em>Internal Request Count</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Internal Request Count</em>'.
- * @see org.eclipse.viatra.examples.library.Library
- * @see #getLibrary()
- * @generated
- */
- EAttribute getLibrary_InternalRequestCount();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.viatra.examples.library.Library#getRequestCount <em>Request Count</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Request Count</em>'.
- * @see org.eclipse.viatra.examples.library.Library#getRequestCount()
- * @see #getLibrary()
- * @generated
- */
- EAttribute getLibrary_RequestCount();
-
- /**
- * Returns the meta object for the reference list '{@link org.eclipse.viatra.examples.library.Library#getSomeBooks <em>Some Books</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the reference list '<em>Some Books</em>'.
- * @see org.eclipse.viatra.examples.library.Library#getSomeBooks()
- * @see #getLibrary()
- * @generated
- */
- EReference getLibrary_SomeBooks();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.viatra.examples.library.Book <em>Book</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Book</em>'.
- * @see org.eclipse.viatra.examples.library.Book
- * @generated
- */
- EClass getBook();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.viatra.examples.library.Book#getTitle <em>Title</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Title</em>'.
- * @see org.eclipse.viatra.examples.library.Book#getTitle()
- * @see #getBook()
- * @generated
- */
- EAttribute getBook_Title();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.viatra.examples.library.Book#getPages <em>Pages</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Pages</em>'.
- * @see org.eclipse.viatra.examples.library.Book#getPages()
- * @see #getBook()
- * @generated
- */
- EAttribute getBook_Pages();
-
- /**
- * Returns the meta object for the attribute list '{@link org.eclipse.viatra.examples.library.Book#getCategory <em>Category</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute list '<em>Category</em>'.
- * @see org.eclipse.viatra.examples.library.Book#getCategory()
- * @see #getBook()
- * @generated
- */
- EAttribute getBook_Category();
-
- /**
- * Returns the meta object for the reference list '{@link org.eclipse.viatra.examples.library.Book#getAuthors <em>Authors</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the reference list '<em>Authors</em>'.
- * @see org.eclipse.viatra.examples.library.Book#getAuthors()
- * @see #getBook()
- * @generated
- */
- EReference getBook_Authors();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.viatra.examples.library.Writer <em>Writer</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Writer</em>'.
- * @see org.eclipse.viatra.examples.library.Writer
- * @generated
- */
- EClass getWriter();
-
- /**
- * Returns the meta object for the reference list '{@link org.eclipse.viatra.examples.library.Writer#getBooks <em>Books</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the reference list '<em>Books</em>'.
- * @see org.eclipse.viatra.examples.library.Writer#getBooks()
- * @see #getWriter()
- * @generated
- */
- EReference getWriter_Books();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.viatra.examples.library.Writer#getFirstBook <em>First Book</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the reference '<em>First Book</em>'.
- * @see org.eclipse.viatra.examples.library.Writer#getFirstBook()
- * @see #getWriter()
- * @generated
- */
- EReference getWriter_FirstBook();
-
- /**
- * Returns the meta object for the reference list '{@link org.eclipse.viatra.examples.library.Writer#getScifiBooks <em>Scifi Books</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the reference list '<em>Scifi Books</em>'.
- * @see org.eclipse.viatra.examples.library.Writer#getScifiBooks()
- * @see #getWriter()
- * @generated
- */
- EReference getWriter_ScifiBooks();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.viatra.examples.library.Writer#getName <em>Name</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Name</em>'.
- * @see org.eclipse.viatra.examples.library.Writer#getName()
- * @see #getWriter()
- * @generated
- */
- EAttribute getWriter_Name();
-
- /**
- * Returns the meta object for enum '{@link org.eclipse.viatra.examples.library.BookCategory <em>Book Category</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for enum '<em>Book Category</em>'.
- * @see org.eclipse.viatra.examples.library.BookCategory
- * @generated
- */
- EEnum getBookCategory();
-
- /**
- * 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
- */
- LibraryFactory getLibraryFactory();
-
- /**
- * <!-- 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 operation 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.viatra.examples.library.impl.LibraryImpl <em>Library</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.viatra.examples.library.impl.LibraryImpl
- * @see org.eclipse.viatra.examples.library.impl.LibraryPackageImpl#getLibrary()
- * @generated
- */
- EClass LIBRARY = eINSTANCE.getLibrary();
-
- /**
- * The meta object literal for the '<em><b>Address</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute LIBRARY__ADDRESS = eINSTANCE.getLibrary_Address();
-
- /**
- * The meta object literal for the '<em><b>Writers</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference LIBRARY__WRITERS = eINSTANCE.getLibrary_Writers();
-
- /**
- * The meta object literal for the '<em><b>Sum Of Pages</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute LIBRARY__SUM_OF_PAGES = eINSTANCE.getLibrary_SumOfPages();
-
- /**
- * The meta object literal for the '<em><b>Books</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference LIBRARY__BOOKS = eINSTANCE.getLibrary_Books();
-
- /**
- * The meta object literal for the '<em><b>Internal Request Count</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute LIBRARY__INTERNAL_REQUEST_COUNT = eINSTANCE.getLibrary_InternalRequestCount();
-
- /**
- * The meta object literal for the '<em><b>Request Count</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute LIBRARY__REQUEST_COUNT = eINSTANCE.getLibrary_RequestCount();
-
- /**
- * The meta object literal for the '<em><b>Some Books</b></em>' reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference LIBRARY__SOME_BOOKS = eINSTANCE.getLibrary_SomeBooks();
-
- /**
- * The meta object literal for the '{@link org.eclipse.viatra.examples.library.impl.BookImpl <em>Book</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.viatra.examples.library.impl.BookImpl
- * @see org.eclipse.viatra.examples.library.impl.LibraryPackageImpl#getBook()
- * @generated
- */
- EClass BOOK = eINSTANCE.getBook();
-
- /**
- * The meta object literal for the '<em><b>Title</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute BOOK__TITLE = eINSTANCE.getBook_Title();
-
- /**
- * The meta object literal for the '<em><b>Pages</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute BOOK__PAGES = eINSTANCE.getBook_Pages();
-
- /**
- * The meta object literal for the '<em><b>Category</b></em>' attribute list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute BOOK__CATEGORY = eINSTANCE.getBook_Category();
-
- /**
- * The meta object literal for the '<em><b>Authors</b></em>' reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference BOOK__AUTHORS = eINSTANCE.getBook_Authors();
-
- /**
- * The meta object literal for the '{@link org.eclipse.viatra.examples.library.impl.WriterImpl <em>Writer</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.viatra.examples.library.impl.WriterImpl
- * @see org.eclipse.viatra.examples.library.impl.LibraryPackageImpl#getWriter()
- * @generated
- */
- EClass WRITER = eINSTANCE.getWriter();
-
- /**
- * The meta object literal for the '<em><b>Books</b></em>' reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference WRITER__BOOKS = eINSTANCE.getWriter_Books();
-
- /**
- * The meta object literal for the '<em><b>First Book</b></em>' reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference WRITER__FIRST_BOOK = eINSTANCE.getWriter_FirstBook();
-
- /**
- * The meta object literal for the '<em><b>Scifi Books</b></em>' reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference WRITER__SCIFI_BOOKS = eINSTANCE.getWriter_ScifiBooks();
-
- /**
- * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute WRITER__NAME = eINSTANCE.getWriter_Name();
-
- /**
- * The meta object literal for the '{@link org.eclipse.viatra.examples.library.BookCategory <em>Book Category</em>}' enum.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.viatra.examples.library.BookCategory
- * @see org.eclipse.viatra.examples.library.impl.LibraryPackageImpl#getBookCategory()
- * @generated
- */
- EEnum BOOK_CATEGORY = eINSTANCE.getBookCategory();
-
- }
-
-} //LibraryPackage
diff --git a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/Writer.java b/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/Writer.java
deleted file mode 100644
index 3d9632f13..000000000
--- a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/Writer.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/**
- */
-package org.eclipse.viatra.examples.library;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Writer</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * </p>
- * <ul>
- * <li>{@link org.eclipse.viatra.examples.library.Writer#getBooks <em>Books</em>}</li>
- * <li>{@link org.eclipse.viatra.examples.library.Writer#getFirstBook <em>First Book</em>}</li>
- * <li>{@link org.eclipse.viatra.examples.library.Writer#getScifiBooks <em>Scifi Books</em>}</li>
- * <li>{@link org.eclipse.viatra.examples.library.Writer#getName <em>Name</em>}</li>
- * </ul>
- *
- * @see org.eclipse.viatra.examples.library.LibraryPackage#getWriter()
- * @model
- * @generated
- */
-public interface Writer extends EObject {
- /**
- * Returns the value of the '<em><b>Books</b></em>' reference list.
- * The list contents are of type {@link org.eclipse.viatra.examples.library.Book}.
- * It is bidirectional and its opposite is '{@link org.eclipse.viatra.examples.library.Book#getAuthors <em>Authors</em>}'.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Books</em>' reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Books</em>' reference list.
- * @see org.eclipse.viatra.examples.library.LibraryPackage#getWriter_Books()
- * @see org.eclipse.viatra.examples.library.Book#getAuthors
- * @model opposite="authors"
- * @generated
- */
- EList<Book> getBooks();
-
- /**
- * Returns the value of the '<em><b>First Book</b></em>' reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>First Book</em>' reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>First Book</em>' reference.
- * @see org.eclipse.viatra.examples.library.LibraryPackage#getWriter_FirstBook()
- * @model transient="true" changeable="false" volatile="true" derived="true"
- * annotation="http://www.eclipse.org/emf/2002/GenModel get='EList<Book> allBooks = getBooks();\r\nif(!allBooks.isEmpty()){\r\n return allBooks.get(0);\r\n}\r\nreturn null;'"
- * @generated
- */
- Book getFirstBook();
-
- /**
- * Returns the value of the '<em><b>Scifi Books</b></em>' reference list.
- * The list contents are of type {@link org.eclipse.viatra.examples.library.Book}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Scifi Books</em>' reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Scifi Books</em>' reference list.
- * @see org.eclipse.viatra.examples.library.LibraryPackage#getWriter_ScifiBooks()
- * @model transient="true" changeable="false" volatile="true" derived="true"
- * annotation="http://www.eclipse.org/emf/2002/GenModel get='EList<Book> allBooks = getBooks();\r\njava.util.List<Book> scifiBooks = new java.util.ArrayList<Book>();\r\nfor (Book book : allBooks) {\r\n if(book.getCategory().contains(org.eclipse.viatra.examples.library.BookCategory.SCI_FI)) {\r\n scifiBooks.add(book);\r\n }\r\n}\r\nreturn org.eclipse.emf.common.util.ECollections.asEList(scifiBooks);'"
- * @generated
- */
- EList<Book> getScifiBooks();
-
- /**
- * Returns the value of the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Name</em>' attribute.
- * @see #setName(String)
- * @see org.eclipse.viatra.examples.library.LibraryPackage#getWriter_Name()
- * @model
- * @generated
- */
- String getName();
-
- /**
- * Sets the value of the '{@link org.eclipse.viatra.examples.library.Writer#getName <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Name</em>' attribute.
- * @see #getName()
- * @generated
- */
- void setName(String value);
-
-} // Writer
diff --git a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/impl/BookImpl.java b/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/impl/BookImpl.java
deleted file mode 100644
index 826388b98..000000000
--- a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/impl/BookImpl.java
+++ /dev/null
@@ -1,329 +0,0 @@
-/**
- */
-package org.eclipse.viatra.examples.library.impl;
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
-
-import org.eclipse.emf.ecore.util.EDataTypeUniqueEList;
-import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-
-import org.eclipse.viatra.examples.library.Book;
-import org.eclipse.viatra.examples.library.BookCategory;
-import org.eclipse.viatra.examples.library.LibraryPackage;
-import org.eclipse.viatra.examples.library.Writer;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Book</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * </p>
- * <ul>
- * <li>{@link org.eclipse.viatra.examples.library.impl.BookImpl#getTitle <em>Title</em>}</li>
- * <li>{@link org.eclipse.viatra.examples.library.impl.BookImpl#getPages <em>Pages</em>}</li>
- * <li>{@link org.eclipse.viatra.examples.library.impl.BookImpl#getCategory <em>Category</em>}</li>
- * <li>{@link org.eclipse.viatra.examples.library.impl.BookImpl#getAuthors <em>Authors</em>}</li>
- * </ul>
- *
- * @generated
- */
-public class BookImpl extends MinimalEObjectImpl.Container implements Book {
- /**
- * The default value of the '{@link #getTitle() <em>Title</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getTitle()
- * @generated
- * @ordered
- */
- protected static final String TITLE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getTitle() <em>Title</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getTitle()
- * @generated
- * @ordered
- */
- protected String title = TITLE_EDEFAULT;
-
- /**
- * The default value of the '{@link #getPages() <em>Pages</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPages()
- * @generated
- * @ordered
- */
- protected static final int PAGES_EDEFAULT = 0;
-
- /**
- * The cached value of the '{@link #getPages() <em>Pages</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPages()
- * @generated
- * @ordered
- */
- protected int pages = PAGES_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getCategory() <em>Category</em>}' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getCategory()
- * @generated
- * @ordered
- */
- protected EList<BookCategory> category;
-
- /**
- * The cached value of the '{@link #getAuthors() <em>Authors</em>}' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getAuthors()
- * @generated
- * @ordered
- */
- protected EList<Writer> authors;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected BookImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return LibraryPackage.Literals.BOOK;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getTitle() {
- return title;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setTitle(String newTitle) {
- String oldTitle = title;
- title = newTitle;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, LibraryPackage.BOOK__TITLE, oldTitle, title));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public int getPages() {
- return pages;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setPages(int newPages) {
- int oldPages = pages;
- pages = newPages;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, LibraryPackage.BOOK__PAGES, oldPages, pages));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList<BookCategory> getCategory() {
- if (category == null) {
- category = new EDataTypeUniqueEList<BookCategory>(BookCategory.class, this, LibraryPackage.BOOK__CATEGORY);
- }
- return category;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList<Writer> getAuthors() {
- if (authors == null) {
- authors = new EObjectWithInverseResolvingEList.ManyInverse<Writer>(Writer.class, this, LibraryPackage.BOOK__AUTHORS, LibraryPackage.WRITER__BOOKS);
- }
- return authors;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case LibraryPackage.BOOK__AUTHORS:
- return ((InternalEList<InternalEObject>)(InternalEList<?>)getAuthors()).basicAdd(otherEnd, msgs);
- }
- return super.eInverseAdd(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case LibraryPackage.BOOK__AUTHORS:
- return ((InternalEList<?>)getAuthors()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case LibraryPackage.BOOK__TITLE:
- return getTitle();
- case LibraryPackage.BOOK__PAGES:
- return getPages();
- case LibraryPackage.BOOK__CATEGORY:
- return getCategory();
- case LibraryPackage.BOOK__AUTHORS:
- return getAuthors();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case LibraryPackage.BOOK__TITLE:
- setTitle((String)newValue);
- return;
- case LibraryPackage.BOOK__PAGES:
- setPages((Integer)newValue);
- return;
- case LibraryPackage.BOOK__CATEGORY:
- getCategory().clear();
- getCategory().addAll((Collection<? extends BookCategory>)newValue);
- return;
- case LibraryPackage.BOOK__AUTHORS:
- getAuthors().clear();
- getAuthors().addAll((Collection<? extends Writer>)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case LibraryPackage.BOOK__TITLE:
- setTitle(TITLE_EDEFAULT);
- return;
- case LibraryPackage.BOOK__PAGES:
- setPages(PAGES_EDEFAULT);
- return;
- case LibraryPackage.BOOK__CATEGORY:
- getCategory().clear();
- return;
- case LibraryPackage.BOOK__AUTHORS:
- getAuthors().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case LibraryPackage.BOOK__TITLE:
- return TITLE_EDEFAULT == null ? title != null : !TITLE_EDEFAULT.equals(title);
- case LibraryPackage.BOOK__PAGES:
- return pages != PAGES_EDEFAULT;
- case LibraryPackage.BOOK__CATEGORY:
- return category != null && !category.isEmpty();
- case LibraryPackage.BOOK__AUTHORS:
- return authors != null && !authors.isEmpty();
- }
- 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(" (title: ");
- result.append(title);
- result.append(", pages: ");
- result.append(pages);
- result.append(", category: ");
- result.append(category);
- result.append(')');
- return result.toString();
- }
-
-} //BookImpl
diff --git a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/impl/LibraryFactoryImpl.java b/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/impl/LibraryFactoryImpl.java
deleted file mode 100644
index a78767b93..000000000
--- a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/impl/LibraryFactoryImpl.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/**
- */
-package org.eclipse.viatra.examples.library.impl;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EDataType;
-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.viatra.examples.library.*;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model <b>Factory</b>.
- * <!-- end-user-doc -->
- * @generated
- */
-public class LibraryFactoryImpl extends EFactoryImpl implements LibraryFactory {
- /**
- * Creates the default factory implementation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static LibraryFactory init() {
- try {
- LibraryFactory theLibraryFactory = (LibraryFactory)EPackage.Registry.INSTANCE.getEFactory(LibraryPackage.eNS_URI);
- if (theLibraryFactory != null) {
- return theLibraryFactory;
- }
- }
- catch (Exception exception) {
- EcorePlugin.INSTANCE.log(exception);
- }
- return new LibraryFactoryImpl();
- }
-
- /**
- * Creates an instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public LibraryFactoryImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EObject create(EClass eClass) {
- switch (eClass.getClassifierID()) {
- case LibraryPackage.LIBRARY: return createLibrary();
- case LibraryPackage.BOOK: return createBook();
- case LibraryPackage.WRITER: return createWriter();
- default:
- throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object createFromString(EDataType eDataType, String initialValue) {
- switch (eDataType.getClassifierID()) {
- case LibraryPackage.BOOK_CATEGORY:
- return createBookCategoryFromString(eDataType, initialValue);
- default:
- throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String convertToString(EDataType eDataType, Object instanceValue) {
- switch (eDataType.getClassifierID()) {
- case LibraryPackage.BOOK_CATEGORY:
- return convertBookCategoryToString(eDataType, instanceValue);
- default:
- throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Library createLibrary() {
- LibraryImpl library = new LibraryImpl();
- return library;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Book createBook() {
- BookImpl book = new BookImpl();
- return book;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Writer createWriter() {
- WriterImpl writer = new WriterImpl();
- return writer;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public BookCategory createBookCategoryFromString(EDataType eDataType, String initialValue) {
- BookCategory result = BookCategory.get(initialValue);
- if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
- return result;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String convertBookCategoryToString(EDataType eDataType, Object instanceValue) {
- return instanceValue == null ? null : instanceValue.toString();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public LibraryPackage getLibraryPackage() {
- return (LibraryPackage)getEPackage();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @deprecated
- * @generated
- */
- @Deprecated
- public static LibraryPackage getPackage() {
- return LibraryPackage.eINSTANCE;
- }
-
-} //LibraryFactoryImpl
diff --git a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/impl/LibraryImpl.java b/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/impl/LibraryImpl.java
deleted file mode 100644
index ca522c664..000000000
--- a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/impl/LibraryImpl.java
+++ /dev/null
@@ -1,391 +0,0 @@
-/**
- */
-package org.eclipse.viatra.examples.library.impl;
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
-
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-
-import org.eclipse.viatra.examples.library.Book;
-import org.eclipse.viatra.examples.library.Library;
-import org.eclipse.viatra.examples.library.LibraryPackage;
-import org.eclipse.viatra.examples.library.Writer;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Library</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * </p>
- * <ul>
- * <li>{@link org.eclipse.viatra.examples.library.impl.LibraryImpl#getAddress <em>Address</em>}</li>
- * <li>{@link org.eclipse.viatra.examples.library.impl.LibraryImpl#getWriters <em>Writers</em>}</li>
- * <li>{@link org.eclipse.viatra.examples.library.impl.LibraryImpl#getSumOfPages <em>Sum Of Pages</em>}</li>
- * <li>{@link org.eclipse.viatra.examples.library.impl.LibraryImpl#getBooks <em>Books</em>}</li>
- * <li>{@link org.eclipse.viatra.examples.library.impl.LibraryImpl#getInternalRequestCount <em>Internal Request Count</em>}</li>
- * <li>{@link org.eclipse.viatra.examples.library.impl.LibraryImpl#getRequestCount <em>Request Count</em>}</li>
- * <li>{@link org.eclipse.viatra.examples.library.impl.LibraryImpl#getSomeBooks <em>Some Books</em>}</li>
- * </ul>
- *
- * @generated
- */
-public class LibraryImpl extends MinimalEObjectImpl.Container implements Library {
- /**
- * The default value of the '{@link #getAddress() <em>Address</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getAddress()
- * @generated
- * @ordered
- */
- protected static final String ADDRESS_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getAddress() <em>Address</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getAddress()
- * @generated
- * @ordered
- */
- protected String address = ADDRESS_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getWriters() <em>Writers</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getWriters()
- * @generated
- * @ordered
- */
- protected EList<Writer> writers;
-
- /**
- * The default value of the '{@link #getSumOfPages() <em>Sum Of Pages</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSumOfPages()
- * @generated
- * @ordered
- */
- protected static final int SUM_OF_PAGES_EDEFAULT = 0;
-
- /**
- * The cached value of the '{@link #getBooks() <em>Books</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getBooks()
- * @generated
- * @ordered
- */
- protected EList<Book> books;
-
- /**
- * The default value of the '{@link #getInternalRequestCount() <em>Internal Request Count</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getInternalRequestCount()
- * @generated
- * @ordered
- */
- protected static final int INTERNAL_REQUEST_COUNT_EDEFAULT = 1;
-
- /**
- * The cached value of the '{@link #getInternalRequestCount() <em>Internal Request Count</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getInternalRequestCount()
- * @generated
- * @ordered
- */
- protected int internalRequestCount = INTERNAL_REQUEST_COUNT_EDEFAULT;
-
- /**
- * The default value of the '{@link #getRequestCount() <em>Request Count</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getRequestCount()
- * @generated
- * @ordered
- */
- protected static final int REQUEST_COUNT_EDEFAULT = 0;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected LibraryImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return LibraryPackage.Literals.LIBRARY;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getAddress() {
- return address;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setAddress(String newAddress) {
- String oldAddress = address;
- address = newAddress;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, LibraryPackage.LIBRARY__ADDRESS, oldAddress, address));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList<Writer> getWriters() {
- if (writers == null) {
- writers = new EObjectContainmentEList<Writer>(Writer.class, this, LibraryPackage.LIBRARY__WRITERS);
- }
- return writers;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public int getSumOfPages() {
- EList<Book> allBooks = getBooks();
- int sumOfPages = 0;
- for (Book book : allBooks) {
- sumOfPages += book.getPages();
- }
- return sumOfPages;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList<Book> getBooks() {
- if (books == null) {
- books = new EObjectContainmentEList<Book>(Book.class, this, LibraryPackage.LIBRARY__BOOKS);
- }
- return books;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public int getInternalRequestCount() {
- return internalRequestCount;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setInternalRequestCount(int newInternalRequestCount) {
- int oldInternalRequestCount = internalRequestCount;
- internalRequestCount = newInternalRequestCount;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, LibraryPackage.LIBRARY__INTERNAL_REQUEST_COUNT, oldInternalRequestCount, internalRequestCount));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public int getRequestCount() {
- internalRequestCount++;
- return internalRequestCount;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList<Book> getSomeBooks() {
- int count = internalRequestCount;
- java.util.List<Book> someBooks = new java.util.ArrayList<Book>();
-
- Book[] books = getBooks().toArray(new Book[0]);
- for (int i = 0; i < books.length; i++) {
- Book book = books[i];
- if(i%count == 0) {
- someBooks.add(book);
- }
- }
- return org.eclipse.emf.common.util.ECollections.asEList(someBooks);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case LibraryPackage.LIBRARY__WRITERS:
- return ((InternalEList<?>)getWriters()).basicRemove(otherEnd, msgs);
- case LibraryPackage.LIBRARY__BOOKS:
- return ((InternalEList<?>)getBooks()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case LibraryPackage.LIBRARY__ADDRESS:
- return getAddress();
- case LibraryPackage.LIBRARY__WRITERS:
- return getWriters();
- case LibraryPackage.LIBRARY__SUM_OF_PAGES:
- return getSumOfPages();
- case LibraryPackage.LIBRARY__BOOKS:
- return getBooks();
- case LibraryPackage.LIBRARY__INTERNAL_REQUEST_COUNT:
- return getInternalRequestCount();
- case LibraryPackage.LIBRARY__REQUEST_COUNT:
- return getRequestCount();
- case LibraryPackage.LIBRARY__SOME_BOOKS:
- return getSomeBooks();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case LibraryPackage.LIBRARY__ADDRESS:
- setAddress((String)newValue);
- return;
- case LibraryPackage.LIBRARY__WRITERS:
- getWriters().clear();
- getWriters().addAll((Collection<? extends Writer>)newValue);
- return;
- case LibraryPackage.LIBRARY__BOOKS:
- getBooks().clear();
- getBooks().addAll((Collection<? extends Book>)newValue);
- return;
- case LibraryPackage.LIBRARY__INTERNAL_REQUEST_COUNT:
- setInternalRequestCount((Integer)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case LibraryPackage.LIBRARY__ADDRESS:
- setAddress(ADDRESS_EDEFAULT);
- return;
- case LibraryPackage.LIBRARY__WRITERS:
- getWriters().clear();
- return;
- case LibraryPackage.LIBRARY__BOOKS:
- getBooks().clear();
- return;
- case LibraryPackage.LIBRARY__INTERNAL_REQUEST_COUNT:
- setInternalRequestCount(INTERNAL_REQUEST_COUNT_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case LibraryPackage.LIBRARY__ADDRESS:
- return ADDRESS_EDEFAULT == null ? address != null : !ADDRESS_EDEFAULT.equals(address);
- case LibraryPackage.LIBRARY__WRITERS:
- return writers != null && !writers.isEmpty();
- case LibraryPackage.LIBRARY__SUM_OF_PAGES:
- return getSumOfPages() != SUM_OF_PAGES_EDEFAULT;
- case LibraryPackage.LIBRARY__BOOKS:
- return books != null && !books.isEmpty();
- case LibraryPackage.LIBRARY__INTERNAL_REQUEST_COUNT:
- return internalRequestCount != INTERNAL_REQUEST_COUNT_EDEFAULT;
- case LibraryPackage.LIBRARY__REQUEST_COUNT:
- return getRequestCount() != REQUEST_COUNT_EDEFAULT;
- case LibraryPackage.LIBRARY__SOME_BOOKS:
- return !getSomeBooks().isEmpty();
- }
- 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(" (address: ");
- result.append(address);
- result.append(", internalRequestCount: ");
- result.append(internalRequestCount);
- result.append(')');
- return result.toString();
- }
-
-} //LibraryImpl
diff --git a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/impl/LibraryPackageImpl.java b/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/impl/LibraryPackageImpl.java
deleted file mode 100644
index 605380fdf..000000000
--- a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/impl/LibraryPackageImpl.java
+++ /dev/null
@@ -1,402 +0,0 @@
-/**
- */
-package org.eclipse.viatra.examples.library.impl;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EEnum;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-
-import org.eclipse.emf.ecore.impl.EPackageImpl;
-
-import org.eclipse.viatra.examples.library.Book;
-import org.eclipse.viatra.examples.library.BookCategory;
-import org.eclipse.viatra.examples.library.Library;
-import org.eclipse.viatra.examples.library.LibraryFactory;
-import org.eclipse.viatra.examples.library.LibraryPackage;
-import org.eclipse.viatra.examples.library.Writer;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model <b>Package</b>.
- * <!-- end-user-doc -->
- * @generated
- */
-public class LibraryPackageImpl extends EPackageImpl implements LibraryPackage {
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass libraryEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass bookEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass writerEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EEnum bookCategoryEEnum = 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.viatra.examples.library.LibraryPackage#eNS_URI
- * @see #init()
- * @generated
- */
- private LibraryPackageImpl() {
- super(eNS_URI, LibraryFactory.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.
- *
- * <p>This method is used to initialize {@link LibraryPackage#eINSTANCE} when that field is accessed.
- * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #eNS_URI
- * @see #createPackageContents()
- * @see #initializePackageContents()
- * @generated
- */
- public static LibraryPackage init() {
- if (isInited) return (LibraryPackage)EPackage.Registry.INSTANCE.getEPackage(LibraryPackage.eNS_URI);
-
- // Obtain or create and register package
- LibraryPackageImpl theLibraryPackage = (LibraryPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof LibraryPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new LibraryPackageImpl());
-
- isInited = true;
-
- // Create package meta-data objects
- theLibraryPackage.createPackageContents();
-
- // Initialize created meta-data
- theLibraryPackage.initializePackageContents();
-
- // Mark meta-data to indicate it can't be changed
- theLibraryPackage.freeze();
-
-
- // Update the registry and return the package
- EPackage.Registry.INSTANCE.put(LibraryPackage.eNS_URI, theLibraryPackage);
- return theLibraryPackage;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getLibrary() {
- return libraryEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getLibrary_Address() {
- return (EAttribute)libraryEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getLibrary_Writers() {
- return (EReference)libraryEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getLibrary_SumOfPages() {
- return (EAttribute)libraryEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getLibrary_Books() {
- return (EReference)libraryEClass.getEStructuralFeatures().get(3);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getLibrary_InternalRequestCount() {
- return (EAttribute)libraryEClass.getEStructuralFeatures().get(4);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getLibrary_RequestCount() {
- return (EAttribute)libraryEClass.getEStructuralFeatures().get(5);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getLibrary_SomeBooks() {
- return (EReference)libraryEClass.getEStructuralFeatures().get(6);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getBook() {
- return bookEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getBook_Title() {
- return (EAttribute)bookEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getBook_Pages() {
- return (EAttribute)bookEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getBook_Category() {
- return (EAttribute)bookEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getBook_Authors() {
- return (EReference)bookEClass.getEStructuralFeatures().get(3);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getWriter() {
- return writerEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getWriter_Books() {
- return (EReference)writerEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getWriter_FirstBook() {
- return (EReference)writerEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getWriter_ScifiBooks() {
- return (EReference)writerEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getWriter_Name() {
- return (EAttribute)writerEClass.getEStructuralFeatures().get(3);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EEnum getBookCategory() {
- return bookCategoryEEnum;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public LibraryFactory getLibraryFactory() {
- return (LibraryFactory)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
- libraryEClass = createEClass(LIBRARY);
- createEAttribute(libraryEClass, LIBRARY__ADDRESS);
- createEReference(libraryEClass, LIBRARY__WRITERS);
- createEAttribute(libraryEClass, LIBRARY__SUM_OF_PAGES);
- createEReference(libraryEClass, LIBRARY__BOOKS);
- createEAttribute(libraryEClass, LIBRARY__INTERNAL_REQUEST_COUNT);
- createEAttribute(libraryEClass, LIBRARY__REQUEST_COUNT);
- createEReference(libraryEClass, LIBRARY__SOME_BOOKS);
-
- bookEClass = createEClass(BOOK);
- createEAttribute(bookEClass, BOOK__TITLE);
- createEAttribute(bookEClass, BOOK__PAGES);
- createEAttribute(bookEClass, BOOK__CATEGORY);
- createEReference(bookEClass, BOOK__AUTHORS);
-
- writerEClass = createEClass(WRITER);
- createEReference(writerEClass, WRITER__BOOKS);
- createEReference(writerEClass, WRITER__FIRST_BOOK);
- createEReference(writerEClass, WRITER__SCIFI_BOOKS);
- createEAttribute(writerEClass, WRITER__NAME);
-
- // Create enums
- bookCategoryEEnum = createEEnum(BOOK_CATEGORY);
- }
-
- /**
- * <!-- 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);
-
- // Create type parameters
-
- // Set bounds for type parameters
-
- // Add supertypes to classes
-
- // Initialize classes, features, and operations; add parameters
- initEClass(libraryEClass, Library.class, "Library", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getLibrary_Address(), ecorePackage.getEString(), "address", null, 0, 1, Library.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getLibrary_Writers(), this.getWriter(), null, "writers", null, 0, -1, Library.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getLibrary_SumOfPages(), ecorePackage.getEInt(), "sumOfPages", null, 0, 1, Library.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
- initEReference(getLibrary_Books(), this.getBook(), null, "books", null, 0, -1, Library.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getLibrary_InternalRequestCount(), ecorePackage.getEInt(), "internalRequestCount", "1", 0, 1, Library.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getLibrary_RequestCount(), ecorePackage.getEInt(), "requestCount", null, 0, 1, Library.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
- initEReference(getLibrary_SomeBooks(), this.getBook(), null, "someBooks", null, 0, -1, Library.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
-
- initEClass(bookEClass, Book.class, "Book", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getBook_Title(), ecorePackage.getEString(), "title", null, 0, 1, Book.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getBook_Pages(), ecorePackage.getEInt(), "pages", null, 0, 1, Book.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getBook_Category(), this.getBookCategory(), "category", null, 0, -1, Book.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getBook_Authors(), this.getWriter(), this.getWriter_Books(), "authors", null, 0, -1, Book.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(writerEClass, Writer.class, "Writer", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getWriter_Books(), this.getBook(), this.getBook_Authors(), "books", null, 0, -1, Writer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getWriter_FirstBook(), this.getBook(), null, "firstBook", null, 0, 1, Writer.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
- initEReference(getWriter_ScifiBooks(), this.getBook(), null, "scifiBooks", null, 0, -1, Writer.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
- initEAttribute(getWriter_Name(), ecorePackage.getEString(), "name", null, 0, 1, Writer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- // Initialize enums and add enum literals
- initEEnum(bookCategoryEEnum, BookCategory.class, "BookCategory");
- addEEnumLiteral(bookCategoryEEnum, BookCategory.DRAMA);
- addEEnumLiteral(bookCategoryEEnum, BookCategory.HISTORY);
- addEEnumLiteral(bookCategoryEEnum, BookCategory.ART);
- addEEnumLiteral(bookCategoryEEnum, BookCategory.SCI_FI);
-
- // Create resource
- createResource(eNS_URI);
- }
-
-} //LibraryPackageImpl
diff --git a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/impl/WriterImpl.java b/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/impl/WriterImpl.java
deleted file mode 100644
index 6f3df2a20..000000000
--- a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/impl/WriterImpl.java
+++ /dev/null
@@ -1,287 +0,0 @@
-/**
- */
-package org.eclipse.viatra.examples.library.impl;
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
-
-import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-
-import org.eclipse.viatra.examples.library.Book;
-import org.eclipse.viatra.examples.library.LibraryPackage;
-import org.eclipse.viatra.examples.library.Writer;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Writer</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * </p>
- * <ul>
- * <li>{@link org.eclipse.viatra.examples.library.impl.WriterImpl#getBooks <em>Books</em>}</li>
- * <li>{@link org.eclipse.viatra.examples.library.impl.WriterImpl#getFirstBook <em>First Book</em>}</li>
- * <li>{@link org.eclipse.viatra.examples.library.impl.WriterImpl#getScifiBooks <em>Scifi Books</em>}</li>
- * <li>{@link org.eclipse.viatra.examples.library.impl.WriterImpl#getName <em>Name</em>}</li>
- * </ul>
- *
- * @generated
- */
-public class WriterImpl extends MinimalEObjectImpl.Container implements Writer {
- /**
- * The cached value of the '{@link #getBooks() <em>Books</em>}' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getBooks()
- * @generated
- * @ordered
- */
- protected EList<Book> books;
-
- /**
- * The default value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected static final String NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected String name = NAME_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected WriterImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return LibraryPackage.Literals.WRITER;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList<Book> getBooks() {
- if (books == null) {
- books = new EObjectWithInverseResolvingEList.ManyInverse<Book>(Book.class, this, LibraryPackage.WRITER__BOOKS, LibraryPackage.BOOK__AUTHORS);
- }
- return books;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Book getFirstBook() {
- Book firstBook = basicGetFirstBook();
- return firstBook != null && firstBook.eIsProxy() ? (Book)eResolveProxy((InternalEObject)firstBook) : firstBook;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Book basicGetFirstBook() {
- EList<Book> allBooks = getBooks();
- if(!allBooks.isEmpty()){
- return allBooks.get(0);
- }
- return null;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList<Book> getScifiBooks() {
- EList<Book> allBooks = getBooks();
- java.util.List<Book> scifiBooks = new java.util.ArrayList<Book>();
- for (Book book : allBooks) {
- if(book.getCategory().contains(org.eclipse.viatra.examples.library.BookCategory.SCI_FI)) {
- scifiBooks.add(book);
- }
- }
- return org.eclipse.emf.common.util.ECollections.asEList(scifiBooks);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getName() {
- return name;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setName(String newName) {
- String oldName = name;
- name = newName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, LibraryPackage.WRITER__NAME, oldName, name));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case LibraryPackage.WRITER__BOOKS:
- return ((InternalEList<InternalEObject>)(InternalEList<?>)getBooks()).basicAdd(otherEnd, msgs);
- }
- return super.eInverseAdd(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case LibraryPackage.WRITER__BOOKS:
- return ((InternalEList<?>)getBooks()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case LibraryPackage.WRITER__BOOKS:
- return getBooks();
- case LibraryPackage.WRITER__FIRST_BOOK:
- if (resolve) return getFirstBook();
- return basicGetFirstBook();
- case LibraryPackage.WRITER__SCIFI_BOOKS:
- return getScifiBooks();
- case LibraryPackage.WRITER__NAME:
- return getName();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case LibraryPackage.WRITER__BOOKS:
- getBooks().clear();
- getBooks().addAll((Collection<? extends Book>)newValue);
- return;
- case LibraryPackage.WRITER__NAME:
- setName((String)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case LibraryPackage.WRITER__BOOKS:
- getBooks().clear();
- return;
- case LibraryPackage.WRITER__NAME:
- setName(NAME_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case LibraryPackage.WRITER__BOOKS:
- return books != null && !books.isEmpty();
- case LibraryPackage.WRITER__FIRST_BOOK:
- return basicGetFirstBook() != null;
- case LibraryPackage.WRITER__SCIFI_BOOKS:
- return !getScifiBooks().isEmpty();
- case LibraryPackage.WRITER__NAME:
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- }
- 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(" (name: ");
- result.append(name);
- result.append(')');
- return result.toString();
- }
-
-} //WriterImpl
diff --git a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/util/LibraryAdapterFactory.java b/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/util/LibraryAdapterFactory.java
deleted file mode 100644
index 3b2ee05c6..000000000
--- a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/util/LibraryAdapterFactory.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/**
- */
-package org.eclipse.viatra.examples.library.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.viatra.examples.library.*;
-
-/**
- * <!-- 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.viatra.examples.library.LibraryPackage
- * @generated
- */
-public class LibraryAdapterFactory extends AdapterFactoryImpl {
- /**
- * The cached model package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected static LibraryPackage modelPackage;
-
- /**
- * Creates an instance of the adapter factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public LibraryAdapterFactory() {
- if (modelPackage == null) {
- modelPackage = LibraryPackage.eINSTANCE;
- }
- }
-
- /**
- * Returns whether this factory is applicable for the type of the object.
- * <!-- begin-user-doc -->
- * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
- * <!-- end-user-doc -->
- * @return whether this factory is applicable for the type of the object.
- * @generated
- */
- @Override
- public boolean isFactoryForType(Object object) {
- if (object == modelPackage) {
- return true;
- }
- if (object instanceof EObject) {
- return ((EObject)object).eClass().getEPackage() == modelPackage;
- }
- return false;
- }
-
- /**
- * The switch that delegates to the <code>createXXX</code> methods.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected LibrarySwitch<Adapter> modelSwitch =
- new LibrarySwitch<Adapter>() {
- @Override
- public Adapter caseLibrary(Library object) {
- return createLibraryAdapter();
- }
- @Override
- public Adapter caseBook(Book object) {
- return createBookAdapter();
- }
- @Override
- public Adapter caseWriter(Writer object) {
- return createWriterAdapter();
- }
- @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.viatra.examples.library.Library <em>Library</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.viatra.examples.library.Library
- * @generated
- */
- public Adapter createLibraryAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.viatra.examples.library.Book <em>Book</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.viatra.examples.library.Book
- * @generated
- */
- public Adapter createBookAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.viatra.examples.library.Writer <em>Writer</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.viatra.examples.library.Writer
- * @generated
- */
- public Adapter createWriterAdapter() {
- 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;
- }
-
-} //LibraryAdapterFactory
diff --git a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/util/LibrarySwitch.java b/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/util/LibrarySwitch.java
deleted file mode 100644
index eb535b379..000000000
--- a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/util/LibrarySwitch.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/**
- */
-package org.eclipse.viatra.examples.library.util;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-
-import org.eclipse.emf.ecore.util.Switch;
-
-import org.eclipse.viatra.examples.library.*;
-
-/**
- * <!-- 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.viatra.examples.library.LibraryPackage
- * @generated
- */
-public class LibrarySwitch<T> extends Switch<T> {
- /**
- * The cached model package
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected static LibraryPackage modelPackage;
-
- /**
- * Creates an instance of the switch.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public LibrarySwitch() {
- if (modelPackage == null) {
- modelPackage = LibraryPackage.eINSTANCE;
- }
- }
-
- /**
- * Checks whether this is a switch for the given package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param ePackage the package in question.
- * @return whether this is a switch for the given package.
- * @generated
- */
- @Override
- protected boolean isSwitchFor(EPackage ePackage) {
- return ePackage == modelPackage;
- }
-
- /**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the first non-null result returned by a <code>caseXXX</code> call.
- * @generated
- */
- @Override
- protected T doSwitch(int classifierID, EObject theEObject) {
- switch (classifierID) {
- case LibraryPackage.LIBRARY: {
- Library library = (Library)theEObject;
- T result = caseLibrary(library);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case LibraryPackage.BOOK: {
- Book book = (Book)theEObject;
- T result = caseBook(book);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case LibraryPackage.WRITER: {
- Writer writer = (Writer)theEObject;
- T result = caseWriter(writer);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- default: return defaultCase(theEObject);
- }
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Library</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>Library</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseLibrary(Library object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Book</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>Book</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseBook(Book object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Writer</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>Writer</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseWriter(Writer object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch, but this is the last case anyway.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject)
- * @generated
- */
- @Override
- public T defaultCase(EObject object) {
- return null;
- }
-
-} //LibrarySwitch
diff --git a/examples/minilibrary/org.eclipse.viatra.examples.library/model/library.ecore b/examples/minilibrary/org.eclipse.viatra.examples.library/model/library.ecore
deleted file mode 100644
index 68ca374be..000000000
--- a/examples/minilibrary/org.eclipse.viatra.examples.library/model/library.ecore
+++ /dev/null
@@ -1,68 +0,0 @@
-<?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="library" nsURI="http://www.eclipse.org/viatra/examples/library/1.0"
- nsPrefix="vlibrary">
- <eClassifiers xsi:type="ecore:EClass" name="Library">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="address" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="writers" upperBound="-1"
- eType="#//Writer" containment="true"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="sumOfPages" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"
- changeable="false" volatile="true" transient="true" derived="true">
- <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
- <details key="get" value="EList&lt;Book> allBooks = getBooks();&#xD;&#xA;int sumOfPages = 0;&#xD;&#xA;for (Book book : allBooks) {&#xD;&#xA; sumOfPages += book.getPages();&#xD;&#xA;}&#xD;&#xA;return sumOfPages;"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="books" upperBound="-1"
- eType="#//Book" containment="true"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="internalRequestCount" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"
- transient="true" defaultValueLiteral="1">
- <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
- <details key="suppressedGetVisibility" value="true"/>
- <details key="suppressedSetVisibility" value="true"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="requestCount" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"
- changeable="false" volatile="true" transient="true" derived="true">
- <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
- <details key="get" value="internalRequestCount++;&#xD;&#xA;return internalRequestCount;"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="someBooks" upperBound="-1"
- eType="#//Book" changeable="false" volatile="true" transient="true" derived="true">
- <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
- <details key="get" value="int count = internalRequestCount;&#xD;&#xA;java.util.List&lt;Book> someBooks = new java.util.ArrayList&lt;Book>();&#xD;&#xA;&#xD;&#xA;Book[] books = getBooks().toArray(new Book[0]);&#xD;&#xA;for (int i = 0; i &lt; books.length; i++) {&#xD;&#xA; Book book = books[i];&#xD;&#xA; if(i%count == 0) {&#xD;&#xA; someBooks.add(book);&#xD;&#xA; }&#xD;&#xA;}&#xD;&#xA;return org.eclipse.emf.common.util.ECollections.asEList(someBooks);"/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="Book">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="title" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="pages" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="category" upperBound="-1"
- eType="#//BookCategory"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="authors" upperBound="-1"
- eType="#//Writer" eOpposite="#//Writer/books"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="Writer">
- <eStructuralFeatures xsi:type="ecore:EReference" name="books" upperBound="-1"
- eType="#//Book" eOpposite="#//Book/authors"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="firstBook" eType="#//Book"
- changeable="false" volatile="true" transient="true" derived="true">
- <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
- <details key="get" value="EList&lt;Book> allBooks = getBooks();&#xD;&#xA;if(!allBooks.isEmpty()){&#xD;&#xA; return allBooks.get(0);&#xD;&#xA;}&#xD;&#xA;return null;"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="scifiBooks" upperBound="-1"
- eType="#//Book" changeable="false" volatile="true" transient="true" derived="true">
- <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
- <details key="get" value="EList&lt;Book> allBooks = getBooks();&#xD;&#xA;java.util.List&lt;Book> scifiBooks = new java.util.ArrayList&lt;Book>();&#xD;&#xA;for (Book book : allBooks) {&#xD;&#xA; if(book.getCategory().contains(org.eclipse.viatra.examples.library.BookCategory.SCI_FI)) {&#xD;&#xA; scifiBooks.add(book);&#xD;&#xA; }&#xD;&#xA;}&#xD;&#xA;return org.eclipse.emf.common.util.ECollections.asEList(scifiBooks);"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EEnum" name="BookCategory">
- <eLiterals name="Drama"/>
- <eLiterals name="History" value="1"/>
- <eLiterals name="Art" value="2"/>
- <eLiterals name="SciFi" value="3"/>
- </eClassifiers>
-</ecore:EPackage>
diff --git a/examples/minilibrary/org.eclipse.viatra.examples.library/model/library.genmodel b/examples/minilibrary/org.eclipse.viatra.examples.library/model/library.genmodel
deleted file mode 100644
index ec76b3925..000000000
--- a/examples/minilibrary/org.eclipse.viatra.examples.library/model/library.genmodel
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
- xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.eclipse.viatra.examples.library/emf-gen" editDirectory="/org.eclipse.viatra.examples.library.edit/emf-gen"
- editorDirectory="/org.eclipse.viatra.examples.library.editor/emf-gen" modelPluginID="org.eclipse.viatra.examples.library"
- modelName="Library" modelPluginClass="" editPluginClass="org.eclipse.viatra.examples.library.provider.LibraryEditPlugin"
- editorPluginClass="org.eclipse.viatra.examples.library.presentation.LibraryEditorPlugin"
- rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container" testsDirectory="org.eclipse.viatra.examples.library.tests/emf-gen"
- testSuiteClass="org.eclipse.viatra.examples.library.tests.LibraryAllTests" importerID="org.eclipse.emf.importer.ecore"
- complianceLevel="7.0" copyrightFields="false" editPluginID="org.eclipse.viatra.examples.library.edit"
- editorPluginID="org.eclipse.viatra.examples.library.editor" runtimeVersion="2.10"
- operationReflection="true" importOrganizing="true">
- <foreignModel>library.ecore</foreignModel>
- <genPackages prefix="Library" basePackage="org.eclipse.viatra.examples" disposableProviderFactory="true"
- ecorePackage="library.ecore#/">
- <genEnums typeSafeEnumCompatible="false" ecoreEnum="library.ecore#//BookCategory">
- <genEnumLiterals ecoreEnumLiteral="library.ecore#//BookCategory/Drama"/>
- <genEnumLiterals ecoreEnumLiteral="library.ecore#//BookCategory/History"/>
- <genEnumLiterals ecoreEnumLiteral="library.ecore#//BookCategory/Art"/>
- <genEnumLiterals ecoreEnumLiteral="library.ecore#//BookCategory/SciFi"/>
- </genEnums>
- <genClasses ecoreClass="library.ecore#//Library">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute library.ecore#//Library/address"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference library.ecore#//Library/writers"/>
- <genFeatures property="Readonly" createChild="false" ecoreFeature="ecore:EAttribute library.ecore#//Library/sumOfPages"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference library.ecore#//Library/books"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute library.ecore#//Library/internalRequestCount"/>
- <genFeatures property="Readonly" createChild="false" ecoreFeature="ecore:EAttribute library.ecore#//Library/requestCount"/>
- <genFeatures property="Readonly" notify="false" createChild="false" ecoreFeature="ecore:EReference library.ecore#//Library/someBooks"/>
- </genClasses>
- <genClasses ecoreClass="library.ecore#//Book">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute library.ecore#//Book/title"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute library.ecore#//Book/pages"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute library.ecore#//Book/category"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference library.ecore#//Book/authors"/>
- </genClasses>
- <genClasses ecoreClass="library.ecore#//Writer">
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference library.ecore#//Writer/books"/>
- <genFeatures property="Readonly" notify="false" createChild="false" ecoreFeature="ecore:EReference library.ecore#//Writer/firstBook"/>
- <genFeatures property="Readonly" notify="false" createChild="false" ecoreFeature="ecore:EReference library.ecore#//Writer/scifiBooks"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute library.ecore#//Writer/name"/>
- </genClasses>
- </genPackages>
-</genmodel:GenModel>
diff --git a/examples/minilibrary/org.eclipse.viatra.examples.library/plugin.properties b/examples/minilibrary/org.eclipse.viatra.examples.library/plugin.properties
deleted file mode 100644
index 5e38cc168..000000000
--- a/examples/minilibrary/org.eclipse.viatra.examples.library/plugin.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-#
-
-pluginName = Library Model
-providerName = www.example.org
diff --git a/examples/minilibrary/org.eclipse.viatra.examples.library/plugin.xml b/examples/minilibrary/org.eclipse.viatra.examples.library/plugin.xml
deleted file mode 100644
index b9e0450f7..000000000
--- a/examples/minilibrary/org.eclipse.viatra.examples.library/plugin.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-
-<!--
--->
-
-<plugin>
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <!-- @generated library -->
- <package
- uri="http://www.eclipse.org/viatra/examples/library/1.0"
- class="org.eclipse.viatra.examples.library.LibraryPackage"
- genModel="model/library.genmodel"/>
- </extension>
-
-</plugin>

Back to the top