summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjmusset2009-03-05 11:33:16 (EST)
committer jmusset2009-03-05 11:33:16 (EST)
commita899a7612649bd5fc8fa3769da94b4057276f97f (patch)
tree1ab57cfa61cbcc1420b220d1c37c3d1beb14d000
parentfebae53978c8975c54de6a55e3e3d1c0bb51434b (diff)
downloadorg.eclipse.acceleo-a899a7612649bd5fc8fa3769da94b4057276f97f.zip
org.eclipse.acceleo-a899a7612649bd5fc8fa3769da94b4057276f97f.tar.gz
org.eclipse.acceleo-a899a7612649bd5fc8fa3769da94b4057276f97f.tar.bz2
Project renaming from MTL to Acceleo
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/.classpath8
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/.project28
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/META-INF/MANIFEST.MF25
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/about.html57
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/build.properties23
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/data/model/Library.xmi7
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/data/template/cstParserLibrary2text.mtl48
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/data/template/mtlIndentStrategy.mtl32
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/data/template/mtlParserEcore.mtl21
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/data/template/mtlParserEcoreCommon.emtl261
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/data/template/mtlParserEcoreCommon.mtl4
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/data/template/mtlParserLibrary2text.emtl822
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/data/template/mtlParserLibrary2text.mtl50
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/model/extlibrary.ecore108
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/model/extlibrary.genmodel74
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/plugin.properties24
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/plugin.xml30
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/Addressable.java57
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/AudioVisualItem.java112
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/Book.java172
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/BookCategory.java237
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/BookOnTape.java83
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/Borrower.java49
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/CirculatingItem.java22
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/Employee.java55
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/ExtlibraryFactory.java102
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/ExtlibraryPackage.java1856
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/Item.java58
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/Lendable.java78
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/Library.java214
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/Periodical.java83
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/Person.java83
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/VideoCassette.java46
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/Writer.java77
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/AudioVisualItemImpl.java283
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/BookImpl.java454
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/BookOnTapeImpl.java233
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/BorrowerImpl.java170
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/CirculatingItemImpl.java286
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/EmployeeImpl.java165
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/ExtlibraryFactoryImpl.java249
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/ExtlibraryPackageImpl.java925
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/ItemImpl.java174
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/LibraryImpl.java575
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/PeriodicalImpl.java227
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/PersonImpl.java284
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/VideoCassetteImpl.java137
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/WriterImpl.java213
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/util/ExtlibraryAdapterFactory.java381
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/util/ExtlibraryResourceFactoryImpl.java54
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/util/ExtlibraryResourceImpl.java34
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/util/ExtlibrarySwitch.java514
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/util/ExtlibraryXMLProcessor.java54
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/src/org/eclipse/acceleo/parser/tests/AcceleoParserTests.java184
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/src/org/eclipse/acceleo/parser/tests/cst/CSTParserBlockTests.java264
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/src/org/eclipse/acceleo/parser/tests/cst/CSTParserTests.java225
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/src/org/eclipse/acceleo/parser/tests/cst/utils/FileContentTests.java51
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/src/org/eclipse/acceleo/parser/tests/cst/utils/SequenceTests.java53
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/src/org/eclipse/acceleo/parser/tests/suite/AllTests.java55
-rw-r--r--tests/org.eclipse.acceleo.parser.tests/test.xml66
61 files changed, 11323 insertions, 0 deletions
diff --git a/tests/org.eclipse.acceleo.parser.tests/.classpath b/tests/org.eclipse.acceleo.parser.tests/.classpath
new file mode 100644
index 0000000..59cf397
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="src-gen"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/tests/org.eclipse.acceleo.parser.tests/.project b/tests/org.eclipse.acceleo.parser.tests/.project
new file mode 100644
index 0000000..4fd0627
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.acceleo.parser.tests</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.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/tests/org.eclipse.acceleo.parser.tests/.settings/org.eclipse.jdt.core.prefs b/tests/org.eclipse.acceleo.parser.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..279992b
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+#Thu May 29 17:53:55 CEST 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/tests/org.eclipse.acceleo.parser.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.acceleo.parser.tests/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..6b3df99
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,25 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.acceleo.parser.tests; singleton:=true
+Bundle-Version: 0.8.0.qualifier
+Bundle-ClassPath: .
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.emf.ecore,
+ org.eclipse.emf.ecore.xmi,
+ org.eclipse.ocl.ecore,
+ org.eclipse.acceleo.model,
+ org.eclipse.acceleo.parser,
+ org.junit,
+ org.eclipse.acceleo.common
+Eclipse-LazyStart: true
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.acceleo.parser.tests,
+ org.eclipse.acceleo.parser.tests.cst,
+ org.eclipse.acceleo.parser.tests.cst.utils,
+ org.eclipse.acceleo.parser.tests.extlibrary,
+ org.eclipse.acceleo.parser.tests.extlibrary.impl,
+ org.eclipse.acceleo.parser.tests.extlibrary.util
diff --git a/tests/org.eclipse.acceleo.parser.tests/about.html b/tests/org.eclipse.acceleo.parser.tests/about.html
new file mode 100644
index 0000000..7e1117e
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/about.html
@@ -0,0 +1,57 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>About</title>
+</head><body lang="EN-US">
+<h2>About This Content</h2>
+
+<em>July 25, 2008</em></p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+
+ <h3>Third Party Content</h3>
+ <p>The Content includes items that have been sourced from third parties as set out below. If you
+ did not receive this Content directly from the Eclipse Foundation, the following is provided
+ for informational purposes only, and you should look to the Redistributor's license for
+ terms and conditions of use.</p>
+ <p><em>
+ <br><br>
+ <strong>OMG MOF 2.0 Specification (06-01-01)</strong> <br>
+ <ul>
+ <li><a href="http://www.omg.org/technology/documents/formal/mof.htm">MOF 2.0 main page</a></li>
+ <li><a href="http://www.omg.org/docs/formal/06-01-01.pdf">MOF 2.0 specification</a></li>
+ <li><a href="http://www.omg.org/">OMG site</a></li>
+ </ul>
+ <br>
+ <strong>OMG OCL 2.0 specification (06-05-01)</strong> <br>
+ <ul>
+ <li><a href="http://www.omg.org/technology/documents/formal/ocl.htm">OCL 2.0 main page</a></li>
+ <li><a href="http://www.omg.org/docs/formal/06-05-01.pdf">OCL 2.0 specification</a></li>
+ <li><a href="http://www.omg.org/">OMG site</a></li>
+ </ul>
+ <br>
+ <strong>OMG MTL 1.0 specification (08-01-16)</strong> <br>
+ <ul>
+ <li><a href="http://www.omg.org/spec/MOFM2T/1.0/">MTL 1.0 main page</a></li>
+ <li><a href="http://www.omg.org/spec/MOFM2T/1.0/PDF">MTL 1.0 specification</a></li>
+ <li><a href="http://www.omg.org/">OMG site</a></li>
+ </ul>
+ <br>
+ </em></p>
+ <p>A detailed list of fixes and clarifications with respect to those specifications may be found in the plug-in directly realizing them.</p>
+</body></html> \ No newline at end of file
diff --git a/tests/org.eclipse.acceleo.parser.tests/build.properties b/tests/org.eclipse.acceleo.parser.tests/build.properties
new file mode 100644
index 0000000..74eb94a
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/build.properties
@@ -0,0 +1,23 @@
+################################################################################
+# Copyright (c) 2008, 2009 Obeo.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Obeo - initial API and implementation
+################################################################################
+bin.includes = .,\
+ model/,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties,\
+ test.xml,\
+ data/,\
+ about.html
+jars.compile.order = .
+source.. = src/,\
+ src-gen/
+output.. = bin/
+Bundle-ClassPath: .
diff --git a/tests/org.eclipse.acceleo.parser.tests/data/model/Library.xmi b/tests/org.eclipse.acceleo.parser.tests/data/model/Library.xmi
new file mode 100644
index 0000000..9e67c46
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/data/model/Library.xmi
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="ASCII"?>
+<extlib:Library xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:extlib="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0" xsi:schemaLocation="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0" name="MyLibrary">
+ <books xsi:type="extlib:Book" title="Brida" author="//@writers.0"/>
+ <books xsi:type="extlib:Book" title="The Hollow" author="//@writers.1"/>
+ <writers firstName="Paulo" lastName="Coelho" books="//@books.0"/>
+ <writers firstName="Norah" lastName="Roberts" books="//@books.1"/>
+</extlib:Library>
diff --git a/tests/org.eclipse.acceleo.parser.tests/data/template/cstParserLibrary2text.mtl b/tests/org.eclipse.acceleo.parser.tests/data/template/cstParserLibrary2text.mtl
new file mode 100644
index 0000000..cd88e21
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/data/template/cstParserLibrary2text.mtl
@@ -0,0 +1,48 @@
+[module cstParserLibrary2text(http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0)/]
+[import mtlParserLibrary2text/]
+
+[comment MyComment /]
+
+[comment]
+ MyComment
+[/comment]
+
+[template public bookToText(b : Book, l : Library) overrides bookToText]
+
+Book : [b.title/]
+
+[if (1 = l.writers->size())]
+ [if (b.name = '')]
+ aaa
+ [elseif (b.name = '')]
+ bbb
+ [else]
+ ccc
+ [/if]
+[/if]
+
+[for (w : Writer | l.writers)]
+ ddd[w.name/]
+[/for]
+
+[file ('',false)]
+[/file]
+
+[trace]
+[/trace]
+
+[let w:Writer]
+[/let]
+
+[protected ('identifier')]
+[/protected]
+
+[protected ('identifier')/]
+
+[/template]
+
+[macro toLowerCase(s:String):String ]
+return [s/].toLowerCase();
+[/macro]
+
+[query myQuery(w:Writer):Writer=w/]
diff --git a/tests/org.eclipse.acceleo.parser.tests/data/template/mtlIndentStrategy.mtl b/tests/org.eclipse.acceleo.parser.tests/data/template/mtlIndentStrategy.mtl
new file mode 100644
index 0000000..4d5780f
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/data/template/mtlIndentStrategy.mtl
@@ -0,0 +1,32 @@
+[module mtlIndentStrategy(http://www.eclipse.org/emf/2002/Ecore) /]
+
+[template public indent(p:EPackage)]
+
+[indent2()/]
+ [for (c:EClassifier | p.eClassifiers)]
+ [c.name/]
+ [/for]
+ [for (c:EClassifier | p.eClassifiers)]
+ [c.name/]
+ [/for]
+
+[/template]
+
+[template public indent2(p:EPackage) ]
+ [p.name/]
+ [if (p.name <> '')]
+ [p.name/]
+ [else]
+ [if (p.name <> '')]
+ [p.name/]
+ [else]
+ [p.name/]
+ [/if]
+ [/if]
+
+ [protected (p.name)]
+ [p.name/]
+ [/protected]
+
+[/template]
+
diff --git a/tests/org.eclipse.acceleo.parser.tests/data/template/mtlParserEcore.mtl b/tests/org.eclipse.acceleo.parser.tests/data/template/mtlParserEcore.mtl
new file mode 100644
index 0000000..86a27c8
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/data/template/mtlParserEcore.mtl
@@ -0,0 +1,21 @@
+[module mtlParserEcore(http://www.eclipse.org/emf/2002/Ecore) extends mtlParserEcoreCommon /]
+[import mtlParserEcoreCommon/]
+[template public classToJava(p:EPackage)]
+
+ [for (c:EClassifier | p.eClassifiers) {count : Integer = 0; }]
+ // This InitSection is taken from one of the spec's examples and should be allowed
+ [/for]
+
+ [for (c:EClassifier | p.eClassifiers) separator(',')]
+ // The separator above isn't parsed as expected.
+ // Looks like the for condition is parsed as being the "last parentheses" of the for line
+ [/for]
+
+ [p.name.toLowerFirst1() before('') separator('\n') after ('') /]
+
+[/template]
+
+[template public toLowerFirst1(s:String) overrides toUFirst ]
+ // Parsing this fails in NPE since we cannot define templates on primitive types
+ [s.substring(1,1).toLower().concat(s.substring(2, s.size()))/]
+[/template] \ No newline at end of file
diff --git a/tests/org.eclipse.acceleo.parser.tests/data/template/mtlParserEcoreCommon.emtl b/tests/org.eclipse.acceleo.parser.tests/data/template/mtlParserEcoreCommon.emtl
new file mode 100644
index 0000000..2995fa9
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/data/template/mtlParserEcoreCommon.emtl
@@ -0,0 +1,261 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI 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" xmlns:mtl="http://www.eclipse.org/acceleo/mtl/0.8.0" xmlns:ocl.ecore="http://www.eclipse.org/ocl/1.1.0/Ecore">
+ <mtl:Module name="mtlParserEcoreCommon">
+ <input>
+ <takesTypesFrom href="http://www.eclipse.org/emf/2002/Ecore#/"/>
+ </input>
+ <ownedModuleElement xsi:type="mtl:Template" name="toUFirst" visibility="Public">
+ <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="&#x9;"/>
+ <body xsi:type="ocl.ecore:OperationCallExp">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <source xsi:type="ocl.ecore:OperationCallExp">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <source xsi:type="ocl.ecore:OperationCallExp">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <source xsi:type="ocl.ecore:VariableExp" referredVariable="/0/toUFirst/s">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </source>
+ <argument xsi:type="ocl.ecore:IntegerLiteralExp" integerSymbol="1">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Integer"/>
+ </argument>
+ <argument xsi:type="ocl.ecore:IntegerLiteralExp" integerSymbol="1">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Integer"/>
+ </argument>
+ <referredOperation xsi:type="ecore:EOperation" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String_Class/substring"/>
+ </source>
+ <referredOperation xsi:type="ecore:EOperation" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String_Class/toUpper"/>
+ </source>
+ <argument xsi:type="ocl.ecore:OperationCallExp">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <source xsi:type="ocl.ecore:VariableExp" referredVariable="/0/toUFirst/s">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </source>
+ <argument xsi:type="ocl.ecore:IntegerLiteralExp" integerSymbol="2">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Integer"/>
+ </argument>
+ <argument xsi:type="ocl.ecore:OperationCallExp">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Integer"/>
+ <source xsi:type="ocl.ecore:VariableExp" referredVariable="/0/toUFirst/s">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </source>
+ <referredOperation xsi:type="ecore:EOperation" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String_Class/size"/>
+ </argument>
+ <referredOperation xsi:type="ecore:EOperation" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String_Class/substring"/>
+ </argument>
+ <referredOperation xsi:type="ecore:EOperation" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String_Class/concat"/>
+ </body>
+ <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol=""/>
+ <parameter name="s">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </parameter>
+ </ownedModuleElement>
+ </mtl:Module>
+ <ecore:EPackage name="additions">
+ <eClassifiers xsi:type="ecore:EClass" name="String_Class">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <references href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </eAnnotations>
+ <eOperations name="substitute">
+ <eAnnotations source="MTL"/>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <eParameters name="r">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </eParameters>
+ <eParameters name="t">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </eParameters>
+ </eOperations>
+ <eOperations name="index">
+ <eAnnotations source="MTL"/>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Integer"/>
+ <eParameters name="r">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </eParameters>
+ </eOperations>
+ <eOperations name="first">
+ <eAnnotations source="MTL"/>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <eParameters name="n">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Integer"/>
+ </eParameters>
+ </eOperations>
+ <eOperations name="last">
+ <eAnnotations source="MTL"/>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <eParameters name="n">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Integer"/>
+ </eParameters>
+ </eOperations>
+ <eOperations name="strstr">
+ <eAnnotations source="MTL"/>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Boolean"/>
+ <eParameters name="r">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </eParameters>
+ </eOperations>
+ <eOperations name="strtok">
+ <eAnnotations source="MTL"/>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <eParameters name="s1">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </eParameters>
+ <eParameters name="flag">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Integer"/>
+ </eParameters>
+ </eOperations>
+ <eOperations name="strcmp">
+ <eAnnotations source="MTL"/>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Integer"/>
+ <eParameters name="s1">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </eParameters>
+ </eOperations>
+ <eOperations name="isAlpha">
+ <eAnnotations source="MTL"/>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Boolean"/>
+ </eOperations>
+ <eOperations name="isAlphanum">
+ <eAnnotations source="MTL"/>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Boolean"/>
+ </eOperations>
+ <eOperations name="toUpperFirst">
+ <eAnnotations source="MTL"/>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </eOperations>
+ <eOperations name="toLowerFirst">
+ <eAnnotations source="MTL"/>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </eOperations>
+ <eOperations name="replace">
+ <eAnnotations source="MTL non-standard"/>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <eParameters name="substring">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </eParameters>
+ <eParameters name="replacement">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </eParameters>
+ </eOperations>
+ <eOperations name="replaceAll">
+ <eAnnotations source="MTL non-standard"/>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <eParameters name="substring">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </eParameters>
+ <eParameters name="replacement">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </eParameters>
+ </eOperations>
+ <eOperations name="substituteAll">
+ <eAnnotations source="MTL non-standard"/>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <eParameters name="substring">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </eParameters>
+ <eParameters name="replacement">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </eParameters>
+ </eOperations>
+ <eOperations name="startsWith">
+ <eAnnotations source="MTL non-standard"/>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Boolean"/>
+ <eParameters name="substring">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </eParameters>
+ </eOperations>
+ <eOperations name="endsWith">
+ <eAnnotations source="MTL non-standard"/>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Boolean"/>
+ <eParameters name="substring">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </eParameters>
+ </eOperations>
+ <eOperations name="trim">
+ <eAnnotations source="MTL non-standard"/>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </eOperations>
+ <eOperations name="tokenize">
+ <eAnnotations source="MTL non-standard"/>
+ <eType xsi:type="ocl.ecore:SequenceType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Sequence(T)"/>
+ <eParameters name="delimiters">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </eParameters>
+ </eOperations>
+ <eOperations name="toUFirst">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <contents xsi:type="ocl.ecore:Constraint"/>
+ </eAnnotations>
+ <eAnnotations source="MTL" references="/0/toUFirst"/>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </eOperations>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Integer_Class">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <references href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Integer"/>
+ </eAnnotations>
+ <eOperations name="toString">
+ <eAnnotations source="MTL"/>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </eOperations>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Real_Class">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <references href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Real"/>
+ </eAnnotations>
+ <eOperations name="toString">
+ <eAnnotations source="MTL"/>
+ </eOperations>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="OclAny_Class">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <references href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/OclAny"/>
+ </eAnnotations>
+ <eOperations name="eAllContents">
+ <eAnnotations source="MTL non-standard"/>
+ <eType xsi:type="ocl.ecore:SequenceType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Sequence(T)"/>
+ </eOperations>
+ <eOperations name="eAllContents">
+ <eAnnotations source="MTL non-standard"/>
+ <eType xsi:type="ocl.ecore:SequenceType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Sequence(T)"/>
+ <eParameters name="filter">
+ <eType xsi:type="ocl.ecore:AnyType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/OclAny"/>
+ </eParameters>
+ </eOperations>
+ <eOperations name="ancestors">
+ <eAnnotations source="MTL non-standard"/>
+ <eType xsi:type="ocl.ecore:SequenceType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Sequence(T)"/>
+ </eOperations>
+ <eOperations name="toString">
+ <eAnnotations source="MTL non-standard"/>
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/acceleo/mtl/0.8.0/mtlnonstdlib.ecore#//String"/>
+ </eOperations>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="EObject_Class">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <references href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ </eAnnotations>
+ <eOperations name="toUFirst">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <contents xsi:type="ocl.ecore:Constraint"/>
+ </eAnnotations>
+ <eAnnotations source="MTL" references="/0/toUFirst"/>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <eParameters name="s">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </eParameters>
+ </eOperations>
+ </eClassifiers>
+ </ecore:EPackage>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ </ocl.ecore:Variable>
+</xmi:XMI>
diff --git a/tests/org.eclipse.acceleo.parser.tests/data/template/mtlParserEcoreCommon.mtl b/tests/org.eclipse.acceleo.parser.tests/data/template/mtlParserEcoreCommon.mtl
new file mode 100644
index 0000000..e5e4ae8
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/data/template/mtlParserEcoreCommon.mtl
@@ -0,0 +1,4 @@
+[module mtlParserEcoreCommon(http://www.eclipse.org/emf/2002/Ecore)/]
+[template public toUFirst(s:EString)]
+ [s.substring(1,1).toUpper().concat(s.substring(2, s.size()))/]
+[/template] \ No newline at end of file
diff --git a/tests/org.eclipse.acceleo.parser.tests/data/template/mtlParserLibrary2text.emtl b/tests/org.eclipse.acceleo.parser.tests/data/template/mtlParserLibrary2text.emtl
new file mode 100644
index 0000000..0e30822
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/data/template/mtlParserLibrary2text.emtl
@@ -0,0 +1,822 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI 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" xmlns:mtl="http://www.eclipse.org/acceleo/mtl/0.8.0" xmlns:ocl.ecore="http://www.eclipse.org/ocl/1.1.0/Ecore">
+ <mtl:Module name="mtlParserLibrary2text" imports="/0">
+ <input>
+ <takesTypesFrom href="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0#/"/>
+ </input>
+ <ownedModuleElement xsi:type="mtl:Template" name="bookToText" visibility="Public">
+ <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="&#xD;&#xA;Book : "/>
+ <body xsi:type="ocl.ecore:PropertyCallExp">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <source xsi:type="ocl.ecore:VariableExp" referredVariable="/0/bookToText/b">
+ <eType xsi:type="ecore:EClass" href="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0#//Book"/>
+ </source>
+ <referredProperty xsi:type="ecore:EAttribute" href="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0#//Book/title"/>
+ </body>
+ <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="&#xD;&#xA;&#xD;&#xA;"/>
+ <body xsi:type="mtl:IfBlock">
+ <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol=""/>
+ <body xsi:type="mtl:IfBlock">
+ <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="&#x9;&#x9;aaa&#xD;&#xA;"/>
+ <ifExpr xsi:type="ocl.ecore:OperationCallExp">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Boolean"/>
+ <source xsi:type="ocl.ecore:PropertyCallExp">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <source xsi:type="ocl.ecore:VariableExp" referredVariable="/0/bookToText/b">
+ <eType xsi:type="ecore:EClass" href="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0#//Book"/>
+ </source>
+ <referredProperty xsi:type="ecore:EAttribute" href="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0#//Book/title"/>
+ </source>
+ <argument xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </argument>
+ <referredOperation xsi:type="ecore:EOperation" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String_Class/="/>
+ </ifExpr>
+ <else>
+ <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="&#x9;&#x9;ccc&#xD;&#xA;"/>
+ </else>
+ <elseIf>
+ <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="&#x9;&#x9;bbb&#xD;&#xA;"/>
+ <ifExpr xsi:type="ocl.ecore:OperationCallExp">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Boolean"/>
+ <source xsi:type="ocl.ecore:PropertyCallExp">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <source xsi:type="ocl.ecore:VariableExp" referredVariable="/0/bookToText/b">
+ <eType xsi:type="ecore:EClass" href="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0#//Book"/>
+ </source>
+ <referredProperty xsi:type="ecore:EAttribute" href="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0#//Book/title"/>
+ </source>
+ <argument xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </argument>
+ <referredOperation xsi:type="ecore:EOperation" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String_Class/="/>
+ </ifExpr>
+ </elseIf>
+ </body>
+ <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol=""/>
+ <ifExpr xsi:type="ocl.ecore:OperationCallExp">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Boolean"/>
+ <source xsi:type="ocl.ecore:IntegerLiteralExp" integerSymbol="1">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Integer"/>
+ </source>
+ <argument xsi:type="ocl.ecore:OperationCallExp">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Integer"/>
+ <source xsi:type="ocl.ecore:PropertyCallExp" eType="/5/OrderedSet(Writer)">
+ <source xsi:type="ocl.ecore:VariableExp" referredVariable="/0/bookToText/l">
+ <eType xsi:type="ecore:EClass" href="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0#//Library"/>
+ </source>
+ <referredProperty xsi:type="ecore:EReference" href="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0#//Library/writers"/>
+ </source>
+ <referredOperation xsi:type="ecore:EOperation" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/OrderedSet(T)_Class/size"/>
+ </argument>
+ <referredOperation xsi:type="ecore:EOperation" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Integer_Class/="/>
+ </ifExpr>
+ </body>
+ <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="&#xD;&#xA;"/>
+ <body xsi:type="mtl:ForBlock">
+ <init>
+ <variable name="temp">
+ <eType xsi:type="ecore:EClass" href="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0#//Writer"/>
+ </variable>
+ </init>
+ <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="&#x9;ddd"/>
+ <body xsi:type="ocl.ecore:PropertyCallExp">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <source xsi:type="ocl.ecore:VariableExp" referredVariable="/0/bookToText/@body.5/w">
+ <eType xsi:type="ecore:EClass" href="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0#//Writer"/>
+ </source>
+ <referredProperty xsi:type="ecore:EAttribute" href="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0#//Writer/name"/>
+ </body>
+ <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="&#xD;&#xA;"/>
+ <loopVariable name="w">
+ <eType xsi:type="ecore:EClass" href="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0#//Writer"/>
+ </loopVariable>
+ <iterSet xsi:type="ocl.ecore:PropertyCallExp" eType="/5/OrderedSet(Writer)">
+ <source xsi:type="ocl.ecore:VariableExp" referredVariable="/0/bookToText/l">
+ <eType xsi:type="ecore:EClass" href="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0#//Library"/>
+ </source>
+ <referredProperty xsi:type="ecore:EReference" href="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0#//Library/writers"/>
+ </iterSet>
+ <before xsi:type="ocl.ecore:NullLiteralExp">
+ <eType xsi:type="ocl.ecore:VoidType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/OclVoid"/>
+ </before>
+ <each xsi:type="ocl.ecore:StringLiteralExp" stringSymbol=",">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </each>
+ <guard xsi:type="ocl.ecore:NullLiteralExp">
+ <eType xsi:type="ocl.ecore:VoidType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/OclVoid"/>
+ </guard>
+ </body>
+ <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="&#xD;&#xA;"/>
+ <body xsi:type="mtl:FileBlock" openMode="OverWrite">
+ <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol=""/>
+ <fileUrl xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </fileUrl>
+ </body>
+ <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="&#xD;&#xA;"/>
+ <body xsi:type="mtl:TraceBlock">
+ <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol=""/>
+ <modelElement xsi:type="ocl.ecore:BooleanLiteralExp" booleanSymbol="false">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Boolean"/>
+ </modelElement>
+ </body>
+ <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="&#xD;&#xA;"/>
+ <body xsi:type="mtl:LetBlock">
+ <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol=""/>
+ <elseLet>
+ <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol=""/>
+ <letVariable name="s2">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </letVariable>
+ </elseLet>
+ <else>
+ <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol=""/>
+ </else>
+ <letVariable name="s1">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </letVariable>
+ </body>
+ <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="&#xD;&#xA;"/>
+ <body xsi:type="mtl:ProtectedAreaBlock">
+ <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="&#xD;&#xA;"/>
+ <marker xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="identifier">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </marker>
+ </body>
+ <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="&#xD;&#xA;"/>
+ <body xsi:type="mtl:ProtectedAreaBlock">
+ <marker xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="identifier">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </marker>
+ </body>
+ <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol=""/>
+ <parameter name="b">
+ <eType xsi:type="ecore:EClass" href="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0#//Book"/>
+ </parameter>
+ <parameter name="l">
+ <eType xsi:type="ecore:EClass" href="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0#//Library"/>
+ </parameter>
+ </ownedModuleElement>
+ <ownedModuleElement xsi:type="mtl:Macro" name="toLowerCase">
+ <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="return "/>
+ <body xsi:type="ocl.ecore:VariableExp" referredVariable="/0/toLowerCase/s">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </body>
+ <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol=".toLowerCase();&#xD;&#xA;"/>
+ <parameter name="s">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </parameter>
+ <type xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </ownedModuleElement>
+ <ownedModuleElement xsi:type="mtl:Query" name="myQuery">
+ <parameter name="s">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </parameter>
+ <expression xsi:type="ocl.ecore:VariableExp" referredVariable="/0/myQuery/s">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </expression>
+ <type xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </ownedModuleElement>
+ </mtl:Module>
+ <ecore:EPackage name="additions">
+ <eClassifiers xsi:type="ecore:EClass" name="String_Class">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <references href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </eAnnotations>
+ <eOperations name="substitute">
+ <eAnnotations source="MTL"/>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <eParameters name="r">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </eParameters>
+ <eParameters name="t">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </eParameters>
+ </eOperations>
+ <eOperations name="index">
+ <eAnnotations source="MTL"/>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Integer"/>
+ <eParameters name="r">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </eParameters>
+ </eOperations>
+ <eOperations name="first">
+ <eAnnotations source="MTL"/>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <eParameters name="n">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Integer"/>
+ </eParameters>
+ </eOperations>
+ <eOperations name="last">
+ <eAnnotations source="MTL"/>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <eParameters name="n">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Integer"/>
+ </eParameters>
+ </eOperations>
+ <eOperations name="strstr">
+ <eAnnotations source="MTL"/>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Boolean"/>
+ <eParameters name="r">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </eParameters>
+ </eOperations>
+ <eOperations name="strtok">
+ <eAnnotations source="MTL"/>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <eParameters name="s1">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </eParameters>
+ <eParameters name="flag">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Integer"/>
+ </eParameters>
+ </eOperations>
+ <eOperations name="strcmp">
+ <eAnnotations source="MTL"/>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Integer"/>
+ <eParameters name="s1">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </eParameters>
+ </eOperations>
+ <eOperations name="isAlpha">
+ <eAnnotations source="MTL"/>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Boolean"/>
+ </eOperations>
+ <eOperations name="isAlphanum">
+ <eAnnotations source="MTL"/>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Boolean"/>
+ </eOperations>
+ <eOperations name="toUpperFirst">
+ <eAnnotations source="MTL"/>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </eOperations>
+ <eOperations name="toLowerFirst">
+ <eAnnotations source="MTL"/>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </eOperations>
+ <eOperations name="replace">
+ <eAnnotations source="MTL non-standard"/>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <eParameters name="substring">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </eParameters>
+ <eParameters name="replacement">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </eParameters>
+ </eOperations>
+ <eOperations name="replaceAll">
+ <eAnnotations source="MTL non-standard"/>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <eParameters name="substring">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </eParameters>
+ <eParameters name="replacement">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </eParameters>
+ </eOperations>
+ <eOperations name="substituteAll">
+ <eAnnotations source="MTL non-standard"/>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <eParameters name="substring">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </eParameters>
+ <eParameters name="replacement">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </eParameters>
+ </eOperations>
+ <eOperations name="startsWith">
+ <eAnnotations source="MTL non-standard"/>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Boolean"/>
+ <eParameters name="substring">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </eParameters>
+ </eOperations>
+ <eOperations name="endsWith">
+ <eAnnotations source="MTL non-standard"/>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Boolean"/>
+ <eParameters name="substring">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </eParameters>
+ </eOperations>
+ <eOperations name="trim">
+ <eAnnotations source="MTL non-standard"/>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </eOperations>
+ <eOperations name="tokenize">
+ <eAnnotations source="MTL non-standard"/>
+ <eType xsi:type="ocl.ecore:SequenceType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Sequence(T)"/>
+ <eParameters name="delimiters">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </eParameters>
+ </eOperations>
+ <eOperations name="toLowerCase">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <contents xsi:type="ocl.ecore:Constraint"/>
+ </eAnnotations>
+ <eAnnotations source="MTL" references="/0/toLowerCase"/>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </eOperations>
+ <eOperations name="myQuery">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <contents xsi:type="ocl.ecore:Constraint"/>
+ </eAnnotations>
+ <eAnnotations source="MTL" references="/0/myQuery"/>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </eOperations>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Integer_Class">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <references href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Integer"/>
+ </eAnnotations>
+ <eOperations name="toString">
+ <eAnnotations source="MTL"/>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </eOperations>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Real_Class">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <references href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Real"/>
+ </eAnnotations>
+ <eOperations name="toString">
+ <eAnnotations source="MTL"/>
+ </eOperations>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="OclAny_Class">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <references href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/OclAny"/>
+ </eAnnotations>
+ <eOperations name="eAllContents">
+ <eAnnotations source="MTL non-standard"/>
+ <eType xsi:type="ocl.ecore:SequenceType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Sequence(T)"/>
+ </eOperations>
+ <eOperations name="eAllContents">
+ <eAnnotations source="MTL non-standard"/>
+ <eType xsi:type="ocl.ecore:SequenceType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Sequence(T)"/>
+ <eParameters name="filter">
+ <eType xsi:type="ocl.ecore:AnyType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/OclAny"/>
+ </eParameters>
+ </eOperations>
+ <eOperations name="ancestors">
+ <eAnnotations source="MTL non-standard"/>
+ <eType xsi:type="ocl.ecore:SequenceType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Sequence(T)"/>
+ </eOperations>
+ <eOperations name="siblings">
+ <eType xsi:type="ocl.ecore:SequenceType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Sequence(T)"/>
+ </eOperations>
+ <eOperations name="toString">
+ <eAnnotations source="MTL non-standard"/>
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/acceleo/mtl/0.8.0/mtlnonstdlib.ecore#//String"/>
+ </eOperations>
+ <eOperations name="eInverse">
+ <eAnnotations source="MTL non-standard"/>
+ <eType xsi:type="ocl.ecore:SequenceType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Sequence(T)"/>
+ </eOperations>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="EObject_Class">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <references href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ </eAnnotations>
+ <eOperations name="bookToText">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <contents xsi:type="ocl.ecore:Constraint"/>
+ </eAnnotations>
+ <eAnnotations source="MTL" references="/0/bookToText"/>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <eParameters name="b">
+ <eType xsi:type="ecore:EClass" href="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0#//Book"/>
+ </eParameters>
+ <eParameters name="l">
+ <eType xsi:type="ecore:EClass" href="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0#//Library"/>
+ </eParameters>
+ </eOperations>
+ <eOperations name="toLowerCase">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <contents xsi:type="ocl.ecore:Constraint"/>
+ </eAnnotations>
+ <eAnnotations source="MTL" references="/0/toLowerCase"/>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <eParameters name="s">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </eParameters>
+ </eOperations>
+ <eOperations name="myQuery">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <contents xsi:type="ocl.ecore:Constraint"/>
+ </eAnnotations>
+ <eAnnotations source="MTL" references="/0/myQuery"/>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <eParameters name="s">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </eParameters>
+ </eOperations>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Book_Class">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <references href="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0#//Book"/>
+ </eAnnotations>
+ <eOperations name="bookToText">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <contents xsi:type="ocl.ecore:Constraint"/>
+ </eAnnotations>
+ <eAnnotations source="MTL" references="/0/bookToText"/>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <eParameters name="l">
+ <eType xsi:type="ecore:EClass" href="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0#//Library"/>
+ </eParameters>
+ </eOperations>
+ </eClassifiers>
+ </ecore:EPackage>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0#//Book"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0#//Book"/>
+ </ocl.ecore:Variable>
+ <ecore:EPackage name="collections">
+ <eClassifiers xsi:type="ocl.ecore:OrderedSetType" name="OrderedSet(Writer)" instanceClassName="java.util.LinkedHashSet">
+ <elementType xsi:type="ecore:EClass" href="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0#//Writer"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ocl.ecore:SetType" instanceClassName="java.util.Set">
+ <elementType xsi:type="ecore:EClass" href="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0#//Writer"/>
+ </eClassifiers>
+ </ecore:EPackage>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0#//Book"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0#//Book"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0#//Book"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0#//Book"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0#//Book"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0#//Book"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0#//Writer"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0#//Writer"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0#//Writer"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0#//Book"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0#//Book"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0#//Book"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0#//Book"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0#//Book"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ </ocl.ecore:Variable>
+ <ecore:EAnnotation source="positions">
+ <eAnnotations source="positions.0" references="/0/bookToText">
+ <details key="start" value="195"/>
+ <details key="end" value="703"/>
+ </eAnnotations>
+ <eAnnotations source="positions.1" references="/0/bookToText/@body.0">
+ <details key="start" value="249"/>
+ <details key="end" value="258"/>
+ </eAnnotations>
+ <eAnnotations source="positions.2" references="/0/bookToText/@body.1">
+ <details key="start" value="259"/>
+ <details key="end" value="266"/>
+ </eAnnotations>
+ <eAnnotations source="positions.3" references="/0/bookToText/@body.1/@source">
+ <details key="start" value="259"/>
+ <details key="end" value="260"/>
+ </eAnnotations>
+ <eAnnotations source="positions.4" references="/0/bookToText/@body.2">
+ <details key="start" value="268"/>
+ <details key="end" value="272"/>
+ </eAnnotations>
+ <eAnnotations source="positions.5" references="/0/bookToText/@body.3">
+ <details key="start" value="272"/>
+ <details key="end" value="393"/>
+ </eAnnotations>
+ <eAnnotations source="positions.6" references="/0/bookToText/@body.3/@body.0">
+ <details key="start" value="302"/>
+ <details key="end" value="302"/>
+ </eAnnotations>
+ <eAnnotations source="positions.7" references="/0/bookToText/@body.3/@body.1">
+ <details key="start" value="303"/>
+ <details key="end" value="386"/>
+ </eAnnotations>
+ <eAnnotations source="positions.8" references="/0/bookToText/@body.3/@body.1/@body.0">
+ <details key="start" value="324"/>
+ <details key="end" value="331"/>
+ </eAnnotations>
+ <eAnnotations source="positions.9" references="/0/bookToText/@body.3/@body.1/@ifExpr">
+ <details key="start" value="307"/>
+ <details key="end" value="321"/>
+ </eAnnotations>
+ <eAnnotations source="positions.10" references="/0/bookToText/@body.3/@body.1/@ifExpr/@source">
+ <details key="start" value="308"/>
+ <details key="end" value="315"/>
+ </eAnnotations>
+ <eAnnotations source="positions.11" references="/0/bookToText/@body.3/@body.1/@ifExpr/@source/@source">
+ <details key="start" value="308"/>
+ <details key="end" value="309"/>
+ </eAnnotations>
+ <eAnnotations source="positions.12" references="/0/bookToText/@body.3/@body.1/@ifExpr/@argument.0">
+ <details key="start" value="318"/>
+ <details key="end" value="320"/>
+ </eAnnotations>
+ <eAnnotations source="positions.13" references="/0/bookToText/@body.3/@body.1/@else">
+ <details key="start" value="365"/>
+ <details key="end" value="381"/>
+ </eAnnotations>
+ <eAnnotations source="positions.14" references="/0/bookToText/@body.3/@body.1/@else/@body.0">
+ <details key="start" value="373"/>
+ <details key="end" value="380"/>
+ </eAnnotations>
+ <eAnnotations source="positions.15" references="/0/bookToText/@body.3/@body.1/@elseIf.0">
+ <details key="start" value="332"/>
+ <details key="end" value="365"/>
+ </eAnnotations>
+ <eAnnotations source="positions.16" references="/0/bookToText/@body.3/@body.1/@elseIf.0/@body.0">
+ <details key="start" value="357"/>
+ <details key="end" value="364"/>
+ </eAnnotations>
+ <eAnnotations source="positions.17" references="/0/bookToText/@body.3/@body.1/@elseIf.0/@ifExpr">
+ <details key="start" value="340"/>
+ <details key="end" value="354"/>
+ </eAnnotations>
+ <eAnnotations source="positions.18" references="/0/bookToText/@body.3/@body.1/@elseIf.0/@ifExpr/@source">
+ <details key="start" value="341"/>
+ <details key="end" value="348"/>
+ </eAnnotations>
+ <eAnnotations source="positions.19" references="/0/bookToText/@body.3/@body.1/@elseIf.0/@ifExpr/@source/@source">
+ <details key="start" value="341"/>
+ <details key="end" value="342"/>
+ </eAnnotations>
+ <eAnnotations source="positions.20" references="/0/bookToText/@body.3/@body.1/@elseIf.0/@ifExpr/@argument.0">
+ <details key="start" value="351"/>
+ <details key="end" value="353"/>
+ </eAnnotations>
+ <eAnnotations source="positions.21" references="/0/bookToText/@body.3/@body.2">
+ <details key="start" value="388"/>
+ <details key="end" value="388"/>
+ </eAnnotations>
+ <eAnnotations source="positions.22" references="/0/bookToText/@body.3/@ifExpr">
+ <details key="start" value="276"/>
+ <details key="end" value="299"/>
+ </eAnnotations>
+ <eAnnotations source="positions.23" references="/0/bookToText/@body.3/@ifExpr/@source">
+ <details key="start" value="277"/>
+ <details key="end" value="278"/>
+ </eAnnotations>
+ <eAnnotations source="positions.24" references="/0/bookToText/@body.3/@ifExpr/@argument.0">
+ <details key="start" value="281"/>
+ <details key="end" value="298"/>
+ </eAnnotations>
+ <eAnnotations source="positions.25" references="/0/bookToText/@body.3/@ifExpr/@argument.0/@source">
+ <details key="start" value="281"/>
+ <details key="end" value="290"/>
+ </eAnnotations>
+ <eAnnotations source="positions.26" references="/0/bookToText/@body.3/@ifExpr/@argument.0/@source/@source">
+ <details key="start" value="281"/>
+ <details key="end" value="282"/>
+ </eAnnotations>
+ <eAnnotations source="positions.27" references="/0/bookToText/@body.4">
+ <details key="start" value="395"/>
+ <details key="end" value="397"/>
+ </eAnnotations>
+ <eAnnotations source="positions.28" references="/0/bookToText/@body.5">
+ <details key="start" value="397"/>
+ <details key="end" value="504"/>
+ </eAnnotations>
+ <eAnnotations source="positions.29" references="/0/bookToText/@body.5/@init">
+ <details key="start" value="466"/>
+ <details key="end" value="480"/>
+ </eAnnotations>
+ <eAnnotations source="positions.30" references="/0/bookToText/@body.5/@init/@variable.0">
+ <details key="start" value="467"/>
+ <details key="end" value="478"/>
+ </eAnnotations>
+ <eAnnotations source="positions.31" references="/0/bookToText/@body.5/@body.0">
+ <details key="start" value="483"/>
+ <details key="end" value="487"/>
+ </eAnnotations>
+ <eAnnotations source="positions.32" references="/0/bookToText/@body.5/@body.1">
+ <details key="start" value="488"/>
+ <details key="end" value="494"/>
+ </eAnnotations>
+ <eAnnotations source="positions.33" references="/0/bookToText/@body.5/@body.1/@source">
+ <details key="start" value="488"/>
+ <details key="end" value="489"/>
+ </eAnnotations>
+ <eAnnotations source="positions.34" references="/0/bookToText/@body.5/@body.2">
+ <details key="start" value="496"/>
+ <details key="end" value="498"/>
+ </eAnnotations>
+ <eAnnotations source="positions.35" references="/0/bookToText/@body.5/w">
+ <details key="start" value="403"/>
+ <details key="end" value="413"/>
+ </eAnnotations>
+ <eAnnotations source="positions.36" references="/0/bookToText/@body.5/@iterSet">
+ <details key="start" value="416"/>
+ <details key="end" value="425"/>
+ </eAnnotations>
+ <eAnnotations source="positions.37" references="/0/bookToText/@body.5/@iterSet/@source">
+ <details key="start" value="416"/>
+ <details key="end" value="417"/>
+ </eAnnotations>
+ <eAnnotations source="positions.38" references="/0/bookToText/@body.5/@before">
+ <details key="start" value="435"/>
+ <details key="end" value="439"/>
+ </eAnnotations>
+ <eAnnotations source="positions.39" references="/0/bookToText/@body.5/@each">
+ <details key="start" value="452"/>
+ <details key="end" value="455"/>
+ </eAnnotations>
+ <eAnnotations source="positions.40" references="/0/bookToText/@body.5/@guard">
+ <details key="start" value="460"/>
+ <details key="end" value="464"/>
+ </eAnnotations>
+ <eAnnotations source="positions.41" references="/0/bookToText/@body.6">
+ <details key="start" value="506"/>
+ <details key="end" value="508"/>
+ </eAnnotations>
+ <eAnnotations source="positions.42" references="/0/bookToText/@body.7">
+ <details key="start" value="508"/>
+ <details key="end" value="534"/>
+ </eAnnotations>
+ <eAnnotations source="positions.43" references="/0/bookToText/@body.7/@body.0">
+ <details key="start" value="527"/>
+ <details key="end" value="527"/>
+ </eAnnotations>
+ <eAnnotations source="positions.44" references="/0/bookToText/@body.7/@fileUrl">
+ <details key="start" value="515"/>
+ <details key="end" value="517"/>
+ </eAnnotations>
+ <eAnnotations source="positions.45" references="/0/bookToText/@body.8">
+ <details key="start" value="536"/>
+ <details key="end" value="538"/>
+ </eAnnotations>
+ <eAnnotations source="positions.46" references="/0/bookToText/@body.9">
+ <details key="start" value="538"/>
+ <details key="end" value="555"/>
+ </eAnnotations>
+ <eAnnotations source="positions.47" references="/0/bookToText/@body.9/@body.0">
+ <details key="start" value="547"/>
+ <details key="end" value="547"/>
+ </eAnnotations>
+ <eAnnotations source="positions.48" references="/0/bookToText/@body.9/@modelElement">
+ <details key="start" value="-1"/>
+ <details key="end" value="-1"/>
+ </eAnnotations>
+ <eAnnotations source="positions.49" references="/0/bookToText/@body.10">
+ <details key="start" value="557"/>
+ <details key="end" value="559"/>
+ </eAnnotations>
+ <eAnnotations source="positions.50" references="/0/bookToText/@body.11">
+ <details key="start" value="559"/>
+ <details key="end" value="613"/>
+ </eAnnotations>
+ <eAnnotations source="positions.51" references="/0/bookToText/@body.11/@body.0">
+ <details key="start" value="577"/>
+ <details key="end" value="577"/>
+ </eAnnotations>
+ <eAnnotations source="positions.52" references="/0/bookToText/@body.11/@elseLet.0">
+ <details key="start" value="577"/>
+ <details key="end" value="599"/>
+ </eAnnotations>
+ <eAnnotations source="positions.53" references="/0/bookToText/@body.11/@elseLet.0/@body.0">
+ <details key="start" value="599"/>
+ <details key="end" value="599"/>
+ </eAnnotations>
+ <eAnnotations source="positions.54" references="/0/bookToText/@body.11/@elseLet.0/s2">
+ <details key="start" value="586"/>
+ <details key="end" value="595"/>
+ </eAnnotations>
+ <eAnnotations source="positions.55" references="/0/bookToText/@body.11/@else">
+ <details key="start" value="599"/>
+ <details key="end" value="607"/>
+ </eAnnotations>
+ <eAnnotations source="positions.56" references="/0/bookToText/@body.11/@else/@body.0">
+ <details key="start" value="607"/>
+ <details key="end" value="607"/>
+ </eAnnotations>
+ <eAnnotations source="positions.57" references="/0/bookToText/@body.11/s1">
+ <details key="start" value="564"/>
+ <details key="end" value="573"/>
+ </eAnnotations>
+ <eAnnotations source="positions.58" references="/0/bookToText/@body.12">
+ <details key="start" value="615"/>
+ <details key="end" value="617"/>
+ </eAnnotations>
+ <eAnnotations source="positions.59" references="/0/bookToText/@body.13">
+ <details key="start" value="617"/>
+ <details key="end" value="657"/>
+ </eAnnotations>
+ <eAnnotations source="positions.60" references="/0/bookToText/@body.13/@body.0">
+ <details key="start" value="643"/>
+ <details key="end" value="645"/>
+ </eAnnotations>
+ <eAnnotations source="positions.61" references="/0/bookToText/@body.13/@marker">
+ <details key="start" value="629"/>
+ <details key="end" value="641"/>
+ </eAnnotations>
+ <eAnnotations source="positions.62" references="/0/bookToText/@body.14">
+ <details key="start" value="659"/>
+ <details key="end" value="661"/>
+ </eAnnotations>
+ <eAnnotations source="positions.63" references="/0/bookToText/@body.15">
+ <details key="start" value="661"/>
+ <details key="end" value="688"/>
+ </eAnnotations>
+ <eAnnotations source="positions.64" references="/0/bookToText/@body.15/@marker">
+ <details key="start" value="673"/>
+ <details key="end" value="685"/>
+ </eAnnotations>
+ <eAnnotations source="positions.65" references="/0/bookToText/@body.16">
+ <details key="start" value="690"/>
+ <details key="end" value="690"/>
+ </eAnnotations>
+ <eAnnotations source="positions.66" references="/0/bookToText/b">
+ <details key="start" value="224"/>
+ <details key="end" value="232"/>
+ </eAnnotations>
+ <eAnnotations source="positions.67" references="/0/bookToText/l">
+ <details key="start" value="234"/>
+ <details key="end" value="245"/>
+ </eAnnotations>
+ <eAnnotations source="positions.68" references="/0/toLowerCase">
+ <details key="start" value="707"/>
+ <details key="end" value="782"/>
+ </eAnnotations>
+ <eAnnotations source="positions.69" references="/0/toLowerCase/@body.0">
+ <details key="start" value="746"/>
+ <details key="end" value="753"/>
+ </eAnnotations>
+ <eAnnotations source="positions.70" references="/0/toLowerCase/@body.1">
+ <details key="start" value="754"/>
+ <details key="end" value="755"/>
+ </eAnnotations>
+ <eAnnotations source="positions.71" references="/0/toLowerCase/@body.2">
+ <details key="start" value="757"/>
+ <details key="end" value="774"/>
+ </eAnnotations>
+ <eAnnotations source="positions.72" references="/0/toLowerCase/s">
+ <details key="start" value="726"/>
+ <details key="end" value="734"/>
+ </eAnnotations>
+ <eAnnotations source="positions.73" references="/0/myQuery">
+ <details key="start" value="786"/>
+ <details key="end" value="825"/>
+ </eAnnotations>
+ <eAnnotations source="positions.74" references="/0/myQuery/s">
+ <details key="start" value="801"/>
+ <details key="end" value="809"/>
+ </eAnnotations>
+ <eAnnotations source="positions.75" references="/0/myQuery/@expression">
+ <details key="start" value="822"/>
+ <details key="end" value="823"/>
+ </eAnnotations>
+ </ecore:EAnnotation>
+</xmi:XMI>
diff --git a/tests/org.eclipse.acceleo.parser.tests/data/template/mtlParserLibrary2text.mtl b/tests/org.eclipse.acceleo.parser.tests/data/template/mtlParserLibrary2text.mtl
new file mode 100644
index 0000000..ab5732c
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/data/template/mtlParserLibrary2text.mtl
@@ -0,0 +1,50 @@
+[module mtlParserLibrary2text(http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0)/]
+[import mtlParserLibrary2text/]
+
+[comment MyComment /]
+
+[comment]
+ MyComment
+[/comment]
+
+[template public bookToText(b : Book, l : Library)]
+
+Book : [b.title/]
+
+[if (1 = l.writers->size())]
+ [if (b.title = '')]
+ aaa
+ [elseif (b.title = '')]
+ bbb
+ [else]
+ ccc
+ [/if]
+[/if]
+
+[for (w : Writer | l.writers) before (null) separator (',') ? (null) {temp:Writer;}]
+ ddd[w.name/]
+[/for]
+
+[file ('',false)]
+[/file]
+
+[trace]
+[/trace]
+
+[let s1:String ]
+[elselet s2:String ]
+[else]
+[/let]
+
+[protected ('identifier')]
+[/protected]
+
+[protected ('identifier')/]
+
+[/template]
+
+[macro toLowerCase(s:String):String ]
+return [s/].toLowerCase();
+[/macro]
+
+[query myQuery(s:String) : String = s/]
diff --git a/tests/org.eclipse.acceleo.parser.tests/model/extlibrary.ecore b/tests/org.eclipse.acceleo.parser.tests/model/extlibrary.ecore
new file mode 100644
index 0000000..e7ba006
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/model/extlibrary.ecore
@@ -0,0 +1,108 @@
+<?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="extlibrary"
+ nsURI="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0" nsPrefix="extlib">
+ <eClassifiers xsi:type="ecore:EClass" name="Book" eSuperTypes="#//CirculatingItem">
+ <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"
+ defaultValueLiteral="100"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="category" eType="#//BookCategory"
+ unsettable="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="author" lowerBound="1"
+ eType="#//Writer" eOpposite="#//Writer/books"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Library" eSuperTypes="#//Addressable">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="writers" upperBound="-1"
+ eType="#//Writer" volatile="true" transient="true" derived="true" containment="true"
+ resolveProxies="false">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="group" value="#people"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="employees" upperBound="-1"
+ eType="#//Employee" volatile="true" transient="true" derived="true" containment="true"
+ resolveProxies="false">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="group" value="#people"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="borrowers" upperBound="-1"
+ eType="#//Borrower" volatile="true" transient="true" derived="true" containment="true"
+ resolveProxies="false">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="group" value="#people"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="stock" ordered="false"
+ upperBound="-1" eType="#//Item" containment="true" resolveProxies="false"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="books" ordered="false"
+ upperBound="-1" eType="#//Book" transient="true" derived="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="branches" upperBound="-1"
+ eType="#//Library" containment="true" eOpposite="#//Library/parentBranch"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="parentBranch" eType="#//Library"
+ eOpposite="#//Library/branches"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="people" upperBound="-1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="group"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Writer" eSuperTypes="#//Person">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
+ volatile="true" transient="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="books" upperBound="-1"
+ eType="#//Book" eOpposite="#//Book/author"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EEnum" name="BookCategory">
+ <eLiterals name="Mystery"/>
+ <eLiterals name="ScienceFiction" value="1"/>
+ <eLiterals name="Biography" value="2"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Item" abstract="true">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="publicationDate" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDate"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Lendable" abstract="true" interface="true">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="copies" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="borrowers" ordered="false"
+ upperBound="-1" eType="#//Borrower" eOpposite="#//Borrower/borrowed"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="CirculatingItem" abstract="true" eSuperTypes="#//Item #//Lendable"/>
+ <eClassifiers xsi:type="ecore:EClass" name="Periodical" abstract="true" eSuperTypes="#//Item">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="title" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="issuesPerYear" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="AudioVisualItem" abstract="true" eSuperTypes="#//CirculatingItem">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="title" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="minutesLength" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="damaged" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="BookOnTape" eSuperTypes="#//AudioVisualItem">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="reader" eType="#//Person"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="author" eType="#//Writer"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="VideoCassette" eSuperTypes="#//AudioVisualItem">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="cast" upperBound="-1" eType="#//Person"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Borrower" eSuperTypes="#//Person">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="borrowed" upperBound="-1"
+ eType="#//Lendable" eOpposite="#//Lendable/borrowers"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Person" eSuperTypes="#//Addressable">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="firstName" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="lastName" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Employee" eSuperTypes="#//Person">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="manager" eType="#//Employee"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Addressable" abstract="true" interface="true">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="address" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/tests/org.eclipse.acceleo.parser.tests/model/extlibrary.genmodel b/tests/org.eclipse.acceleo.parser.tests/model/extlibrary.genmodel
new file mode 100644
index 0000000..af2ff20
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/model/extlibrary.genmodel
@@ -0,0 +1,74 @@
+<?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.acceleo.parser.tests/src-gen"
+ modelPluginID="org.eclipse.acceleo.parser.tests" modelName="Extlibrary" importerID="org.eclipse.emf.importer.ecore"
+ complianceLevel="5.0" copyrightFields="false">
+ <foreignModel>extlibrary.ecore</foreignModel>
+ <genPackages prefix="Extlibrary" basePackage="org.eclipse.acceleo.parser.tests" resource="XML"
+ disposableProviderFactory="true" ecorePackage="extlibrary.ecore#/">
+ <genEnums typeSafeEnumCompatible="false" ecoreEnum="extlibrary.ecore#//BookCategory">
+ <genEnumLiterals ecoreEnumLiteral="extlibrary.ecore#//BookCategory/Mystery"/>
+ <genEnumLiterals ecoreEnumLiteral="extlibrary.ecore#//BookCategory/ScienceFiction"/>
+ <genEnumLiterals ecoreEnumLiteral="extlibrary.ecore#//BookCategory/Biography"/>
+ </genEnums>
+ <genClasses ecoreClass="extlibrary.ecore#//Book">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute extlibrary.ecore#//Book/title"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute extlibrary.ecore#//Book/pages"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute extlibrary.ecore#//Book/category"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference extlibrary.ecore#//Book/author"/>
+ </genClasses>
+ <genClasses ecoreClass="extlibrary.ecore#//Library">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute extlibrary.ecore#//Library/name"/>
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference extlibrary.ecore#//Library/writers"/>
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference extlibrary.ecore#//Library/employees"/>
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference extlibrary.ecore#//Library/borrowers"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference extlibrary.ecore#//Library/stock"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference extlibrary.ecore#//Library/books"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference extlibrary.ecore#//Library/branches"/>
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference extlibrary.ecore#//Library/parentBranch"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EAttribute extlibrary.ecore#//Library/people"/>
+ </genClasses>
+ <genClasses ecoreClass="extlibrary.ecore#//Writer">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute extlibrary.ecore#//Writer/name"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference extlibrary.ecore#//Writer/books"/>
+ </genClasses>
+ <genClasses image="false" ecoreClass="extlibrary.ecore#//Item">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute extlibrary.ecore#//Item/publicationDate"/>
+ </genClasses>
+ <genClasses image="false" ecoreClass="extlibrary.ecore#//Lendable">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute extlibrary.ecore#//Lendable/copies"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference extlibrary.ecore#//Lendable/borrowers"/>
+ </genClasses>
+ <genClasses image="false" ecoreClass="extlibrary.ecore#//CirculatingItem"/>
+ <genClasses image="false" ecoreClass="extlibrary.ecore#//Periodical">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute extlibrary.ecore#//Periodical/title"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute extlibrary.ecore#//Periodical/issuesPerYear"/>
+ </genClasses>
+ <genClasses image="false" ecoreClass="extlibrary.ecore#//AudioVisualItem">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute extlibrary.ecore#//AudioVisualItem/title"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute extlibrary.ecore#//AudioVisualItem/minutesLength"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute extlibrary.ecore#//AudioVisualItem/damaged"/>
+ </genClasses>
+ <genClasses ecoreClass="extlibrary.ecore#//BookOnTape">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference extlibrary.ecore#//BookOnTape/reader"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference extlibrary.ecore#//BookOnTape/author"/>
+ </genClasses>
+ <genClasses ecoreClass="extlibrary.ecore#//VideoCassette">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference extlibrary.ecore#//VideoCassette/cast"/>
+ </genClasses>
+ <genClasses ecoreClass="extlibrary.ecore#//Borrower">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference extlibrary.ecore#//Borrower/borrowed"/>
+ </genClasses>
+ <genClasses ecoreClass="extlibrary.ecore#//Person">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute extlibrary.ecore#//Person/firstName"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute extlibrary.ecore#//Person/lastName"/>
+ </genClasses>
+ <genClasses ecoreClass="extlibrary.ecore#//Employee">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference extlibrary.ecore#//Employee/manager"/>
+ </genClasses>
+ <genClasses image="false" ecoreClass="extlibrary.ecore#//Addressable">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute extlibrary.ecore#//Addressable/address"/>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/tests/org.eclipse.acceleo.parser.tests/plugin.properties b/tests/org.eclipse.acceleo.parser.tests/plugin.properties
new file mode 100644
index 0000000..21c61aa
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/plugin.properties
@@ -0,0 +1,24 @@
+#################################################################################
+# Copyright (c) 2008, 2009 Obeo.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Obeo - initial API and implementation
+#################################################################################
+pluginName = Acceleo Parser Tests
+providerName = Eclipse.org
+# ====================================================================
+# To code developer:
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+# ====================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# ====================================================================
+
diff --git a/tests/org.eclipse.acceleo.parser.tests/plugin.xml b/tests/org.eclipse.acceleo.parser.tests/plugin.xml
new file mode 100644
index 0000000..28108ed
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/plugin.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+Copyright (c) 2008, 2009 Obeo.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Obeo - initial API and implementation
+-->
+
+<plugin>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <package
+ uri = "http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0"
+ class = "org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage"
+ genModel = "model/extlibrary.genmodel" />
+ </extension>
+
+ <extension point="org.eclipse.emf.ecore.extension_parser">
+ <parser
+ type="extlibrary"
+ class="org.eclipse.acceleo.parser.tests.extlibrary.util.ExtlibraryResourceFactoryImpl" />
+ </extension>
+
+</plugin>
diff --git a/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/Addressable.java b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/Addressable.java
new file mode 100644
index 0000000..36b5187
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/Addressable.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.acceleo.parser.tests.extlibrary;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object '<em><b>Addressable</b></em>'. <!--
+ * end-user-doc -->
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.Addressable#getAddress <em>Address</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage#getAddressable()
+ * @model interface="true" abstract="true"
+ * @generated
+ */
+public interface Addressable 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.acceleo.parser.tests.extlibrary.ExtlibraryPackage#getAddressable_Address()
+ * @model
+ * @generated
+ */
+ String getAddress();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.acceleo.parser.tests.extlibrary.Addressable#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);
+
+} // Addressable
diff --git a/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/AudioVisualItem.java b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/AudioVisualItem.java
new file mode 100644
index 0000000..2251c0f
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/AudioVisualItem.java
@@ -0,0 +1,112 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.acceleo.parser.tests.extlibrary;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object '<em><b>Audio Visual Item</b></em>'. <!--
+ * end-user-doc -->
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.AudioVisualItem#getTitle <em>Title</em>}</li>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.AudioVisualItem#getMinutesLength <em>Minutes Length
+ * </em>}</li>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.AudioVisualItem#isDamaged <em>Damaged</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage#getAudioVisualItem()
+ * @model abstract="true"
+ * @generated
+ */
+public interface AudioVisualItem extends CirculatingItem {
+ /**
+ * 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.acceleo.parser.tests.extlibrary.ExtlibraryPackage#getAudioVisualItem_Title()
+ * @model
+ * @generated
+ */
+ String getTitle();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.acceleo.parser.tests.extlibrary.AudioVisualItem#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>Minutes Length</b></em>' attribute. <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Minutes Length</em>' attribute isn't clear, there really should be more of a
+ * description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Minutes Length</em>' attribute.
+ * @see #setMinutesLength(int)
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage#getAudioVisualItem_MinutesLength()
+ * @model required="true"
+ * @generated
+ */
+ int getMinutesLength();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.acceleo.parser.tests.extlibrary.AudioVisualItem#getMinutesLength
+ * <em>Minutes Length</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Minutes Length</em>' attribute.
+ * @see #getMinutesLength()
+ * @generated
+ */
+ void setMinutesLength(int value);
+
+ /**
+ * Returns the value of the '<em><b>Damaged</b></em>' attribute. <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Damaged</em>' attribute isn't clear, there really should be more of a
+ * description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Damaged</em>' attribute.
+ * @see #setDamaged(boolean)
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage#getAudioVisualItem_Damaged()
+ * @model
+ * @generated
+ */
+ boolean isDamaged();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.acceleo.parser.tests.extlibrary.AudioVisualItem#isDamaged
+ * <em>Damaged</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Damaged</em>' attribute.
+ * @see #isDamaged()
+ * @generated
+ */
+ void setDamaged(boolean value);
+
+} // AudioVisualItem
diff --git a/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/Book.java b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/Book.java
new file mode 100644
index 0000000..c80fb58
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/Book.java
@@ -0,0 +1,172 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.acceleo.parser.tests.extlibrary;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object '<em><b>Book</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.Book#getTitle <em>Title</em>}</li>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.Book#getPages <em>Pages</em>}</li>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.Book#getCategory <em>Category</em>}</li>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.Book#getAuthor <em>Author</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage#getBook()
+ * @model
+ * @generated
+ */
+public interface Book extends CirculatingItem {
+ /**
+ * 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.acceleo.parser.tests.extlibrary.ExtlibraryPackage#getBook_Title()
+ * @model
+ * @generated
+ */
+ String getTitle();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.acceleo.parser.tests.extlibrary.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. The default value is <code>"100"</code>.
+ * <!-- 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.acceleo.parser.tests.extlibrary.ExtlibraryPackage#getBook_Pages()
+ * @model default="100"
+ * @generated
+ */
+ int getPages();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.acceleo.parser.tests.extlibrary.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. The literals are from the enumeration
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.BookCategory}. <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Category</em>' attribute 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.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.BookCategory
+ * @see #isSetCategory()
+ * @see #unsetCategory()
+ * @see #setCategory(BookCategory)
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage#getBook_Category()
+ * @model unsettable="true"
+ * @generated
+ */
+ BookCategory getCategory();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.acceleo.parser.tests.extlibrary.Book#getCategory
+ * <em>Category</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Category</em>' attribute.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.BookCategory
+ * @see #isSetCategory()
+ * @see #unsetCategory()
+ * @see #getCategory()
+ * @generated
+ */
+ void setCategory(BookCategory value);
+
+ /**
+ * Unsets the value of the '{@link org.eclipse.acceleo.parser.tests.extlibrary.Book#getCategory
+ * <em>Category</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #isSetCategory()
+ * @see #getCategory()
+ * @see #setCategory(BookCategory)
+ * @generated
+ */
+ void unsetCategory();
+
+ /**
+ * Returns whether the value of the '{@link org.eclipse.acceleo.parser.tests.extlibrary.Book#getCategory
+ * <em>Category</em>}' attribute is set. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return whether the value of the '<em>Category</em>' attribute is set.
+ * @see #unsetCategory()
+ * @see #getCategory()
+ * @see #setCategory(BookCategory)
+ * @generated
+ */
+ boolean isSetCategory();
+
+ /**
+ * Returns the value of the '<em><b>Author</b></em>' reference. It is bidirectional and its opposite is '
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.Writer#getBooks <em>Books</em>}'. <!-- begin-user-doc
+ * -->
+ * <p>
+ * If the meaning of the '<em>Author</em>' reference isn't clear, there really should be more of a
+ * description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Author</em>' reference.
+ * @see #setAuthor(Writer)
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage#getBook_Author()
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.Writer#getBooks
+ * @model opposite="books" required="true"
+ * @generated
+ */
+ Writer getAuthor();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.acceleo.parser.tests.extlibrary.Book#getAuthor <em>Author</em>}'
+ * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Author</em>' reference.
+ * @see #getAuthor()
+ * @generated
+ */
+ void setAuthor(Writer value);
+
+} // Book
diff --git a/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/BookCategory.java b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/BookCategory.java
new file mode 100644
index 0000000..f241987
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/BookCategory.java
@@ -0,0 +1,237 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.acceleo.parser.tests.extlibrary;
+
+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.acceleo.parser.tests.extlibrary.ExtlibraryPackage#getBookCategory()
+ * @model
+ * @generated
+ */
+public enum BookCategory implements Enumerator {
+ /**
+ * The '<em><b>Mystery</b></em>' literal object. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #MYSTERY_VALUE
+ * @generated
+ * @ordered
+ */
+ MYSTERY(0, "Mystery", "Mystery"),
+
+ /**
+ * The '<em><b>Science Fiction</b></em>' literal object. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #SCIENCE_FICTION_VALUE
+ * @generated
+ * @ordered
+ */
+ SCIENCE_FICTION(1, "ScienceFiction", "ScienceFiction"),
+
+ /**
+ * The '<em><b>Biography</b></em>' literal object. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #BIOGRAPHY_VALUE
+ * @generated
+ * @ordered
+ */
+ BIOGRAPHY(2, "Biography", "Biography");
+
+ /**
+ * The '<em><b>Mystery</b></em>' literal value. <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>Mystery</b></em>' literal object isn't clear, there really should be more of
+ * a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @see #MYSTERY
+ * @model name="Mystery"
+ * @generated
+ * @ordered
+ */
+ public static final int MYSTERY_VALUE = 0;
+
+ /**
+ * The '<em><b>Science Fiction</b></em>' literal value. <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>Science Fiction</b></em>' literal object isn't clear, there really should be
+ * more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @see #SCIENCE_FICTION
+ * @model name="ScienceFiction"
+ * @generated
+ * @ordered
+ */
+ public static final int SCIENCE_FICTION_VALUE = 1;
+
+ /**
+ * The '<em><b>Biography</b></em>' literal value. <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>Biography</b></em>' literal object isn't clear, there really should be more
+ * of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @see #BIOGRAPHY
+ * @model name="Biography"
+ * @generated
+ * @ordered
+ */
+ public static final int BIOGRAPHY_VALUE = 2;
+
+ /**
+ * 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[] {MYSTERY, SCIENCE_FICTION,
+ BIOGRAPHY,};
+
+ /**
+ * 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 -->
+ *
+ * @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 -->
+ *
+ * @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 -->
+ *
+ * @generated
+ */
+ public static BookCategory get(int value) {
+ switch (value) {
+ case MYSTERY_VALUE:
+ return MYSTERY;
+ case SCIENCE_FICTION_VALUE:
+ return SCIENCE_FICTION;
+ case BIOGRAPHY_VALUE:
+ return BIOGRAPHY;
+ }
+ 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/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/BookOnTape.java b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/BookOnTape.java
new file mode 100644
index 0000000..37a3f4f
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/BookOnTape.java
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.acceleo.parser.tests.extlibrary;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object '<em><b>Book On Tape</b></em>'. <!--
+ * end-user-doc -->
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.BookOnTape#getReader <em>Reader</em>}</li>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.BookOnTape#getAuthor <em>Author</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage#getBookOnTape()
+ * @model
+ * @generated
+ */
+public interface BookOnTape extends AudioVisualItem {
+ /**
+ * Returns the value of the '<em><b>Reader</b></em>' reference. <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Reader</em>' reference isn't clear, there really should be more of a
+ * description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Reader</em>' reference.
+ * @see #setReader(Person)
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage#getBookOnTape_Reader()
+ * @model
+ * @generated
+ */
+ Person getReader();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.acceleo.parser.tests.extlibrary.BookOnTape#getReader
+ * <em>Reader</em>}' reference. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Reader</em>' reference.
+ * @see #getReader()
+ * @generated
+ */
+ void setReader(Person value);
+
+ /**
+ * Returns the value of the '<em><b>Author</b></em>' reference. <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Author</em>' reference isn't clear, there really should be more of a
+ * description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Author</em>' reference.
+ * @see #setAuthor(Writer)
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage#getBookOnTape_Author()
+ * @model
+ * @generated
+ */
+ Writer getAuthor();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.acceleo.parser.tests.extlibrary.BookOnTape#getAuthor
+ * <em>Author</em>}' reference. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Author</em>' reference.
+ * @see #getAuthor()
+ * @generated
+ */
+ void setAuthor(Writer value);
+
+} // BookOnTape
diff --git a/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/Borrower.java b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/Borrower.java
new file mode 100644
index 0000000..538027c
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/Borrower.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.acceleo.parser.tests.extlibrary;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object '<em><b>Borrower</b></em>'. <!-- end-user-doc
+ * -->
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.Borrower#getBorrowed <em>Borrowed</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage#getBorrower()
+ * @model
+ * @generated
+ */
+public interface Borrower extends Person {
+ /**
+ * Returns the value of the '<em><b>Borrowed</b></em>' reference list. The list contents are of type
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.Lendable}. It is bidirectional and its opposite is '
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.Lendable#getBorrowers <em>Borrowers</em>}'. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Borrowed</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>Borrowed</em>' reference list.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage#getBorrower_Borrowed()
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.Lendable#getBorrowers
+ * @model opposite="borrowers"
+ * @generated
+ */
+ EList<Lendable> getBorrowed();
+
+} // Borrower
diff --git a/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/CirculatingItem.java b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/CirculatingItem.java
new file mode 100644
index 0000000..1de9a45
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/CirculatingItem.java
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.acceleo.parser.tests.extlibrary;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object '<em><b>Circulating Item</b></em>'. <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage#getCirculatingItem()
+ * @model abstract="true"
+ * @generated
+ */
+public interface CirculatingItem extends Item, Lendable {
+} // CirculatingItem
diff --git a/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/Employee.java b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/Employee.java
new file mode 100644
index 0000000..2c6d634
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/Employee.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.acceleo.parser.tests.extlibrary;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object '<em><b>Employee</b></em>'. <!-- end-user-doc
+ * -->
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.Employee#getManager <em>Manager</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage#getEmployee()
+ * @model
+ * @generated
+ */
+public interface Employee extends Person {
+ /**
+ * Returns the value of the '<em><b>Manager</b></em>' reference. <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Manager</em>' reference isn't clear, there really should be more of a
+ * description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Manager</em>' reference.
+ * @see #setManager(Employee)
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage#getEmployee_Manager()
+ * @model
+ * @generated
+ */
+ Employee getManager();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.acceleo.parser.tests.extlibrary.Employee#getManager
+ * <em>Manager</em>}' reference. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Manager</em>' reference.
+ * @see #getManager()
+ * @generated
+ */
+ void setManager(Employee value);
+
+} // Employee
diff --git a/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/ExtlibraryFactory.java b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/ExtlibraryFactory.java
new file mode 100644
index 0000000..84b001c
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/ExtlibraryFactory.java
@@ -0,0 +1,102 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.acceleo.parser.tests.extlibrary;
+
+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.acceleo.parser.tests.extlibrary.ExtlibraryPackage
+ * @generated
+ */
+public interface ExtlibraryFactory extends EFactory {
+ /**
+ * The singleton instance of the factory. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ ExtlibraryFactory eINSTANCE = org.eclipse.acceleo.parser.tests.extlibrary.impl.ExtlibraryFactoryImpl.init();
+
+ /**
+ * 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>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>Writer</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Writer</em>'.
+ * @generated
+ */
+ Writer createWriter();
+
+ /**
+ * Returns a new object of class '<em>Book On Tape</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Book On Tape</em>'.
+ * @generated
+ */
+ BookOnTape createBookOnTape();
+
+ /**
+ * Returns a new object of class '<em>Video Cassette</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Video Cassette</em>'.
+ * @generated
+ */
+ VideoCassette createVideoCassette();
+
+ /**
+ * Returns a new object of class '<em>Borrower</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Borrower</em>'.
+ * @generated
+ */
+ Borrower createBorrower();
+
+ /**
+ * Returns a new object of class '<em>Person</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Person</em>'.
+ * @generated
+ */
+ Person createPerson();
+
+ /**
+ * Returns a new object of class '<em>Employee</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Employee</em>'.
+ * @generated
+ */
+ Employee createEmployee();
+
+ /**
+ * Returns the package supported by this factory. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the package supported by this factory.
+ * @generated
+ */
+ ExtlibraryPackage getExtlibraryPackage();
+
+} // ExtlibraryFactory
diff --git a/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/ExtlibraryPackage.java b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/ExtlibraryPackage.java
new file mode 100644
index 0000000..e11e694
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/ExtlibraryPackage.java
@@ -0,0 +1,1856 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.acceleo.parser.tests.extlibrary;
+
+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 enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface ExtlibraryPackage extends EPackage {
+ /**
+ * The package name. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNAME = "extlibrary";
+
+ /**
+ * The package namespace URI. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNS_URI = "http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0";
+
+ /**
+ * The package namespace name. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNS_PREFIX = "extlib";
+
+ /**
+ * The singleton instance of the package. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ ExtlibraryPackage eINSTANCE = org.eclipse.acceleo.parser.tests.extlibrary.impl.ExtlibraryPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.ItemImpl <em>Item</em>}
+ * ' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.ItemImpl
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.ExtlibraryPackageImpl#getItem()
+ * @generated
+ */
+ int ITEM = 3;
+
+ /**
+ * The feature id for the '<em><b>Publication Date</b></em>' attribute. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int ITEM__PUBLICATION_DATE = 0;
+
+ /**
+ * The number of structural features of the '<em>Item</em>' class. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int ITEM_FEATURE_COUNT = 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.CirculatingItemImpl
+ * <em>Circulating Item</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.CirculatingItemImpl
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.ExtlibraryPackageImpl#getCirculatingItem()
+ * @generated
+ */
+ int CIRCULATING_ITEM = 5;
+
+ /**
+ * The feature id for the '<em><b>Publication Date</b></em>' attribute. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int CIRCULATING_ITEM__PUBLICATION_DATE = ITEM__PUBLICATION_DATE;
+
+ /**
+ * The feature id for the '<em><b>Copies</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ * @ordered
+ */
+ int CIRCULATING_ITEM__COPIES = ITEM_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Borrowers</b></em>' reference list. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int CIRCULATING_ITEM__BORROWERS = ITEM_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>Circulating Item</em>' class. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int CIRCULATING_ITEM_FEATURE_COUNT = ITEM_FEATURE_COUNT + 2;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.BookImpl <em>Book</em>}
+ * ' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.BookImpl
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.ExtlibraryPackageImpl#getBook()
+ * @generated
+ */
+ int BOOK = 0;
+
+ /**
+ * The feature id for the '<em><b>Publication Date</b></em>' attribute. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int BOOK__PUBLICATION_DATE = CIRCULATING_ITEM__PUBLICATION_DATE;
+
+ /**
+ * The feature id for the '<em><b>Copies</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ * @ordered
+ */
+ int BOOK__COPIES = CIRCULATING_ITEM__COPIES;
+
+ /**
+ * The feature id for the '<em><b>Borrowers</b></em>' reference list. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int BOOK__BORROWERS = CIRCULATING_ITEM__BORROWERS;
+
+ /**
+ * The feature id for the '<em><b>Title</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int BOOK__TITLE = CIRCULATING_ITEM_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Pages</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int BOOK__PAGES = CIRCULATING_ITEM_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Category</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ * @ordered
+ */
+ int BOOK__CATEGORY = CIRCULATING_ITEM_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>Author</b></em>' reference. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ * @ordered
+ */
+ int BOOK__AUTHOR = CIRCULATING_ITEM_FEATURE_COUNT + 3;
+
+ /**
+ * The number of structural features of the '<em>Book</em>' class. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int BOOK_FEATURE_COUNT = CIRCULATING_ITEM_FEATURE_COUNT + 4;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.acceleo.parser.tests.extlibrary.Addressable
+ * <em>Addressable</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.Addressable
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.ExtlibraryPackageImpl#getAddressable()
+ * @generated
+ */
+ int ADDRESSABLE = 13;
+
+ /**
+ * The feature id for the '<em><b>Address</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ * @ordered
+ */
+ int ADDRESSABLE__ADDRESS = 0;
+
+ /**
+ * The number of structural features of the '<em>Addressable</em>' class. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int ADDRESSABLE_FEATURE_COUNT = 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.LibraryImpl
+ * <em>Library</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.LibraryImpl
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.ExtlibraryPackageImpl#getLibrary()
+ * @generated
+ */
+ int LIBRARY = 1;
+
+ /**
+ * The feature id for the '<em><b>Address</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ * @ordered
+ */
+ int LIBRARY__ADDRESS = ADDRESSABLE__ADDRESS;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int LIBRARY__NAME = ADDRESSABLE_FEATURE_COUNT + 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 = ADDRESSABLE_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Employees</b></em>' containment reference list. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int LIBRARY__EMPLOYEES = ADDRESSABLE_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>Borrowers</b></em>' containment reference list. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int LIBRARY__BORROWERS = ADDRESSABLE_FEATURE_COUNT + 3;
+
+ /**
+ * The feature id for the '<em><b>Stock</b></em>' containment reference list. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int LIBRARY__STOCK = ADDRESSABLE_FEATURE_COUNT + 4;
+
+ /**
+ * The feature id for the '<em><b>Books</b></em>' reference list. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int LIBRARY__BOOKS = ADDRESSABLE_FEATURE_COUNT + 5;
+
+ /**
+ * The feature id for the '<em><b>Branches</b></em>' containment reference list. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int LIBRARY__BRANCHES = ADDRESSABLE_FEATURE_COUNT + 6;
+
+ /**
+ * The feature id for the '<em><b>Parent Branch</b></em>' container reference. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int LIBRARY__PARENT_BRANCH = ADDRESSABLE_FEATURE_COUNT + 7;
+
+ /**
+ * The feature id for the '<em><b>People</b></em>' attribute list. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int LIBRARY__PEOPLE = ADDRESSABLE_FEATURE_COUNT + 8;
+
+ /**
+ * The number of structural features of the '<em>Library</em>' class. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int LIBRARY_FEATURE_COUNT = ADDRESSABLE_FEATURE_COUNT + 9;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.PersonImpl
+ * <em>Person</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.PersonImpl
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.ExtlibraryPackageImpl#getPerson()
+ * @generated
+ */
+ int PERSON = 11;
+
+ /**
+ * The feature id for the '<em><b>Address</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ * @ordered
+ */
+ int PERSON__ADDRESS = ADDRESSABLE__ADDRESS;
+
+ /**
+ * The feature id for the '<em><b>First Name</b></em>' attribute. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int PERSON__FIRST_NAME = ADDRESSABLE_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Last Name</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ * @ordered
+ */
+ int PERSON__LAST_NAME = ADDRESSABLE_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>Person</em>' class. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int PERSON_FEATURE_COUNT = ADDRESSABLE_FEATURE_COUNT + 2;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.WriterImpl
+ * <em>Writer</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.WriterImpl
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.ExtlibraryPackageImpl#getWriter()
+ * @generated
+ */
+ int WRITER = 2;
+
+ /**
+ * The feature id for the '<em><b>Address</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ * @ordered
+ */
+ int WRITER__ADDRESS = PERSON__ADDRESS;
+
+ /**
+ * The feature id for the '<em><b>First Name</b></em>' attribute. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int WRITER__FIRST_NAME = PERSON__FIRST_NAME;
+
+ /**
+ * The feature id for the '<em><b>Last Name</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ * @ordered
+ */
+ int WRITER__LAST_NAME = PERSON__LAST_NAME;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int WRITER__NAME = PERSON_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Books</b></em>' reference list. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int WRITER__BOOKS = PERSON_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>Writer</em>' class. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int WRITER_FEATURE_COUNT = PERSON_FEATURE_COUNT + 2;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.acceleo.parser.tests.extlibrary.Lendable <em>Lendable</em>}'
+ * class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.Lendable
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.ExtlibraryPackageImpl#getLendable()
+ * @generated
+ */
+ int LENDABLE = 4;
+
+ /**
+ * The feature id for the '<em><b>Copies</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ * @ordered
+ */
+ int LENDABLE__COPIES = 0;
+
+ /**
+ * The feature id for the '<em><b>Borrowers</b></em>' reference list. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int LENDABLE__BORROWERS = 1;
+
+ /**
+ * The number of structural features of the '<em>Lendable</em>' class. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int LENDABLE_FEATURE_COUNT = 2;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.PeriodicalImpl
+ * <em>Periodical</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.PeriodicalImpl
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.ExtlibraryPackageImpl#getPeriodical()
+ * @generated
+ */
+ int PERIODICAL = 6;
+
+ /**
+ * The feature id for the '<em><b>Publication Date</b></em>' attribute. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int PERIODICAL__PUBLICATION_DATE = ITEM__PUBLICATION_DATE;
+
+ /**
+ * The feature id for the '<em><b>Title</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int PERIODICAL__TITLE = ITEM_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Issues Per Year</b></em>' attribute. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int PERIODICAL__ISSUES_PER_YEAR = ITEM_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>Periodical</em>' class. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int PERIODICAL_FEATURE_COUNT = ITEM_FEATURE_COUNT + 2;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.AudioVisualItemImpl
+ * <em>Audio Visual Item</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.AudioVisualItemImpl
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.ExtlibraryPackageImpl#getAudioVisualItem()
+ * @generated
+ */
+ int AUDIO_VISUAL_ITEM = 7;
+
+ /**
+ * The feature id for the '<em><b>Publication Date</b></em>' attribute. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int AUDIO_VISUAL_ITEM__PUBLICATION_DATE = CIRCULATING_ITEM__PUBLICATION_DATE;
+
+ /**
+ * The feature id for the '<em><b>Copies</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ * @ordered
+ */
+ int AUDIO_VISUAL_ITEM__COPIES = CIRCULATING_ITEM__COPIES;
+
+ /**
+ * The feature id for the '<em><b>Borrowers</b></em>' reference list. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int AUDIO_VISUAL_ITEM__BORROWERS = CIRCULATING_ITEM__BORROWERS;
+
+ /**
+ * The feature id for the '<em><b>Title</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int AUDIO_VISUAL_ITEM__TITLE = CIRCULATING_ITEM_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Minutes Length</b></em>' attribute. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int AUDIO_VISUAL_ITEM__MINUTES_LENGTH = CIRCULATING_ITEM_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Damaged</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ * @ordered
+ */
+ int AUDIO_VISUAL_ITEM__DAMAGED = CIRCULATING_ITEM_FEATURE_COUNT + 2;
+
+ /**
+ * The number of structural features of the '<em>Audio Visual Item</em>' class. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int AUDIO_VISUAL_ITEM_FEATURE_COUNT = CIRCULATING_ITEM_FEATURE_COUNT + 3;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.BookOnTapeImpl
+ * <em>Book On Tape</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.BookOnTapeImpl
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.ExtlibraryPackageImpl#getBookOnTape()
+ * @generated
+ */
+ int BOOK_ON_TAPE = 8;
+
+ /**
+ * The feature id for the '<em><b>Publication Date</b></em>' attribute. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int BOOK_ON_TAPE__PUBLICATION_DATE = AUDIO_VISUAL_ITEM__PUBLICATION_DATE;
+
+ /**
+ * The feature id for the '<em><b>Copies</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ * @ordered
+ */
+ int BOOK_ON_TAPE__COPIES = AUDIO_VISUAL_ITEM__COPIES;
+
+ /**
+ * The feature id for the '<em><b>Borrowers</b></em>' reference list. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int BOOK_ON_TAPE__BORROWERS = AUDIO_VISUAL_ITEM__BORROWERS;
+
+ /**
+ * The feature id for the '<em><b>Title</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int BOOK_ON_TAPE__TITLE = AUDIO_VISUAL_ITEM__TITLE;
+
+ /**
+ * The feature id for the '<em><b>Minutes Length</b></em>' attribute. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int BOOK_ON_TAPE__MINUTES_LENGTH = AUDIO_VISUAL_ITEM__MINUTES_LENGTH;
+
+ /**
+ * The feature id for the '<em><b>Damaged</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ * @ordered
+ */
+ int BOOK_ON_TAPE__DAMAGED = AUDIO_VISUAL_ITEM__DAMAGED;
+
+ /**
+ * The feature id for the '<em><b>Reader</b></em>' reference. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ * @ordered
+ */
+ int BOOK_ON_TAPE__READER = AUDIO_VISUAL_ITEM_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Author</b></em>' reference. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ * @ordered
+ */
+ int BOOK_ON_TAPE__AUTHOR = AUDIO_VISUAL_ITEM_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>Book On Tape</em>' class. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int BOOK_ON_TAPE_FEATURE_COUNT = AUDIO_VISUAL_ITEM_FEATURE_COUNT + 2;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.VideoCassetteImpl
+ * <em>Video Cassette</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.VideoCassetteImpl
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.ExtlibraryPackageImpl#getVideoCassette()
+ * @generated
+ */
+ int VIDEO_CASSETTE = 9;
+
+ /**
+ * The feature id for the '<em><b>Publication Date</b></em>' attribute. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int VIDEO_CASSETTE__PUBLICATION_DATE = AUDIO_VISUAL_ITEM__PUBLICATION_DATE;
+
+ /**
+ * The feature id for the '<em><b>Copies</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ * @ordered
+ */
+ int VIDEO_CASSETTE__COPIES = AUDIO_VISUAL_ITEM__COPIES;
+
+ /**
+ * The feature id for the '<em><b>Borrowers</b></em>' reference list. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int VIDEO_CASSETTE__BORROWERS = AUDIO_VISUAL_ITEM__BORROWERS;
+
+ /**
+ * The feature id for the '<em><b>Title</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int VIDEO_CASSETTE__TITLE = AUDIO_VISUAL_ITEM__TITLE;
+
+ /**
+ * The feature id for the '<em><b>Minutes Length</b></em>' attribute. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int VIDEO_CASSETTE__MINUTES_LENGTH = AUDIO_VISUAL_ITEM__MINUTES_LENGTH;
+
+ /**
+ * The feature id for the '<em><b>Damaged</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ * @ordered
+ */
+ int VIDEO_CASSETTE__DAMAGED = AUDIO_VISUAL_ITEM__DAMAGED;
+
+ /**
+ * The feature id for the '<em><b>Cast</b></em>' reference list. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ * @ordered
+ */
+ int VIDEO_CASSETTE__CAST = AUDIO_VISUAL_ITEM_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Video Cassette</em>' class. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int VIDEO_CASSETTE_FEATURE_COUNT = AUDIO_VISUAL_ITEM_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.BorrowerImpl
+ * <em>Borrower</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.BorrowerImpl
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.ExtlibraryPackageImpl#getBorrower()
+ * @generated
+ */
+ int BORROWER = 10;
+
+ /**
+ * The feature id for the '<em><b>Address</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ * @ordered
+ */
+ int BORROWER__ADDRESS = PERSON__ADDRESS;
+
+ /**
+ * The feature id for the '<em><b>First Name</b></em>' attribute. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int BORROWER__FIRST_NAME = PERSON__FIRST_NAME;
+
+ /**
+ * The feature id for the '<em><b>Last Name</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ * @ordered
+ */
+ int BORROWER__LAST_NAME = PERSON__LAST_NAME;
+
+ /**
+ * The feature id for the '<em><b>Borrowed</b></em>' reference list. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int BORROWER__BORROWED = PERSON_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Borrower</em>' class. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int BORROWER_FEATURE_COUNT = PERSON_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.EmployeeImpl
+ * <em>Employee</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.EmployeeImpl
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.ExtlibraryPackageImpl#getEmployee()
+ * @generated
+ */
+ int EMPLOYEE = 12;
+
+ /**
+ * The feature id for the '<em><b>Address</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ * @ordered
+ */
+ int EMPLOYEE__ADDRESS = PERSON__ADDRESS;
+
+ /**
+ * The feature id for the '<em><b>First Name</b></em>' attribute. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int EMPLOYEE__FIRST_NAME = PERSON__FIRST_NAME;
+
+ /**
+ * The feature id for the '<em><b>Last Name</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ * @ordered
+ */
+ int EMPLOYEE__LAST_NAME = PERSON__LAST_NAME;
+
+ /**
+ * The feature id for the '<em><b>Manager</b></em>' reference. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ * @ordered
+ */
+ int EMPLOYEE__MANAGER = PERSON_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Employee</em>' class. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int EMPLOYEE_FEATURE_COUNT = PERSON_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.acceleo.parser.tests.extlibrary.BookCategory
+ * <em>Book Category</em>}' enum. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.BookCategory
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.ExtlibraryPackageImpl#getBookCategory()
+ * @generated
+ */
+ int BOOK_CATEGORY = 14;
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.acceleo.parser.tests.extlibrary.Book <em>Book</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Book</em>'.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.Book
+ * @generated
+ */
+ EClass getBook();
+
+ /**
+ * Returns the meta object for the attribute '
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.Book#getTitle <em>Title</em>}'. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Title</em>'.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.Book#getTitle()
+ * @see #getBook()
+ * @generated
+ */
+ EAttribute getBook_Title();
+
+ /**
+ * Returns the meta object for the attribute '
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.Book#getPages <em>Pages</em>}'. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Pages</em>'.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.Book#getPages()
+ * @see #getBook()
+ * @generated
+ */
+ EAttribute getBook_Pages();
+
+ /**
+ * Returns the meta object for the attribute '
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.Book#getCategory <em>Category</em>}'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Category</em>'.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.Book#getCategory()
+ * @see #getBook()
+ * @generated
+ */
+ EAttribute getBook_Category();
+
+ /**
+ * Returns the meta object for the reference '
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.Book#getAuthor <em>Author</em>}'. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference '<em>Author</em>'.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.Book#getAuthor()
+ * @see #getBook()
+ * @generated
+ */
+ EReference getBook_Author();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.acceleo.parser.tests.extlibrary.Library
+ * <em>Library</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Library</em>'.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.Library
+ * @generated
+ */
+ EClass getLibrary();
+
+ /**
+ * Returns the meta object for the attribute '
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.Library#getName <em>Name</em>}'. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.Library#getName()
+ * @see #getLibrary()
+ * @generated
+ */
+ EAttribute getLibrary_Name();
+
+ /**
+ * Returns the meta object for the containment reference list '
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.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.acceleo.parser.tests.extlibrary.Library#getWriters()
+ * @see #getLibrary()
+ * @generated
+ */
+ EReference getLibrary_Writers();
+
+ /**
+ * Returns the meta object for the containment reference list '
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.Library#getEmployees <em>Employees</em>}'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the containment reference list '<em>Employees</em>'.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.Library#getEmployees()
+ * @see #getLibrary()
+ * @generated
+ */
+ EReference getLibrary_Employees();
+
+ /**
+ * Returns the meta object for the containment reference list '
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.Library#getBorrowers <em>Borrowers</em>}'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the containment reference list '<em>Borrowers</em>'.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.Library#getBorrowers()
+ * @see #getLibrary()
+ * @generated
+ */
+ EReference getLibrary_Borrowers();
+
+ /**
+ * Returns the meta object for the containment reference list '
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.Library#getStock <em>Stock</em>}'. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the containment reference list '<em>Stock</em>'.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.Library#getStock()
+ * @see #getLibrary()
+ * @generated
+ */
+ EReference getLibrary_Stock();
+
+ /**
+ * Returns the meta object for the reference list '
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.Library#getBooks <em>Books</em>}'. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference list '<em>Books</em>'.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.Library#getBooks()
+ * @see #getLibrary()
+ * @generated
+ */
+ EReference getLibrary_Books();
+
+ /**
+ * Returns the meta object for the containment reference list '
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.Library#getBranches <em>Branches</em>}'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the containment reference list '<em>Branches</em>'.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.Library#getBranches()
+ * @see #getLibrary()
+ * @generated
+ */
+ EReference getLibrary_Branches();
+
+ /**
+ * Returns the meta object for the container reference '
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.Library#getParentBranch <em>Parent Branch</em>}'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the container reference '<em>Parent Branch</em>'.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.Library#getParentBranch()
+ * @see #getLibrary()
+ * @generated
+ */
+ EReference getLibrary_ParentBranch();
+
+ /**
+ * Returns the meta object for the attribute list '
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.Library#getPeople <em>People</em>}'. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute list '<em>People</em>'.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.Library#getPeople()
+ * @see #getLibrary()
+ * @generated
+ */
+ EAttribute getLibrary_People();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.acceleo.parser.tests.extlibrary.Writer
+ * <em>Writer</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Writer</em>'.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.Writer
+ * @generated
+ */
+ EClass getWriter();
+
+ /**
+ * Returns the meta object for the attribute '
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.Writer#getName <em>Name</em>}'. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.Writer#getName()
+ * @see #getWriter()
+ * @generated
+ */
+ EAttribute getWriter_Name();
+
+ /**
+ * Returns the meta object for the reference list '
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.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.acceleo.parser.tests.extlibrary.Writer#getBooks()
+ * @see #getWriter()
+ * @generated
+ */
+ EReference getWriter_Books();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.acceleo.parser.tests.extlibrary.Item <em>Item</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Item</em>'.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.Item
+ * @generated
+ */
+ EClass getItem();
+
+ /**
+ * Returns the meta object for the attribute '
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.Item#getPublicationDate <em>Publication Date</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Publication Date</em>'.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.Item#getPublicationDate()
+ * @see #getItem()
+ * @generated
+ */
+ EAttribute getItem_PublicationDate();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.acceleo.parser.tests.extlibrary.Lendable
+ * <em>Lendable</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Lendable</em>'.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.Lendable
+ * @generated
+ */
+ EClass getLendable();
+
+ /**
+ * Returns the meta object for the attribute '
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.Lendable#getCopies <em>Copies</em>}'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Copies</em>'.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.Lendable#getCopies()
+ * @see #getLendable()
+ * @generated
+ */
+ EAttribute getLendable_Copies();
+
+ /**
+ * Returns the meta object for the reference list '
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.Lendable#getBorrowers <em>Borrowers</em>}'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference list '<em>Borrowers</em>'.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.Lendable#getBorrowers()
+ * @see #getLendable()
+ * @generated
+ */
+ EReference getLendable_Borrowers();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.acceleo.parser.tests.extlibrary.CirculatingItem
+ * <em>Circulating Item</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Circulating Item</em>'.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.CirculatingItem
+ * @generated
+ */
+ EClass getCirculatingItem();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.acceleo.parser.tests.extlibrary.Periodical
+ * <em>Periodical</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Periodical</em>'.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.Periodical
+ * @generated
+ */
+ EClass getPeriodical();
+
+ /**
+ * Returns the meta object for the attribute '
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.Periodical#getTitle <em>Title</em>}'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Title</em>'.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.Periodical#getTitle()
+ * @see #getPeriodical()
+ * @generated
+ */
+ EAttribute getPeriodical_Title();
+
+ /**
+ * Returns the meta object for the attribute '
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.Periodical#getIssuesPerYear <em>Issues Per Year</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Issues Per Year</em>'.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.Periodical#getIssuesPerYear()
+ * @see #getPeriodical()
+ * @generated
+ */
+ EAttribute getPeriodical_IssuesPerYear();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.acceleo.parser.tests.extlibrary.AudioVisualItem
+ * <em>Audio Visual Item</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Audio Visual Item</em>'.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.AudioVisualItem
+ * @generated
+ */
+ EClass getAudioVisualItem();
+
+ /**
+ * Returns the meta object for the attribute '
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.AudioVisualItem#getTitle <em>Title</em>}'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Title</em>'.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.AudioVisualItem#getTitle()
+ * @see #getAudioVisualItem()
+ * @generated
+ */
+ EAttribute getAudioVisualItem_Title();
+
+ /**
+ * Returns the meta object for the attribute '
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.AudioVisualItem#getMinutesLength
+ * <em>Minutes Length</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Minutes Length</em>'.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.AudioVisualItem#getMinutesLength()
+ * @see #getAudioVisualItem()
+ * @generated
+ */
+ EAttribute getAudioVisualItem_MinutesLength();
+
+ /**
+ * Returns the meta object for the attribute '
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.AudioVisualItem#isDamaged <em>Damaged</em>}'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Damaged</em>'.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.AudioVisualItem#isDamaged()
+ * @see #getAudioVisualItem()
+ * @generated
+ */
+ EAttribute getAudioVisualItem_Damaged();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.acceleo.parser.tests.extlibrary.BookOnTape
+ * <em>Book On Tape</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Book On Tape</em>'.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.BookOnTape
+ * @generated
+ */
+ EClass getBookOnTape();
+
+ /**
+ * Returns the meta object for the reference '
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.BookOnTape#getReader <em>Reader</em>}'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference '<em>Reader</em>'.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.BookOnTape#getReader()
+ * @see #getBookOnTape()
+ * @generated
+ */
+ EReference getBookOnTape_Reader();
+
+ /**
+ * Returns the meta object for the reference '
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.BookOnTape#getAuthor <em>Author</em>}'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference '<em>Author</em>'.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.BookOnTape#getAuthor()
+ * @see #getBookOnTape()
+ * @generated
+ */
+ EReference getBookOnTape_Author();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.acceleo.parser.tests.extlibrary.VideoCassette
+ * <em>Video Cassette</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Video Cassette</em>'.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.VideoCassette
+ * @generated
+ */
+ EClass getVideoCassette();
+
+ /**
+ * Returns the meta object for the reference list '
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.VideoCassette#getCast <em>Cast</em>}'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference list '<em>Cast</em>'.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.VideoCassette#getCast()
+ * @see #getVideoCassette()
+ * @generated
+ */
+ EReference getVideoCassette_Cast();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.acceleo.parser.tests.extlibrary.Borrower
+ * <em>Borrower</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Borrower</em>'.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.Borrower
+ * @generated
+ */
+ EClass getBorrower();
+
+ /**
+ * Returns the meta object for the reference list '
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.Borrower#getBorrowed <em>Borrowed</em>}'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference list '<em>Borrowed</em>'.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.Borrower#getBorrowed()
+ * @see #getBorrower()
+ * @generated
+ */
+ EReference getBorrower_Borrowed();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.acceleo.parser.tests.extlibrary.Person
+ * <em>Person</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Person</em>'.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.Person
+ * @generated
+ */
+ EClass getPerson();
+
+ /**
+ * Returns the meta object for the attribute '
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.Person#getFirstName <em>First Name</em>}'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>First Name</em>'.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.Person#getFirstName()
+ * @see #getPerson()
+ * @generated
+ */
+ EAttribute getPerson_FirstName();
+
+ /**
+ * Returns the meta object for the attribute '
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.Person#getLastName <em>Last Name</em>}'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Last Name</em>'.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.Person#getLastName()
+ * @see #getPerson()
+ * @generated
+ */
+ EAttribute getPerson_LastName();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.acceleo.parser.tests.extlibrary.Employee
+ * <em>Employee</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Employee</em>'.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.Employee
+ * @generated
+ */
+ EClass getEmployee();
+
+ /**
+ * Returns the meta object for the reference '
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.Employee#getManager <em>Manager</em>}'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference '<em>Manager</em>'.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.Employee#getManager()
+ * @see #getEmployee()
+ * @generated
+ */
+ EReference getEmployee_Manager();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.acceleo.parser.tests.extlibrary.Addressable
+ * <em>Addressable</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Addressable</em>'.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.Addressable
+ * @generated
+ */
+ EClass getAddressable();
+
+ /**
+ * Returns the meta object for the attribute '
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.Addressable#getAddress <em>Address</em>}'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Address</em>'.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.Addressable#getAddress()
+ * @see #getAddressable()
+ * @generated
+ */
+ EAttribute getAddressable_Address();
+
+ /**
+ * Returns the meta object for enum '{@link org.eclipse.acceleo.parser.tests.extlibrary.BookCategory
+ * <em>Book Category</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for enum '<em>Book Category</em>'.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.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
+ */
+ ExtlibraryFactory getExtlibraryFactory();
+
+ /**
+ * <!-- begin-user-doc --> Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ interface Literals {
+ /**
+ * The meta object literal for the '{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.BookImpl
+ * <em>Book</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.BookImpl
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.ExtlibraryPackageImpl#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 feature. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute BOOK__CATEGORY = eINSTANCE.getBook_Category();
+
+ /**
+ * The meta object literal for the '<em><b>Author</b></em>' reference feature. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference BOOK__AUTHOR = eINSTANCE.getBook_Author();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.LibraryImpl
+ * <em>Library</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.LibraryImpl
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.ExtlibraryPackageImpl#getLibrary()
+ * @generated
+ */
+ EClass LIBRARY = eINSTANCE.getLibrary();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute LIBRARY__NAME = eINSTANCE.getLibrary_Name();
+
+ /**
+ * 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>Employees</b></em>' containment reference list feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference LIBRARY__EMPLOYEES = eINSTANCE.getLibrary_Employees();
+
+ /**
+ * The meta object literal for the '<em><b>Borrowers</b></em>' containment reference list feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference LIBRARY__BORROWERS = eINSTANCE.getLibrary_Borrowers();
+
+ /**
+ * The meta object literal for the '<em><b>Stock</b></em>' containment reference list feature. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference LIBRARY__STOCK = eINSTANCE.getLibrary_Stock();
+
+ /**
+ * The meta object literal for the '<em><b>Books</b></em>' reference list feature. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference LIBRARY__BOOKS = eINSTANCE.getLibrary_Books();
+
+ /**
+ * The meta object literal for the '<em><b>Branches</b></em>' containment reference list feature. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference LIBRARY__BRANCHES = eINSTANCE.getLibrary_Branches();
+
+ /**
+ * The meta object literal for the '<em><b>Parent Branch</b></em>' container reference feature. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference LIBRARY__PARENT_BRANCH = eINSTANCE.getLibrary_ParentBranch();
+
+ /**
+ * The meta object literal for the '<em><b>People</b></em>' attribute list feature. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute LIBRARY__PEOPLE = eINSTANCE.getLibrary_People();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.WriterImpl
+ * <em>Writer</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.WriterImpl
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.ExtlibraryPackageImpl#getWriter()
+ * @generated
+ */
+ EClass WRITER = eINSTANCE.getWriter();
+
+ /**
+ * 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 '<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 '{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.ItemImpl
+ * <em>Item</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.ItemImpl
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.ExtlibraryPackageImpl#getItem()
+ * @generated
+ */
+ EClass ITEM = eINSTANCE.getItem();
+
+ /**
+ * The meta object literal for the '<em><b>Publication Date</b></em>' attribute feature. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute ITEM__PUBLICATION_DATE = eINSTANCE.getItem_PublicationDate();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.acceleo.parser.tests.extlibrary.Lendable
+ * <em>Lendable</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.Lendable
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.ExtlibraryPackageImpl#getLendable()
+ * @generated
+ */
+ EClass LENDABLE = eINSTANCE.getLendable();
+
+ /**
+ * The meta object literal for the '<em><b>Copies</b></em>' attribute feature. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute LENDABLE__COPIES = eINSTANCE.getLendable_Copies();
+
+ /**
+ * The meta object literal for the '<em><b>Borrowers</b></em>' reference list feature. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference LENDABLE__BORROWERS = eINSTANCE.getLendable_Borrowers();
+
+ /**
+ * The meta object literal for the '
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.impl.CirculatingItemImpl <em>Circulating Item</em>}'
+ * class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.CirculatingItemImpl
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.ExtlibraryPackageImpl#getCirculatingItem()
+ * @generated
+ */
+ EClass CIRCULATING_ITEM = eINSTANCE.getCirculatingItem();
+
+ /**
+ * The meta object literal for the '
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.impl.PeriodicalImpl <em>Periodical</em>}' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.PeriodicalImpl
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.ExtlibraryPackageImpl#getPeriodical()
+ * @generated
+ */
+ EClass PERIODICAL = eINSTANCE.getPeriodical();
+
+ /**
+ * The meta object literal for the '<em><b>Title</b></em>' attribute feature. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute PERIODICAL__TITLE = eINSTANCE.getPeriodical_Title();
+
+ /**
+ * The meta object literal for the '<em><b>Issues Per Year</b></em>' attribute feature. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute PERIODICAL__ISSUES_PER_YEAR = eINSTANCE.getPeriodical_IssuesPerYear();
+
+ /**
+ * The meta object literal for the '
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.impl.AudioVisualItemImpl <em>Audio Visual Item</em>}
+ * ' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.AudioVisualItemImpl
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.ExtlibraryPackageImpl#getAudioVisualItem()
+ * @generated
+ */
+ EClass AUDIO_VISUAL_ITEM = eINSTANCE.getAudioVisualItem();
+
+ /**
+ * The meta object literal for the '<em><b>Title</b></em>' attribute feature. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute AUDIO_VISUAL_ITEM__TITLE = eINSTANCE.getAudioVisualItem_Title();
+
+ /**
+ * The meta object literal for the '<em><b>Minutes Length</b></em>' attribute feature. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute AUDIO_VISUAL_ITEM__MINUTES_LENGTH = eINSTANCE.getAudioVisualItem_MinutesLength();
+
+ /**
+ * The meta object literal for the '<em><b>Damaged</b></em>' attribute feature. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute AUDIO_VISUAL_ITEM__DAMAGED = eINSTANCE.getAudioVisualItem_Damaged();
+
+ /**
+ * The meta object literal for the '
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.impl.BookOnTapeImpl <em>Book On Tape</em>}' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.BookOnTapeImpl
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.ExtlibraryPackageImpl#getBookOnTape()
+ * @generated
+ */
+ EClass BOOK_ON_TAPE = eINSTANCE.getBookOnTape();
+
+ /**
+ * The meta object literal for the '<em><b>Reader</b></em>' reference feature. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference BOOK_ON_TAPE__READER = eINSTANCE.getBookOnTape_Reader();
+
+ /**
+ * The meta object literal for the '<em><b>Author</b></em>' reference feature. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference BOOK_ON_TAPE__AUTHOR = eINSTANCE.getBookOnTape_Author();
+
+ /**
+ * The meta object literal for the '
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.impl.VideoCassetteImpl <em>Video Cassette</em>}'
+ * class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.VideoCassetteImpl
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.ExtlibraryPackageImpl#getVideoCassette()
+ * @generated
+ */
+ EClass VIDEO_CASSETTE = eINSTANCE.getVideoCassette();
+
+ /**
+ * The meta object literal for the '<em><b>Cast</b></em>' reference list feature. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference VIDEO_CASSETTE__CAST = eINSTANCE.getVideoCassette_Cast();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.BorrowerImpl
+ * <em>Borrower</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.BorrowerImpl
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.ExtlibraryPackageImpl#getBorrower()
+ * @generated
+ */
+ EClass BORROWER = eINSTANCE.getBorrower();
+
+ /**
+ * The meta object literal for the '<em><b>Borrowed</b></em>' reference list feature. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference BORROWER__BORROWED = eINSTANCE.getBorrower_Borrowed();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.PersonImpl
+ * <em>Person</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.PersonImpl
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.ExtlibraryPackageImpl#getPerson()
+ * @generated
+ */
+ EClass PERSON = eINSTANCE.getPerson();
+
+ /**
+ * The meta object literal for the '<em><b>First Name</b></em>' attribute feature. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute PERSON__FIRST_NAME = eINSTANCE.getPerson_FirstName();
+
+ /**
+ * The meta object literal for the '<em><b>Last Name</b></em>' attribute feature. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute PERSON__LAST_NAME = eINSTANCE.getPerson_LastName();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.EmployeeImpl
+ * <em>Employee</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.EmployeeImpl
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.ExtlibraryPackageImpl#getEmployee()
+ * @generated
+ */
+ EClass EMPLOYEE = eINSTANCE.getEmployee();
+
+ /**
+ * The meta object literal for the '<em><b>Manager</b></em>' reference feature. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference EMPLOYEE__MANAGER = eINSTANCE.getEmployee_Manager();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.acceleo.parser.tests.extlibrary.Addressable
+ * <em>Addressable</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.Addressable
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.ExtlibraryPackageImpl#getAddressable()
+ * @generated
+ */
+ EClass ADDRESSABLE = eINSTANCE.getAddressable();
+
+ /**
+ * The meta object literal for the '<em><b>Address</b></em>' attribute feature. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute ADDRESSABLE__ADDRESS = eINSTANCE.getAddressable_Address();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.acceleo.parser.tests.extlibrary.BookCategory
+ * <em>Book Category</em>}' enum. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.BookCategory
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.impl.ExtlibraryPackageImpl#getBookCategory()
+ * @generated
+ */
+ EEnum BOOK_CATEGORY = eINSTANCE.getBookCategory();
+
+ }
+
+} // ExtlibraryPackage
diff --git a/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/Item.java b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/Item.java
new file mode 100644
index 0000000..7efe809
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/Item.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.acceleo.parser.tests.extlibrary;
+
+import java.util.Date;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object '<em><b>Item</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.Item#getPublicationDate <em>Publication Date</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage#getItem()
+ * @model abstract="true"
+ * @generated
+ */
+public interface Item extends EObject {
+ /**
+ * Returns the value of the '<em><b>Publication Date</b></em>' attribute. <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Publication Date</em>' attribute isn't clear, there really should be more of
+ * a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Publication Date</em>' attribute.
+ * @see #setPublicationDate(Date)
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage#getItem_PublicationDate()
+ * @model
+ * @generated
+ */
+ Date getPublicationDate();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.acceleo.parser.tests.extlibrary.Item#getPublicationDate
+ * <em>Publication Date</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Publication Date</em>' attribute.
+ * @see #getPublicationDate()
+ * @generated
+ */
+ void setPublicationDate(Date value);
+
+} // Item
diff --git a/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/Lendable.java b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/Lendable.java
new file mode 100644
index 0000000..d37ee03
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/Lendable.java
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.acceleo.parser.tests.extlibrary;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object '<em><b>Lendable</b></em>'. <!-- end-user-doc
+ * -->
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.Lendable#getCopies <em>Copies</em>}</li>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.Lendable#getBorrowers <em>Borrowers</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage#getLendable()
+ * @model interface="true" abstract="true"
+ * @generated
+ */
+public interface Lendable extends EObject {
+ /**
+ * Returns the value of the '<em><b>Copies</b></em>' attribute. <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Copies</em>' attribute isn't clear, there really should be more of a
+ * description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Copies</em>' attribute.
+ * @see #setCopies(int)
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage#getLendable_Copies()
+ * @model required="true"
+ * @generated
+ */
+ int getCopies();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.acceleo.parser.tests.extlibrary.Lendable#getCopies
+ * <em>Copies</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Copies</em>' attribute.
+ * @see #getCopies()
+ * @generated
+ */
+ void setCopies(int value);
+
+ /**
+ * Returns the value of the '<em><b>Borrowers</b></em>' reference list. The list contents are of type
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.Borrower}. It is bidirectional and its opposite is '
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.Borrower#getBorrowed <em>Borrowed</em>}'. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Borrowers</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>Borrowers</em>' reference list.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage#getLendable_Borrowers()
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.Borrower#getBorrowed
+ * @model opposite="borrowed" ordered="false"
+ * @generated
+ */
+ EList<Borrower> getBorrowers();
+
+} // Lendable
diff --git a/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/Library.java b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/Library.java
new file mode 100644
index 0000000..90f0e45
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/Library.java
@@ -0,0 +1,214 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.acceleo.parser.tests.extlibrary;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.util.FeatureMap;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object '<em><b>Library</b></em>'. <!-- end-user-doc
+ * -->
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.Library#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.Library#getWriters <em>Writers</em>}</li>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.Library#getEmployees <em>Employees</em>}</li>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.Library#getBorrowers <em>Borrowers</em>}</li>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.Library#getStock <em>Stock</em>}</li>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.Library#getBooks <em>Books</em>}</li>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.Library#getBranches <em>Branches</em>}</li>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.Library#getParentBranch <em>Parent Branch</em>}</li>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.Library#getPeople <em>People</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage#getLibrary()
+ * @model
+ * @generated
+ */
+public interface Library extends Addressable {
+ /**
+ * 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.acceleo.parser.tests.extlibrary.ExtlibraryPackage#getLibrary_Name()
+ * @model
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.acceleo.parser.tests.extlibrary.Library#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);
+
+ /**
+ * Returns the value of the '<em><b>Writers</b></em>' containment reference list. The list contents are of
+ * type {@link org.eclipse.acceleo.parser.tests.extlibrary.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.acceleo.parser.tests.extlibrary.ExtlibraryPackage#getLibrary_Writers()
+ * @model containment="true" transient="true" volatile="true" derived="true"
+ * extendedMetaData="group='#people'"
+ * @generated
+ */
+ EList<Writer> getWriters();
+
+ /**
+ * Returns the value of the '<em><b>Employees</b></em>' containment reference list. The list contents are
+ * of type {@link org.eclipse.acceleo.parser.tests.extlibrary.Employee}. <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Employees</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>Employees</em>' containment reference list.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage#getLibrary_Employees()
+ * @model containment="true" transient="true" volatile="true" derived="true"
+ * extendedMetaData="group='#people'"
+ * @generated
+ */
+ EList<Employee> getEmployees();
+
+ /**
+ * Returns the value of the '<em><b>Borrowers</b></em>' containment reference list. The list contents are
+ * of type {@link org.eclipse.acceleo.parser.tests.extlibrary.Borrower}. <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Borrowers</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>Borrowers</em>' containment reference list.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage#getLibrary_Borrowers()
+ * @model containment="true" transient="true" volatile="true" derived="true"
+ * extendedMetaData="group='#people'"
+ * @generated
+ */
+ EList<Borrower> getBorrowers();
+
+ /**
+ * Returns the value of the '<em><b>Stock</b></em>' containment reference list. The list contents are of
+ * type {@link org.eclipse.acceleo.parser.tests.extlibrary.Item}. <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Stock</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>Stock</em>' containment reference list.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage#getLibrary_Stock()
+ * @model containment="true" ordered="false"
+ * @generated
+ */
+ EList<Item> getStock();
+
+ /**
+ * Returns the value of the '<em><b>Books</b></em>' reference list. The list contents are of type
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.Book}. <!-- 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.acceleo.parser.tests.extlibrary.ExtlibraryPackage#getLibrary_Books()
+ * @model transient="true" derived="true" ordered="false"
+ * @generated
+ */
+ EList<Book> getBooks();
+
+ /**
+ * Returns the value of the '<em><b>Branches</b></em>' containment reference list. The list contents are
+ * of type {@link org.eclipse.acceleo.parser.tests.extlibrary.Library}. It is bidirectional and its opposite
+ * is '{@link org.eclipse.acceleo.parser.tests.extlibrary.Library#getParentBranch <em>Parent Branch</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Branches</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>Branches</em>' containment reference list.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage#getLibrary_Branches()
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.Library#getParentBranch
+ * @model opposite="parentBranch" containment="true"
+ * @generated
+ */
+ EList<Library> getBranches();
+
+ /**
+ * Returns the value of the '<em><b>Parent Branch</b></em>' container reference. It is bidirectional and
+ * its opposite is '{@link org.eclipse.acceleo.parser.tests.extlibrary.Library#getBranches <em>Branches</em>}
+ * '. <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Parent Branch</em>' container reference isn't clear, there really should be
+ * more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Parent Branch</em>' container reference.
+ * @see #setParentBranch(Library)
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage#getLibrary_ParentBranch()
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.Library#getBranches
+ * @model opposite="branches" transient="false"
+ * @generated
+ */
+ Library getParentBranch();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.acceleo.parser.tests.extlibrary.Library#getParentBranch
+ * <em>Parent Branch</em>}' container reference. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Parent Branch</em>' container reference.
+ * @see #getParentBranch()
+ * @generated
+ */
+ void setParentBranch(Library value);
+
+ /**
+ * Returns the value of the '<em><b>People</b></em>' attribute list. The list contents are of type
+ * {@link org.eclipse.emf.ecore.util.FeatureMap.Entry}. <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>People</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>People</em>' attribute list.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage#getLibrary_People()
+ * @model dataType="org.eclipse.emf.ecore.EFeatureMapEntry" many="true" extendedMetaData="kind='group'"
+ * @generated
+ */
+ FeatureMap getPeople();
+
+} // Library
diff --git a/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/Periodical.java b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/Periodical.java
new file mode 100644
index 0000000..1224bcd
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/Periodical.java
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.acceleo.parser.tests.extlibrary;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object '<em><b>Periodical</b></em>'. <!--
+ * end-user-doc -->
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.Periodical#getTitle <em>Title</em>}</li>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.Periodical#getIssuesPerYear <em>Issues Per Year</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage#getPeriodical()
+ * @model abstract="true"
+ * @generated
+ */
+public interface Periodical extends Item {
+ /**
+ * 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.acceleo.parser.tests.extlibrary.ExtlibraryPackage#getPeriodical_Title()
+ * @model
+ * @generated
+ */
+ String getTitle();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.acceleo.parser.tests.extlibrary.Periodical#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>Issues Per Year</b></em>' attribute. <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Issues Per Year</em>' attribute isn't clear, there really should be more of
+ * a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Issues Per Year</em>' attribute.
+ * @see #setIssuesPerYear(int)
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage#getPeriodical_IssuesPerYear()
+ * @model required="true"
+ * @generated
+ */
+ int getIssuesPerYear();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.acceleo.parser.tests.extlibrary.Periodical#getIssuesPerYear
+ * <em>Issues Per Year</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Issues Per Year</em>' attribute.
+ * @see #getIssuesPerYear()
+ * @generated
+ */
+ void setIssuesPerYear(int value);
+
+} // Periodical
diff --git a/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/Person.java b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/Person.java
new file mode 100644
index 0000000..267c740
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/Person.java
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.acceleo.parser.tests.extlibrary;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object '<em><b>Person</b></em>'. <!-- end-user-doc
+ * -->
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.Person#getFirstName <em>First Name</em>}</li>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.Person#getLastName <em>Last Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage#getPerson()
+ * @model
+ * @generated
+ */
+public interface Person extends Addressable {
+ /**
+ * Returns the value of the '<em><b>First Name</b></em>' attribute. <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>First 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>First Name</em>' attribute.
+ * @see #setFirstName(String)
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage#getPerson_FirstName()
+ * @model required="true"
+ * @generated
+ */
+ String getFirstName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.acceleo.parser.tests.extlibrary.Person#getFirstName
+ * <em>First Name</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>First Name</em>' attribute.
+ * @see #getFirstName()
+ * @generated
+ */
+ void setFirstName(String value);
+
+ /**
+ * Returns the value of the '<em><b>Last Name</b></em>' attribute. <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Last 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>Last Name</em>' attribute.
+ * @see #setLastName(String)
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage#getPerson_LastName()
+ * @model required="true"
+ * @generated
+ */
+ String getLastName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.acceleo.parser.tests.extlibrary.Person#getLastName
+ * <em>Last Name</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Last Name</em>' attribute.
+ * @see #getLastName()
+ * @generated
+ */
+ void setLastName(String value);
+
+} // Person
diff --git a/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/VideoCassette.java b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/VideoCassette.java
new file mode 100644
index 0000000..7785419
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/VideoCassette.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.acceleo.parser.tests.extlibrary;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object '<em><b>Video Cassette</b></em>'. <!--
+ * end-user-doc -->
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.VideoCassette#getCast <em>Cast</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage#getVideoCassette()
+ * @model
+ * @generated
+ */
+public interface VideoCassette extends AudioVisualItem {
+ /**
+ * Returns the value of the '<em><b>Cast</b></em>' reference list. The list contents are of type
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.Person}. <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Cast</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>Cast</em>' reference list.
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage#getVideoCassette_Cast()
+ * @model
+ * @generated
+ */
+ EList<Person> getCast();
+
+} // VideoCassette
diff --git a/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/Writer.java b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/Writer.java
new file mode 100644
index 0000000..cc1c6db
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/Writer.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.acceleo.parser.tests.extlibrary;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object '<em><b>Writer</b></em>'. <!-- end-user-doc
+ * -->
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.Writer#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.Writer#getBooks <em>Books</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage#getWriter()
+ * @model
+ * @generated
+ */
+public interface Writer extends Person {
+ /**
+ * 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.acceleo.parser.tests.extlibrary.ExtlibraryPackage#getWriter_Name()
+ * @model transient="true" volatile="true"
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.acceleo.parser.tests.extlibrary.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);
+
+ /**
+ * Returns the value of the '<em><b>Books</b></em>' reference list. The list contents are of type
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.Book}. It is bidirectional and its opposite is '
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.Book#getAuthor <em>Author</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.acceleo.parser.tests.extlibrary.ExtlibraryPackage#getWriter_Books()
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.Book#getAuthor
+ * @model opposite="author"
+ * @generated
+ */
+ EList<Book> getBooks();
+
+} // Writer
diff --git a/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/AudioVisualItemImpl.java b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/AudioVisualItemImpl.java
new file mode 100644
index 0000000..246a49b
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/AudioVisualItemImpl.java
@@ -0,0 +1,283 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.acceleo.parser.tests.extlibrary.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.acceleo.parser.tests.extlibrary.AudioVisualItem;
+import org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object '<em><b>Audio Visual Item</b></em>'. <!--
+ * end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.AudioVisualItemImpl#getTitle <em>Title</em>}</li>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.AudioVisualItemImpl#getMinutesLength <em>Minutes
+ * Length</em>}</li>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.AudioVisualItemImpl#isDamaged <em>Damaged</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class AudioVisualItemImpl extends CirculatingItemImpl implements AudioVisualItem {
+ /**
+ * 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 #getMinutesLength() <em>Minutes Length</em>}' attribute. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #getMinutesLength()
+ * @generated
+ * @ordered
+ */
+ protected static final int MINUTES_LENGTH_EDEFAULT = 0;
+
+ /**
+ * The cached value of the '{@link #getMinutesLength() <em>Minutes Length</em>}' attribute. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #getMinutesLength()
+ * @generated
+ * @ordered
+ */
+ protected int minutesLength = MINUTES_LENGTH_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #isDamaged() <em>Damaged</em>}' attribute. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #isDamaged()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean DAMAGED_EDEFAULT = false;
+
+ /**
+ * The cached value of the '{@link #isDamaged() <em>Damaged</em>}' attribute. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #isDamaged()
+ * @generated
+ * @ordered
+ */
+ protected boolean damaged = DAMAGED_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected AudioVisualItemImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ExtlibraryPackage.Literals.AUDIO_VISUAL_ITEM;
+ }
+
+ /**
+ * <!-- 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, ExtlibraryPackage.AUDIO_VISUAL_ITEM__TITLE,
+ oldTitle, title));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public int getMinutesLength() {
+ return minutesLength;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setMinutesLength(int newMinutesLength) {
+ int oldMinutesLength = minutesLength;
+ minutesLength = newMinutesLength;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET,
+ ExtlibraryPackage.AUDIO_VISUAL_ITEM__MINUTES_LENGTH, oldMinutesLength, minutesLength));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean isDamaged() {
+ return damaged;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setDamaged(boolean newDamaged) {
+ boolean oldDamaged = damaged;
+ damaged = newDamaged;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET,
+ ExtlibraryPackage.AUDIO_VISUAL_ITEM__DAMAGED, oldDamaged, damaged));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ExtlibraryPackage.AUDIO_VISUAL_ITEM__TITLE:
+ return getTitle();
+ case ExtlibraryPackage.AUDIO_VISUAL_ITEM__MINUTES_LENGTH:
+ return new Integer(getMinutesLength());
+ case ExtlibraryPackage.AUDIO_VISUAL_ITEM__DAMAGED:
+ return isDamaged() ? Boolean.TRUE : Boolean.FALSE;
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ExtlibraryPackage.AUDIO_VISUAL_ITEM__TITLE:
+ setTitle((String)newValue);
+ return;
+ case ExtlibraryPackage.AUDIO_VISUAL_ITEM__MINUTES_LENGTH:
+ setMinutesLength(((Integer)newValue).intValue());
+ return;
+ case ExtlibraryPackage.AUDIO_VISUAL_ITEM__DAMAGED:
+ setDamaged(((Boolean)newValue).booleanValue());
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ExtlibraryPackage.AUDIO_VISUAL_ITEM__TITLE:
+ setTitle(TITLE_EDEFAULT);
+ return;
+ case ExtlibraryPackage.AUDIO_VISUAL_ITEM__MINUTES_LENGTH:
+ setMinutesLength(MINUTES_LENGTH_EDEFAULT);
+ return;
+ case ExtlibraryPackage.AUDIO_VISUAL_ITEM__DAMAGED:
+ setDamaged(DAMAGED_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ExtlibraryPackage.AUDIO_VISUAL_ITEM__TITLE:
+ return TITLE_EDEFAULT == null ? title != null : !TITLE_EDEFAULT.equals(title);
+ case ExtlibraryPackage.AUDIO_VISUAL_ITEM__MINUTES_LENGTH:
+ return minutesLength != MINUTES_LENGTH_EDEFAULT;
+ case ExtlibraryPackage.AUDIO_VISUAL_ITEM__DAMAGED:
+ return damaged != DAMAGED_EDEFAULT;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) {
+ return super.toString();
+ }
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (title: ");
+ result.append(title);
+ result.append(", minutesLength: ");
+ result.append(minutesLength);
+ result.append(", damaged: ");
+ result.append(damaged);
+ result.append(')');
+ return result.toString();
+ }
+
+} // AudioVisualItemImpl
diff --git a/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/BookImpl.java b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/BookImpl.java
new file mode 100644
index 0000000..0932803
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/BookImpl.java
@@ -0,0 +1,454 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.acceleo.parser.tests.extlibrary.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.acceleo.parser.tests.extlibrary.Book;
+import org.eclipse.acceleo.parser.tests.extlibrary.BookCategory;
+import org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage;
+import org.eclipse.acceleo.parser.tests.extlibrary.Writer;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object '<em><b>Book</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.BookImpl#getTitle <em>Title</em>}</li>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.BookImpl#getPages <em>Pages</em>}</li>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.BookImpl#getCategory <em>Category</em>}</li>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.BookImpl#getAuthor <em>Author</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class BookImpl extends CirculatingItemImpl 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 = 100;
+
+ /**
+ * 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 default value of the '{@link #getCategory() <em>Category</em>}' attribute. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getCategory()
+ * @generated
+ * @ordered
+ */
+ protected static final BookCategory CATEGORY_EDEFAULT = BookCategory.MYSTERY;
+
+ /**
+ * The cached value of the '{@link #getCategory() <em>Category</em>}' attribute. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getCategory()
+ * @generated
+ * @ordered
+ */
+ protected BookCategory category = CATEGORY_EDEFAULT;
+
+ /**
+ * This is true if the Category attribute has been set. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ protected boolean categoryESet;
+
+ /**
+ * The cached value of the '{@link #getAuthor() <em>Author</em>}' reference. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #getAuthor()
+ * @generated
+ * @ordered
+ */
+ protected Writer author;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected BookImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ExtlibraryPackage.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, ExtlibraryPackage.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, ExtlibraryPackage.BOOK__PAGES, oldPages,
+ pages));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public BookCategory getCategory() {
+ return category;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setCategory(BookCategory newCategory) {
+ BookCategory oldCategory = category;
+ category = newCategory == null ? CATEGORY_EDEFAULT : newCategory;
+ boolean oldCategoryESet = categoryESet;
+ categoryESet = true;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, ExtlibraryPackage.BOOK__CATEGORY,
+ oldCategory, category, !oldCategoryESet));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void unsetCategory() {
+ BookCategory oldCategory = category;
+ boolean oldCategoryESet = categoryESet;
+ category = CATEGORY_EDEFAULT;
+ categoryESet = false;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.UNSET, ExtlibraryPackage.BOOK__CATEGORY,
+ oldCategory, CATEGORY_EDEFAULT, oldCategoryESet));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean isSetCategory() {
+ return categoryESet;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Writer getAuthor() {
+ if (author != null && author.eIsProxy()) {
+ InternalEObject oldAuthor = (InternalEObject)author;
+ author = (Writer)eResolveProxy(oldAuthor);
+ if (author != oldAuthor) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ExtlibraryPackage.BOOK__AUTHOR,
+ oldAuthor, author));
+ }
+ }
+ }
+ return author;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Writer basicGetAuthor() {
+ return author;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public NotificationChain basicSetAuthor(Writer newAuthor, NotificationChain msgs) {
+ Writer oldAuthor = author;
+ author = newAuthor;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
+ ExtlibraryPackage.BOOK__AUTHOR, oldAuthor, newAuthor);
+ if (msgs == null) {
+ msgs = notification;
+ } else {
+ msgs.add(notification);
+ }
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setAuthor(Writer newAuthor) {
+ if (newAuthor != author) {
+ NotificationChain msgs = null;
+ if (author != null) {
+ msgs = ((InternalEObject)author).eInverseRemove(this, ExtlibraryPackage.WRITER__BOOKS,
+ Writer.class, msgs);
+ }
+ if (newAuthor != null) {
+ msgs = ((InternalEObject)newAuthor).eInverseAdd(this, ExtlibraryPackage.WRITER__BOOKS,
+ Writer.class, msgs);
+ }
+ msgs = basicSetAuthor(newAuthor, msgs);
+ if (msgs != null) {
+ msgs.dispatch();
+ }
+ } else if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, ExtlibraryPackage.BOOK__AUTHOR, newAuthor,
+ newAuthor));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case ExtlibraryPackage.BOOK__AUTHOR:
+ if (author != null) {
+ msgs = ((InternalEObject)author).eInverseRemove(this, ExtlibraryPackage.WRITER__BOOKS,
+ Writer.class, msgs);
+ }
+ return basicSetAuthor((Writer)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 ExtlibraryPackage.BOOK__AUTHOR:
+ return basicSetAuthor(null, 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 ExtlibraryPackage.BOOK__TITLE:
+ return getTitle();
+ case ExtlibraryPackage.BOOK__PAGES:
+ return new Integer(getPages());
+ case ExtlibraryPackage.BOOK__CATEGORY:
+ return getCategory();
+ case ExtlibraryPackage.BOOK__AUTHOR:
+ if (resolve) {
+ return getAuthor();
+ }
+ return basicGetAuthor();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ExtlibraryPackage.BOOK__TITLE:
+ setTitle((String)newValue);
+ return;
+ case ExtlibraryPackage.BOOK__PAGES:
+ setPages(((Integer)newValue).intValue());
+ return;
+ case ExtlibraryPackage.BOOK__CATEGORY:
+ setCategory((BookCategory)newValue);
+ return;
+ case ExtlibraryPackage.BOOK__AUTHOR:
+ setAuthor((Writer)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ExtlibraryPackage.BOOK__TITLE:
+ setTitle(TITLE_EDEFAULT);
+ return;
+ case ExtlibraryPackage.BOOK__PAGES:
+ setPages(PAGES_EDEFAULT);
+ return;
+ case ExtlibraryPackage.BOOK__CATEGORY:
+ unsetCategory();
+ return;
+ case ExtlibraryPackage.BOOK__AUTHOR:
+ setAuthor((Writer)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ExtlibraryPackage.BOOK__TITLE:
+ return TITLE_EDEFAULT == null ? title != null : !TITLE_EDEFAULT.equals(title);
+ case ExtlibraryPackage.BOOK__PAGES:
+ return pages != PAGES_EDEFAULT;
+ case ExtlibraryPackage.BOOK__CATEGORY:
+ return isSetCategory();
+ case ExtlibraryPackage.BOOK__AUTHOR:
+ return author != null;
+ }
+ 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: ");
+ if (categoryESet) {
+ result.append(category);
+ } else {
+ result.append("<unset>");
+ }
+ result.append(')');
+ return result.toString();
+ }
+
+} // BookImpl
diff --git a/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/BookOnTapeImpl.java b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/BookOnTapeImpl.java
new file mode 100644
index 0000000..ec35416
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/BookOnTapeImpl.java
@@ -0,0 +1,233 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.acceleo.parser.tests.extlibrary.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.acceleo.parser.tests.extlibrary.BookOnTape;
+import org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage;
+import org.eclipse.acceleo.parser.tests.extlibrary.Person;
+import org.eclipse.acceleo.parser.tests.extlibrary.Writer;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object '<em><b>Book On Tape</b></em>'. <!--
+ * end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.BookOnTapeImpl#getReader <em>Reader</em>}</li>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.BookOnTapeImpl#getAuthor <em>Author</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class BookOnTapeImpl extends AudioVisualItemImpl implements BookOnTape {
+ /**
+ * The cached value of the '{@link #getReader() <em>Reader</em>}' reference. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #getReader()
+ * @generated
+ * @ordered
+ */
+ protected Person reader;
+
+ /**
+ * The cached value of the '{@link #getAuthor() <em>Author</em>}' reference. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #getAuthor()
+ * @generated
+ * @ordered
+ */
+ protected Writer author;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected BookOnTapeImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ExtlibraryPackage.Literals.BOOK_ON_TAPE;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Person getReader() {
+ if (reader != null && reader.eIsProxy()) {
+ InternalEObject oldReader = (InternalEObject)reader;
+ reader = (Person)eResolveProxy(oldReader);
+ if (reader != oldReader) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE,
+ ExtlibraryPackage.BOOK_ON_TAPE__READER, oldReader, reader));
+ }
+ }
+ }
+ return reader;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Person basicGetReader() {
+ return reader;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setReader(Person newReader) {
+ Person oldReader = reader;
+ reader = newReader;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, ExtlibraryPackage.BOOK_ON_TAPE__READER,
+ oldReader, reader));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Writer getAuthor() {
+ if (author != null && author.eIsProxy()) {
+ InternalEObject oldAuthor = (InternalEObject)author;
+ author = (Writer)eResolveProxy(oldAuthor);
+ if (author != oldAuthor) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE,
+ ExtlibraryPackage.BOOK_ON_TAPE__AUTHOR, oldAuthor, author));
+ }
+ }
+ }
+ return author;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Writer basicGetAuthor() {
+ return author;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setAuthor(Writer newAuthor) {
+ Writer oldAuthor = author;
+ author = newAuthor;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, ExtlibraryPackage.BOOK_ON_TAPE__AUTHOR,
+ oldAuthor, author));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ExtlibraryPackage.BOOK_ON_TAPE__READER:
+ if (resolve) {
+ return getReader();
+ }
+ return basicGetReader();
+ case ExtlibraryPackage.BOOK_ON_TAPE__AUTHOR:
+ if (resolve) {
+ return getAuthor();
+ }
+ return basicGetAuthor();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ExtlibraryPackage.BOOK_ON_TAPE__READER:
+ setReader((Person)newValue);
+ return;
+ case ExtlibraryPackage.BOOK_ON_TAPE__AUTHOR:
+ setAuthor((Writer)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ExtlibraryPackage.BOOK_ON_TAPE__READER:
+ setReader((Person)null);
+ return;
+ case ExtlibraryPackage.BOOK_ON_TAPE__AUTHOR:
+ setAuthor((Writer)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ExtlibraryPackage.BOOK_ON_TAPE__READER:
+ return reader != null;
+ case ExtlibraryPackage.BOOK_ON_TAPE__AUTHOR:
+ return author != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} // BookOnTapeImpl
diff --git a/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/BorrowerImpl.java b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/BorrowerImpl.java
new file mode 100644
index 0000000..9adc90f
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/BorrowerImpl.java
@@ -0,0 +1,170 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.acceleo.parser.tests.extlibrary.impl;
+
+import java.util.Collection;
+
+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.util.EObjectWithInverseResolvingEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.acceleo.parser.tests.extlibrary.Borrower;
+import org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage;
+import org.eclipse.acceleo.parser.tests.extlibrary.Lendable;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object '<em><b>Borrower</b></em>'. <!-- end-user-doc
+ * -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.BorrowerImpl#getBorrowed <em>Borrowed</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class BorrowerImpl extends PersonImpl implements Borrower {
+ /**
+ * The cached value of the '{@link #getBorrowed() <em>Borrowed</em>}' reference list. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @see #getBorrowed()
+ * @generated
+ * @ordered
+ */
+ protected EList<Lendable> borrowed;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected BorrowerImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ExtlibraryPackage.Literals.BORROWER;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EList<Lendable> getBorrowed() {
+ if (borrowed == null) {
+ borrowed = new EObjectWithInverseResolvingEList.ManyInverse<Lendable>(Lendable.class, this,
+ ExtlibraryPackage.BORROWER__BORROWED, ExtlibraryPackage.LENDABLE__BORROWERS);
+ }
+ return borrowed;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case ExtlibraryPackage.BORROWER__BORROWED:
+ return ((InternalEList<InternalEObject>)(InternalEList<?>)getBorrowed()).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 ExtlibraryPackage.BORROWER__BORROWED:
+ return ((InternalEList<?>)getBorrowed()).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 ExtlibraryPackage.BORROWER__BORROWED:
+ return getBorrowed();
+ }
+ 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 ExtlibraryPackage.BORROWER__BORROWED:
+ getBorrowed().clear();
+ getBorrowed().addAll((Collection<? extends Lendable>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ExtlibraryPackage.BORROWER__BORROWED:
+ getBorrowed().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ExtlibraryPackage.BORROWER__BORROWED:
+ return borrowed != null && !borrowed.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} // BorrowerImpl
diff --git a/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/CirculatingItemImpl.java b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/CirculatingItemImpl.java
new file mode 100644
index 0000000..d5b31ed
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/CirculatingItemImpl.java
@@ -0,0 +1,286 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.acceleo.parser.tests.extlibrary.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.util.EObjectWithInverseResolvingEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.acceleo.parser.tests.extlibrary.Borrower;
+import org.eclipse.acceleo.parser.tests.extlibrary.CirculatingItem;
+import org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage;
+import org.eclipse.acceleo.parser.tests.extlibrary.Lendable;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object '<em><b>Circulating Item</b></em>'. <!--
+ * end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.CirculatingItemImpl#getCopies <em>Copies</em>}</li>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.CirculatingItemImpl#getBorrowers <em>Borrowers
+ * </em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class CirculatingItemImpl extends ItemImpl implements CirculatingItem {
+ /**
+ * The default value of the '{@link #getCopies() <em>Copies</em>}' attribute. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #getCopies()
+ * @generated
+ * @ordered
+ */
+ protected static final int COPIES_EDEFAULT = 0;
+
+ /**
+ * The cached value of the '{@link #getCopies() <em>Copies</em>}' attribute. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #getCopies()
+ * @generated
+ * @ordered
+ */
+ protected int copies = COPIES_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getBorrowers() <em>Borrowers</em>}' reference list. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #getBorrowers()
+ * @generated
+ * @ordered
+ */
+ protected EList<Borrower> borrowers;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected CirculatingItemImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ExtlibraryPackage.Literals.CIRCULATING_ITEM;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public int getCopies() {
+ return copies;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setCopies(int newCopies) {
+ int oldCopies = copies;
+ copies = newCopies;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, ExtlibraryPackage.CIRCULATING_ITEM__COPIES,
+ oldCopies, copies));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EList<Borrower> getBorrowers() {
+ if (borrowers == null) {
+ borrowers = new EObjectWithInverseResolvingEList.ManyInverse<Borrower>(Borrower.class, this,
+ ExtlibraryPackage.CIRCULATING_ITEM__BORROWERS, ExtlibraryPackage.BORROWER__BORROWED);
+ }
+ return borrowers;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case ExtlibraryPackage.CIRCULATING_ITEM__BORROWERS:
+ return ((InternalEList<InternalEObject>)(InternalEList<?>)getBorrowers()).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 ExtlibraryPackage.CIRCULATING_ITEM__BORROWERS:
+ return ((InternalEList<?>)getBorrowers()).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 ExtlibraryPackage.CIRCULATING_ITEM__COPIES:
+ return new Integer(getCopies());
+ case ExtlibraryPackage.CIRCULATING_ITEM__BORROWERS:
+ return getBorrowers();
+ }
+ 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 ExtlibraryPackage.CIRCULATING_ITEM__COPIES:
+ setCopies(((Integer)newValue).intValue());
+ return;
+ case ExtlibraryPackage.CIRCULATING_ITEM__BORROWERS:
+ getBorrowers().clear();
+ getBorrowers().addAll((Collection<? extends Borrower>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ExtlibraryPackage.CIRCULATING_ITEM__COPIES:
+ setCopies(COPIES_EDEFAULT);
+ return;
+ case ExtlibraryPackage.CIRCULATING_ITEM__BORROWERS:
+ getBorrowers().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ExtlibraryPackage.CIRCULATING_ITEM__COPIES:
+ return copies != COPIES_EDEFAULT;
+ case ExtlibraryPackage.CIRCULATING_ITEM__BORROWERS:
+ return borrowers != null && !borrowers.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
+ if (baseClass == Lendable.class) {
+ switch (derivedFeatureID) {
+ case ExtlibraryPackage.CIRCULATING_ITEM__COPIES:
+ return ExtlibraryPackage.LENDABLE__COPIES;
+ case ExtlibraryPackage.CIRCULATING_ITEM__BORROWERS:
+ return ExtlibraryPackage.LENDABLE__BORROWERS;
+ default:
+ return -1;
+ }
+ }
+ return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
+ if (baseClass == Lendable.class) {
+ switch (baseFeatureID) {
+ case ExtlibraryPackage.LENDABLE__COPIES:
+ return ExtlibraryPackage.CIRCULATING_ITEM__COPIES;
+ case ExtlibraryPackage.LENDABLE__BORROWERS:
+ return ExtlibraryPackage.CIRCULATING_ITEM__BORROWERS;
+ default:
+ return -1;
+ }
+ }
+ return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) {
+ return super.toString();
+ }
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (copies: ");
+ result.append(copies);
+ result.append(')');
+ return result.toString();
+ }
+
+} // CirculatingItemImpl
diff --git a/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/EmployeeImpl.java b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/EmployeeImpl.java
new file mode 100644
index 0000000..fa12381
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/EmployeeImpl.java
@@ -0,0 +1,165 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.acceleo.parser.tests.extlibrary.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.acceleo.parser.tests.extlibrary.Employee;
+import org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object '<em><b>Employee</b></em>'. <!-- end-user-doc
+ * -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.EmployeeImpl#getManager <em>Manager</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class EmployeeImpl extends PersonImpl implements Employee {
+ /**
+ * The cached value of the '{@link #getManager() <em>Manager</em>}' reference. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getManager()
+ * @generated
+ * @ordered
+ */
+ protected Employee manager;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected EmployeeImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ExtlibraryPackage.Literals.EMPLOYEE;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Employee getManager() {
+ if (manager != null && manager.eIsProxy()) {
+ InternalEObject oldManager = (InternalEObject)manager;
+ manager = (Employee)eResolveProxy(oldManager);
+ if (manager != oldManager) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE,
+ ExtlibraryPackage.EMPLOYEE__MANAGER, oldManager, manager));
+ }
+ }
+ }
+ return manager;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Employee basicGetManager() {
+ return manager;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setManager(Employee newManager) {
+ Employee oldManager = manager;
+ manager = newManager;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, ExtlibraryPackage.EMPLOYEE__MANAGER,
+ oldManager, manager));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ExtlibraryPackage.EMPLOYEE__MANAGER:
+ if (resolve) {
+ return getManager();
+ }
+ return basicGetManager();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ExtlibraryPackage.EMPLOYEE__MANAGER:
+ setManager((Employee)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ExtlibraryPackage.EMPLOYEE__MANAGER:
+ setManager((Employee)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ExtlibraryPackage.EMPLOYEE__MANAGER:
+ return manager != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} // EmployeeImpl
diff --git a/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/ExtlibraryFactoryImpl.java b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/ExtlibraryFactoryImpl.java
new file mode 100644
index 0000000..e26d867
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/ExtlibraryFactoryImpl.java
@@ -0,0 +1,249 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.acceleo.parser.tests.extlibrary.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.acceleo.parser.tests.extlibrary.Book;
+import org.eclipse.acceleo.parser.tests.extlibrary.BookCategory;
+import org.eclipse.acceleo.parser.tests.extlibrary.BookOnTape;
+import org.eclipse.acceleo.parser.tests.extlibrary.Borrower;
+import org.eclipse.acceleo.parser.tests.extlibrary.Employee;
+import org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryFactory;
+import org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage;
+import org.eclipse.acceleo.parser.tests.extlibrary.Library;
+import org.eclipse.acceleo.parser.tests.extlibrary.Person;
+import org.eclipse.acceleo.parser.tests.extlibrary.VideoCassette;
+import org.eclipse.acceleo.parser.tests.extlibrary.Writer;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model <b>Factory</b>. <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class ExtlibraryFactoryImpl extends EFactoryImpl implements ExtlibraryFactory {
+ /**
+ * Creates the default factory implementation. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static ExtlibraryFactory init() {
+ try {
+ ExtlibraryFactory theExtlibraryFactory = (ExtlibraryFactory)EPackage.Registry.INSTANCE
+ .getEFactory("http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0");
+ if (theExtlibraryFactory != null) {
+ return theExtlibraryFactory;
+ }
+ } catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new ExtlibraryFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ExtlibraryFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case ExtlibraryPackage.BOOK:
+ return createBook();
+ case ExtlibraryPackage.LIBRARY:
+ return createLibrary();
+ case ExtlibraryPackage.WRITER:
+ return createWriter();
+ case ExtlibraryPackage.BOOK_ON_TAPE:
+ return createBookOnTape();
+ case ExtlibraryPackage.VIDEO_CASSETTE:
+ return createVideoCassette();
+ case ExtlibraryPackage.BORROWER:
+ return createBorrower();
+ case ExtlibraryPackage.PERSON:
+ return createPerson();
+ case ExtlibraryPackage.EMPLOYEE:
+ return createEmployee();
+ 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 ExtlibraryPackage.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 ExtlibraryPackage.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 Book createBook() {
+ BookImpl book = new BookImpl();
+ return book;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Library createLibrary() {
+ LibraryImpl library = new LibraryImpl();
+ return library;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Writer createWriter() {
+ WriterImpl writer = new WriterImpl();
+ return writer;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public BookOnTape createBookOnTape() {
+ BookOnTapeImpl bookOnTape = new BookOnTapeImpl();
+ return bookOnTape;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public VideoCassette createVideoCassette() {
+ VideoCassetteImpl videoCassette = new VideoCassetteImpl();
+ return videoCassette;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Borrower createBorrower() {
+ BorrowerImpl borrower = new BorrowerImpl();
+ return borrower;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Person createPerson() {
+ PersonImpl person = new PersonImpl();
+ return person;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Employee createEmployee() {
+ EmployeeImpl employee = new EmployeeImpl();
+ return employee;
+ }
+
+ /**
+ * <!-- 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 ExtlibraryPackage getExtlibraryPackage() {
+ return (ExtlibraryPackage)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static ExtlibraryPackage getPackage() {
+ return ExtlibraryPackage.eINSTANCE;
+ }
+
+} // ExtlibraryFactoryImpl
diff --git a/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/ExtlibraryPackageImpl.java b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/ExtlibraryPackageImpl.java
new file mode 100644
index 0000000..daeec85
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/ExtlibraryPackageImpl.java
@@ -0,0 +1,925 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.acceleo.parser.tests.extlibrary.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.acceleo.parser.tests.extlibrary.Addressable;
+import org.eclipse.acceleo.parser.tests.extlibrary.AudioVisualItem;
+import org.eclipse.acceleo.parser.tests.extlibrary.Book;
+import org.eclipse.acceleo.parser.tests.extlibrary.BookCategory;
+import org.eclipse.acceleo.parser.tests.extlibrary.BookOnTape;
+import org.eclipse.acceleo.parser.tests.extlibrary.Borrower;
+import org.eclipse.acceleo.parser.tests.extlibrary.CirculatingItem;
+import org.eclipse.acceleo.parser.tests.extlibrary.Employee;
+import org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryFactory;
+import org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage;
+import org.eclipse.acceleo.parser.tests.extlibrary.Item;
+import org.eclipse.acceleo.parser.tests.extlibrary.Lendable;
+import org.eclipse.acceleo.parser.tests.extlibrary.Library;
+import org.eclipse.acceleo.parser.tests.extlibrary.Periodical;
+import org.eclipse.acceleo.parser.tests.extlibrary.Person;
+import org.eclipse.acceleo.parser.tests.extlibrary.VideoCassette;
+import org.eclipse.acceleo.parser.tests.extlibrary.Writer;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model <b>Package</b>. <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class ExtlibraryPackageImpl extends EPackageImpl implements ExtlibraryPackage {
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass bookEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass libraryEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass writerEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass itemEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass lendableEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass circulatingItemEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass periodicalEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass audioVisualItemEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass bookOnTapeEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass videoCassetteEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass borrowerEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass personEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass employeeEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass addressableEClass = 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.acceleo.parser.tests.extlibrary.ExtlibraryPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private ExtlibraryPackageImpl() {
+ super(eNS_URI, ExtlibraryFactory.eINSTANCE);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it
+ * depends. Simple dependencies are satisfied by calling this method on all dependent packages before
+ * doing anything else. This method drives initialization for interdependent packages directly, in
+ * parallel with this package, itself.
+ * <p>
+ * Of this package and its interdependencies, all packages which have not yet been registered by their URI
+ * values are first created and registered. The packages are then initialized in two steps: meta-model
+ * objects for all of the packages are created before any are initialized, since one package's meta-model
+ * objects may refer to those of another.
+ * <p>
+ * Invocation of this method will not affect any packages that have already been initialized. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static ExtlibraryPackage init() {
+ if (isInited) {
+ return (ExtlibraryPackage)EPackage.Registry.INSTANCE.getEPackage(ExtlibraryPackage.eNS_URI);
+ }
+
+ // Obtain or create and register package
+ ExtlibraryPackageImpl theExtlibraryPackage = (ExtlibraryPackageImpl)(EPackage.Registry.INSTANCE
+ .getEPackage(eNS_URI) instanceof ExtlibraryPackageImpl ? EPackage.Registry.INSTANCE
+ .getEPackage(eNS_URI) : new ExtlibraryPackageImpl());
+
+ isInited = true;
+
+ // Create package meta-data objects
+ theExtlibraryPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theExtlibraryPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theExtlibraryPackage.freeze();
+
+ return theExtlibraryPackage;
+ }
+
+ /**
+ * <!-- 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_Author() {
+ return (EReference)bookEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getLibrary() {
+ return libraryEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EAttribute getLibrary_Name() {
+ 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 EReference getLibrary_Employees() {
+ return (EReference)libraryEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getLibrary_Borrowers() {
+ return (EReference)libraryEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getLibrary_Stock() {
+ return (EReference)libraryEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getLibrary_Books() {
+ return (EReference)libraryEClass.getEStructuralFeatures().get(5);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getLibrary_Branches() {
+ return (EReference)libraryEClass.getEStructuralFeatures().get(6);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getLibrary_ParentBranch() {
+ return (EReference)libraryEClass.getEStructuralFeatures().get(7);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EAttribute getLibrary_People() {
+ return (EAttribute)libraryEClass.getEStructuralFeatures().get(8);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getWriter() {
+ return writerEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EAttribute getWriter_Name() {
+ return (EAttribute)writerEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getWriter_Books() {
+ return (EReference)writerEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getItem() {
+ return itemEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EAttribute getItem_PublicationDate() {
+ return (EAttribute)itemEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getLendable() {
+ return lendableEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EAttribute getLendable_Copies() {
+ return (EAttribute)lendableEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getLendable_Borrowers() {
+ return (EReference)lendableEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getCirculatingItem() {
+ return circulatingItemEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getPeriodical() {
+ return periodicalEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EAttribute getPeriodical_Title() {
+ return (EAttribute)periodicalEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EAttribute getPeriodical_IssuesPerYear() {
+ return (EAttribute)periodicalEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getAudioVisualItem() {
+ return audioVisualItemEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EAttribute getAudioVisualItem_Title() {
+ return (EAttribute)audioVisualItemEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EAttribute getAudioVisualItem_MinutesLength() {
+ return (EAttribute)audioVisualItemEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EAttribute getAudioVisualItem_Damaged() {
+ return (EAttribute)audioVisualItemEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getBookOnTape() {
+ return bookOnTapeEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getBookOnTape_Reader() {
+ return (EReference)bookOnTapeEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getBookOnTape_Author() {
+ return (EReference)bookOnTapeEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getVideoCassette() {
+ return videoCassetteEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getVideoCassette_Cast() {
+ return (EReference)videoCassetteEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getBorrower() {
+ return borrowerEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getBorrower_Borrowed() {
+ return (EReference)borrowerEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getPerson() {
+ return personEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EAttribute getPerson_FirstName() {
+ return (EAttribute)personEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EAttribute getPerson_LastName() {
+ return (EAttribute)personEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getEmployee() {
+ return employeeEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getEmployee_Manager() {
+ return (EReference)employeeEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getAddressable() {
+ return addressableEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EAttribute getAddressable_Address() {
+ return (EAttribute)addressableEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EEnum getBookCategory() {
+ return bookCategoryEEnum;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ExtlibraryFactory getExtlibraryFactory() {
+ return (ExtlibraryFactory)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
+ bookEClass = createEClass(BOOK);
+ createEAttribute(bookEClass, BOOK__TITLE);
+ createEAttribute(bookEClass, BOOK__PAGES);
+ createEAttribute(bookEClass, BOOK__CATEGORY);
+ createEReference(bookEClass, BOOK__AUTHOR);
+
+ libraryEClass = createEClass(LIBRARY);
+ createEAttribute(libraryEClass, LIBRARY__NAME);
+ createEReference(libraryEClass, LIBRARY__WRITERS);
+ createEReference(libraryEClass, LIBRARY__EMPLOYEES);
+ createEReference(libraryEClass, LIBRARY__BORROWERS);
+ createEReference(libraryEClass, LIBRARY__STOCK);
+ createEReference(libraryEClass, LIBRARY__BOOKS);
+ createEReference(libraryEClass, LIBRARY__BRANCHES);
+ createEReference(libraryEClass, LIBRARY__PARENT_BRANCH);
+ createEAttribute(libraryEClass, LIBRARY__PEOPLE);
+
+ writerEClass = createEClass(WRITER);
+ createEAttribute(writerEClass, WRITER__NAME);
+ createEReference(writerEClass, WRITER__BOOKS);
+
+ itemEClass = createEClass(ITEM);
+ createEAttribute(itemEClass, ITEM__PUBLICATION_DATE);
+
+ lendableEClass = createEClass(LENDABLE);
+ createEAttribute(lendableEClass, LENDABLE__COPIES);
+ createEReference(lendableEClass, LENDABLE__BORROWERS);
+
+ circulatingItemEClass = createEClass(CIRCULATING_ITEM);
+
+ periodicalEClass = createEClass(PERIODICAL);
+ createEAttribute(periodicalEClass, PERIODICAL__TITLE);
+ createEAttribute(periodicalEClass, PERIODICAL__ISSUES_PER_YEAR);
+
+ audioVisualItemEClass = createEClass(AUDIO_VISUAL_ITEM);
+ createEAttribute(audioVisualItemEClass, AUDIO_VISUAL_ITEM__TITLE);
+ createEAttribute(audioVisualItemEClass, AUDIO_VISUAL_ITEM__MINUTES_LENGTH);
+ createEAttribute(audioVisualItemEClass, AUDIO_VISUAL_ITEM__DAMAGED);
+
+ bookOnTapeEClass = createEClass(BOOK_ON_TAPE);
+ createEReference(bookOnTapeEClass, BOOK_ON_TAPE__READER);
+ createEReference(bookOnTapeEClass, BOOK_ON_TAPE__AUTHOR);
+
+ videoCassetteEClass = createEClass(VIDEO_CASSETTE);
+ createEReference(videoCassetteEClass, VIDEO_CASSETTE__CAST);
+
+ borrowerEClass = createEClass(BORROWER);
+ createEReference(borrowerEClass, BORROWER__BORROWED);
+
+ personEClass = createEClass(PERSON);
+ createEAttribute(personEClass, PERSON__FIRST_NAME);
+ createEAttribute(personEClass, PERSON__LAST_NAME);
+
+ employeeEClass = createEClass(EMPLOYEE);
+ createEReference(employeeEClass, EMPLOYEE__MANAGER);
+
+ addressableEClass = createEClass(ADDRESSABLE);
+ createEAttribute(addressableEClass, ADDRESSABLE__ADDRESS);
+
+ // 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
+ bookEClass.getESuperTypes().add(this.getCirculatingItem());
+ libraryEClass.getESuperTypes().add(this.getAddressable());
+ writerEClass.getESuperTypes().add(this.getPerson());
+ circulatingItemEClass.getESuperTypes().add(this.getItem());
+ circulatingItemEClass.getESuperTypes().add(this.getLendable());
+ periodicalEClass.getESuperTypes().add(this.getItem());
+ audioVisualItemEClass.getESuperTypes().add(this.getCirculatingItem());
+ bookOnTapeEClass.getESuperTypes().add(this.getAudioVisualItem());
+ videoCassetteEClass.getESuperTypes().add(this.getAudioVisualItem());
+ borrowerEClass.getESuperTypes().add(this.getPerson());
+ personEClass.getESuperTypes().add(this.getAddressable());
+ employeeEClass.getESuperTypes().add(this.getPerson());
+
+ // Initialize classes and features; add operations and parameters
+ 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", "100", 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_Author(), this.getWriter(), this.getWriter_Books(), "author", null, 1, 1,
+ Book.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES,
+ !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(libraryEClass, Library.class, "Library", !IS_ABSTRACT, !IS_INTERFACE,
+ IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getLibrary_Name(), ecorePackage.getEString(), "name", 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);
+ initEReference(getLibrary_Employees(), this.getEmployee(), null, "employees", null, 0, -1,
+ Library.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES,
+ !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
+ initEReference(getLibrary_Borrowers(), this.getBorrower(), null, "borrowers", null, 0, -1,
+ Library.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES,
+ !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
+ initEReference(getLibrary_Stock(), this.getItem(), null, "stock", null, 0, -1, Library.class,
+ !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES,
+ !IS_UNSETTABLE, 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);
+ initEReference(getLibrary_Branches(), this.getLibrary(), this.getLibrary_ParentBranch(), "branches",
+ null, 0, -1, Library.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE,
+ !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getLibrary_ParentBranch(), this.getLibrary(), this.getLibrary_Branches(),
+ "parentBranch", 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_People(), ecorePackage.getEFeatureMapEntry(), "people", null, 0, -1,
+ Library.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
+ !IS_DERIVED, IS_ORDERED);
+
+ initEClass(writerEClass, Writer.class, "Writer", !IS_ABSTRACT, !IS_INTERFACE,
+ IS_GENERATED_INSTANCE_CLASS);
+ 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);
+ initEReference(getWriter_Books(), this.getBook(), this.getBook_Author(), "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);
+
+ initEClass(itemEClass, Item.class, "Item", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getItem_PublicationDate(), ecorePackage.getEDate(), "publicationDate", null, 0, 1,
+ Item.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
+ !IS_DERIVED, IS_ORDERED);
+
+ initEClass(lendableEClass, Lendable.class, "Lendable", IS_ABSTRACT, IS_INTERFACE,
+ IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getLendable_Copies(), ecorePackage.getEInt(), "copies", null, 1, 1, Lendable.class,
+ !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED,
+ IS_ORDERED);
+ initEReference(getLendable_Borrowers(), this.getBorrower(), this.getBorrower_Borrowed(), "borrowers",
+ null, 0, -1, Lendable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE,
+ IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+ initEClass(circulatingItemEClass, CirculatingItem.class, "CirculatingItem", IS_ABSTRACT,
+ !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+ initEClass(periodicalEClass, Periodical.class, "Periodical", IS_ABSTRACT, !IS_INTERFACE,
+ IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getPeriodical_Title(), ecorePackage.getEString(), "title", null, 0, 1,
+ Periodical.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID,
+ IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getPeriodical_IssuesPerYear(), ecorePackage.getEInt(), "issuesPerYear", null, 1, 1,
+ Periodical.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID,
+ IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(audioVisualItemEClass, AudioVisualItem.class, "AudioVisualItem", IS_ABSTRACT,
+ !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getAudioVisualItem_Title(), ecorePackage.getEString(), "title", null, 0, 1,
+ AudioVisualItem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID,
+ IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getAudioVisualItem_MinutesLength(), ecorePackage.getEInt(), "minutesLength", null, 1,
+ 1, AudioVisualItem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID,
+ IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getAudioVisualItem_Damaged(), ecorePackage.getEBoolean(), "damaged", null, 0, 1,
+ AudioVisualItem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID,
+ IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(bookOnTapeEClass, BookOnTape.class, "BookOnTape", !IS_ABSTRACT, !IS_INTERFACE,
+ IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getBookOnTape_Reader(), this.getPerson(), null, "reader", null, 0, 1,
+ BookOnTape.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE,
+ IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getBookOnTape_Author(), this.getWriter(), null, "author", null, 0, 1,
+ BookOnTape.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE,
+ IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(videoCassetteEClass, VideoCassette.class, "VideoCassette", !IS_ABSTRACT, !IS_INTERFACE,
+ IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getVideoCassette_Cast(), this.getPerson(), null, "cast", null, 0, -1,
+ VideoCassette.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE,
+ IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(borrowerEClass, Borrower.class, "Borrower", !IS_ABSTRACT, !IS_INTERFACE,
+ IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getBorrower_Borrowed(), this.getLendable(), this.getLendable_Borrowers(), "borrowed",
+ null, 0, -1, Borrower.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE,
+ IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(personEClass, Person.class, "Person", !IS_ABSTRACT, !IS_INTERFACE,
+ IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getPerson_FirstName(), ecorePackage.getEString(), "firstName", null, 1, 1,
+ Person.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
+ !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getPerson_LastName(), ecorePackage.getEString(), "lastName", null, 1, 1, Person.class,
+ !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED,
+ IS_ORDERED);
+
+ initEClass(employeeEClass, Employee.class, "Employee", !IS_ABSTRACT, !IS_INTERFACE,
+ IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getEmployee_Manager(), this.getEmployee(), null, "manager", null, 0, 1,
+ Employee.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE,
+ IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(addressableEClass, Addressable.class, "Addressable", IS_ABSTRACT, IS_INTERFACE,
+ IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getAddressable_Address(), ecorePackage.getEString(), "address", null, 0, 1,
+ Addressable.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.MYSTERY);
+ addEEnumLiteral(bookCategoryEEnum, BookCategory.SCIENCE_FICTION);
+ addEEnumLiteral(bookCategoryEEnum, BookCategory.BIOGRAPHY);
+
+ // Create resource
+ createResource(eNS_URI);
+
+ // Create annotations
+ // http:///org/eclipse/emf/ecore/util/ExtendedMetaData
+ createExtendedMetaDataAnnotations();
+ }
+
+ /**
+ * Initializes the annotations for <b>http:///org/eclipse/emf/ecore/util/ExtendedMetaData</b>. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void createExtendedMetaDataAnnotations() {
+ String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData";
+ addAnnotation(getLibrary_Writers(), source, new String[] {"group", "#people"});
+ addAnnotation(getLibrary_Employees(), source, new String[] {"group", "#people"});
+ addAnnotation(getLibrary_Borrowers(), source, new String[] {"group", "#people"});
+ addAnnotation(getLibrary_People(), source, new String[] {"kind", "group"});
+ }
+
+} // ExtlibraryPackageImpl
diff --git a/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/ItemImpl.java b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/ItemImpl.java
new file mode 100644
index 0000000..7e33fb0
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/ItemImpl.java
@@ -0,0 +1,174 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.acceleo.parser.tests.extlibrary.impl;
+
+import java.util.Date;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+import org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage;
+import org.eclipse.acceleo.parser.tests.extlibrary.Item;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object '<em><b>Item</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.ItemImpl#getPublicationDate <em>Publication Date
+ * </em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class ItemImpl extends EObjectImpl implements Item {
+ /**
+ * The default value of the '{@link #getPublicationDate() <em>Publication Date</em>}' attribute. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #getPublicationDate()
+ * @generated
+ * @ordered
+ */
+ protected static final Date PUBLICATION_DATE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getPublicationDate() <em>Publication Date</em>}' attribute. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #getPublicationDate()
+ * @generated
+ * @ordered
+ */
+ protected Date publicationDate = PUBLICATION_DATE_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ItemImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ExtlibraryPackage.Literals.ITEM;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Date getPublicationDate() {
+ return publicationDate;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setPublicationDate(Date newPublicationDate) {
+ Date oldPublicationDate = publicationDate;
+ publicationDate = newPublicationDate;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, ExtlibraryPackage.ITEM__PUBLICATION_DATE,
+ oldPublicationDate, publicationDate));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ExtlibraryPackage.ITEM__PUBLICATION_DATE:
+ return getPublicationDate();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ExtlibraryPackage.ITEM__PUBLICATION_DATE:
+ setPublicationDate((Date)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ExtlibraryPackage.ITEM__PUBLICATION_DATE:
+ setPublicationDate(PUBLICATION_DATE_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ExtlibraryPackage.ITEM__PUBLICATION_DATE:
+ return PUBLICATION_DATE_EDEFAULT == null ? publicationDate != null
+ : !PUBLICATION_DATE_EDEFAULT.equals(publicationDate);
+ }
+ 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(" (publicationDate: ");
+ result.append(publicationDate);
+ result.append(')');
+ return result.toString();
+ }
+
+} // ItemImpl
diff --git a/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/LibraryImpl.java b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/LibraryImpl.java
new file mode 100644
index 0000000..baba81c
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/LibraryImpl.java
@@ -0,0 +1,575 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.acceleo.parser.tests.extlibrary.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.EObjectImpl;
+import org.eclipse.emf.ecore.util.BasicFeatureMap;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
+import org.eclipse.emf.ecore.util.EObjectResolvingEList;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.util.FeatureMap;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.acceleo.parser.tests.extlibrary.Book;
+import org.eclipse.acceleo.parser.tests.extlibrary.Borrower;
+import org.eclipse.acceleo.parser.tests.extlibrary.Employee;
+import org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage;
+import org.eclipse.acceleo.parser.tests.extlibrary.Item;
+import org.eclipse.acceleo.parser.tests.extlibrary.Library;
+import org.eclipse.acceleo.parser.tests.extlibrary.Writer;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object '<em><b>Library</b></em>'. <!-- end-user-doc
+ * -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.LibraryImpl#getAddress <em>Address</em>}</li>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.LibraryImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.LibraryImpl#getWriters <em>Writers</em>}</li>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.LibraryImpl#getEmployees <em>Employees</em>}</li>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.LibraryImpl#getBorrowers <em>Borrowers</em>}</li>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.LibraryImpl#getStock <em>Stock</em>}</li>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.LibraryImpl#getBooks <em>Books</em>}</li>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.LibraryImpl#getBranches <em>Branches</em>}</li>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.LibraryImpl#getParentBranch <em>Parent Branch</em>}
+ * </li>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.LibraryImpl#getPeople <em>People</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class LibraryImpl extends EObjectImpl 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 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;
+
+ /**
+ * The cached value of the '{@link #getStock() <em>Stock</em>}' containment reference list. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #getStock()
+ * @generated
+ * @ordered
+ */
+ protected EList<Item> stock;
+
+ /**
+ * 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 cached value of the '{@link #getBranches() <em>Branches</em>}' containment reference list. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #getBranches()
+ * @generated
+ * @ordered
+ */
+ protected EList<Library> branches;
+
+ /**
+ * The cached value of the '{@link #getPeople() <em>People</em>}' attribute list. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getPeople()
+ * @generated
+ * @ordered
+ */
+ protected FeatureMap people;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected LibraryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ExtlibraryPackage.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, ExtlibraryPackage.LIBRARY__ADDRESS,
+ oldAddress, address));
+ }
+ }
+
+ /**
+ * <!-- 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, ExtlibraryPackage.LIBRARY__NAME, oldName,
+ name));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EList<Writer> getWriters() {
+ return getPeople().list(ExtlibraryPackage.Literals.LIBRARY__WRITERS);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EList<Employee> getEmployees() {
+ return getPeople().list(ExtlibraryPackage.Literals.LIBRARY__EMPLOYEES);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EList<Borrower> getBorrowers() {
+ return getPeople().list(ExtlibraryPackage.Literals.LIBRARY__BORROWERS);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EList<Item> getStock() {
+ if (stock == null) {
+ stock = new EObjectContainmentEList<Item>(Item.class, this, ExtlibraryPackage.LIBRARY__STOCK);
+ }
+ return stock;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EList<Book> getBooks() {
+ if (books == null) {
+ books = new EObjectResolvingEList<Book>(Book.class, this, ExtlibraryPackage.LIBRARY__BOOKS);
+ }
+ return books;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EList<Library> getBranches() {
+ if (branches == null) {
+ branches = new EObjectContainmentWithInverseEList<Library>(Library.class, this,
+ ExtlibraryPackage.LIBRARY__BRANCHES, ExtlibraryPackage.LIBRARY__PARENT_BRANCH);
+ }
+ return branches;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Library getParentBranch() {
+ if (eContainerFeatureID != ExtlibraryPackage.LIBRARY__PARENT_BRANCH) {
+ return null;
+ }
+ return (Library)eContainer();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public NotificationChain basicSetParentBranch(Library newParentBranch, NotificationChain msgs) {
+ msgs = eBasicSetContainer((InternalEObject)newParentBranch, ExtlibraryPackage.LIBRARY__PARENT_BRANCH,
+ msgs);
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setParentBranch(Library newParentBranch) {
+ if (newParentBranch != eInternalContainer()
+ || (eContainerFeatureID != ExtlibraryPackage.LIBRARY__PARENT_BRANCH && newParentBranch != null)) {
+ if (EcoreUtil.isAncestor(this, newParentBranch)) {
+ throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
+ }
+ NotificationChain msgs = null;
+ if (eInternalContainer() != null) {
+ msgs = eBasicRemoveFromContainer(msgs);
+ }
+ if (newParentBranch != null) {
+ msgs = ((InternalEObject)newParentBranch).eInverseAdd(this,
+ ExtlibraryPackage.LIBRARY__BRANCHES, Library.class, msgs);
+ }
+ msgs = basicSetParentBranch(newParentBranch, msgs);
+ if (msgs != null) {
+ msgs.dispatch();
+ }
+ } else if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, ExtlibraryPackage.LIBRARY__PARENT_BRANCH,
+ newParentBranch, newParentBranch));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public FeatureMap getPeople() {
+ if (people == null) {
+ people = new BasicFeatureMap(this, ExtlibraryPackage.LIBRARY__PEOPLE);
+ }
+ return people;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case ExtlibraryPackage.LIBRARY__BRANCHES:
+ return ((InternalEList<InternalEObject>)(InternalEList<?>)getBranches()).basicAdd(otherEnd,
+ msgs);
+ case ExtlibraryPackage.LIBRARY__PARENT_BRANCH:
+ if (eInternalContainer() != null) {
+ msgs = eBasicRemoveFromContainer(msgs);
+ }
+ return basicSetParentBranch((Library)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 ExtlibraryPackage.LIBRARY__WRITERS:
+ return ((InternalEList<?>)getWriters()).basicRemove(otherEnd, msgs);
+ case ExtlibraryPackage.LIBRARY__EMPLOYEES:
+ return ((InternalEList<?>)getEmployees()).basicRemove(otherEnd, msgs);
+ case ExtlibraryPackage.LIBRARY__BORROWERS:
+ return ((InternalEList<?>)getBorrowers()).basicRemove(otherEnd, msgs);
+ case ExtlibraryPackage.LIBRARY__STOCK:
+ return ((InternalEList<?>)getStock()).basicRemove(otherEnd, msgs);
+ case ExtlibraryPackage.LIBRARY__BRANCHES:
+ return ((InternalEList<?>)getBranches()).basicRemove(otherEnd, msgs);
+ case ExtlibraryPackage.LIBRARY__PARENT_BRANCH:
+ return basicSetParentBranch(null, msgs);
+ case ExtlibraryPackage.LIBRARY__PEOPLE:
+ return ((InternalEList<?>)getPeople()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
+ switch (eContainerFeatureID) {
+ case ExtlibraryPackage.LIBRARY__PARENT_BRANCH:
+ return eInternalContainer().eInverseRemove(this, ExtlibraryPackage.LIBRARY__BRANCHES,
+ Library.class, msgs);
+ }
+ return super.eBasicRemoveFromContainerFeature(msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ExtlibraryPackage.LIBRARY__ADDRESS:
+ return getAddress();
+ case ExtlibraryPackage.LIBRARY__NAME:
+ return getName();
+ case ExtlibraryPackage.LIBRARY__WRITERS:
+ return getWriters();
+ case ExtlibraryPackage.LIBRARY__EMPLOYEES:
+ return getEmployees();
+ case ExtlibraryPackage.LIBRARY__BORROWERS:
+ return getBorrowers();
+ case ExtlibraryPackage.LIBRARY__STOCK:
+ return getStock();
+ case ExtlibraryPackage.LIBRARY__BOOKS:
+ return getBooks();
+ case ExtlibraryPackage.LIBRARY__BRANCHES:
+ return getBranches();
+ case ExtlibraryPackage.LIBRARY__PARENT_BRANCH:
+ return getParentBranch();
+ case ExtlibraryPackage.LIBRARY__PEOPLE:
+ if (coreType) {
+ return getPeople();
+ }
+ return ((FeatureMap.Internal)getPeople()).getWrapper();
+ }
+ 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 ExtlibraryPackage.LIBRARY__ADDRESS:
+ setAddress((String)newValue);
+ return;
+ case ExtlibraryPackage.LIBRARY__NAME:
+ setName((String)newValue);
+ return;
+ case ExtlibraryPackage.LIBRARY__WRITERS:
+ getWriters().clear();
+ getWriters().addAll((Collection<? extends Writer>)newValue);
+ return;
+ case ExtlibraryPackage.LIBRARY__EMPLOYEES:
+ getEmployees().clear();
+ getEmployees().addAll((Collection<? extends Employee>)newValue);
+ return;
+ case ExtlibraryPackage.LIBRARY__BORROWERS:
+ getBorrowers().clear();
+ getBorrowers().addAll((Collection<? extends Borrower>)newValue);
+ return;
+ case ExtlibraryPackage.LIBRARY__STOCK:
+ getStock().clear();
+ getStock().addAll((Collection<? extends Item>)newValue);
+ return;
+ case ExtlibraryPackage.LIBRARY__BOOKS:
+ getBooks().clear();
+ getBooks().addAll((Collection<? extends Book>)newValue);
+ return;
+ case ExtlibraryPackage.LIBRARY__BRANCHES:
+ getBranches().clear();
+ getBranches().addAll((Collection<? extends Library>)newValue);
+ return;
+ case ExtlibraryPackage.LIBRARY__PARENT_BRANCH:
+ setParentBranch((Library)newValue);
+ return;
+ case ExtlibraryPackage.LIBRARY__PEOPLE:
+ ((FeatureMap.Internal)getPeople()).set(newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ExtlibraryPackage.LIBRARY__ADDRESS:
+ setAddress(ADDRESS_EDEFAULT);
+ return;
+ case ExtlibraryPackage.LIBRARY__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case ExtlibraryPackage.LIBRARY__WRITERS:
+ getWriters().clear();
+ return;
+ case ExtlibraryPackage.LIBRARY__EMPLOYEES:
+ getEmployees().clear();
+ return;
+ case ExtlibraryPackage.LIBRARY__BORROWERS:
+ getBorrowers().clear();
+ return;
+ case ExtlibraryPackage.LIBRARY__STOCK:
+ getStock().clear();
+ return;
+ case ExtlibraryPackage.LIBRARY__BOOKS:
+ getBooks().clear();
+ return;
+ case ExtlibraryPackage.LIBRARY__BRANCHES:
+ getBranches().clear();
+ return;
+ case ExtlibraryPackage.LIBRARY__PARENT_BRANCH:
+ setParentBranch((Library)null);
+ return;
+ case ExtlibraryPackage.LIBRARY__PEOPLE:
+ getPeople().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ExtlibraryPackage.LIBRARY__ADDRESS:
+ return ADDRESS_EDEFAULT == null ? address != null : !ADDRESS_EDEFAULT.equals(address);
+ case ExtlibraryPackage.LIBRARY__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case ExtlibraryPackage.LIBRARY__WRITERS:
+ return !getWriters().isEmpty();
+ case ExtlibraryPackage.LIBRARY__EMPLOYEES:
+ return !getEmployees().isEmpty();
+ case ExtlibraryPackage.LIBRARY__BORROWERS:
+ return !getBorrowers().isEmpty();
+ case ExtlibraryPackage.LIBRARY__STOCK:
+ return stock != null && !stock.isEmpty();
+ case ExtlibraryPackage.LIBRARY__BOOKS:
+ return books != null && !books.isEmpty();
+ case ExtlibraryPackage.LIBRARY__BRANCHES:
+ return branches != null && !branches.isEmpty();
+ case ExtlibraryPackage.LIBRARY__PARENT_BRANCH:
+ return getParentBranch() != null;
+ case ExtlibraryPackage.LIBRARY__PEOPLE:
+ return people != null && !people.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(", name: ");
+ result.append(name);
+ result.append(", people: ");
+ result.append(people);
+ result.append(')');
+ return result.toString();
+ }
+
+} // LibraryImpl
diff --git a/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/PeriodicalImpl.java b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/PeriodicalImpl.java
new file mode 100644
index 0000000..981a444
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/PeriodicalImpl.java
@@ -0,0 +1,227 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.acceleo.parser.tests.extlibrary.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage;
+import org.eclipse.acceleo.parser.tests.extlibrary.Periodical;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object '<em><b>Periodical</b></em>'. <!--
+ * end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.PeriodicalImpl#getTitle <em>Title</em>}</li>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.PeriodicalImpl#getIssuesPerYear <em>Issues Per Year
+ * </em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class PeriodicalImpl extends ItemImpl implements Periodical {
+ /**
+ * 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 #getIssuesPerYear() <em>Issues Per Year</em>}' attribute. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #getIssuesPerYear()
+ * @generated
+ * @ordered
+ */
+ protected static final int ISSUES_PER_YEAR_EDEFAULT = 0;
+
+ /**
+ * The cached value of the '{@link #getIssuesPerYear() <em>Issues Per Year</em>}' attribute. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #getIssuesPerYear()
+ * @generated
+ * @ordered
+ */
+ protected int issuesPerYear = ISSUES_PER_YEAR_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected PeriodicalImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ExtlibraryPackage.Literals.PERIODICAL;
+ }
+
+ /**
+ * <!-- 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, ExtlibraryPackage.PERIODICAL__TITLE,
+ oldTitle, title));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public int getIssuesPerYear() {
+ return issuesPerYear;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setIssuesPerYear(int newIssuesPerYear) {
+ int oldIssuesPerYear = issuesPerYear;
+ issuesPerYear = newIssuesPerYear;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET,
+ ExtlibraryPackage.PERIODICAL__ISSUES_PER_YEAR, oldIssuesPerYear, issuesPerYear));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ExtlibraryPackage.PERIODICAL__TITLE:
+ return getTitle();
+ case ExtlibraryPackage.PERIODICAL__ISSUES_PER_YEAR:
+ return new Integer(getIssuesPerYear());
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ExtlibraryPackage.PERIODICAL__TITLE:
+ setTitle((String)newValue);
+ return;
+ case ExtlibraryPackage.PERIODICAL__ISSUES_PER_YEAR:
+ setIssuesPerYear(((Integer)newValue).intValue());
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ExtlibraryPackage.PERIODICAL__TITLE:
+ setTitle(TITLE_EDEFAULT);
+ return;
+ case ExtlibraryPackage.PERIODICAL__ISSUES_PER_YEAR:
+ setIssuesPerYear(ISSUES_PER_YEAR_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ExtlibraryPackage.PERIODICAL__TITLE:
+ return TITLE_EDEFAULT == null ? title != null : !TITLE_EDEFAULT.equals(title);
+ case ExtlibraryPackage.PERIODICAL__ISSUES_PER_YEAR:
+ return issuesPerYear != ISSUES_PER_YEAR_EDEFAULT;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) {
+ return super.toString();
+ }
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (title: ");
+ result.append(title);
+ result.append(", issuesPerYear: ");
+ result.append(issuesPerYear);
+ result.append(')');
+ return result.toString();
+ }
+
+} // PeriodicalImpl
diff --git a/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/PersonImpl.java b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/PersonImpl.java
new file mode 100644
index 0000000..e9dd3a6
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/PersonImpl.java
@@ -0,0 +1,284 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.acceleo.parser.tests.extlibrary.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+import org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage;
+import org.eclipse.acceleo.parser.tests.extlibrary.Person;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object '<em><b>Person</b></em>'. <!-- end-user-doc
+ * -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.PersonImpl#getAddress <em>Address</em>}</li>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.PersonImpl#getFirstName <em>First Name</em>}</li>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.PersonImpl#getLastName <em>Last Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class PersonImpl extends EObjectImpl implements Person {
+ /**
+ * 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 default value of the '{@link #getFirstName() <em>First Name</em>}' attribute. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @see #getFirstName()
+ * @generated
+ * @ordered
+ */
+ protected static final String FIRST_NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getFirstName() <em>First Name</em>}' attribute. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @see #getFirstName()
+ * @generated
+ * @ordered
+ */
+ protected String firstName = FIRST_NAME_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getLastName() <em>Last Name</em>}' attribute. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getLastName()
+ * @generated
+ * @ordered
+ */
+ protected static final String LAST_NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getLastName() <em>Last Name</em>}' attribute. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getLastName()
+ * @generated
+ * @ordered
+ */
+ protected String lastName = LAST_NAME_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected PersonImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ExtlibraryPackage.Literals.PERSON;
+ }
+
+ /**
+ * <!-- 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, ExtlibraryPackage.PERSON__ADDRESS,
+ oldAddress, address));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String getFirstName() {
+ return firstName;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setFirstName(String newFirstName) {
+ String oldFirstName = firstName;
+ firstName = newFirstName;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, ExtlibraryPackage.PERSON__FIRST_NAME,
+ oldFirstName, firstName));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String getLastName() {
+ return lastName;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setLastName(String newLastName) {
+ String oldLastName = lastName;
+ lastName = newLastName;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, ExtlibraryPackage.PERSON__LAST_NAME,
+ oldLastName, lastName));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ExtlibraryPackage.PERSON__ADDRESS:
+ return getAddress();
+ case ExtlibraryPackage.PERSON__FIRST_NAME:
+ return getFirstName();
+ case ExtlibraryPackage.PERSON__LAST_NAME:
+ return getLastName();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ExtlibraryPackage.PERSON__ADDRESS:
+ setAddress((String)newValue);
+ return;
+ case ExtlibraryPackage.PERSON__FIRST_NAME:
+ setFirstName((String)newValue);
+ return;
+ case ExtlibraryPackage.PERSON__LAST_NAME:
+ setLastName((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ExtlibraryPackage.PERSON__ADDRESS:
+ setAddress(ADDRESS_EDEFAULT);
+ return;
+ case ExtlibraryPackage.PERSON__FIRST_NAME:
+ setFirstName(FIRST_NAME_EDEFAULT);
+ return;
+ case ExtlibraryPackage.PERSON__LAST_NAME:
+ setLastName(LAST_NAME_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ExtlibraryPackage.PERSON__ADDRESS:
+ return ADDRESS_EDEFAULT == null ? address != null : !ADDRESS_EDEFAULT.equals(address);
+ case ExtlibraryPackage.PERSON__FIRST_NAME:
+ return FIRST_NAME_EDEFAULT == null ? firstName != null : !FIRST_NAME_EDEFAULT
+ .equals(firstName);
+ case ExtlibraryPackage.PERSON__LAST_NAME:
+ return LAST_NAME_EDEFAULT == null ? lastName != null : !LAST_NAME_EDEFAULT.equals(lastName);
+ }
+ 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(", firstName: ");
+ result.append(firstName);
+ result.append(", lastName: ");
+ result.append(lastName);
+ result.append(')');
+ return result.toString();
+ }
+
+} // PersonImpl
diff --git a/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/VideoCassetteImpl.java b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/VideoCassetteImpl.java
new file mode 100644
index 0000000..f6436d3
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/VideoCassetteImpl.java
@@ -0,0 +1,137 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.acceleo.parser.tests.extlibrary.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.util.EObjectResolvingEList;
+import org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage;
+import org.eclipse.acceleo.parser.tests.extlibrary.Person;
+import org.eclipse.acceleo.parser.tests.extlibrary.VideoCassette;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object '<em><b>Video Cassette</b></em>'. <!--
+ * end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.VideoCassetteImpl#getCast <em>Cast</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class VideoCassetteImpl extends AudioVisualItemImpl implements VideoCassette {
+ /**
+ * The cached value of the '{@link #getCast() <em>Cast</em>}' reference list. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #getCast()
+ * @generated
+ * @ordered
+ */
+ protected EList<Person> cast;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected VideoCassetteImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ExtlibraryPackage.Literals.VIDEO_CASSETTE;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EList<Person> getCast() {
+ if (cast == null) {
+ cast = new EObjectResolvingEList<Person>(Person.class, this,
+ ExtlibraryPackage.VIDEO_CASSETTE__CAST);
+ }
+ return cast;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ExtlibraryPackage.VIDEO_CASSETTE__CAST:
+ return getCast();
+ }
+ 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 ExtlibraryPackage.VIDEO_CASSETTE__CAST:
+ getCast().clear();
+ getCast().addAll((Collection<? extends Person>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ExtlibraryPackage.VIDEO_CASSETTE__CAST:
+ getCast().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ExtlibraryPackage.VIDEO_CASSETTE__CAST:
+ return cast != null && !cast.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} // VideoCassetteImpl
diff --git a/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/WriterImpl.java b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/WriterImpl.java
new file mode 100644
index 0000000..c68f984
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/impl/WriterImpl.java
@@ -0,0 +1,213 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.acceleo.parser.tests.extlibrary.impl;
+
+import java.util.Collection;
+
+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.util.EObjectWithInverseResolvingEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.acceleo.parser.tests.extlibrary.Book;
+import org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage;
+import org.eclipse.acceleo.parser.tests.extlibrary.Writer;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object '<em><b>Writer</b></em>'. <!-- end-user-doc
+ * -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.WriterImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.acceleo.parser.tests.extlibrary.impl.WriterImpl#getBooks <em>Books</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class WriterImpl extends PersonImpl implements Writer {
+ /**
+ * 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 #getBooks() <em>Books</em>}' reference list. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getBooks()
+ * @generated
+ * @ordered
+ */
+ protected EList<Book> books;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected WriterImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ExtlibraryPackage.Literals.WRITER;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String getName() {
+ // TODO: implement this method to return the 'Name' attribute
+ // Ensure that you remove @generated or mark it @generated NOT
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setName(String newName) {
+ // TODO: implement this method to set the 'Name' attribute
+ // Ensure that you remove @generated or mark it @generated NOT
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EList<Book> getBooks() {
+ if (books == null) {
+ books = new EObjectWithInverseResolvingEList<Book>(Book.class, this,
+ ExtlibraryPackage.WRITER__BOOKS, ExtlibraryPackage.BOOK__AUTHOR);
+ }
+ return books;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case ExtlibraryPackage.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 ExtlibraryPackage.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 ExtlibraryPackage.WRITER__NAME:
+ return getName();
+ case ExtlibraryPackage.WRITER__BOOKS:
+ return getBooks();
+ }
+ 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 ExtlibraryPackage.WRITER__NAME:
+ setName((String)newValue);
+ return;
+ case ExtlibraryPackage.WRITER__BOOKS:
+ getBooks().clear();
+ getBooks().addAll((Collection<? extends Book>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ExtlibraryPackage.WRITER__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case ExtlibraryPackage.WRITER__BOOKS:
+ getBooks().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ExtlibraryPackage.WRITER__NAME:
+ return NAME_EDEFAULT == null ? getName() != null : !NAME_EDEFAULT.equals(getName());
+ case ExtlibraryPackage.WRITER__BOOKS:
+ return books != null && !books.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} // WriterImpl
diff --git a/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/util/ExtlibraryAdapterFactory.java b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/util/ExtlibraryAdapterFactory.java
new file mode 100644
index 0000000..52278e7
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/util/ExtlibraryAdapterFactory.java
@@ -0,0 +1,381 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.acceleo.parser.tests.extlibrary.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.acceleo.parser.tests.extlibrary.Addressable;
+import org.eclipse.acceleo.parser.tests.extlibrary.AudioVisualItem;
+import org.eclipse.acceleo.parser.tests.extlibrary.Book;
+import org.eclipse.acceleo.parser.tests.extlibrary.BookOnTape;
+import org.eclipse.acceleo.parser.tests.extlibrary.Borrower;
+import org.eclipse.acceleo.parser.tests.extlibrary.CirculatingItem;
+import org.eclipse.acceleo.parser.tests.extlibrary.Employee;
+import org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage;
+import org.eclipse.acceleo.parser.tests.extlibrary.Item;
+import org.eclipse.acceleo.parser.tests.extlibrary.Lendable;
+import org.eclipse.acceleo.parser.tests.extlibrary.Library;
+import org.eclipse.acceleo.parser.tests.extlibrary.Periodical;
+import org.eclipse.acceleo.parser.tests.extlibrary.Person;
+import org.eclipse.acceleo.parser.tests.extlibrary.VideoCassette;
+import org.eclipse.acceleo.parser.tests.extlibrary.Writer;
+
+/**
+ * <!-- 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.acceleo.parser.tests.extlibrary.ExtlibraryPackage
+ * @generated
+ */
+public class ExtlibraryAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected static ExtlibraryPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ExtlibraryAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = ExtlibraryPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object. <!-- begin-user-doc --> This
+ * implementation returns <code>true</code> if the object is either the model's package or is an instance
+ * object of the model. <!-- end-user-doc -->
+ *
+ * @return whether this factory is applicable for the type of the object.
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object object) {
+ if (object == modelPackage) {
+ return true;
+ }
+ if (object instanceof EObject) {
+ return ((EObject)object).eClass().getEPackage() == modelPackage;
+ }
+ return false;
+ }
+
+ /**
+ * The switch the delegates to the <code>createXXX</code> methods. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected ExtlibrarySwitch<Adapter> modelSwitch = new ExtlibrarySwitch<Adapter>() {
+ @Override
+ public Adapter caseBook(Book object) {
+ return createBookAdapter();
+ }
+
+ @Override
+ public Adapter caseLibrary(Library object) {
+ return createLibraryAdapter();
+ }
+
+ @Override
+ public Adapter caseWriter(Writer object) {
+ return createWriterAdapter();
+ }
+
+ @Override
+ public Adapter caseItem(Item object) {
+ return createItemAdapter();
+ }
+
+ @Override
+ public Adapter caseLendable(Lendable object) {
+ return createLendableAdapter();
+ }
+
+ @Override
+ public Adapter caseCirculatingItem(CirculatingItem object) {
+ return createCirculatingItemAdapter();
+ }
+
+ @Override
+ public Adapter casePeriodical(Periodical object) {
+ return createPeriodicalAdapter();
+ }
+
+ @Override
+ public Adapter caseAudioVisualItem(AudioVisualItem object) {
+ return createAudioVisualItemAdapter();
+ }
+
+ @Override
+ public Adapter caseBookOnTape(BookOnTape object) {
+ return createBookOnTapeAdapter();
+ }
+
+ @Override
+ public Adapter caseVideoCassette(VideoCassette object) {
+ return createVideoCassetteAdapter();
+ }
+
+ @Override
+ public Adapter caseBorrower(Borrower object) {
+ return createBorrowerAdapter();
+ }
+
+ @Override
+ public Adapter casePerson(Person object) {
+ return createPersonAdapter();
+ }
+
+ @Override
+ public Adapter caseEmployee(Employee object) {
+ return createEmployeeAdapter();
+ }
+
+ @Override
+ public Adapter caseAddressable(Addressable object) {
+ return createAddressableAdapter();
+ }
+
+ @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.acceleo.parser.tests.extlibrary.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.acceleo.parser.tests.extlibrary.Book
+ * @generated
+ */
+ public Adapter createBookAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.acceleo.parser.tests.extlibrary.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.acceleo.parser.tests.extlibrary.Library
+ * @generated
+ */
+ public Adapter createLibraryAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.acceleo.parser.tests.extlibrary.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.acceleo.parser.tests.extlibrary.Writer
+ * @generated
+ */
+ public Adapter createWriterAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.acceleo.parser.tests.extlibrary.Item
+ * <em>Item</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.acceleo.parser.tests.extlibrary.Item
+ * @generated
+ */
+ public Adapter createItemAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.acceleo.parser.tests.extlibrary.Lendable
+ * <em>Lendable</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.acceleo.parser.tests.extlibrary.Lendable
+ * @generated
+ */
+ public Adapter createLendableAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.CirculatingItem <em>Circulating Item</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.acceleo.parser.tests.extlibrary.CirculatingItem
+ * @generated
+ */
+ public Adapter createCirculatingItemAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.Periodical <em>Periodical</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.acceleo.parser.tests.extlibrary.Periodical
+ * @generated
+ */
+ public Adapter createPeriodicalAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.AudioVisualItem <em>Audio Visual Item</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.acceleo.parser.tests.extlibrary.AudioVisualItem
+ * @generated
+ */
+ public Adapter createAudioVisualItemAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.BookOnTape <em>Book On Tape</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.acceleo.parser.tests.extlibrary.BookOnTape
+ * @generated
+ */
+ public Adapter createBookOnTapeAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.VideoCassette <em>Video Cassette</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.acceleo.parser.tests.extlibrary.VideoCassette
+ * @generated
+ */
+ public Adapter createVideoCassetteAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.acceleo.parser.tests.extlibrary.Borrower
+ * <em>Borrower</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.acceleo.parser.tests.extlibrary.Borrower
+ * @generated
+ */
+ public Adapter createBorrowerAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.acceleo.parser.tests.extlibrary.Person
+ * <em>Person</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.acceleo.parser.tests.extlibrary.Person
+ * @generated
+ */
+ public Adapter createPersonAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.acceleo.parser.tests.extlibrary.Employee
+ * <em>Employee</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.acceleo.parser.tests.extlibrary.Employee
+ * @generated
+ */
+ public Adapter createEmployeeAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '
+ * {@link org.eclipse.acceleo.parser.tests.extlibrary.Addressable <em>Addressable</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.acceleo.parser.tests.extlibrary.Addressable
+ * @generated
+ */
+ public Adapter createAddressableAdapter() {
+ 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;
+ }
+
+} // ExtlibraryAdapterFactory
diff --git a/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/util/ExtlibraryResourceFactoryImpl.java b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/util/ExtlibraryResourceFactoryImpl.java
new file mode 100644
index 0000000..44be00b
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/util/ExtlibraryResourceFactoryImpl.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.acceleo.parser.tests.extlibrary.util;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
+import org.eclipse.emf.ecore.xmi.XMLResource;
+
+/**
+ * <!-- begin-user-doc --> The <b>Resource Factory</b> associated with the package. <!-- end-user-doc -->
+ *
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.util.ExtlibraryResourceImpl
+ * @generated
+ */
+public class ExtlibraryResourceFactoryImpl extends ResourceFactoryImpl {
+ /**
+ * Creates an instance of the resource factory. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ExtlibraryResourceFactoryImpl() {
+ super();
+ }
+
+ /**
+ * Creates an instance of the resource. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Resource createResource(URI uri) {
+ XMLResource result = new ExtlibraryResourceImpl(uri);
+ result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+ result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+
+ result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE);
+
+ result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+ result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+
+ result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE);
+ return result;
+ }
+
+} // ExtlibraryResourceFactoryImpl
diff --git a/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/util/ExtlibraryResourceImpl.java b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/util/ExtlibraryResourceImpl.java
new file mode 100644
index 0000000..19d635e
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/util/ExtlibraryResourceImpl.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.acceleo.parser.tests.extlibrary.util;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl;
+
+/**
+ * <!-- begin-user-doc --> The <b>Resource </b> associated with the package. <!-- end-user-doc -->
+ *
+ * @see org.eclipse.acceleo.parser.tests.extlibrary.util.ExtlibraryResourceFactoryImpl
+ * @generated
+ */
+public class ExtlibraryResourceImpl extends XMLResourceImpl {
+ /**
+ * Creates an instance of the resource. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param uri
+ * the URI of the new resource.
+ * @generated
+ */
+ public ExtlibraryResourceImpl(URI uri) {
+ super(uri);
+ }
+
+} // ExtlibraryResourceImpl
diff --git a/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/util/ExtlibrarySwitch.java b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/util/ExtlibrarySwitch.java
new file mode 100644
index 0000000..28bbc24
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/util/ExtlibrarySwitch.java
@@ -0,0 +1,514 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.acceleo.parser.tests.extlibrary.util;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.acceleo.parser.tests.extlibrary.Addressable;
+import org.eclipse.acceleo.parser.tests.extlibrary.AudioVisualItem;
+import org.eclipse.acceleo.parser.tests.extlibrary.Book;
+import org.eclipse.acceleo.parser.tests.extlibrary.BookOnTape;
+import org.eclipse.acceleo.parser.tests.extlibrary.Borrower;
+import org.eclipse.acceleo.parser.tests.extlibrary.CirculatingItem;
+import org.eclipse.acceleo.parser.tests.extlibrary.Employee;
+import org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage;
+import org.eclipse.acceleo.parser.tests.extlibrary.Item;
+import org.eclipse.acceleo.parser.tests.extlibrary.Lendable;
+import org.eclipse.acceleo.parser.tests.extlibrary.Library;
+import org.eclipse.acceleo.parser.tests.extlibrary.Periodical;
+import org.eclipse.acceleo.parser.tests.extlibrary.Person;
+import org.eclipse.acceleo.parser.tests.extlibrary.VideoCassette;
+import org.eclipse.acceleo.parser.tests.extlibrary.Writer;
+
+/**
+ * <!-- 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.acceleo.parser.tests.extlibrary.ExtlibraryPackage
+ * @generated
+ */
+public class ExtlibrarySwitch<T> {
+ /**
+ * The cached model package <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected static ExtlibraryPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ExtlibrarySwitch() {
+ if (modelPackage == null) {
+ modelPackage = ExtlibraryPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields
+ * that result. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ public T doSwitch(EObject theEObject) {
+ return doSwitch(theEObject.eClass(), theEObject);
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields
+ * that result. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ protected T doSwitch(EClass theEClass, EObject theEObject) {
+ if (theEClass.eContainer() == modelPackage) {
+ return doSwitch(theEClass.getClassifierID(), theEObject);
+ } else {
+ List<EClass> eSuperTypes = theEClass.getESuperTypes();
+ return eSuperTypes.isEmpty() ? defaultCase(theEObject) : doSwitch(eSuperTypes.get(0), theEObject);
+ }
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields
+ * that result. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case ExtlibraryPackage.BOOK: {
+ Book book = (Book)theEObject;
+ T result = caseBook(book);
+ if (result == null) {
+ result = caseCirculatingItem(book);
+ }
+ if (result == null) {
+ result = caseItem(book);
+ }
+ if (result == null) {
+ result = caseLendable(book);
+ }
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case ExtlibraryPackage.LIBRARY: {
+ Library library = (Library)theEObject;
+ T result = caseLibrary(library);
+ if (result == null) {
+ result = caseAddressable(library);
+ }
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case ExtlibraryPackage.WRITER: {
+ Writer writer = (Writer)theEObject;
+ T result = caseWriter(writer);
+ if (result == null) {
+ result = casePerson(writer);
+ }
+ if (result == null) {
+ result = caseAddressable(writer);
+ }
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case ExtlibraryPackage.ITEM: {
+ Item item = (Item)theEObject;
+ T result = caseItem(item);
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case ExtlibraryPackage.LENDABLE: {
+ Lendable lendable = (Lendable)theEObject;
+ T result = caseLendable(lendable);
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case ExtlibraryPackage.CIRCULATING_ITEM: {
+ CirculatingItem circulatingItem = (CirculatingItem)theEObject;
+ T result = caseCirculatingItem(circulatingItem);
+ if (result == null) {
+ result = caseItem(circulatingItem);
+ }
+ if (result == null) {
+ result = caseLendable(circulatingItem);
+ }
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case ExtlibraryPackage.PERIODICAL: {
+ Periodical periodical = (Periodical)theEObject;
+ T result = casePeriodical(periodical);
+ if (result == null) {
+ result = caseItem(periodical);
+ }
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case ExtlibraryPackage.AUDIO_VISUAL_ITEM: {
+ AudioVisualItem audioVisualItem = (AudioVisualItem)theEObject;
+ T result = caseAudioVisualItem(audioVisualItem);
+ if (result == null) {
+ result = caseCirculatingItem(audioVisualItem);
+ }
+ if (result == null) {
+ result = caseItem(audioVisualItem);
+ }
+ if (result == null) {
+ result = caseLendable(audioVisualItem);
+ }
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case ExtlibraryPackage.BOOK_ON_TAPE: {
+ BookOnTape bookOnTape = (BookOnTape)theEObject;
+ T result = caseBookOnTape(bookOnTape);
+ if (result == null) {
+ result = caseAudioVisualItem(bookOnTape);
+ }
+ if (result == null) {
+ result = caseCirculatingItem(bookOnTape);
+ }
+ if (result == null) {
+ result = caseItem(bookOnTape);
+ }
+ if (result == null) {
+ result = caseLendable(bookOnTape);
+ }
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case ExtlibraryPackage.VIDEO_CASSETTE: {
+ VideoCassette videoCassette = (VideoCassette)theEObject;
+ T result = caseVideoCassette(videoCassette);
+ if (result == null) {
+ result = caseAudioVisualItem(videoCassette);
+ }
+ if (result == null) {
+ result = caseCirculatingItem(videoCassette);
+ }
+ if (result == null) {
+ result = caseItem(videoCassette);
+ }
+ if (result == null) {
+ result = caseLendable(videoCassette);
+ }
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case ExtlibraryPackage.BORROWER: {
+ Borrower borrower = (Borrower)theEObject;
+ T result = caseBorrower(borrower);
+ if (result == null) {
+ result = casePerson(borrower);
+ }
+ if (result == null) {
+ result = caseAddressable(borrower);
+ }
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case ExtlibraryPackage.PERSON: {
+ Person person = (Person)theEObject;
+ T result = casePerson(person);
+ if (result == null) {
+ result = caseAddressable(person);
+ }
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case ExtlibraryPackage.EMPLOYEE: {
+ Employee employee = (Employee)theEObject;
+ T result = caseEmployee(employee);
+ if (result == null) {
+ result = casePerson(employee);
+ }
+ if (result == null) {
+ result = caseAddressable(employee);
+ }
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case ExtlibraryPackage.ADDRESSABLE: {
+ Addressable addressable = (Addressable)theEObject;
+ T result = caseAddressable(addressable);
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ default:
+ return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * 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>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>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>Item</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>Item</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseItem(Item object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Lendable</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>Lendable</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseLendable(Lendable object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Circulating Item</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>Circulating Item</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseCirculatingItem(CirculatingItem object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Periodical</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>Periodical</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casePeriodical(Periodical object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Audio Visual Item</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>Audio Visual Item</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseAudioVisualItem(AudioVisualItem object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Book On Tape</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 On Tape</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseBookOnTape(BookOnTape object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Video Cassette</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>Video Cassette</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseVideoCassette(VideoCassette object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Borrower</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>Borrower</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseBorrower(Borrower object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Person</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>Person</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casePerson(Person object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Employee</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>Employee</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseEmployee(Employee object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Addressable</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>Addressable</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseAddressable(Addressable object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. <!-- begin-user-doc
+ * --> This implementation returns null; returning a non-null result will terminate the switch, but this
+ * is the last case anyway. <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} // ExtlibrarySwitch
diff --git a/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/util/ExtlibraryXMLProcessor.java b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/util/ExtlibraryXMLProcessor.java
new file mode 100644
index 0000000..d5cd659
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/src-gen/org/eclipse/acceleo/parser/tests/extlibrary/util/ExtlibraryXMLProcessor.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.acceleo.parser.tests.extlibrary.util;
+
+import java.util.Map;
+
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.xmi.util.XMLProcessor;
+import org.eclipse.acceleo.parser.tests.extlibrary.ExtlibraryPackage;
+
+/**
+ * This class contains helper methods to serialize and deserialize XML documents <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class ExtlibraryXMLProcessor extends XMLProcessor {
+
+ /**
+ * Public constructor to instantiate the helper. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ExtlibraryXMLProcessor() {
+ super((EPackage.Registry.INSTANCE));
+ ExtlibraryPackage.eINSTANCE.eClass();
+ }
+
+ /**
+ * Register for "*" and "xml" file extensions the ExtlibraryResourceFactoryImpl factory. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected Map<String, Resource.Factory> getRegistrations() {
+ if (registrations == null) {
+ super.getRegistrations();
+ registrations.put(XML_EXTENSION, new ExtlibraryResourceFactoryImpl());
+ registrations.put(STAR_EXTENSION, new ExtlibraryResourceFactoryImpl());
+ }
+ return registrations;
+ }
+
+} // ExtlibraryXMLProcessor
diff --git a/tests/org.eclipse.acceleo.parser.tests/src/org/eclipse/acceleo/parser/tests/AcceleoParserTests.java b/tests/org.eclipse.acceleo.parser.tests/src/org/eclipse/acceleo/parser/tests/AcceleoParserTests.java
new file mode 100644
index 0000000..98fa2bf
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/src/org/eclipse/acceleo/parser/tests/AcceleoParserTests.java
@@ -0,0 +1,184 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.acceleo.parser.tests;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import junit.framework.AssertionFailedError;
+import junit.framework.TestCase;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.acceleo.common.utils.ModelUtils;
+import org.eclipse.acceleo.internal.parser.cst.utils.FileContent;
+import org.eclipse.acceleo.parser.AcceleoParser;
+import org.eclipse.acceleo.parser.AcceleoParserProblem;
+import org.eclipse.acceleo.parser.AcceleoSourceBuffer;
+import org.osgi.framework.Bundle;
+
+public class AcceleoParserTests extends TestCase {
+
+ private Bundle bundle;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ bundle = Platform.getBundle("org.eclipse.acceleo.parser.tests");
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ bundle = null;
+ }
+
+ private File createFile(String pathName) {
+ try {
+ String fileLocation = FileLocator.resolve(bundle.getEntry(pathName)).getPath();
+ return new File(fileLocation);
+ } catch (IOException e) {
+ throw new AssertionFailedError(e.getMessage());
+ } catch (NullPointerException e) {
+ /*
+ * on the server the unit test fails with an NPE :S
+ */
+ throw new AssertionFailedError(e.getMessage());
+ }
+
+ }
+
+ private URI createFileURI(String pathName) {
+ try {
+ String fileLocation = FileLocator.resolve(bundle.getEntry(pathName)).getPath();
+ return URI.createFileURI(fileLocation);
+ } catch (IOException e) {
+ throw new AssertionFailedError(e.getMessage());
+ }
+ }
+
+ public void testCompileSourceBufferEcoreAcceleoWithImport() {
+ File file = createFile("/data/template/mtlParserEcore.mtl");
+ AcceleoSourceBuffer source = new AcceleoSourceBuffer(file);
+ AcceleoParser parser = new AcceleoParser();
+ ResourceSet resourceSet = new ResourceSetImpl();
+ Resource resource = ModelUtils.createResource(URI.createURI("http://acceleo.eclipse.org/default.emtl"),
+ resourceSet);
+ List<URI> dependencies = new ArrayList<URI>();
+ dependencies.add(createFileURI("/data/template/mtlParserEcoreCommon.emtl"));
+ parser.parse(source, resource, dependencies);
+ assertNotNull(source.getAST());
+ if (source.getProblems().getList().size() > 0) {
+ fail(source.getProblems().getMessage());
+ }
+ }
+
+ public void testCompileSourceBufferLibrary2textAcceleo() {
+ File file = createFile("/data/template/mtlParserLibrary2text.mtl");
+ AcceleoSourceBuffer source = new AcceleoSourceBuffer(file);
+ AcceleoParser parser = new AcceleoParser();
+ ResourceSet resourceSet = new ResourceSetImpl();
+ Resource resource = ModelUtils.createResource(URI.createURI("http://acceleo.eclipse.org/default.emtl"),
+ resourceSet);
+ parser.parse(source, resource, new ArrayList<URI>());
+ assertNotNull(source.getAST());
+ if (source.getProblems().getList().size() > 0) {
+ fail(source.getProblems().getMessage());
+ }
+ }
+
+ public void testCompileFileLibrary2textAcceleo() {
+ File iFile = createFile("/data/template/mtlParserLibrary2text.mtl");
+ URI oURI = createFileURI("/data/template/mtlParserLibrary2text.emtl");
+ testCompileFile(iFile, oURI, 0);
+ }
+
+ public void testCompileFileLibrary2textAcceleoWithBadOutputURI() {
+ File iFile = createFile("/data/template/mtlParserLibrary2text.mtl");
+ URI oURI = URI.createURI("http://acceleo.eclipse.org");
+ testCompileFile(iFile, oURI, 1);
+ }
+
+ private void testCompileFile(File iFile, URI oURI, int problemsCount) {
+ List<File> iFiles = new ArrayList<File>();
+ iFiles.add(iFile);
+ AcceleoParser parser = new AcceleoParser();
+ List<URI> oURIs = new ArrayList<URI>();
+ oURIs.add(oURI);
+ assertNull(parser.getProblems(iFile));
+ parser.parse(iFiles, oURIs, new ArrayList<URI>());
+ if (parser.getProblems(iFile).getList().size() != problemsCount) {
+ fail("You must have " + problemsCount + " syntax errors : "
+ + parser.getProblems(iFile).getMessage());
+ }
+ if (problemsCount == 0) {
+ assertEquals(parser.getProblems(iFile).getMessage(), "");
+ assertEquals(parser.getProblems(iFile).toString(), "");
+ } else {
+ assertTrue(parser.getProblems(iFile).getMessage() != null);
+ Iterator<AcceleoParserProblem> it = parser.getProblems(iFile).getList().iterator();
+ while (it.hasNext()) {
+ AcceleoParserProblem parserProblem = it.next();
+ assertTrue(parserProblem.getMessage() != null);
+ assertTrue(parserProblem.getLine() > 0);
+ assertTrue(parserProblem.getPosBegin() > -1);
+ assertTrue(parserProblem.getPosEnd() > -1);
+ assertTrue(parserProblem.toString().length() > 0);
+ }
+ }
+ parser.getProblems(iFile).clear();
+ }
+
+ public void testIndentStrategy() {
+ File file = createFile("/data/template/mtlIndentStrategy.mtl");
+ AcceleoSourceBuffer source = new AcceleoSourceBuffer(file);
+ AcceleoParser parser = new AcceleoParser();
+ ResourceSet resourceSet = new ResourceSetImpl();
+ Resource resource = ModelUtils.createResource(URI.createURI("http://acceleo.eclipse.org/default.emtl"),
+ resourceSet);
+ List<URI> dependencies = new ArrayList<URI>();
+ parser.parse(source, resource, dependencies);
+ assertNotNull(source.getAST());
+ if (source.getProblems().getList().size() > 0) {
+ fail(source.getProblems().getMessage());
+ }
+ String[] results = {"\n", "\n", "\t\t", "\n", "", "\t\t", "\n", "", "\t", "\n", "\t\t", "\n", "", "",
+ "\t\t\t", "\n", "", "\t\t\t", "\n", "", "\n", "\n\t\t", "\n", ""};
+ int i = -1;
+ StringBuffer report = new StringBuffer();
+ Iterator<EObject> it = resource.getContents().get(0).eAllContents();
+ while (it.hasNext()) {
+ EObject eObject = (EObject)it.next();
+ if (eObject instanceof org.eclipse.ocl.ecore.StringLiteralExp) {
+ i++;
+ org.eclipse.ocl.ecore.StringLiteralExp literal = (org.eclipse.ocl.ecore.StringLiteralExp)eObject;
+ String symbol = literal.getStringSymbol().replaceAll("\r", "");
+ if (i >= results.length || !results[i].equals(symbol)) {
+ int line = FileContent.lineNumber(source.getBuffer(), literal.getStartPosition());
+ report.append("New value at line " + line + " [" + i + "] = '" + symbol + "'\n");
+ }
+ }
+ }
+ if (report.length() > 0) {
+ System.out.print(report);
+ fail(report.toString());
+ }
+ }
+
+}
diff --git a/tests/org.eclipse.acceleo.parser.tests/src/org/eclipse/acceleo/parser/tests/cst/CSTParserBlockTests.java b/tests/org.eclipse.acceleo.parser.tests/src/org/eclipse/acceleo/parser/tests/cst/CSTParserBlockTests.java
new file mode 100644
index 0000000..bfeaca8
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/src/org/eclipse/acceleo/parser/tests/cst/CSTParserBlockTests.java
@@ -0,0 +1,264 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.acceleo.parser.tests.cst;
+
+import junit.framework.TestCase;
+
+import org.eclipse.acceleo.parser.cst.CstFactory;
+import org.eclipse.acceleo.parser.cst.FileBlock;
+import org.eclipse.acceleo.parser.cst.ForBlock;
+import org.eclipse.acceleo.parser.cst.IfBlock;
+import org.eclipse.acceleo.parser.cst.LetBlock;
+import org.eclipse.acceleo.parser.cst.Module;
+import org.eclipse.acceleo.parser.cst.Template;
+import org.eclipse.acceleo.parser.cst.TraceBlock;
+import org.eclipse.acceleo.internal.parser.cst.CSTParser;
+import org.eclipse.acceleo.internal.parser.cst.CSTParserBlock;
+import org.eclipse.acceleo.parser.AcceleoSourceBuffer;
+
+public class CSTParserBlockTests extends TestCase {
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ public void testParseIf() {
+ StringBuffer buffer = new StringBuffer("[if(true)] [/if]");
+ testParseIf(buffer, 0);
+ }
+
+ public void testParseIfElse() {
+ StringBuffer buffer = new StringBuffer("[if(true)] [else] [/if]");
+ testParseIf(buffer, 0);
+ }
+
+ public void testParseIfElseIf() {
+ StringBuffer buffer = new StringBuffer("[if(true)] [elseif(true)] [else] [/if]");
+ testParseIf(buffer, 0);
+ }
+
+ public void testParseIfWithOwnedIf() {
+ StringBuffer buffer = new StringBuffer("[if(true)] [if(true)] [elseif(true)] [else] [/if] [/if]");
+ testParseIf(buffer, 0);
+ }
+
+ public void testParseIfBadSyntaxValidateQuotes() {
+ StringBuffer buffer = new StringBuffer("[if(true)] \" [if(true)] \" [elseif(true)] [/if]");
+ testParseIf(buffer, 1);
+ }
+
+ public void testParseIfValidateQuotes() {
+ StringBuffer buffer = new StringBuffer("[if(true)] \" [elseif(true)] [else] [/if]");
+ testParseIf(buffer, 0);
+ }
+
+ private void testParseIf(StringBuffer buffer, int problemsCount) {
+ StringBuffer moduleBuffer = new StringBuffer("mymodule(http://www.eclipse.org/uml2/2.1.0/UML)");
+ AcceleoSourceBuffer moduleSource = new AcceleoSourceBuffer(moduleBuffer);
+ CSTParser pAcceleomodule = new CSTParser(moduleSource);
+ Module eModule = CstFactory.eINSTANCE.createModule();
+ pAcceleomodule.parseModuleHeader(0, moduleBuffer.length(), eModule);
+ Template eTemplate = CstFactory.eINSTANCE.createTemplate();
+ eModule.getOwnedModuleElement().add(eTemplate);
+ IfBlock eIf = CstFactory.eINSTANCE.createIfBlock();
+ eTemplate.getBody().add(eIf);
+ AcceleoSourceBuffer source = new AcceleoSourceBuffer(buffer);
+ CSTParser pAcceleo = new CSTParser(source);
+ CSTParserBlock parser = new CSTParserBlock(pAcceleo);
+ parser.parse(0, buffer.length(), eIf);
+ if (source.getProblems().getList().size() != problemsCount) {
+ fail("You must have " + problemsCount + " syntax errors : " + source.getProblems().getMessage());
+ }
+ }
+
+ public void testParseFor() {
+ StringBuffer buffer = new StringBuffer("[for (c : Class | null)] [/for]");
+ testParseFor(buffer, 0);
+ }
+
+ public void testParseForWithOwnedFor() {
+ StringBuffer buffer = new StringBuffer(
+ "[for (c : Class | null)] [for(a : Property | null)] [/for] [/for]");
+ testParseFor(buffer, 0);
+ }
+
+ public void testParseForWithBefore() {
+ StringBuffer buffer = new StringBuffer("[for (c : Class | null) before (null)] [/for]");
+ testParseFor(buffer, 0);
+ }
+
+ public void testParseForWithBeforeSeparator() {
+ StringBuffer buffer = new StringBuffer(
+ "[for (c : Class | null) before (null) separator (',')] [/for]");
+ testParseFor(buffer, 0);
+ }
+
+ public void testParseForWithBeforeAfter() {
+ StringBuffer buffer = new StringBuffer("[for (c : Class | null) before (null)] after (null)] [/for]");
+ testParseFor(buffer, 0);
+ }
+
+ public void testParseForWithBeforeGuard() {
+ StringBuffer buffer = new StringBuffer("[for (c : Class | null) before (null) ? (null)] [/for]");
+ testParseFor(buffer, 0);
+ }
+
+ public void testParseForWithBeforeGuardInitSection() {
+ StringBuffer buffer = new StringBuffer(
+ "[for (c1 : Class | null) before (null) ? (null) {c2:Class;} ] [/for]");
+ testParseFor(buffer, 0);
+ }
+
+ private void testParseFor(StringBuffer buffer, int problemsCount) {
+ StringBuffer moduleBuffer = new StringBuffer("mymodule(http://www.eclipse.org/uml2/2.1.0/UML)");
+ AcceleoSourceBuffer moduleSource = new AcceleoSourceBuffer(moduleBuffer);
+ Module eModule = CstFactory.eINSTANCE.createModule();
+ CSTParser pAcceleomodule = new CSTParser(moduleSource);
+ pAcceleomodule.parseModuleHeader(0, moduleBuffer.length(), eModule);
+ Template eTemplate = CstFactory.eINSTANCE.createTemplate();
+ eModule.getOwnedModuleElement().add(eTemplate);
+ ForBlock eFor = CstFactory.eINSTANCE.createForBlock();
+ eTemplate.getBody().add(eFor);
+ AcceleoSourceBuffer source = new AcceleoSourceBuffer(buffer);
+ CSTParser pAcceleo = new CSTParser(source);
+ CSTParserBlock parser = new CSTParserBlock(pAcceleo);
+ parser.parse(0, buffer.length(), eFor);
+ if (source.getProblems().getList().size() != problemsCount) {
+ fail("You must have " + problemsCount + " syntax errors : " + source.getProblems().getMessage());
+ }
+ }
+
+ public void testParseLetWithVariable() {
+ StringBuffer buffer = new StringBuffer("[let c1 : Class] [/let]");
+ testParseLet(buffer, 0);
+ }
+
+ public void testParseLetWithoutVariable() {
+ StringBuffer buffer = new StringBuffer("[let ] [/let]");
+ testParseLet(buffer, 1);
+ }
+
+ public void testParseLetElse() {
+ StringBuffer buffer = new StringBuffer("[let c:Class] [else] [/let]");
+ testParseLet(buffer, 0);
+ }
+
+ public void testParseLetElseLet() {
+ StringBuffer buffer = new StringBuffer("[let c1:Class] [elselet c2:Class] [else] [/let]");
+ testParseLet(buffer, 0);
+ }
+
+ public void testParseLetWithOwnedLet() {
+ StringBuffer buffer = new StringBuffer(
+ "[let c1:Class] [let c2:Class] [elselet c3:Class] [else] [/let] [/let]");
+ testParseLet(buffer, 0);
+ }
+
+ private void testParseLet(StringBuffer buffer, int problemsCount) {
+ StringBuffer moduleBuffer = new StringBuffer("mymodule(http://www.eclipse.org/uml2/2.1.0/UML)");
+ AcceleoSourceBuffer moduleSource = new AcceleoSourceBuffer(moduleBuffer);
+ Module eModule = CstFactory.eINSTANCE.createModule();
+ CSTParser pAcceleomodule = new CSTParser(moduleSource);
+ pAcceleomodule.parseModuleHeader(0, moduleBuffer.length(), eModule);
+ Template eTemplate = CstFactory.eINSTANCE.createTemplate();
+ eModule.getOwnedModuleElement().add(eTemplate);
+ LetBlock eLet = CstFactory.eINSTANCE.createLetBlock();
+ eTemplate.getBody().add(eLet);
+ AcceleoSourceBuffer source = new AcceleoSourceBuffer(buffer);
+ CSTParser pAcceleo = new CSTParser(source);
+ CSTParserBlock parser = new CSTParserBlock(pAcceleo);
+ parser.parse(0, buffer.length(), eLet);
+ if (source.getProblems().getList().size() != problemsCount) {
+ fail("You must have " + problemsCount + " syntax errors : " + source.getProblems().getMessage());
+ }
+ }
+
+ public void testParseTrace() {
+ StringBuffer buffer = new StringBuffer("[trace ('')] [/trace]");
+ testParseTrace(buffer, 0);
+ }
+
+ public void testParseTraceWithOwnedTrace() {
+ StringBuffer buffer = new StringBuffer("[trace ('1')] [trace ('2')] [/trace] [/trace]");
+ testParseTrace(buffer, 0);
+ }
+
+ private void testParseTrace(StringBuffer buffer, int problemsCount) {
+ StringBuffer moduleBuffer = new StringBuffer("mymodule(http://www.eclipse.org/uml2/2.1.0/UML)");
+ AcceleoSourceBuffer moduleSource = new AcceleoSourceBuffer(moduleBuffer);
+ Module eModule = CstFactory.eINSTANCE.createModule();
+ CSTParser pAcceleomodule = new CSTParser(moduleSource);
+ pAcceleomodule.parseModuleHeader(0, moduleBuffer.length(), eModule);
+ Template eTemplate = CstFactory.eINSTANCE.createTemplate();
+ eModule.getOwnedModuleElement().add(eTemplate);
+ TraceBlock eTrace = CstFactory.eINSTANCE.createTraceBlock();
+ eTemplate.getBody().add(eTrace);
+ AcceleoSourceBuffer source = new AcceleoSourceBuffer(buffer);
+ CSTParser pAcceleo = new CSTParser(source);
+ CSTParserBlock parser = new CSTParserBlock(pAcceleo);
+ parser.parse(0, buffer.length(), eTrace);
+ if (source.getProblems().getList().size() != problemsCount) {
+ fail("You must have " + problemsCount + " syntax errors : " + source.getProblems().getMessage());
+ }
+ }
+
+ public void testParseFileWithOverwriteMode() {
+ StringBuffer buffer = new StringBuffer("[file ('file.txt', false)] [/file]");
+ testParseFile(buffer, 0);
+ }
+
+ public void testParseFileWithAppendMode() {
+ StringBuffer buffer = new StringBuffer("[file ('file.txt', true)] [/file]");
+ testParseFile(buffer, 0);
+ }
+
+ public void testParseFileWithBadOpenMode() {
+ StringBuffer buffer = new StringBuffer("[file ('file.txt', badmode)] [/file]");
+ testParseFile(buffer, 1);
+ }
+
+ public void testParseFileWithOpenModeAndUniqueId() {
+ StringBuffer buffer = new StringBuffer("[file ('file.txt', true, 'ID')] [/file]");
+ testParseFile(buffer, 0);
+ }
+
+ public void testParseFileWithOwnedFile() {
+ StringBuffer buffer = new StringBuffer(
+ "[file ('file.txt', false)] [file ('file.txt', false)] [/file] [/file]");
+ testParseFile(buffer, 0);
+ }
+
+ private void testParseFile(StringBuffer buffer, int problemsCount) {
+ StringBuffer moduleBuffer = new StringBuffer("mymodule(http://www.eclipse.org/uml2/2.1.0/UML)");
+ AcceleoSourceBuffer moduleSource = new AcceleoSourceBuffer(moduleBuffer);
+ Module eModule = CstFactory.eINSTANCE.createModule();
+ CSTParser pAcceleomodule = new CSTParser(moduleSource);
+ pAcceleomodule.parseModuleHeader(0, moduleBuffer.length(), eModule);
+ Template eTemplate = CstFactory.eINSTANCE.createTemplate();
+ eModule.getOwnedModuleElement().add(eTemplate);
+ FileBlock eFile = CstFactory.eINSTANCE.createFileBlock();
+ eTemplate.getBody().add(eFile);
+ AcceleoSourceBuffer source = new AcceleoSourceBuffer(buffer);
+ CSTParser pAcceleo = new CSTParser(source);
+ CSTParserBlock parser = new CSTParserBlock(pAcceleo);
+ parser.parse(0, buffer.length(), eFile);
+ if (source.getProblems().getList().size() != problemsCount) {
+ fail("You must have " + problemsCount + " syntax errors : " + source.getProblems().getMessage());
+ }
+ }
+
+}
diff --git a/tests/org.eclipse.acceleo.parser.tests/src/org/eclipse/acceleo/parser/tests/cst/CSTParserTests.java b/tests/org.eclipse.acceleo.parser.tests/src/org/eclipse/acceleo/parser/tests/cst/CSTParserTests.java
new file mode 100644
index 0000000..54ddc86
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/src/org/eclipse/acceleo/parser/tests/cst/CSTParserTests.java
@@ -0,0 +1,225 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.acceleo.parser.tests.cst;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.List;
+
+import junit.framework.AssertionFailedError;
+import junit.framework.TestCase;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.acceleo.common.utils.ModelUtils;
+import org.eclipse.acceleo.parser.cst.CstFactory;
+import org.eclipse.acceleo.parser.cst.Module;
+import org.eclipse.acceleo.parser.cst.Template;
+import org.eclipse.acceleo.internal.parser.ast.CST2ASTConverter;
+import org.eclipse.acceleo.internal.parser.cst.CSTParser;
+import org.eclipse.acceleo.parser.AcceleoSourceBuffer;
+import org.eclipse.ocl.helper.Choice;
+import org.osgi.framework.Bundle;
+
+public class CSTParserTests extends TestCase {
+
+ private Bundle bundle;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ bundle = Platform.getBundle("org.eclipse.acceleo.parser.tests");
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ bundle = null;
+ }
+
+ private File createFile(String pathName) {
+ try {
+ String fileLocation = FileLocator.resolve(bundle.getEntry(pathName)).getPath();
+ return new File(fileLocation);
+ } catch (IOException e) {
+ throw new AssertionFailedError(e.getMessage());
+ } catch (NullPointerException e) {
+ /*
+ * on the server the unit test fails with an NPE :S
+ */
+ throw new AssertionFailedError(e.getMessage());
+ }
+
+ }
+
+ public void testParseFileLibrary2textAcceleo() {
+ File file = createFile("/data/template/cstParserLibrary2text.mtl");
+ AcceleoSourceBuffer source = new AcceleoSourceBuffer(file);
+ CSTParser parser = new CSTParser(source);
+ assertNotNull(parser.parse());
+ if (source.getProblems().getList().size() > 0) {
+ fail(source.getProblems().getMessage());
+ }
+ }
+
+ public void testParseEmptyBuffer() {
+ StringBuffer buffer = new StringBuffer("");
+ AcceleoSourceBuffer source = new AcceleoSourceBuffer(buffer);
+ CSTParser parser = new CSTParser(source);
+ assertNull(parser.parse());
+ checkProblems(source, 1);
+ }
+
+ public void testParseBufferModuleIsMissing() {
+ StringBuffer buffer = new StringBuffer("[template name()][/template]");
+ AcceleoSourceBuffer source = new AcceleoSourceBuffer(buffer);
+ CSTParser parser = new CSTParser(source);
+ assertNull(parser.parse());
+ checkProblems(source, 1);
+ }
+
+ public void testParseBufferModuleIsNotTerminated() {
+ StringBuffer buffer = new StringBuffer(
+ "[module library2text(http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0)/]");
+ AcceleoSourceBuffer source = new AcceleoSourceBuffer(buffer);
+ CSTParser parser = new CSTParser(source);
+ assertNotNull(parser.parse());
+ checkProblems(source, 0);
+
+ buffer = new StringBuffer(
+ "[module library2text(http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0)");
+ source = new AcceleoSourceBuffer(buffer);
+ parser = new CSTParser(source);
+ assertNull(parser.parse());
+ checkProblems(source, 1);
+ }
+
+ private void checkProblems(AcceleoSourceBuffer source, int problemsCount) {
+ if (source.getProblems().getList().size() != problemsCount) {
+ fail("You must have " + problemsCount + " syntax errors : " + source.getProblems().getMessage());
+ }
+ }
+
+ public void testParseModuleHeaderUML() {
+ StringBuffer buffer = new StringBuffer("mymodule(http://www.eclipse.org/uml2/2.1.0/UML)");
+ testParseModuleHeader(buffer);
+ }
+
+ public void testParseModuleHeaderUMLExtendsOneModule() {
+ StringBuffer buffer = new StringBuffer(
+ "mymodule(http://www.eclipse.org/uml2/2.1.0/UML) extends mymodule1");
+ testParseModuleHeader(buffer);
+ }
+
+ public void testParseModuleHeaderUMLExtendsTwoModules() {
+ StringBuffer buffer = new StringBuffer(
+ "mymodule(http://www.eclipse.org/uml2/2.1.0/UML) extends mymodule1, mymodule2");
+ testParseModuleHeader(buffer);
+ }
+
+ private void testParseModuleHeader(StringBuffer buffer) {
+ AcceleoSourceBuffer source = new AcceleoSourceBuffer(buffer);
+ CSTParser parser = new CSTParser(source);
+ Module eModule = CstFactory.eINSTANCE.createModule();
+ parser.parseModuleHeader(0, buffer.length(), eModule);
+ if (source.getProblems().getList().size() > 0) {
+ fail(source.getProblems().getMessage());
+ }
+ }
+
+ public void testParseTemplateHeaderWithOneParameter() {
+ StringBuffer buffer = new StringBuffer("public class2Java(c : Class)");
+ testParseTemplateHeader(buffer, 0);
+ }
+
+ public void testParseTemplateHeaderWithTwoParameters() {
+ StringBuffer buffer = new StringBuffer("public class2Java(c1 : Class, c2 : Class)");
+ testParseTemplateHeader(buffer, 0);
+ }
+
+ public void testParseTemplateHeaderWithBadParameter() {
+ StringBuffer buffer = new StringBuffer("public class2Java(c1 : Class, c2 - Class)");
+ testParseTemplateHeader(buffer, 1);
+ }
+
+ public void testParseTemplateHeaderWithOverrides() {
+ StringBuffer buffer = new StringBuffer(
+ "public class2Java(c1 : Class) overrides class2Java, class2Java");
+ testParseTemplateHeader(buffer, 0);
+ }
+
+ public void testParseTemplateHeaderWithOverridesGuard() {
+ StringBuffer buffer = new StringBuffer(
+ "public class2Java(c1 : Class) overrides class2Java ? (c1.name = '')");
+ testParseTemplateHeader(buffer, 0);
+ }
+
+ public void testParseTemplateHeaderWithOverridesGuardParenthesisAreRequired() {
+ StringBuffer buffer = new StringBuffer(
+ "public class2Java(c1 : Class) overrides class2Java ? c1.name = ''");
+ testParseTemplateHeader(buffer, 1);
+ }
+
+ public void testParseTemplateHeaderWithOverridesGuardInitSection() {
+ StringBuffer buffer = new StringBuffer(
+ "public class2Java(c1 : Class) overrides class2Java ? (c1.name = '') {c2:Class;}");
+ testParseTemplateHeader(buffer, 0);
+ }
+
+ private void testParseTemplateHeader(StringBuffer buffer, int problemsCount) {
+ StringBuffer moduleBuffer = new StringBuffer("mymodule(http://www.eclipse.org/uml2/2.1.0/UML)");
+ AcceleoSourceBuffer moduleSource = new AcceleoSourceBuffer(moduleBuffer);
+ Module eModule = CstFactory.eINSTANCE.createModule();
+ CSTParser moduleParser = new CSTParser(moduleSource);
+ moduleParser.parseModuleHeader(0, moduleBuffer.length(), eModule);
+ Template eTemplate = CstFactory.eINSTANCE.createTemplate();
+ eModule.getOwnedModuleElement().add(eTemplate);
+ AcceleoSourceBuffer source = new AcceleoSourceBuffer(buffer);
+ CSTParser parser = new CSTParser(source);
+ parser.parseTemplateHeader(0, buffer.length(), eTemplate);
+ if (source.getProblems().getList().size() != problemsCount) {
+ fail("You must have " + problemsCount + " syntax errors : " + source.getProblems().getMessage());
+ }
+ }
+
+ public void testParseOCLSyntaxHelp() {
+ String bufferBefore = "[module mymodule(http://www.eclipse.org/uml2/2.1.0/UML)/]"
+ + "[template public class2Java(c1 : Class)]" + "[c1.";
+ String bufferAfter = "/] [/template]";
+ List<Choice> choices = getSyntaxHelp(bufferBefore + bufferAfter, bufferBefore.length());
+ assertEquals(choices.size(), 52);
+ }
+
+ private List<Choice> getSyntaxHelp(String buffer, int offset) {
+ AcceleoSourceBuffer source = new AcceleoSourceBuffer(new StringBuffer(buffer));
+ CSTParser parser = new CSTParser(source);
+ Module cst = parser.parse();
+ ResourceSet resourceSet = new ResourceSetImpl();
+ Resource resource = ModelUtils.createResource(URI.createURI("http://acceleo.eclipse.org/default.emtl"),
+ resourceSet);
+ CST2ASTConverter astConverter = new CST2ASTConverter();
+ astConverter.createAST(cst, resource);
+ if (resource.getContents().size() > 0
+ && resource.getContents().get(0) instanceof org.eclipse.acceleo.model.mtl.Module) {
+ org.eclipse.acceleo.model.mtl.Module ast = (org.eclipse.acceleo.model.mtl.Module)resource.getContents().get(0);
+ astConverter.getOCL().addRecursivelyMetamodelsToScope(ast);
+ astConverter.getOCL().addRecursivelyBehavioralFeaturesToScope(ast);
+ assertNotNull(astConverter.getOCL().addRecursivelyVariablesToScopeAndGetContextClassifierAt(ast,
+ offset));
+ }
+ return astConverter.getOCL().getSyntaxHelp("");
+ }
+
+}
diff --git a/tests/org.eclipse.acceleo.parser.tests/src/org/eclipse/acceleo/parser/tests/cst/utils/FileContentTests.java b/tests/org.eclipse.acceleo.parser.tests/src/org/eclipse/acceleo/parser/tests/cst/utils/FileContentTests.java
new file mode 100644
index 0000000..58f0624
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/src/org/eclipse/acceleo/parser/tests/cst/utils/FileContentTests.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.acceleo.parser.tests.cst.utils;
+
+import junit.framework.TestCase;
+
+import org.eclipse.acceleo.internal.parser.cst.utils.FileContent;
+
+public class FileContentTests extends TestCase {
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ public void testLineNumber() {
+ StringBuffer buffer = new StringBuffer("1\n2\n3\n4\n5");
+ assertEquals(FileContent.lineNumber(buffer, 0), 1);
+ assertEquals(FileContent.lineNumber(buffer, 1), 1);
+ assertEquals(FileContent.lineNumber(buffer, 2), 2);
+ assertEquals(FileContent.lineNumber(buffer, 3), 2);
+ assertEquals(FileContent.lineNumber(buffer, 4), 3);
+ assertEquals(FileContent.lineNumber(buffer, 5), 3);
+ assertEquals(FileContent.lineNumber(buffer, 6), 4);
+ }
+
+ public void testColumnNumber() {
+ StringBuffer buffer = new StringBuffer("1\n2\n3\n4\n5");
+ assertEquals(FileContent.columnNumber(buffer, 0), 1);
+ assertEquals(FileContent.columnNumber(buffer, 1), 2);
+ assertEquals(FileContent.columnNumber(buffer, 2), 1);
+ assertEquals(FileContent.columnNumber(buffer, 3), 2);
+ assertEquals(FileContent.columnNumber(buffer, 4), 1);
+ assertEquals(FileContent.columnNumber(buffer, 5), 2);
+ assertEquals(FileContent.columnNumber(buffer, 6), 1);
+ }
+
+}
diff --git a/tests/org.eclipse.acceleo.parser.tests/src/org/eclipse/acceleo/parser/tests/cst/utils/SequenceTests.java b/tests/org.eclipse.acceleo.parser.tests/src/org/eclipse/acceleo/parser/tests/cst/utils/SequenceTests.java
new file mode 100644
index 0000000..91d2455
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/src/org/eclipse/acceleo/parser/tests/cst/utils/SequenceTests.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.acceleo.parser.tests.cst.utils;
+
+import junit.framework.TestCase;
+
+import org.eclipse.acceleo.internal.parser.cst.utils.Region;
+import org.eclipse.acceleo.internal.parser.cst.utils.Sequence;
+import org.eclipse.acceleo.internal.parser.cst.utils.SequenceBlock;
+
+public class SequenceTests extends TestCase {
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ public void testSequence() {
+ StringBuffer buffer = new StringBuffer("abcde");
+ assertEquals(new Sequence("a").search(buffer).b(), 0);
+ assertEquals(new Sequence("abcde").search(buffer).b(), 0);
+ assertEquals(new Sequence("f").search(buffer).b(), -1);
+
+ Sequence seq = new Sequence("a");
+ assertEquals(seq.search(buffer), new Region(0, 1, seq));
+ assertEquals(seq.search(buffer).toString(), "[0,1]");
+ seq = new Sequence("f");
+ assertEquals(seq.search(buffer), Region.NOT_FOUND);
+ }
+
+ public void testSequenceBlock() {
+ StringBuffer buffer = new StringBuffer("a((h)g)h");
+ SequenceBlock parenthesis = new SequenceBlock(new Sequence("("), new Sequence(")"), null, true, null);
+ assertEquals(new Sequence("g").search(buffer, 0, buffer.length(), null,
+ new SequenceBlock[] {parenthesis}).b(), -1);
+ assertEquals(new Sequence("h").search(buffer, 0, buffer.length(), null,
+ new SequenceBlock[] {parenthesis}).b(), 7);
+ }
+
+}
diff --git a/tests/org.eclipse.acceleo.parser.tests/src/org/eclipse/acceleo/parser/tests/suite/AllTests.java b/tests/org.eclipse.acceleo.parser.tests/src/org/eclipse/acceleo/parser/tests/suite/AllTests.java
new file mode 100644
index 0000000..624f72a
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/src/org/eclipse/acceleo/parser/tests/suite/AllTests.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.acceleo.parser.tests.suite;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+import org.eclipse.acceleo.parser.tests.AcceleoParserTests;
+import org.eclipse.acceleo.parser.tests.cst.CSTParserBlockTests;
+import org.eclipse.acceleo.parser.tests.cst.CSTParserTests;
+import org.eclipse.acceleo.parser.tests.cst.utils.FileContentTests;
+import org.eclipse.acceleo.parser.tests.cst.utils.SequenceTests;
+
+/**
+ * This suite will launch all the tests defined for the Acceleo parser.
+ *
+ * @author <a href="mailto:jonathan.musset@obeo.fr">Jonathan Musset</a>
+ */
+public class AllTests {
+
+ /**
+ * Launches the test with the given arguments.
+ *
+ * @param args
+ * Arguments of the testCase.
+ */
+ public static void main(String[] args) {
+ TestRunner.run(suite());
+ }
+
+ /**
+ * Creates the {@link junit.framework.TestSuite TestSuite} for all the test.
+ *
+ * @return The test suite containing all the tests
+ */
+ public static Test suite() {
+ final TestSuite suite = new TestSuite("Acceleo parser test suite");
+ suite.addTestSuite(AcceleoParserTests.class);
+ suite.addTestSuite(CSTParserBlockTests.class);
+ suite.addTestSuite(CSTParserTests.class);
+ suite.addTestSuite(FileContentTests.class);
+ suite.addTestSuite(SequenceTests.class);
+ return suite;
+ }
+
+}
diff --git a/tests/org.eclipse.acceleo.parser.tests/test.xml b/tests/org.eclipse.acceleo.parser.tests/test.xml
new file mode 100644
index 0000000..ace67f2
--- /dev/null
+++ b/tests/org.eclipse.acceleo.parser.tests/test.xml
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!--
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2008, 2009 Obeo and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - Initial API and implementation
+ *
+ * </copyright>
+ *
+ * $Id: test.xml,v 1.1 2009/03/05 16:33:18 jmusset Exp $
+ */
+-->
+
+<project name="testsuite" default="run" basedir=".">
+ <!-- The property ${eclipse-home} should be passed into this script -->
+ <!-- Set a meaningful default value for when it is not. -->
+ <property name="eclipse-home" value="${basedir}\..\.."/>
+
+ <!-- sets the properties plugin-name, and library-file -->
+ <property name="plugin-name" value="org.eclipse.acceleo.parser.tests"/>
+ <property name="library-file" value="${eclipse-home}/dropins/eclipse/plugins/org.eclipse.test/library.xml"/>
+
+ <!-- This target holds all initialization code that needs to be done for -->
+ <!-- all tests that are to be run. Initialization for individual tests -->
+ <!-- should be done within the body of the suite target. -->
+ <target name="init">
+ <tstamp/>
+ <delete>
+ <fileset dir="${eclipse-home}" includes="org*.xml"/>
+ </delete>
+ </target>
+
+ <!-- This target defines the tests that need to be run. -->
+ <target name="suite">
+ <property name="m2t-folder" value="${eclipse-home}/emf_folder"/>
+ <delete dir="${m2t-folder}" quiet="true"/>
+ <ant target="core-test" antfile="${library-file}" dir="${eclipse-home}">
+ <property name="data-dir" value="${m2t-folder}"/>
+ <property name="plugin-name" value="${plugin-name}"/>
+ <property name="classname" value="org.eclipse.acceleo.parser.tests.suite.AllTests"/>
+ </ant>
+ </target>
+
+ <!-- This target holds code to cleanup the testing environment after -->
+ <!-- after all of the tests have been run. You can use this target to -->
+ <!-- delete temporary files that have been created. -->
+ <target name="cleanup">
+ </target>
+
+ <!-- This target runs the test suite. Any actions that need to happen -->
+ <!-- after all the tests have been run should go here. -->
+ <target name="run" depends="init,suite,cleanup">
+ <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
+ <property name="includes" value="org*.xml"/>
+ <property name="output-file" value="${plugin-name}.xml"/>
+ </ant>
+ </target>
+
+</project>