diff options
author | Eike Stepper | 2009-04-26 16:52:43 +0000 |
---|---|---|
committer | Eike Stepper | 2009-04-26 16:52:43 +0000 |
commit | 75b5e955a062d69c87d49975e2292688fae47a88 (patch) | |
tree | 2243cf53ec5dfebe933905ecf452d0343745a291 | |
parent | d2fb30e856c3bd7d0bdc0ebdd66c2b7bb5a632b0 (diff) | |
download | cdo-75b5e955a062d69c87d49975e2292688fae47a88.tar.gz cdo-75b5e955a062d69c87d49975e2292688fae47a88.tar.xz cdo-75b5e955a062d69c87d49975e2292688fae47a88.zip |
[273726] Publish "Gastro" Examples
https://bugs.eclipse.org/bugs/show_bug.cgi?id=273726
272 files changed, 30029 insertions, 0 deletions
diff --git a/plugins/org.gastro.business.edit/.classpath b/plugins/org.gastro.business.edit/.classpath new file mode 100644 index 0000000000..304e86186a --- /dev/null +++ b/plugins/org.gastro.business.edit/.classpath @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="src"/> + <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="output" path="bin"/> +</classpath> diff --git a/plugins/org.gastro.business.edit/.cvsignore b/plugins/org.gastro.business.edit/.cvsignore new file mode 100644 index 0000000000..693869726d --- /dev/null +++ b/plugins/org.gastro.business.edit/.cvsignore @@ -0,0 +1,2 @@ +bin +doc diff --git a/plugins/org.gastro.business.edit/.project b/plugins/org.gastro.business.edit/.project new file mode 100644 index 0000000000..d6cf37d3bb --- /dev/null +++ b/plugins/org.gastro.business.edit/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.gastro.business.edit</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.ManifestBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.SchemaBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + <nature>org.eclipse.pde.PluginNature</nature> + </natures> +</projectDescription> diff --git a/plugins/org.gastro.business.edit/META-INF/MANIFEST.MF b/plugins/org.gastro.business.edit/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..9ce913a9c5 --- /dev/null +++ b/plugins/org.gastro.business.edit/META-INF/MANIFEST.MF @@ -0,0 +1,17 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: org.gastro.business.edit;singleton:=true +Bundle-Version: 1.0.0 +Bundle-ClassPath: . +Bundle-Activator: org.gastro.business.provider.BusinessEditPlugin$Implementation +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: J2SE-1.5 +Export-Package: org.gastro.business.provider +Require-Bundle: org.eclipse.core.runtime, + org.gastro.business;visibility:=reexport, + org.eclipse.emf.edit;visibility:=reexport, + org.gastro.inventory;visibility:=reexport, + org.gastro.inventory.edit;visibility:=reexport +Bundle-ActivationPolicy: lazy diff --git a/plugins/org.gastro.business.edit/build.properties b/plugins/org.gastro.business.edit/build.properties new file mode 100644 index 0000000000..6a83a2ff20 --- /dev/null +++ b/plugins/org.gastro.business.edit/build.properties @@ -0,0 +1,17 @@ + +# <copyright> +# </copyright> +# +# $Id: build.properties,v 1.1 2009-04-26 16:52:39 estepper Exp $ + +bin.includes = .,\ + icons/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties,\ + copyright.txt,\ + epl-v10.html,\ + license.html +jars.compile.order = . +source.. = src/ +output.. = bin/ diff --git a/plugins/org.gastro.business.edit/copyright.txt b/plugins/org.gastro.business.edit/copyright.txt new file mode 100644 index 0000000000..d7088ff84e --- /dev/null +++ b/plugins/org.gastro.business.edit/copyright.txt @@ -0,0 +1,11 @@ +Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) 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: + Eike Stepper - initial API and implementation + +Initial Publication: + Eclipse Magazin - http://www.eclipse-magazin.de
\ No newline at end of file diff --git a/plugins/org.gastro.business.edit/epl-v10.html b/plugins/org.gastro.business.edit/epl-v10.html new file mode 100644 index 0000000000..d7b88e9416 --- /dev/null +++ b/plugins/org.gastro.business.edit/epl-v10.html @@ -0,0 +1,319 @@ +<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"><head> +<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> +<meta name="ProgId" content="Word.Document"> +<meta name="Generator" content="Microsoft Word 9"> +<meta name="Originator" content="Microsoft Word 9"> +<link rel="File-List" href="http://www.eclipse.org/org/documents/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml"><title>Eclipse Public License - Version 1.0</title><!--[if gte mso 9]><xml> + <o:DocumentProperties> + <o:Revision>2</o:Revision> + <o:TotalTime>3</o:TotalTime> + <o:Created>2004-03-05T23:03:00Z</o:Created> + <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved> + <o:Pages>4</o:Pages> + <o:Words>1626</o:Words> + <o:Characters>9270</o:Characters> + <o:Lines>77</o:Lines> + <o:Paragraphs>18</o:Paragraphs> + <o:CharactersWithSpaces>11384</o:CharactersWithSpaces> + <o:Version>9.4402</o:Version> + </o:DocumentProperties> +</xml><![endif]--><!--[if gte mso 9]><xml> + <w:WordDocument> + <w:TrackRevisions/> + </w:WordDocument> +</xml><![endif]--> + + +<style> +<!-- + /* Font Definitions */ +@font-face + {font-family:Tahoma; + panose-1:2 11 6 4 3 5 4 4 2 4; + mso-font-charset:0; + mso-generic-font-family:swiss; + mso-font-pitch:variable; + mso-font-signature:553679495 -2147483648 8 0 66047 0;} + /* Style Definitions */ +p.MsoNormal, li.MsoNormal, div.MsoNormal + {mso-style-parent:""; + margin:0in; + margin-bottom:.0001pt; + mso-pagination:widow-orphan; + font-size:12.0pt; + font-family:"Times New Roman"; + mso-fareast-font-family:"Times New Roman";} +p + {margin-right:0in; + mso-margin-top-alt:auto; + mso-margin-bottom-alt:auto; + margin-left:0in; + mso-pagination:widow-orphan; + font-size:12.0pt; + font-family:"Times New Roman"; + mso-fareast-font-family:"Times New Roman";} +p.BalloonText, li.BalloonText, div.BalloonText + {mso-style-name:"Balloon Text"; + margin:0in; + margin-bottom:.0001pt; + mso-pagination:widow-orphan; + font-size:8.0pt; + font-family:Tahoma; + mso-fareast-font-family:"Times New Roman";} +@page Section1 + {size:8.5in 11.0in; + margin:1.0in 1.25in 1.0in 1.25in; + mso-header-margin:.5in; + mso-footer-margin:.5in; + mso-paper-source:0;} +div.Section1 + {page:Section1;} +--> +</style></head> + +<body style="" lang="EN-US"> + +<div class="Section1"> + +<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b> +</p> + +<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER +THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, +REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE +OF THIS AGREEMENT.</span> </p> + +<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p> + +<p><span style="font-size: 10pt;">"Contribution" means:</span> </p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a) +in the case of the initial Contributor, the initial code and documentation +distributed under this Agreement, and<br clear="left"> +b) in the case of each subsequent Contributor:</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i) +changes to the Program, and</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii) +additions to the Program;</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where +such changes and/or additions to the Program originate from and are distributed +by that particular Contributor. A Contribution 'originates' from a Contributor +if it was added to the Program by such Contributor itself or anyone acting on +such Contributor's behalf. Contributions do not include additions to the +Program which: (i) are separate modules of software distributed in conjunction +with the Program under their own license agreement, and (ii) are not derivative +works of the Program. </span></p> + +<p><span style="font-size: 10pt;">"Contributor" means any person or +entity that distributes the Program.</span> </p> + +<p><span style="font-size: 10pt;">"Licensed Patents " mean patent +claims licensable by a Contributor which are necessarily infringed by the use +or sale of its Contribution alone or when combined with the Program. </span></p> + +<p><span style="font-size: 10pt;">"Program" means the Contributions +distributed in accordance with this Agreement.</span> </p> + +<p><span style="font-size: 10pt;">"Recipient" means anyone who +receives the Program under this Agreement, including all Contributors.</span> </p> + +<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a) +Subject to the terms of this Agreement, each Contributor hereby grants Recipient +a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly +display, publicly perform, distribute and sublicense the Contribution of such +Contributor, if any, and such derivative works, in source code and object code +form.</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) +Subject to the terms of this Agreement, each Contributor hereby grants +Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free +patent license under Licensed Patents to make, use, sell, offer to sell, import +and otherwise transfer the Contribution of such Contributor, if any, in source +code and object code form. This patent license shall apply to the combination +of the Contribution and the Program if, at the time the Contribution is added +by the Contributor, such addition of the Contribution causes such combination +to be covered by the Licensed Patents. The patent license shall not apply to +any other combinations which include the Contribution. No hardware per se is +licensed hereunder. </span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c) +Recipient understands that although each Contributor grants the licenses to its +Contributions set forth herein, no assurances are provided by any Contributor +that the Program does not infringe the patent or other intellectual property +rights of any other entity. Each Contributor disclaims any liability to Recipient +for claims brought by any other entity based on infringement of intellectual +property rights or otherwise. As a condition to exercising the rights and +licenses granted hereunder, each Recipient hereby assumes sole responsibility +to secure any other intellectual property rights needed, if any. For example, +if a third party patent license is required to allow Recipient to distribute +the Program, it is Recipient's responsibility to acquire that license before +distributing the Program.</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d) +Each Contributor represents that to its knowledge it has sufficient copyright +rights in its Contribution, if any, to grant the copyright license set forth in +this Agreement. </span></p> + +<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p> + +<p><span style="font-size: 10pt;">A Contributor may choose to distribute the +Program in object code form under its own license agreement, provided that:</span> +</p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a) +it complies with the terms and conditions of this Agreement; and</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) +its license agreement:</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i) +effectively disclaims on behalf of all Contributors all warranties and +conditions, express and implied, including warranties or conditions of title +and non-infringement, and implied warranties or conditions of merchantability +and fitness for a particular purpose; </span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii) +effectively excludes on behalf of all Contributors all liability for damages, +including direct, indirect, special, incidental and consequential damages, such +as lost profits; </span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii) +states that any provisions which differ from this Agreement are offered by that +Contributor alone and not by any other party; and</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv) +states that source code for the Program is available from such Contributor, and +informs licensees how to obtain it in a reasonable manner on or through a +medium customarily used for software exchange.<span style="color: blue;"> </span></span></p> + +<p><span style="font-size: 10pt;">When the Program is made available in source +code form:</span> </p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a) +it must be made available under this Agreement; and </span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a +copy of this Agreement must be included with each copy of the Program. </span></p> + +<p><span style="font-size: 10pt;">Contributors may not remove or alter any +copyright notices contained within the Program. </span></p> + +<p><span style="font-size: 10pt;">Each Contributor must identify itself as the +originator of its Contribution, if any, in a manner that reasonably allows +subsequent Recipients to identify the originator of the Contribution. </span></p> + +<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p> + +<p><span style="font-size: 10pt;">Commercial distributors of software may +accept certain responsibilities with respect to end users, business partners +and the like. While this license is intended to facilitate the commercial use +of the Program, the Contributor who includes the Program in a commercial +product offering should do so in a manner which does not create potential +liability for other Contributors. Therefore, if a Contributor includes the +Program in a commercial product offering, such Contributor ("Commercial +Contributor") hereby agrees to defend and indemnify every other +Contributor ("Indemnified Contributor") against any losses, damages and +costs (collectively "Losses") arising from claims, lawsuits and other +legal actions brought by a third party against the Indemnified Contributor to +the extent caused by the acts or omissions of such Commercial Contributor in +connection with its distribution of the Program in a commercial product +offering. The obligations in this section do not apply to any claims or Losses +relating to any actual or alleged intellectual property infringement. In order +to qualify, an Indemnified Contributor must: a) promptly notify the Commercial +Contributor in writing of such claim, and b) allow the Commercial Contributor +to control, and cooperate with the Commercial Contributor in, the defense and +any related settlement negotiations. The Indemnified Contributor may participate +in any such claim at its own expense.</span> </p> + +<p><span style="font-size: 10pt;">For example, a Contributor might include the +Program in a commercial product offering, Product X. That Contributor is then a +Commercial Contributor. If that Commercial Contributor then makes performance +claims, or offers warranties related to Product X, those performance claims and +warranties are such Commercial Contributor's responsibility alone. Under this +section, the Commercial Contributor would have to defend claims against the +other Contributors related to those performance claims and warranties, and if a +court requires any other Contributor to pay any damages as a result, the +Commercial Contributor must pay those damages.</span> </p> + +<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p> + +<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS +AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT +WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, +WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, +MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely +responsible for determining the appropriateness of using and distributing the +Program and assumes all risks associated with its exercise of rights under this +Agreement , including but not limited to the risks and costs of program errors, +compliance with applicable laws, damage to or loss of data, programs or +equipment, and unavailability or interruption of operations. </span></p> + +<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p> + +<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS +AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY +OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF +THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF +THE POSSIBILITY OF SUCH DAMAGES.</span> </p> + +<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p> + +<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid +or unenforceable under applicable law, it shall not affect the validity or +enforceability of the remainder of the terms of this Agreement, and without +further action by the parties hereto, such provision shall be reformed to the +minimum extent necessary to make such provision valid and enforceable.</span> </p> + +<p><span style="font-size: 10pt;">If Recipient institutes patent litigation +against any entity (including a cross-claim or counterclaim in a lawsuit) +alleging that the Program itself (excluding combinations of the Program with +other software or hardware) infringes such Recipient's patent(s), then such +Recipient's rights granted under Section 2(b) shall terminate as of the date +such litigation is filed. </span></p> + +<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement +shall terminate if it fails to comply with any of the material terms or +conditions of this Agreement and does not cure such failure in a reasonable +period of time after becoming aware of such noncompliance. If all Recipient's +rights under this Agreement terminate, Recipient agrees to cease use and +distribution of the Program as soon as reasonably practicable. However, +Recipient's obligations under this Agreement and any licenses granted by +Recipient relating to the Program shall continue and survive. </span></p> + +<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute +copies of this Agreement, but in order to avoid inconsistency the Agreement is +copyrighted and may only be modified in the following manner. The Agreement +Steward reserves the right to publish new versions (including revisions) of +this Agreement from time to time. No one other than the Agreement Steward has +the right to modify this Agreement. The Eclipse Foundation is the initial +Agreement Steward. The Eclipse Foundation may assign the responsibility to +serve as the Agreement Steward to a suitable separate entity. Each new version +of the Agreement will be given a distinguishing version number. The Program +(including Contributions) may always be distributed subject to the version of +the Agreement under which it was received. In addition, after a new version of +the Agreement is published, Contributor may elect to distribute the Program +(including its Contributions) under the new version. Except as expressly stated +in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to +the intellectual property of any Contributor under this Agreement, whether +expressly, by implication, estoppel or otherwise. All rights in the Program not +expressly granted under this Agreement are reserved.</span> </p> + +<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the +State of New York and the intellectual property laws of the United States of +America. No party to this Agreement will bring a legal action under this +Agreement more than one year after the cause of action arose. Each party waives +its rights to a jury trial in any resulting litigation.</span> </p> + +<p class="MsoNormal"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p> + +</div> + +</body></html>
\ No newline at end of file diff --git a/plugins/org.gastro.business.edit/icons/full/obj16/BusinessDay.gif b/plugins/org.gastro.business.edit/icons/full/obj16/BusinessDay.gif Binary files differnew file mode 100644 index 0000000000..b1f8afa476 --- /dev/null +++ b/plugins/org.gastro.business.edit/icons/full/obj16/BusinessDay.gif diff --git a/plugins/org.gastro.business.edit/icons/full/obj16/Order.gif b/plugins/org.gastro.business.edit/icons/full/obj16/Order.gif Binary files differnew file mode 100644 index 0000000000..48e3cf2268 --- /dev/null +++ b/plugins/org.gastro.business.edit/icons/full/obj16/Order.gif diff --git a/plugins/org.gastro.business.edit/icons/full/obj16/OrderDetail.gif b/plugins/org.gastro.business.edit/icons/full/obj16/OrderDetail.gif Binary files differnew file mode 100644 index 0000000000..8a5c70cbd7 --- /dev/null +++ b/plugins/org.gastro.business.edit/icons/full/obj16/OrderDetail.gif diff --git a/plugins/org.gastro.business.edit/icons/full/obj16/Waiter.gif b/plugins/org.gastro.business.edit/icons/full/obj16/Waiter.gif Binary files differnew file mode 100644 index 0000000000..83afb9b3c9 --- /dev/null +++ b/plugins/org.gastro.business.edit/icons/full/obj16/Waiter.gif diff --git a/plugins/org.gastro.business.edit/license.html b/plugins/org.gastro.business.edit/license.html new file mode 100644 index 0000000000..d7b88e9416 --- /dev/null +++ b/plugins/org.gastro.business.edit/license.html @@ -0,0 +1,319 @@ +<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"><head> +<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> +<meta name="ProgId" content="Word.Document"> +<meta name="Generator" content="Microsoft Word 9"> +<meta name="Originator" content="Microsoft Word 9"> +<link rel="File-List" href="http://www.eclipse.org/org/documents/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml"><title>Eclipse Public License - Version 1.0</title><!--[if gte mso 9]><xml> + <o:DocumentProperties> + <o:Revision>2</o:Revision> + <o:TotalTime>3</o:TotalTime> + <o:Created>2004-03-05T23:03:00Z</o:Created> + <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved> + <o:Pages>4</o:Pages> + <o:Words>1626</o:Words> + <o:Characters>9270</o:Characters> + <o:Lines>77</o:Lines> + <o:Paragraphs>18</o:Paragraphs> + <o:CharactersWithSpaces>11384</o:CharactersWithSpaces> + <o:Version>9.4402</o:Version> + </o:DocumentProperties> +</xml><![endif]--><!--[if gte mso 9]><xml> + <w:WordDocument> + <w:TrackRevisions/> + </w:WordDocument> +</xml><![endif]--> + + +<style> +<!-- + /* Font Definitions */ +@font-face + {font-family:Tahoma; + panose-1:2 11 6 4 3 5 4 4 2 4; + mso-font-charset:0; + mso-generic-font-family:swiss; + mso-font-pitch:variable; + mso-font-signature:553679495 -2147483648 8 0 66047 0;} + /* Style Definitions */ +p.MsoNormal, li.MsoNormal, div.MsoNormal + {mso-style-parent:""; + margin:0in; + margin-bottom:.0001pt; + mso-pagination:widow-orphan; + font-size:12.0pt; + font-family:"Times New Roman"; + mso-fareast-font-family:"Times New Roman";} +p + {margin-right:0in; + mso-margin-top-alt:auto; + mso-margin-bottom-alt:auto; + margin-left:0in; + mso-pagination:widow-orphan; + font-size:12.0pt; + font-family:"Times New Roman"; + mso-fareast-font-family:"Times New Roman";} +p.BalloonText, li.BalloonText, div.BalloonText + {mso-style-name:"Balloon Text"; + margin:0in; + margin-bottom:.0001pt; + mso-pagination:widow-orphan; + font-size:8.0pt; + font-family:Tahoma; + mso-fareast-font-family:"Times New Roman";} +@page Section1 + {size:8.5in 11.0in; + margin:1.0in 1.25in 1.0in 1.25in; + mso-header-margin:.5in; + mso-footer-margin:.5in; + mso-paper-source:0;} +div.Section1 + {page:Section1;} +--> +</style></head> + +<body style="" lang="EN-US"> + +<div class="Section1"> + +<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b> +</p> + +<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER +THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, +REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE +OF THIS AGREEMENT.</span> </p> + +<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p> + +<p><span style="font-size: 10pt;">"Contribution" means:</span> </p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a) +in the case of the initial Contributor, the initial code and documentation +distributed under this Agreement, and<br clear="left"> +b) in the case of each subsequent Contributor:</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i) +changes to the Program, and</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii) +additions to the Program;</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where +such changes and/or additions to the Program originate from and are distributed +by that particular Contributor. A Contribution 'originates' from a Contributor +if it was added to the Program by such Contributor itself or anyone acting on +such Contributor's behalf. Contributions do not include additions to the +Program which: (i) are separate modules of software distributed in conjunction +with the Program under their own license agreement, and (ii) are not derivative +works of the Program. </span></p> + +<p><span style="font-size: 10pt;">"Contributor" means any person or +entity that distributes the Program.</span> </p> + +<p><span style="font-size: 10pt;">"Licensed Patents " mean patent +claims licensable by a Contributor which are necessarily infringed by the use +or sale of its Contribution alone or when combined with the Program. </span></p> + +<p><span style="font-size: 10pt;">"Program" means the Contributions +distributed in accordance with this Agreement.</span> </p> + +<p><span style="font-size: 10pt;">"Recipient" means anyone who +receives the Program under this Agreement, including all Contributors.</span> </p> + +<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a) +Subject to the terms of this Agreement, each Contributor hereby grants Recipient +a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly +display, publicly perform, distribute and sublicense the Contribution of such +Contributor, if any, and such derivative works, in source code and object code +form.</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) +Subject to the terms of this Agreement, each Contributor hereby grants +Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free +patent license under Licensed Patents to make, use, sell, offer to sell, import +and otherwise transfer the Contribution of such Contributor, if any, in source +code and object code form. This patent license shall apply to the combination +of the Contribution and the Program if, at the time the Contribution is added +by the Contributor, such addition of the Contribution causes such combination +to be covered by the Licensed Patents. The patent license shall not apply to +any other combinations which include the Contribution. No hardware per se is +licensed hereunder. </span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c) +Recipient understands that although each Contributor grants the licenses to its +Contributions set forth herein, no assurances are provided by any Contributor +that the Program does not infringe the patent or other intellectual property +rights of any other entity. Each Contributor disclaims any liability to Recipient +for claims brought by any other entity based on infringement of intellectual +property rights or otherwise. As a condition to exercising the rights and +licenses granted hereunder, each Recipient hereby assumes sole responsibility +to secure any other intellectual property rights needed, if any. For example, +if a third party patent license is required to allow Recipient to distribute +the Program, it is Recipient's responsibility to acquire that license before +distributing the Program.</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d) +Each Contributor represents that to its knowledge it has sufficient copyright +rights in its Contribution, if any, to grant the copyright license set forth in +this Agreement. </span></p> + +<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p> + +<p><span style="font-size: 10pt;">A Contributor may choose to distribute the +Program in object code form under its own license agreement, provided that:</span> +</p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a) +it complies with the terms and conditions of this Agreement; and</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) +its license agreement:</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i) +effectively disclaims on behalf of all Contributors all warranties and +conditions, express and implied, including warranties or conditions of title +and non-infringement, and implied warranties or conditions of merchantability +and fitness for a particular purpose; </span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii) +effectively excludes on behalf of all Contributors all liability for damages, +including direct, indirect, special, incidental and consequential damages, such +as lost profits; </span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii) +states that any provisions which differ from this Agreement are offered by that +Contributor alone and not by any other party; and</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv) +states that source code for the Program is available from such Contributor, and +informs licensees how to obtain it in a reasonable manner on or through a +medium customarily used for software exchange.<span style="color: blue;"> </span></span></p> + +<p><span style="font-size: 10pt;">When the Program is made available in source +code form:</span> </p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a) +it must be made available under this Agreement; and </span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a +copy of this Agreement must be included with each copy of the Program. </span></p> + +<p><span style="font-size: 10pt;">Contributors may not remove or alter any +copyright notices contained within the Program. </span></p> + +<p><span style="font-size: 10pt;">Each Contributor must identify itself as the +originator of its Contribution, if any, in a manner that reasonably allows +subsequent Recipients to identify the originator of the Contribution. </span></p> + +<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p> + +<p><span style="font-size: 10pt;">Commercial distributors of software may +accept certain responsibilities with respect to end users, business partners +and the like. While this license is intended to facilitate the commercial use +of the Program, the Contributor who includes the Program in a commercial +product offering should do so in a manner which does not create potential +liability for other Contributors. Therefore, if a Contributor includes the +Program in a commercial product offering, such Contributor ("Commercial +Contributor") hereby agrees to defend and indemnify every other +Contributor ("Indemnified Contributor") against any losses, damages and +costs (collectively "Losses") arising from claims, lawsuits and other +legal actions brought by a third party against the Indemnified Contributor to +the extent caused by the acts or omissions of such Commercial Contributor in +connection with its distribution of the Program in a commercial product +offering. The obligations in this section do not apply to any claims or Losses +relating to any actual or alleged intellectual property infringement. In order +to qualify, an Indemnified Contributor must: a) promptly notify the Commercial +Contributor in writing of such claim, and b) allow the Commercial Contributor +to control, and cooperate with the Commercial Contributor in, the defense and +any related settlement negotiations. The Indemnified Contributor may participate +in any such claim at its own expense.</span> </p> + +<p><span style="font-size: 10pt;">For example, a Contributor might include the +Program in a commercial product offering, Product X. That Contributor is then a +Commercial Contributor. If that Commercial Contributor then makes performance +claims, or offers warranties related to Product X, those performance claims and +warranties are such Commercial Contributor's responsibility alone. Under this +section, the Commercial Contributor would have to defend claims against the +other Contributors related to those performance claims and warranties, and if a +court requires any other Contributor to pay any damages as a result, the +Commercial Contributor must pay those damages.</span> </p> + +<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p> + +<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS +AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT +WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, +WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, +MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely +responsible for determining the appropriateness of using and distributing the +Program and assumes all risks associated with its exercise of rights under this +Agreement , including but not limited to the risks and costs of program errors, +compliance with applicable laws, damage to or loss of data, programs or +equipment, and unavailability or interruption of operations. </span></p> + +<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p> + +<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS +AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY +OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF +THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF +THE POSSIBILITY OF SUCH DAMAGES.</span> </p> + +<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p> + +<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid +or unenforceable under applicable law, it shall not affect the validity or +enforceability of the remainder of the terms of this Agreement, and without +further action by the parties hereto, such provision shall be reformed to the +minimum extent necessary to make such provision valid and enforceable.</span> </p> + +<p><span style="font-size: 10pt;">If Recipient institutes patent litigation +against any entity (including a cross-claim or counterclaim in a lawsuit) +alleging that the Program itself (excluding combinations of the Program with +other software or hardware) infringes such Recipient's patent(s), then such +Recipient's rights granted under Section 2(b) shall terminate as of the date +such litigation is filed. </span></p> + +<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement +shall terminate if it fails to comply with any of the material terms or +conditions of this Agreement and does not cure such failure in a reasonable +period of time after becoming aware of such noncompliance. If all Recipient's +rights under this Agreement terminate, Recipient agrees to cease use and +distribution of the Program as soon as reasonably practicable. However, +Recipient's obligations under this Agreement and any licenses granted by +Recipient relating to the Program shall continue and survive. </span></p> + +<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute +copies of this Agreement, but in order to avoid inconsistency the Agreement is +copyrighted and may only be modified in the following manner. The Agreement +Steward reserves the right to publish new versions (including revisions) of +this Agreement from time to time. No one other than the Agreement Steward has +the right to modify this Agreement. The Eclipse Foundation is the initial +Agreement Steward. The Eclipse Foundation may assign the responsibility to +serve as the Agreement Steward to a suitable separate entity. Each new version +of the Agreement will be given a distinguishing version number. The Program +(including Contributions) may always be distributed subject to the version of +the Agreement under which it was received. In addition, after a new version of +the Agreement is published, Contributor may elect to distribute the Program +(including its Contributions) under the new version. Except as expressly stated +in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to +the intellectual property of any Contributor under this Agreement, whether +expressly, by implication, estoppel or otherwise. All rights in the Program not +expressly granted under this Agreement are reserved.</span> </p> + +<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the +State of New York and the intellectual property laws of the United States of +America. No party to this Agreement will bring a legal action under this +Agreement more than one year after the cause of action arose. Each party waives +its rights to a jury trial in any resulting litigation.</span> </p> + +<p class="MsoNormal"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p> + +</div> + +</body></html>
\ No newline at end of file diff --git a/plugins/org.gastro.business.edit/plugin.properties b/plugins/org.gastro.business.edit/plugin.properties new file mode 100644 index 0000000000..b63faa21d7 --- /dev/null +++ b/plugins/org.gastro.business.edit/plugin.properties @@ -0,0 +1,52 @@ + +# <copyright> +# </copyright> +# +# $Id: plugin.properties,v 1.1 2009-04-26 16:52:39 estepper Exp $ + +pluginName = Gastory Business Day Edit Support +providerName = www.gastro.org + +_UI_CreateChild_text = {0} +_UI_CreateChild_text2 = {1} {0} +_UI_CreateChild_text3 = {1} +_UI_CreateChild_tooltip = Create New {0} Under {1} Feature +_UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}. +_UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent. + +_UI_PropertyDescriptor_description = The {0} of the {1} + +_UI_BusinessDay_type = Geschäftstag +_UI_Order_type = Bewirtung +_UI_OrderDetail_type = Bestellung +_UI_Waiter_type = Kellner +_UI_Unknown_type = Objekt + +_UI_Unknown_datatype= Wert + +_UI_BusinessDay_date_feature = Datum +_UI_BusinessDay_menuCard_feature = Menükarte +_UI_BusinessDay_orders_feature = Bewirtungen +_UI_BusinessDay_waiters_feature = Kellner +_UI_Order_businessDay_feature = Geschäftstag +_UI_Order_table_feature = Tisch +_UI_Order_orderDetails_feature = Betsellungen +_UI_Order_number_feature = Nummer +_UI_OrderDetail_order_feature = Bewirtung +_UI_OrderDetail_offering_feature = Angebot +_UI_OrderDetail_quantity_feature = Menge +_UI_Waiter_businessDay_feature = Geschäftstag +_UI_Waiter_tables_feature = Tische +_UI_Waiter_employee_feature = Mitarbeiter +_UI_Waiter_from_feature = Von +_UI_Waiter_until_feature = Bis +_UI_Unknown_feature = Unbekannt + +_UI_OrderDetail_state_feature = Bearbeitungszustand +_UI_OrderState_Ordered_literal = Bestellt +_UI_OrderState_Acknowledged_literal = In Zubereitung +_UI_OrderState_Prepared_literal = Zubereitet +_UI_OrderState_Served_literal = Serviert +_UI_OrderState_Paid_literal = Bezahlt +_UI_BusinessDay_closed_feature = Abgeschlossen +_UI_OrderDetail_price_feature = Preis diff --git a/plugins/org.gastro.business.edit/plugin.xml b/plugins/org.gastro.business.edit/plugin.xml new file mode 100644 index 0000000000..7a522439d5 --- /dev/null +++ b/plugins/org.gastro.business.edit/plugin.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.0"?> + +<!-- + <copyright> + </copyright> + + $Id: plugin.xml,v 1.1 2009-04-26 16:52:39 estepper Exp $ +--> + +<plugin> + + <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories"> + <factory + uri="http://www.gastro.org/business/1.0" + class="org.gastro.business.provider.BusinessItemProviderAdapterFactory" + supportedTypes= + "org.eclipse.emf.edit.provider.IEditingDomainItemProvider + org.eclipse.emf.edit.provider.IStructuredItemContentProvider + org.eclipse.emf.edit.provider.ITreeItemContentProvider + org.eclipse.emf.edit.provider.IItemLabelProvider + org.eclipse.emf.edit.provider.IItemPropertySource"/> + </extension> + +</plugin> diff --git a/plugins/org.gastro.business.edit/src/org/gastro/business/provider/BusinessDayItemProvider.java b/plugins/org.gastro.business.edit/src/org/gastro/business/provider/BusinessDayItemProvider.java new file mode 100644 index 0000000000..ac62dee84e --- /dev/null +++ b/plugins/org.gastro.business.edit/src/org/gastro/business/provider/BusinessDayItemProvider.java @@ -0,0 +1,241 @@ +/** + * Copyright (c) 2009 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + * + * Initial Publication: + * Eclipse Magazin - http://www.eclipse-magazin.de + */ +package org.gastro.business.provider; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.ResourceLocator; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.gastro.business.BusinessDay; +import org.gastro.business.BusinessFactory; +import org.gastro.business.BusinessPackage; + +import java.util.Collection; +import java.util.Date; +import java.util.List; + +/** + * This is the item provider adapter for a {@link org.gastro.business.BusinessDay} object. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ +public class BusinessDayItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, + IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource +{ + /** + * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public BusinessDayItemProvider(AdapterFactory adapterFactory) + { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) + { + if (itemPropertyDescriptors == null) + { + super.getPropertyDescriptors(object); + + addDatePropertyDescriptor(object); + addMenuCardPropertyDescriptor(object); + addClosedPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Date feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addDatePropertyDescriptor(Object object) + { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory) + .getRootAdapterFactory(), getResourceLocator(), getString("_UI_BusinessDay_date_feature"), getString( + "_UI_PropertyDescriptor_description", "_UI_BusinessDay_date_feature", "_UI_BusinessDay_type"), + BusinessPackage.Literals.BUSINESS_DAY__DATE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, null)); + } + + /** + * This adds a property descriptor for the Menu Card feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addMenuCardPropertyDescriptor(Object object) + { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory) + .getRootAdapterFactory(), getResourceLocator(), getString("_UI_BusinessDay_menuCard_feature"), getString( + "_UI_PropertyDescriptor_description", "_UI_BusinessDay_menuCard_feature", "_UI_BusinessDay_type"), + BusinessPackage.Literals.BUSINESS_DAY__MENU_CARD, true, false, true, null, null, null)); + } + + /** + * This adds a property descriptor for the Closed feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addClosedPropertyDescriptor(Object object) + { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory) + .getRootAdapterFactory(), getResourceLocator(), getString("_UI_BusinessDay_closed_feature"), getString( + "_UI_PropertyDescriptor_description", "_UI_BusinessDay_closed_feature", "_UI_BusinessDay_type"), + BusinessPackage.Literals.BUSINESS_DAY__CLOSED, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, + null, null)); + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) + { + if (childrenFeatures == null) + { + super.getChildrenFeatures(object); + childrenFeatures.add(BusinessPackage.Literals.BUSINESS_DAY__ORDERS); + childrenFeatures.add(BusinessPackage.Literals.BUSINESS_DAY__WAITERS); + } + return childrenFeatures; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) + { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean hasChildren(Object object) + { + return hasChildren(object, true); + } + + /** + * This returns BusinessDay.gif. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) + { + return overlayImage(object, getResourceLocator().getImage("full/obj16/BusinessDay")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public String getText(Object object) + { + Date labelValue = ((BusinessDay)object).getDate(); + String label = labelValue == null ? null : labelValue.toString(); + return label == null || label.length() == 0 ? getString("_UI_BusinessDay_type") : label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached children and by creating a + * viewer notification, which it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) + { + updateChildren(notification); + + switch (notification.getFeatureID(BusinessDay.class)) + { + case BusinessPackage.BUSINESS_DAY__DATE: + case BusinessPackage.BUSINESS_DAY__CLOSED: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + case BusinessPackage.BUSINESS_DAY__ORDERS: + case BusinessPackage.BUSINESS_DAY__WAITERS: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children that can be created under + * this object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) + { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add(createChildParameter(BusinessPackage.Literals.BUSINESS_DAY__ORDERS, + BusinessFactory.eINSTANCE.createOrder())); + + newChildDescriptors.add(createChildParameter(BusinessPackage.Literals.BUSINESS_DAY__WAITERS, + BusinessFactory.eINSTANCE.createWaiter())); + } + + /** + * Return the resource locator for this item provider's resources. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() + { + return BusinessEditPlugin.INSTANCE; + } + +} diff --git a/plugins/org.gastro.business.edit/src/org/gastro/business/provider/BusinessEditPlugin.java b/plugins/org.gastro.business.edit/src/org/gastro/business/provider/BusinessEditPlugin.java new file mode 100644 index 0000000000..ef1b236968 --- /dev/null +++ b/plugins/org.gastro.business.edit/src/org/gastro/business/provider/BusinessEditPlugin.java @@ -0,0 +1,97 @@ +/** + * Copyright (c) 2009 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + * + * Initial Publication: + * Eclipse Magazin - http://www.eclipse-magazin.de + */ +package org.gastro.business.provider; + +import org.eclipse.emf.common.EMFPlugin; +import org.eclipse.emf.common.util.ResourceLocator; + +import org.gastro.inventory.provider.InventoryEditPlugin; + +/** + * This is the central singleton for the Business edit plugin. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public final class BusinessEditPlugin extends EMFPlugin +{ + /** + * Keep track of the singleton. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public static final BusinessEditPlugin INSTANCE = new BusinessEditPlugin(); + + /** + * Keep track of the singleton. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private static Implementation plugin; + + /** + * Create the instance. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public BusinessEditPlugin() + { + super(new ResourceLocator[] { InventoryEditPlugin.INSTANCE, }); + } + + /** + * Returns the singleton instance of the Eclipse plugin. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the singleton instance. + * @generated + */ + @Override + public ResourceLocator getPluginResourceLocator() + { + return plugin; + } + + /** + * Returns the singleton instance of the Eclipse plugin. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the singleton instance. + * @generated + */ + public static Implementation getPlugin() + { + return plugin; + } + + /** + * The actual implementation of the Eclipse <b>Plugin</b>. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public static class Implementation extends EclipsePlugin + { + /** + * Creates an instance. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public Implementation() + { + super(); + + // Remember the static instance. + // + plugin = this; + } + } + +} diff --git a/plugins/org.gastro.business.edit/src/org/gastro/business/provider/BusinessItemProviderAdapterFactory.java b/plugins/org.gastro.business.edit/src/org/gastro/business/provider/BusinessItemProviderAdapterFactory.java new file mode 100644 index 0000000000..a815311575 --- /dev/null +++ b/plugins/org.gastro.business.edit/src/org/gastro/business/provider/BusinessItemProviderAdapterFactory.java @@ -0,0 +1,299 @@ +/** + * Copyright (c) 2009 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + * + * Initial Publication: + * Eclipse Magazin - http://www.eclipse-magazin.de + */ +package org.gastro.business.provider; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.Notifier; +import org.eclipse.emf.edit.provider.ChangeNotifier; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.ComposedAdapterFactory; +import org.eclipse.emf.edit.provider.IChangeNotifier; +import org.eclipse.emf.edit.provider.IDisposable; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.INotifyChangedListener; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; + +import org.gastro.business.util.BusinessAdapterFactory; + +import java.util.ArrayList; +import java.util.Collection; + +/** + * This is the factory that is used to provide the interfaces needed to support Viewers. The adapters generated by this + * factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}. The adapters + * also support Eclipse property sheets. Note that most of the adapters are shared among multiple instances. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class BusinessItemProviderAdapterFactory extends BusinessAdapterFactory implements ComposeableAdapterFactory, + IChangeNotifier, IDisposable +{ + /** + * This keeps track of the root adapter factory that delegates to this adapter factory. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + protected ComposedAdapterFactory parentAdapterFactory; + + /** + * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + protected IChangeNotifier changeNotifier = new ChangeNotifier(); + + /** + * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected Collection<Object> supportedTypes = new ArrayList<Object>(); + + /** + * This constructs an instance. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public BusinessItemProviderAdapterFactory() + { + supportedTypes.add(IEditingDomainItemProvider.class); + supportedTypes.add(IStructuredItemContentProvider.class); + supportedTypes.add(ITreeItemContentProvider.class); + supportedTypes.add(IItemLabelProvider.class); + supportedTypes.add(IItemPropertySource.class); + } + + /** + * This keeps track of the one adapter used for all {@link org.gastro.business.BusinessDay} instances. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected BusinessDayItemProvider businessDayItemProvider; + + /** + * This creates an adapter for a {@link org.gastro.business.BusinessDay}. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + */ + @Override + public Adapter createBusinessDayAdapter() + { + if (businessDayItemProvider == null) + { + businessDayItemProvider = new BusinessDayItemProvider(this); + } + + return businessDayItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.gastro.business.Order} instances. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + protected OrderItemProvider orderItemProvider; + + /** + * This creates an adapter for a {@link org.gastro.business.Order}. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createOrderAdapter() + { + if (orderItemProvider == null) + { + orderItemProvider = new OrderItemProvider(this); + } + + return orderItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.gastro.business.OrderDetail} instances. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected OrderDetailItemProvider orderDetailItemProvider; + + /** + * This creates an adapter for a {@link org.gastro.business.OrderDetail}. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + */ + @Override + public Adapter createOrderDetailAdapter() + { + if (orderDetailItemProvider == null) + { + orderDetailItemProvider = new OrderDetailItemProvider(this); + } + + return orderDetailItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.gastro.business.Waiter} instances. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + protected WaiterItemProvider waiterItemProvider; + + /** + * This creates an adapter for a {@link org.gastro.business.Waiter}. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createWaiterAdapter() + { + if (waiterItemProvider == null) + { + waiterItemProvider = new WaiterItemProvider(this); + } + + return waiterItemProvider; + } + + /** + * This returns the root adapter factory that contains this factory. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public ComposeableAdapterFactory getRootAdapterFactory() + { + return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory(); + } + + /** + * This sets the composed adapter factory that contains this factory. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) + { + this.parentAdapterFactory = parentAdapterFactory; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean isFactoryForType(Object type) + { + return supportedTypes.contains(type) || super.isFactoryForType(type); + } + + /** + * This implementation substitutes the factory itself as the key for the adapter. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Adapter adapt(Notifier notifier, Object type) + { + return super.adapt(notifier, this); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object adapt(Object object, Object type) + { + if (isFactoryForType(type)) + { + Object adapter = super.adapt(object, type); + if (!(type instanceof Class<?>) || (((Class<?>)type).isInstance(adapter))) + { + return adapter; + } + } + + return null; + } + + /** + * This adds a listener. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void addListener(INotifyChangedListener notifyChangedListener) + { + changeNotifier.addListener(notifyChangedListener); + } + + /** + * This removes a listener. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void removeListener(INotifyChangedListener notifyChangedListener) + { + changeNotifier.removeListener(notifyChangedListener); + } + + /** + * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + public void fireNotifyChanged(Notification notification) + { + changeNotifier.fireNotifyChanged(notification); + + if (parentAdapterFactory != null) + { + parentAdapterFactory.fireNotifyChanged(notification); + } + } + + /** + * This disposes all of the item providers created by this factory. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void dispose() + { + if (businessDayItemProvider != null) + businessDayItemProvider.dispose(); + if (orderItemProvider != null) + orderItemProvider.dispose(); + if (orderDetailItemProvider != null) + orderDetailItemProvider.dispose(); + if (waiterItemProvider != null) + waiterItemProvider.dispose(); + } + +} diff --git a/plugins/org.gastro.business.edit/src/org/gastro/business/provider/OrderDetailItemProvider.java b/plugins/org.gastro.business.edit/src/org/gastro/business/provider/OrderDetailItemProvider.java new file mode 100644 index 0000000000..1298c255f3 --- /dev/null +++ b/plugins/org.gastro.business.edit/src/org/gastro/business/provider/OrderDetailItemProvider.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2009 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + * + * Initial Publication: + * Eclipse Magazin - http://www.eclipse-magazin.de + */ +package org.gastro.business.provider; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.ResourceLocator; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.gastro.business.BusinessPackage; +import org.gastro.business.OrderDetail; + +import java.util.Collection; +import java.util.List; + +/** + * This is the item provider adapter for a {@link org.gastro.business.OrderDetail} object. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ +public class OrderDetailItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, + IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource +{ + /** + * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public OrderDetailItemProvider(AdapterFactory adapterFactory) + { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) + { + if (itemPropertyDescriptors == null) + { + super.getPropertyDescriptors(object); + + addOfferingPropertyDescriptor(object); + addQuantityPropertyDescriptor(object); + addStatePropertyDescriptor(object); + addPricePropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Offering feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addOfferingPropertyDescriptor(Object object) + { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory) + .getRootAdapterFactory(), getResourceLocator(), getString("_UI_OrderDetail_offering_feature"), getString( + "_UI_PropertyDescriptor_description", "_UI_OrderDetail_offering_feature", "_UI_OrderDetail_type"), + BusinessPackage.Literals.ORDER_DETAIL__OFFERING, true, false, true, null, null, null)); + } + + /** + * This adds a property descriptor for the Quantity feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addQuantityPropertyDescriptor(Object object) + { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory) + .getRootAdapterFactory(), getResourceLocator(), getString("_UI_OrderDetail_quantity_feature"), getString( + "_UI_PropertyDescriptor_description", "_UI_OrderDetail_quantity_feature", "_UI_OrderDetail_type"), + BusinessPackage.Literals.ORDER_DETAIL__QUANTITY, true, false, false, + ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); + } + + /** + * This adds a property descriptor for the State feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addStatePropertyDescriptor(Object object) + { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory) + .getRootAdapterFactory(), getResourceLocator(), getString("_UI_OrderDetail_state_feature"), getString( + "_UI_PropertyDescriptor_description", "_UI_OrderDetail_state_feature", "_UI_OrderDetail_type"), + BusinessPackage.Literals.ORDER_DETAIL__STATE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, null)); + } + + /** + * This adds a property descriptor for the Price feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addPricePropertyDescriptor(Object object) + { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory) + .getRootAdapterFactory(), getResourceLocator(), getString("_UI_OrderDetail_price_feature"), getString( + "_UI_PropertyDescriptor_description", "_UI_OrderDetail_price_feature", "_UI_OrderDetail_type"), + BusinessPackage.Literals.ORDER_DETAIL__PRICE, false, false, false, ItemPropertyDescriptor.REAL_VALUE_IMAGE, + null, null)); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean hasChildren(Object object) + { + return hasChildren(object, true); + } + + /** + * This returns OrderDetail.gif. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) + { + return overlayImage(object, getResourceLocator().getImage("full/obj16/OrderDetail")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public String getText(Object object) + { + OrderDetail orderDetail = (OrderDetail)object; + return orderDetail.getOffering() == null ? getString("_UI_OrderDetail_type") : orderDetail.getOffering().getName() + + " " + orderDetail.getQuantity(); + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached children and by creating a + * viewer notification, which it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) + { + updateChildren(notification); + + switch (notification.getFeatureID(OrderDetail.class)) + { + case BusinessPackage.ORDER_DETAIL__QUANTITY: + case BusinessPackage.ORDER_DETAIL__STATE: + case BusinessPackage.ORDER_DETAIL__PRICE: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children that can be created under + * this object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) + { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() + { + return BusinessEditPlugin.INSTANCE; + } + +} diff --git a/plugins/org.gastro.business.edit/src/org/gastro/business/provider/OrderItemProvider.java b/plugins/org.gastro.business.edit/src/org/gastro/business/provider/OrderItemProvider.java new file mode 100644 index 0000000000..0cc738c089 --- /dev/null +++ b/plugins/org.gastro.business.edit/src/org/gastro/business/provider/OrderItemProvider.java @@ -0,0 +1,218 @@ +/** + * Copyright (c) 2009 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + * + * Initial Publication: + * Eclipse Magazin - http://www.eclipse-magazin.de + */ +package org.gastro.business.provider; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.ResourceLocator; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.gastro.business.BusinessFactory; +import org.gastro.business.BusinessPackage; +import org.gastro.business.Order; + +import java.util.Collection; +import java.util.List; + +/** + * This is the item provider adapter for a {@link org.gastro.business.Order} object. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ +public class OrderItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, + IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource +{ + /** + * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public OrderItemProvider(AdapterFactory adapterFactory) + { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) + { + if (itemPropertyDescriptors == null) + { + super.getPropertyDescriptors(object); + + addTablePropertyDescriptor(object); + addNumberPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Table feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addTablePropertyDescriptor(Object object) + { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory) + .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Order_table_feature"), getString( + "_UI_PropertyDescriptor_description", "_UI_Order_table_feature", "_UI_Order_type"), + BusinessPackage.Literals.ORDER__TABLE, true, false, true, null, null, null)); + } + + /** + * This adds a property descriptor for the Number feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addNumberPropertyDescriptor(Object object) + { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory) + .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Order_number_feature"), getString( + "_UI_PropertyDescriptor_description", "_UI_Order_number_feature", "_UI_Order_type"), + BusinessPackage.Literals.ORDER__NUMBER, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, + null)); + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) + { + if (childrenFeatures == null) + { + super.getChildrenFeatures(object); + childrenFeatures.add(BusinessPackage.Literals.ORDER__ORDER_DETAILS); + } + return childrenFeatures; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) + { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean hasChildren(Object object) + { + return hasChildren(object, true); + } + + /** + * This returns Order.gif. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) + { + return overlayImage(object, getResourceLocator().getImage("full/obj16/Order")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) + { + Order order = (Order)object; + return getString("_UI_Order_type") + " " + order.getNumber(); + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached children and by creating a + * viewer notification, which it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) + { + updateChildren(notification); + + switch (notification.getFeatureID(Order.class)) + { + case BusinessPackage.ORDER__NUMBER: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + case BusinessPackage.ORDER__ORDER_DETAILS: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children that can be created under + * this object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) + { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add(createChildParameter(BusinessPackage.Literals.ORDER__ORDER_DETAILS, + BusinessFactory.eINSTANCE.createOrderDetail())); + } + + /** + * Return the resource locator for this item provider's resources. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() + { + return BusinessEditPlugin.INSTANCE; + } + +} diff --git a/plugins/org.gastro.business.edit/src/org/gastro/business/provider/WaiterItemProvider.java b/plugins/org.gastro.business.edit/src/org/gastro/business/provider/WaiterItemProvider.java new file mode 100644 index 0000000000..eeaa0ed690 --- /dev/null +++ b/plugins/org.gastro.business.edit/src/org/gastro/business/provider/WaiterItemProvider.java @@ -0,0 +1,207 @@ +/** + * Copyright (c) 2009 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + * + * Initial Publication: + * Eclipse Magazin - http://www.eclipse-magazin.de + */ +package org.gastro.business.provider; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.ResourceLocator; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.gastro.business.BusinessPackage; +import org.gastro.business.Waiter; + +import java.util.Collection; +import java.util.List; + +/** + * This is the item provider adapter for a {@link org.gastro.business.Waiter} object. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ +public class WaiterItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, + IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource +{ + /** + * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public WaiterItemProvider(AdapterFactory adapterFactory) + { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) + { + if (itemPropertyDescriptors == null) + { + super.getPropertyDescriptors(object); + + addTablesPropertyDescriptor(object); + addEmployeePropertyDescriptor(object); + addFromPropertyDescriptor(object); + addUntilPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Tables feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addTablesPropertyDescriptor(Object object) + { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory) + .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Waiter_tables_feature"), getString( + "_UI_PropertyDescriptor_description", "_UI_Waiter_tables_feature", "_UI_Waiter_type"), + BusinessPackage.Literals.WAITER__TABLES, true, false, true, null, null, null)); + } + + /** + * This adds a property descriptor for the Employee feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addEmployeePropertyDescriptor(Object object) + { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory) + .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Waiter_employee_feature"), getString( + "_UI_PropertyDescriptor_description", "_UI_Waiter_employee_feature", "_UI_Waiter_type"), + BusinessPackage.Literals.WAITER__EMPLOYEE, true, false, true, null, null, null)); + } + + /** + * This adds a property descriptor for the From feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addFromPropertyDescriptor(Object object) + { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory) + .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Waiter_from_feature"), getString( + "_UI_PropertyDescriptor_description", "_UI_Waiter_from_feature", "_UI_Waiter_type"), + BusinessPackage.Literals.WAITER__FROM, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, + null)); + } + + /** + * This adds a property descriptor for the Until feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addUntilPropertyDescriptor(Object object) + { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory) + .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Waiter_until_feature"), getString( + "_UI_PropertyDescriptor_description", "_UI_Waiter_until_feature", "_UI_Waiter_type"), + BusinessPackage.Literals.WAITER__UNTIL, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, + null)); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean hasChildren(Object object) + { + return hasChildren(object, true); + } + + /** + * This returns Waiter.gif. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) + { + return overlayImage(object, getResourceLocator().getImage("full/obj16/Waiter")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public String getText(Object object) + { + Waiter waiter = (Waiter)object; + return waiter.getEmployee() == null ? getString("_UI_Waiter_type") : waiter.getEmployee().getName(); + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached children and by creating a + * viewer notification, which it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) + { + updateChildren(notification); + + switch (notification.getFeatureID(Waiter.class)) + { + case BusinessPackage.WAITER__FROM: + case BusinessPackage.WAITER__UNTIL: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children that can be created under + * this object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) + { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() + { + return BusinessEditPlugin.INSTANCE; + } + +} diff --git a/plugins/org.gastro.business/.classpath b/plugins/org.gastro.business/.classpath new file mode 100644 index 0000000000..304e86186a --- /dev/null +++ b/plugins/org.gastro.business/.classpath @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="src"/> + <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="output" path="bin"/> +</classpath> diff --git a/plugins/org.gastro.business/.cvsignore b/plugins/org.gastro.business/.cvsignore new file mode 100644 index 0000000000..693869726d --- /dev/null +++ b/plugins/org.gastro.business/.cvsignore @@ -0,0 +1,2 @@ +bin +doc diff --git a/plugins/org.gastro.business/.project b/plugins/org.gastro.business/.project new file mode 100644 index 0000000000..71849403d1 --- /dev/null +++ b/plugins/org.gastro.business/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.gastro.business</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.ManifestBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.SchemaBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + <nature>org.eclipse.pde.PluginNature</nature> + </natures> +</projectDescription> diff --git a/plugins/org.gastro.business/.settings/org.eclipse.core.resources.prefs b/plugins/org.gastro.business/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000000..3c5df59cbe --- /dev/null +++ b/plugins/org.gastro.business/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,4 @@ +#Wed Apr 08 19:16:49 CEST 2009 +eclipse.preferences.version=1 +encoding//model/business.ecore=UTF-8 +encoding//model/business.ecorediag=UTF-8 diff --git a/plugins/org.gastro.business/META-INF/CDO.MF b/plugins/org.gastro.business/META-INF/CDO.MF new file mode 100644 index 0000000000..bbfa1b0550 --- /dev/null +++ b/plugins/org.gastro.business/META-INF/CDO.MF @@ -0,0 +1 @@ +This is a marker file for bundles with CDO native models. diff --git a/plugins/org.gastro.business/META-INF/MANIFEST.MF b/plugins/org.gastro.business/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..beb282e4a8 --- /dev/null +++ b/plugins/org.gastro.business/META-INF/MANIFEST.MF @@ -0,0 +1,17 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: org.gastro.business;singleton:=true +Bundle-Version: 1.0.0 +Bundle-ClassPath: . +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: J2SE-1.5 +Export-Package: org.gastro.business, + org.gastro.business.impl, + org.gastro.business.util +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.emf.ecore;visibility:=reexport, + org.eclipse.emf.cdo;visibility:=reexport, + org.gastro.inventory;visibility:=reexport +Bundle-ActivationPolicy: lazy diff --git a/plugins/org.gastro.business/build.properties b/plugins/org.gastro.business/build.properties new file mode 100644 index 0000000000..0efa67d779 --- /dev/null +++ b/plugins/org.gastro.business/build.properties @@ -0,0 +1,17 @@ + +# <copyright> +# </copyright> +# +# $Id: build.properties,v 1.1 2009-04-26 16:52:37 estepper Exp $ + +bin.includes = .,\ + model/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties,\ + copyright.txt,\ + epl-v10.html,\ + license.html +jars.compile.order = . +source.. = src/ +output.. = bin/ diff --git a/plugins/org.gastro.business/copyright.txt b/plugins/org.gastro.business/copyright.txt new file mode 100644 index 0000000000..d7088ff84e --- /dev/null +++ b/plugins/org.gastro.business/copyright.txt @@ -0,0 +1,11 @@ +Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) 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: + Eike Stepper - initial API and implementation + +Initial Publication: + Eclipse Magazin - http://www.eclipse-magazin.de
\ No newline at end of file diff --git a/plugins/org.gastro.business/epl-v10.html b/plugins/org.gastro.business/epl-v10.html new file mode 100644 index 0000000000..d7b88e9416 --- /dev/null +++ b/plugins/org.gastro.business/epl-v10.html @@ -0,0 +1,319 @@ +<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"><head> +<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> +<meta name="ProgId" content="Word.Document"> +<meta name="Generator" content="Microsoft Word 9"> +<meta name="Originator" content="Microsoft Word 9"> +<link rel="File-List" href="http://www.eclipse.org/org/documents/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml"><title>Eclipse Public License - Version 1.0</title><!--[if gte mso 9]><xml> + <o:DocumentProperties> + <o:Revision>2</o:Revision> + <o:TotalTime>3</o:TotalTime> + <o:Created>2004-03-05T23:03:00Z</o:Created> + <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved> + <o:Pages>4</o:Pages> + <o:Words>1626</o:Words> + <o:Characters>9270</o:Characters> + <o:Lines>77</o:Lines> + <o:Paragraphs>18</o:Paragraphs> + <o:CharactersWithSpaces>11384</o:CharactersWithSpaces> + <o:Version>9.4402</o:Version> + </o:DocumentProperties> +</xml><![endif]--><!--[if gte mso 9]><xml> + <w:WordDocument> + <w:TrackRevisions/> + </w:WordDocument> +</xml><![endif]--> + + +<style> +<!-- + /* Font Definitions */ +@font-face + {font-family:Tahoma; + panose-1:2 11 6 4 3 5 4 4 2 4; + mso-font-charset:0; + mso-generic-font-family:swiss; + mso-font-pitch:variable; + mso-font-signature:553679495 -2147483648 8 0 66047 0;} + /* Style Definitions */ +p.MsoNormal, li.MsoNormal, div.MsoNormal + {mso-style-parent:""; + margin:0in; + margin-bottom:.0001pt; + mso-pagination:widow-orphan; + font-size:12.0pt; + font-family:"Times New Roman"; + mso-fareast-font-family:"Times New Roman";} +p + {margin-right:0in; + mso-margin-top-alt:auto; + mso-margin-bottom-alt:auto; + margin-left:0in; + mso-pagination:widow-orphan; + font-size:12.0pt; + font-family:"Times New Roman"; + mso-fareast-font-family:"Times New Roman";} +p.BalloonText, li.BalloonText, div.BalloonText + {mso-style-name:"Balloon Text"; + margin:0in; + margin-bottom:.0001pt; + mso-pagination:widow-orphan; + font-size:8.0pt; + font-family:Tahoma; + mso-fareast-font-family:"Times New Roman";} +@page Section1 + {size:8.5in 11.0in; + margin:1.0in 1.25in 1.0in 1.25in; + mso-header-margin:.5in; + mso-footer-margin:.5in; + mso-paper-source:0;} +div.Section1 + {page:Section1;} +--> +</style></head> + +<body style="" lang="EN-US"> + +<div class="Section1"> + +<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b> +</p> + +<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER +THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, +REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE +OF THIS AGREEMENT.</span> </p> + +<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p> + +<p><span style="font-size: 10pt;">"Contribution" means:</span> </p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a) +in the case of the initial Contributor, the initial code and documentation +distributed under this Agreement, and<br clear="left"> +b) in the case of each subsequent Contributor:</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i) +changes to the Program, and</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii) +additions to the Program;</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where +such changes and/or additions to the Program originate from and are distributed +by that particular Contributor. A Contribution 'originates' from a Contributor +if it was added to the Program by such Contributor itself or anyone acting on +such Contributor's behalf. Contributions do not include additions to the +Program which: (i) are separate modules of software distributed in conjunction +with the Program under their own license agreement, and (ii) are not derivative +works of the Program. </span></p> + +<p><span style="font-size: 10pt;">"Contributor" means any person or +entity that distributes the Program.</span> </p> + +<p><span style="font-size: 10pt;">"Licensed Patents " mean patent +claims licensable by a Contributor which are necessarily infringed by the use +or sale of its Contribution alone or when combined with the Program. </span></p> + +<p><span style="font-size: 10pt;">"Program" means the Contributions +distributed in accordance with this Agreement.</span> </p> + +<p><span style="font-size: 10pt;">"Recipient" means anyone who +receives the Program under this Agreement, including all Contributors.</span> </p> + +<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a) +Subject to the terms of this Agreement, each Contributor hereby grants Recipient +a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly +display, publicly perform, distribute and sublicense the Contribution of such +Contributor, if any, and such derivative works, in source code and object code +form.</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) +Subject to the terms of this Agreement, each Contributor hereby grants +Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free +patent license under Licensed Patents to make, use, sell, offer to sell, import +and otherwise transfer the Contribution of such Contributor, if any, in source +code and object code form. This patent license shall apply to the combination +of the Contribution and the Program if, at the time the Contribution is added +by the Contributor, such addition of the Contribution causes such combination +to be covered by the Licensed Patents. The patent license shall not apply to +any other combinations which include the Contribution. No hardware per se is +licensed hereunder. </span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c) +Recipient understands that although each Contributor grants the licenses to its +Contributions set forth herein, no assurances are provided by any Contributor +that the Program does not infringe the patent or other intellectual property +rights of any other entity. Each Contributor disclaims any liability to Recipient +for claims brought by any other entity based on infringement of intellectual +property rights or otherwise. As a condition to exercising the rights and +licenses granted hereunder, each Recipient hereby assumes sole responsibility +to secure any other intellectual property rights needed, if any. For example, +if a third party patent license is required to allow Recipient to distribute +the Program, it is Recipient's responsibility to acquire that license before +distributing the Program.</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d) +Each Contributor represents that to its knowledge it has sufficient copyright +rights in its Contribution, if any, to grant the copyright license set forth in +this Agreement. </span></p> + +<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p> + +<p><span style="font-size: 10pt;">A Contributor may choose to distribute the +Program in object code form under its own license agreement, provided that:</span> +</p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a) +it complies with the terms and conditions of this Agreement; and</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) +its license agreement:</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i) +effectively disclaims on behalf of all Contributors all warranties and +conditions, express and implied, including warranties or conditions of title +and non-infringement, and implied warranties or conditions of merchantability +and fitness for a particular purpose; </span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii) +effectively excludes on behalf of all Contributors all liability for damages, +including direct, indirect, special, incidental and consequential damages, such +as lost profits; </span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii) +states that any provisions which differ from this Agreement are offered by that +Contributor alone and not by any other party; and</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv) +states that source code for the Program is available from such Contributor, and +informs licensees how to obtain it in a reasonable manner on or through a +medium customarily used for software exchange.<span style="color: blue;"> </span></span></p> + +<p><span style="font-size: 10pt;">When the Program is made available in source +code form:</span> </p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a) +it must be made available under this Agreement; and </span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a +copy of this Agreement must be included with each copy of the Program. </span></p> + +<p><span style="font-size: 10pt;">Contributors may not remove or alter any +copyright notices contained within the Program. </span></p> + +<p><span style="font-size: 10pt;">Each Contributor must identify itself as the +originator of its Contribution, if any, in a manner that reasonably allows +subsequent Recipients to identify the originator of the Contribution. </span></p> + +<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p> + +<p><span style="font-size: 10pt;">Commercial distributors of software may +accept certain responsibilities with respect to end users, business partners +and the like. While this license is intended to facilitate the commercial use +of the Program, the Contributor who includes the Program in a commercial +product offering should do so in a manner which does not create potential +liability for other Contributors. Therefore, if a Contributor includes the +Program in a commercial product offering, such Contributor ("Commercial +Contributor") hereby agrees to defend and indemnify every other +Contributor ("Indemnified Contributor") against any losses, damages and +costs (collectively "Losses") arising from claims, lawsuits and other +legal actions brought by a third party against the Indemnified Contributor to +the extent caused by the acts or omissions of such Commercial Contributor in +connection with its distribution of the Program in a commercial product +offering. The obligations in this section do not apply to any claims or Losses +relating to any actual or alleged intellectual property infringement. In order +to qualify, an Indemnified Contributor must: a) promptly notify the Commercial +Contributor in writing of such claim, and b) allow the Commercial Contributor +to control, and cooperate with the Commercial Contributor in, the defense and +any related settlement negotiations. The Indemnified Contributor may participate +in any such claim at its own expense.</span> </p> + +<p><span style="font-size: 10pt;">For example, a Contributor might include the +Program in a commercial product offering, Product X. That Contributor is then a +Commercial Contributor. If that Commercial Contributor then makes performance +claims, or offers warranties related to Product X, those performance claims and +warranties are such Commercial Contributor's responsibility alone. Under this +section, the Commercial Contributor would have to defend claims against the +other Contributors related to those performance claims and warranties, and if a +court requires any other Contributor to pay any damages as a result, the +Commercial Contributor must pay those damages.</span> </p> + +<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p> + +<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS +AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT +WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, +WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, +MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely +responsible for determining the appropriateness of using and distributing the +Program and assumes all risks associated with its exercise of rights under this +Agreement , including but not limited to the risks and costs of program errors, +compliance with applicable laws, damage to or loss of data, programs or +equipment, and unavailability or interruption of operations. </span></p> + +<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p> + +<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS +AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY +OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF +THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF +THE POSSIBILITY OF SUCH DAMAGES.</span> </p> + +<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p> + +<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid +or unenforceable under applicable law, it shall not affect the validity or +enforceability of the remainder of the terms of this Agreement, and without +further action by the parties hereto, such provision shall be reformed to the +minimum extent necessary to make such provision valid and enforceable.</span> </p> + +<p><span style="font-size: 10pt;">If Recipient institutes patent litigation +against any entity (including a cross-claim or counterclaim in a lawsuit) +alleging that the Program itself (excluding combinations of the Program with +other software or hardware) infringes such Recipient's patent(s), then such +Recipient's rights granted under Section 2(b) shall terminate as of the date +such litigation is filed. </span></p> + +<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement +shall terminate if it fails to comply with any of the material terms or +conditions of this Agreement and does not cure such failure in a reasonable +period of time after becoming aware of such noncompliance. If all Recipient's +rights under this Agreement terminate, Recipient agrees to cease use and +distribution of the Program as soon as reasonably practicable. However, +Recipient's obligations under this Agreement and any licenses granted by +Recipient relating to the Program shall continue and survive. </span></p> + +<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute +copies of this Agreement, but in order to avoid inconsistency the Agreement is +copyrighted and may only be modified in the following manner. The Agreement +Steward reserves the right to publish new versions (including revisions) of +this Agreement from time to time. No one other than the Agreement Steward has +the right to modify this Agreement. The Eclipse Foundation is the initial +Agreement Steward. The Eclipse Foundation may assign the responsibility to +serve as the Agreement Steward to a suitable separate entity. Each new version +of the Agreement will be given a distinguishing version number. The Program +(including Contributions) may always be distributed subject to the version of +the Agreement under which it was received. In addition, after a new version of +the Agreement is published, Contributor may elect to distribute the Program +(including its Contributions) under the new version. Except as expressly stated +in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to +the intellectual property of any Contributor under this Agreement, whether +expressly, by implication, estoppel or otherwise. All rights in the Program not +expressly granted under this Agreement are reserved.</span> </p> + +<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the +State of New York and the intellectual property laws of the United States of +America. No party to this Agreement will bring a legal action under this +Agreement more than one year after the cause of action arose. Each party waives +its rights to a jury trial in any resulting litigation.</span> </p> + +<p class="MsoNormal"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p> + +</div> + +</body></html>
\ No newline at end of file diff --git a/plugins/org.gastro.business/license.html b/plugins/org.gastro.business/license.html new file mode 100644 index 0000000000..d7b88e9416 --- /dev/null +++ b/plugins/org.gastro.business/license.html @@ -0,0 +1,319 @@ +<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"><head> +<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> +<meta name="ProgId" content="Word.Document"> +<meta name="Generator" content="Microsoft Word 9"> +<meta name="Originator" content="Microsoft Word 9"> +<link rel="File-List" href="http://www.eclipse.org/org/documents/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml"><title>Eclipse Public License - Version 1.0</title><!--[if gte mso 9]><xml> + <o:DocumentProperties> + <o:Revision>2</o:Revision> + <o:TotalTime>3</o:TotalTime> + <o:Created>2004-03-05T23:03:00Z</o:Created> + <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved> + <o:Pages>4</o:Pages> + <o:Words>1626</o:Words> + <o:Characters>9270</o:Characters> + <o:Lines>77</o:Lines> + <o:Paragraphs>18</o:Paragraphs> + <o:CharactersWithSpaces>11384</o:CharactersWithSpaces> + <o:Version>9.4402</o:Version> + </o:DocumentProperties> +</xml><![endif]--><!--[if gte mso 9]><xml> + <w:WordDocument> + <w:TrackRevisions/> + </w:WordDocument> +</xml><![endif]--> + + +<style> +<!-- + /* Font Definitions */ +@font-face + {font-family:Tahoma; + panose-1:2 11 6 4 3 5 4 4 2 4; + mso-font-charset:0; + mso-generic-font-family:swiss; + mso-font-pitch:variable; + mso-font-signature:553679495 -2147483648 8 0 66047 0;} + /* Style Definitions */ +p.MsoNormal, li.MsoNormal, div.MsoNormal + {mso-style-parent:""; + margin:0in; + margin-bottom:.0001pt; + mso-pagination:widow-orphan; + font-size:12.0pt; + font-family:"Times New Roman"; + mso-fareast-font-family:"Times New Roman";} +p + {margin-right:0in; + mso-margin-top-alt:auto; + mso-margin-bottom-alt:auto; + margin-left:0in; + mso-pagination:widow-orphan; + font-size:12.0pt; + font-family:"Times New Roman"; + mso-fareast-font-family:"Times New Roman";} +p.BalloonText, li.BalloonText, div.BalloonText + {mso-style-name:"Balloon Text"; + margin:0in; + margin-bottom:.0001pt; + mso-pagination:widow-orphan; + font-size:8.0pt; + font-family:Tahoma; + mso-fareast-font-family:"Times New Roman";} +@page Section1 + {size:8.5in 11.0in; + margin:1.0in 1.25in 1.0in 1.25in; + mso-header-margin:.5in; + mso-footer-margin:.5in; + mso-paper-source:0;} +div.Section1 + {page:Section1;} +--> +</style></head> + +<body style="" lang="EN-US"> + +<div class="Section1"> + +<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b> +</p> + +<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER +THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, +REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE +OF THIS AGREEMENT.</span> </p> + +<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p> + +<p><span style="font-size: 10pt;">"Contribution" means:</span> </p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a) +in the case of the initial Contributor, the initial code and documentation +distributed under this Agreement, and<br clear="left"> +b) in the case of each subsequent Contributor:</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i) +changes to the Program, and</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii) +additions to the Program;</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where +such changes and/or additions to the Program originate from and are distributed +by that particular Contributor. A Contribution 'originates' from a Contributor +if it was added to the Program by such Contributor itself or anyone acting on +such Contributor's behalf. Contributions do not include additions to the +Program which: (i) are separate modules of software distributed in conjunction +with the Program under their own license agreement, and (ii) are not derivative +works of the Program. </span></p> + +<p><span style="font-size: 10pt;">"Contributor" means any person or +entity that distributes the Program.</span> </p> + +<p><span style="font-size: 10pt;">"Licensed Patents " mean patent +claims licensable by a Contributor which are necessarily infringed by the use +or sale of its Contribution alone or when combined with the Program. </span></p> + +<p><span style="font-size: 10pt;">"Program" means the Contributions +distributed in accordance with this Agreement.</span> </p> + +<p><span style="font-size: 10pt;">"Recipient" means anyone who +receives the Program under this Agreement, including all Contributors.</span> </p> + +<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a) +Subject to the terms of this Agreement, each Contributor hereby grants Recipient +a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly +display, publicly perform, distribute and sublicense the Contribution of such +Contributor, if any, and such derivative works, in source code and object code +form.</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) +Subject to the terms of this Agreement, each Contributor hereby grants +Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free +patent license under Licensed Patents to make, use, sell, offer to sell, import +and otherwise transfer the Contribution of such Contributor, if any, in source +code and object code form. This patent license shall apply to the combination +of the Contribution and the Program if, at the time the Contribution is added +by the Contributor, such addition of the Contribution causes such combination +to be covered by the Licensed Patents. The patent license shall not apply to +any other combinations which include the Contribution. No hardware per se is +licensed hereunder. </span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c) +Recipient understands that although each Contributor grants the licenses to its +Contributions set forth herein, no assurances are provided by any Contributor +that the Program does not infringe the patent or other intellectual property +rights of any other entity. Each Contributor disclaims any liability to Recipient +for claims brought by any other entity based on infringement of intellectual +property rights or otherwise. As a condition to exercising the rights and +licenses granted hereunder, each Recipient hereby assumes sole responsibility +to secure any other intellectual property rights needed, if any. For example, +if a third party patent license is required to allow Recipient to distribute +the Program, it is Recipient's responsibility to acquire that license before +distributing the Program.</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d) +Each Contributor represents that to its knowledge it has sufficient copyright +rights in its Contribution, if any, to grant the copyright license set forth in +this Agreement. </span></p> + +<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p> + +<p><span style="font-size: 10pt;">A Contributor may choose to distribute the +Program in object code form under its own license agreement, provided that:</span> +</p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a) +it complies with the terms and conditions of this Agreement; and</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) +its license agreement:</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i) +effectively disclaims on behalf of all Contributors all warranties and +conditions, express and implied, including warranties or conditions of title +and non-infringement, and implied warranties or conditions of merchantability +and fitness for a particular purpose; </span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii) +effectively excludes on behalf of all Contributors all liability for damages, +including direct, indirect, special, incidental and consequential damages, such +as lost profits; </span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii) +states that any provisions which differ from this Agreement are offered by that +Contributor alone and not by any other party; and</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv) +states that source code for the Program is available from such Contributor, and +informs licensees how to obtain it in a reasonable manner on or through a +medium customarily used for software exchange.<span style="color: blue;"> </span></span></p> + +<p><span style="font-size: 10pt;">When the Program is made available in source +code form:</span> </p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a) +it must be made available under this Agreement; and </span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a +copy of this Agreement must be included with each copy of the Program. </span></p> + +<p><span style="font-size: 10pt;">Contributors may not remove or alter any +copyright notices contained within the Program. </span></p> + +<p><span style="font-size: 10pt;">Each Contributor must identify itself as the +originator of its Contribution, if any, in a manner that reasonably allows +subsequent Recipients to identify the originator of the Contribution. </span></p> + +<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p> + +<p><span style="font-size: 10pt;">Commercial distributors of software may +accept certain responsibilities with respect to end users, business partners +and the like. While this license is intended to facilitate the commercial use +of the Program, the Contributor who includes the Program in a commercial +product offering should do so in a manner which does not create potential +liability for other Contributors. Therefore, if a Contributor includes the +Program in a commercial product offering, such Contributor ("Commercial +Contributor") hereby agrees to defend and indemnify every other +Contributor ("Indemnified Contributor") against any losses, damages and +costs (collectively "Losses") arising from claims, lawsuits and other +legal actions brought by a third party against the Indemnified Contributor to +the extent caused by the acts or omissions of such Commercial Contributor in +connection with its distribution of the Program in a commercial product +offering. The obligations in this section do not apply to any claims or Losses +relating to any actual or alleged intellectual property infringement. In order +to qualify, an Indemnified Contributor must: a) promptly notify the Commercial +Contributor in writing of such claim, and b) allow the Commercial Contributor +to control, and cooperate with the Commercial Contributor in, the defense and +any related settlement negotiations. The Indemnified Contributor may participate +in any such claim at its own expense.</span> </p> + +<p><span style="font-size: 10pt;">For example, a Contributor might include the +Program in a commercial product offering, Product X. That Contributor is then a +Commercial Contributor. If that Commercial Contributor then makes performance +claims, or offers warranties related to Product X, those performance claims and +warranties are such Commercial Contributor's responsibility alone. Under this +section, the Commercial Contributor would have to defend claims against the +other Contributors related to those performance claims and warranties, and if a +court requires any other Contributor to pay any damages as a result, the +Commercial Contributor must pay those damages.</span> </p> + +<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p> + +<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS +AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT +WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, +WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, +MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely +responsible for determining the appropriateness of using and distributing the +Program and assumes all risks associated with its exercise of rights under this +Agreement , including but not limited to the risks and costs of program errors, +compliance with applicable laws, damage to or loss of data, programs or +equipment, and unavailability or interruption of operations. </span></p> + +<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p> + +<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS +AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY +OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF +THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF +THE POSSIBILITY OF SUCH DAMAGES.</span> </p> + +<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p> + +<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid +or unenforceable under applicable law, it shall not affect the validity or +enforceability of the remainder of the terms of this Agreement, and without +further action by the parties hereto, such provision shall be reformed to the +minimum extent necessary to make such provision valid and enforceable.</span> </p> + +<p><span style="font-size: 10pt;">If Recipient institutes patent litigation +against any entity (including a cross-claim or counterclaim in a lawsuit) +alleging that the Program itself (excluding combinations of the Program with +other software or hardware) infringes such Recipient's patent(s), then such +Recipient's rights granted under Section 2(b) shall terminate as of the date +such litigation is filed. </span></p> + +<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement +shall terminate if it fails to comply with any of the material terms or +conditions of this Agreement and does not cure such failure in a reasonable +period of time after becoming aware of such noncompliance. If all Recipient's +rights under this Agreement terminate, Recipient agrees to cease use and +distribution of the Program as soon as reasonably practicable. However, +Recipient's obligations under this Agreement and any licenses granted by +Recipient relating to the Program shall continue and survive. </span></p> + +<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute +copies of this Agreement, but in order to avoid inconsistency the Agreement is +copyrighted and may only be modified in the following manner. The Agreement +Steward reserves the right to publish new versions (including revisions) of +this Agreement from time to time. No one other than the Agreement Steward has +the right to modify this Agreement. The Eclipse Foundation is the initial +Agreement Steward. The Eclipse Foundation may assign the responsibility to +serve as the Agreement Steward to a suitable separate entity. Each new version +of the Agreement will be given a distinguishing version number. The Program +(including Contributions) may always be distributed subject to the version of +the Agreement under which it was received. In addition, after a new version of +the Agreement is published, Contributor may elect to distribute the Program +(including its Contributions) under the new version. Except as expressly stated +in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to +the intellectual property of any Contributor under this Agreement, whether +expressly, by implication, estoppel or otherwise. All rights in the Program not +expressly granted under this Agreement are reserved.</span> </p> + +<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the +State of New York and the intellectual property laws of the United States of +America. No party to this Agreement will bring a legal action under this +Agreement more than one year after the cause of action arose. Each party waives +its rights to a jury trial in any resulting litigation.</span> </p> + +<p class="MsoNormal"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p> + +</div> + +</body></html>
\ No newline at end of file diff --git a/plugins/org.gastro.business/model/business.ecore b/plugins/org.gastro.business/model/business.ecore new file mode 100644 index 0000000000..13f8aec314 --- /dev/null +++ b/plugins/org.gastro.business/model/business.ecore @@ -0,0 +1,51 @@ +<?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="business" + nsURI="http://www.gastro.org/business/1.0" nsPrefix="business"> + <eClassifiers xsi:type="ecore:EClass" name="BusinessDay"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="date" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDate"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="menuCard" lowerBound="1" + eType="ecore:EClass ../../org.gastro.inventory/model/inventory.ecore#//MenuCard"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="orders" upperBound="-1" + eType="#//Order" containment="true" eOpposite="#//Order/businessDay"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="waiters" lowerBound="1" + upperBound="-1" eType="#//Waiter" containment="true" eOpposite="#//Waiter/businessDay"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="closed" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="Order"> + <eStructuralFeatures xsi:type="ecore:EReference" name="businessDay" lowerBound="1" + eType="#//BusinessDay" eOpposite="#//BusinessDay/orders"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="table" lowerBound="1" eType="ecore:EClass ../../org.gastro.inventory/model/inventory.ecore#//Table"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="orderDetails" lowerBound="1" + upperBound="-1" eType="#//OrderDetail" containment="true" eOpposite="#//OrderDetail/order"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="number" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="OrderDetail"> + <eStructuralFeatures xsi:type="ecore:EReference" name="order" lowerBound="1" eType="#//Order" + eOpposite="#//Order/orderDetails"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="offering" lowerBound="1" + eType="ecore:EClass ../../org.gastro.inventory/model/inventory.ecore#//Offering"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="quantity" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="state" eType="#//OrderState"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="price" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFloat" + changeable="false" volatile="true" transient="true" derived="true"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="Waiter"> + <eStructuralFeatures xsi:type="ecore:EReference" name="businessDay" eType="#//BusinessDay" + eOpposite="#//BusinessDay/waiters"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="tables" upperBound="-1" + eType="ecore:EClass ../../org.gastro.inventory/model/inventory.ecore#//Table"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="employee" lowerBound="1" + eType="ecore:EClass ../../org.gastro.inventory/model/inventory.ecore#//Employee"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="from" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDate"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="until" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDate"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EEnum" name="OrderState"> + <eLiterals name="Ordered"/> + <eLiterals name="Acknowledged" value="2"/> + <eLiterals name="Prepared" value="1"/> + <eLiterals name="Served" value="3"/> + <eLiterals name="Paid" value="4"/> + </eClassifiers> +</ecore:EPackage> diff --git a/plugins/org.gastro.business/model/business.ecorediag b/plugins/org.gastro.business/model/business.ecorediag new file mode 100644 index 0000000000..e9bc5526bf --- /dev/null +++ b/plugins/org.gastro.business/model/business.ecorediag @@ -0,0 +1,310 @@ +<?xml version="1.0" encoding="UTF-8"?> +<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmi:id="_C9lGsCRhEd6Laae2Tgx_FA" type="EcoreTools" name="business" measurementUnit="Pixel"> + <children xmi:type="notation:Node" xmi:id="_KFAcYCRhEd6Laae2Tgx_FA" type="1001"> + <children xmi:type="notation:Node" xmi:id="_KFDfsCRhEd6Laae2Tgx_FA" type="4001"/> + <children xmi:type="notation:Node" xmi:id="_KFEGwCRhEd6Laae2Tgx_FA" type="5001"> + <children xmi:type="notation:Node" xmi:id="_QzlNMCRhEd6Laae2Tgx_FA" type="2001"> + <element xmi:type="ecore:EAttribute" href="business.ecore#//BusinessDay/date"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_Qzl0QCRhEd6Laae2Tgx_FA"/> + </children> + <children xmi:type="notation:Node" xmi:id="_ghc7ESZgEd6IxZnGa5VTNA" type="2001"> + <element xmi:type="ecore:EAttribute" href="business.ecore#//BusinessDay/closed"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_ghc7EiZgEd6IxZnGa5VTNA"/> + </children> + <styles xmi:type="notation:DrawerStyle" xmi:id="_KFEGwSRhEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_KFEGwiRhEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_KFEGwyRhEd6Laae2Tgx_FA"/> + </children> + <children xmi:type="notation:Node" xmi:id="_KFEGxCRhEd6Laae2Tgx_FA" type="5002"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_KFEGxSRhEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_KFEGxiRhEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_KFEGxyRhEd6Laae2Tgx_FA"/> + </children> + <styles xmi:type="notation:ShapeStyle" xmi:id="_KFAcYSRhEd6Laae2Tgx_FA" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="7910650" lineColor="8421504"/> + <element xmi:type="ecore:EClass" href="business.ecore#//BusinessDay"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_KFAcYiRhEd6Laae2Tgx_FA" x="208" y="163" width="140"/> + </children> + <children xmi:type="notation:Node" xmi:id="_UAe8ICRjEd6Laae2Tgx_FA" type="1001"> + <children xmi:type="notation:Node" xmi:id="_UAe8IyRjEd6Laae2Tgx_FA" type="4001"/> + <children xmi:type="notation:Node" xmi:id="_UAfjMCRjEd6Laae2Tgx_FA" type="5001"> + <children xmi:type="notation:Node" xmi:id="_lJvbwCRmEd6Laae2Tgx_FA" type="2001"> + <element xmi:type="ecore:EAttribute" href="business.ecore#//Order/number"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_lJvbwSRmEd6Laae2Tgx_FA"/> + </children> + <styles xmi:type="notation:DrawerStyle" xmi:id="_UAfjMSRjEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_UAfjMiRjEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_UAfjMyRjEd6Laae2Tgx_FA"/> + </children> + <children xmi:type="notation:Node" xmi:id="_UAfjNCRjEd6Laae2Tgx_FA" type="5002"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_UAfjNSRjEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_UAfjNiRjEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_UAfjNyRjEd6Laae2Tgx_FA"/> + </children> + <styles xmi:type="notation:ShapeStyle" xmi:id="_UAe8ISRjEd6Laae2Tgx_FA" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="7910650" lineColor="8421504"/> + <element xmi:type="ecore:EClass" href="business.ecore#//Order"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_UAe8IiRjEd6Laae2Tgx_FA" x="42" y="171"/> + </children> + <children xmi:type="notation:Node" xmi:id="_WKeugCRjEd6Laae2Tgx_FA" type="1001"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_WKlcMCRjEd6Laae2Tgx_FA" source="Shortcut"> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_WKlcMSRjEd6Laae2Tgx_FA" key="modelID" value="EcoreTools"/> + </eAnnotations> + <children xmi:type="notation:Node" xmi:id="_WKfVkCRjEd6Laae2Tgx_FA" type="4001"/> + <children xmi:type="notation:Node" xmi:id="_WKfVkSRjEd6Laae2Tgx_FA" type="5001"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_WKfVkiRjEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_WKfVkyRjEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_WKfVlCRjEd6Laae2Tgx_FA"/> + </children> + <children xmi:type="notation:Node" xmi:id="_WKf8oCRjEd6Laae2Tgx_FA" type="5002"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_WKf8oSRjEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_WKf8oiRjEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_WKf8oyRjEd6Laae2Tgx_FA"/> + </children> + <styles xmi:type="notation:ShapeStyle" xmi:id="_WKeugSRjEd6Laae2Tgx_FA" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="15772310" lineColor="8421504"/> + <element xmi:type="ecore:EClass" href="platform:/resource/org.gastro.inventory/model/inventory.ecore#//Table"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_WKeugiRjEd6Laae2Tgx_FA" x="45" y="39"/> + </children> + <children xmi:type="notation:Node" xmi:id="_tXVPoCRjEd6Laae2Tgx_FA" type="1001"> + <children xmi:type="notation:Node" xmi:id="_tXZhECRjEd6Laae2Tgx_FA" type="4001"/> + <children xmi:type="notation:Node" xmi:id="_tXZhESRjEd6Laae2Tgx_FA" type="5001"> + <children xmi:type="notation:Node" xmi:id="_7ffdICRjEd6Laae2Tgx_FA" type="2001"> + <element xmi:type="ecore:EAttribute" href="business.ecore#//OrderDetail/quantity"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_7ffdISRjEd6Laae2Tgx_FA"/> + </children> + <children xmi:type="notation:Node" xmi:id="_r4PUECRmEd6Laae2Tgx_FA" type="2001"> + <element xmi:type="ecore:EAttribute" href="business.ecore#//OrderDetail/state"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_r4PUESRmEd6Laae2Tgx_FA"/> + </children> + <children xmi:type="notation:Node" xmi:id="_ze4qQSa0Ed6oA6nutKAH1g" type="2001"> + <element xmi:type="ecore:EAttribute" href="business.ecore#//OrderDetail/price"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_ze4qQia0Ed6oA6nutKAH1g"/> + </children> + <styles xmi:type="notation:DrawerStyle" xmi:id="_tXZhEiRjEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_tXZhEyRjEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_tXZhFCRjEd6Laae2Tgx_FA"/> + </children> + <children xmi:type="notation:Node" xmi:id="_tXZhFSRjEd6Laae2Tgx_FA" type="5002"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_tXZhFiRjEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_tXZhFyRjEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_tXZhGCRjEd6Laae2Tgx_FA"/> + </children> + <styles xmi:type="notation:ShapeStyle" xmi:id="_tXVPoSRjEd6Laae2Tgx_FA" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="7910650" lineColor="8421504"/> + <element xmi:type="ecore:EClass" href="business.ecore#//OrderDetail"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_tXVPoiRjEd6Laae2Tgx_FA" x="29" y="272"/> + </children> + <children xmi:type="notation:Node" xmi:id="_22fRsCRjEd6Laae2Tgx_FA" type="1001"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_22uiQCRjEd6Laae2Tgx_FA" source="Shortcut"> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_22uiQSRjEd6Laae2Tgx_FA" key="modelID" value="EcoreTools"/> + </eAnnotations> + <children xmi:type="notation:Node" xmi:id="_22f4wCRjEd6Laae2Tgx_FA" type="4001"/> + <children xmi:type="notation:Node" xmi:id="_22f4wSRjEd6Laae2Tgx_FA" type="5001"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_22gf0CRjEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_22gf0SRjEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_22gf0iRjEd6Laae2Tgx_FA"/> + </children> + <children xmi:type="notation:Node" xmi:id="_22gf0yRjEd6Laae2Tgx_FA" type="5002"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_22gf1CRjEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_22gf1SRjEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_22gf1iRjEd6Laae2Tgx_FA"/> + </children> + <styles xmi:type="notation:ShapeStyle" xmi:id="_22fRsSRjEd6Laae2Tgx_FA" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="15772310" lineColor="8421504"/> + <element xmi:type="ecore:EClass" href="platform:/resource/org.gastro.inventory/model/inventory.ecore#//Offering"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_22fRsiRjEd6Laae2Tgx_FA" x="420" y="285"/> + </children> + <children xmi:type="notation:Node" xmi:id="_xl66gCRkEd6Laae2Tgx_FA" type="1001"> + <children xmi:type="notation:Node" xmi:id="_xl8vsCRkEd6Laae2Tgx_FA" type="4001"/> + <children xmi:type="notation:Node" xmi:id="_xl8vsSRkEd6Laae2Tgx_FA" type="5001"> + <children xmi:type="notation:Node" xmi:id="_eTri4CRmEd6Laae2Tgx_FA" type="2001"> + <element xmi:type="ecore:EAttribute" href="business.ecore#//Waiter/from"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_eTri4SRmEd6Laae2Tgx_FA"/> + </children> + <children xmi:type="notation:Node" xmi:id="_hFotICRmEd6Laae2Tgx_FA" type="2001"> + <element xmi:type="ecore:EAttribute" href="business.ecore#//Waiter/until"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_hFotISRmEd6Laae2Tgx_FA"/> + </children> + <styles xmi:type="notation:DrawerStyle" xmi:id="_xl8vsiRkEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_xl8vsyRkEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_xl8vtCRkEd6Laae2Tgx_FA"/> + </children> + <children xmi:type="notation:Node" xmi:id="_xl8vtSRkEd6Laae2Tgx_FA" type="5002"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_xl8vtiRkEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_xl8vtyRkEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_xl8vuCRkEd6Laae2Tgx_FA"/> + </children> + <styles xmi:type="notation:ShapeStyle" xmi:id="_xl66gSRkEd6Laae2Tgx_FA" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="7910650" lineColor="8421504"/> + <element xmi:type="ecore:EClass" href="business.ecore#//Waiter"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_xl66giRkEd6Laae2Tgx_FA" x="226" y="35"/> + </children> + <children xmi:type="notation:Node" xmi:id="_1GCLQCRkEd6Laae2Tgx_FA" type="1001"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_1GIR4CRkEd6Laae2Tgx_FA" source="Shortcut"> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_1GIR4SRkEd6Laae2Tgx_FA" key="modelID" value="EcoreTools"/> + </eAnnotations> + <children xmi:type="notation:Node" xmi:id="_1GCLQyRkEd6Laae2Tgx_FA" type="4001"/> + <children xmi:type="notation:Node" xmi:id="_1GCyUCRkEd6Laae2Tgx_FA" type="5001"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_1GCyUSRkEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_1GCyUiRkEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_1GCyUyRkEd6Laae2Tgx_FA"/> + </children> + <children xmi:type="notation:Node" xmi:id="_1GCyVCRkEd6Laae2Tgx_FA" type="5002"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_1GCyVSRkEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_1GCyViRkEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_1GCyVyRkEd6Laae2Tgx_FA"/> + </children> + <styles xmi:type="notation:ShapeStyle" xmi:id="_1GCLQSRkEd6Laae2Tgx_FA" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="15772310" lineColor="8421504"/> + <element xmi:type="ecore:EClass" href="platform:/resource/org.gastro.inventory/model/inventory.ecore#//Employee"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_1GCLQiRkEd6Laae2Tgx_FA" x="420" y="39"/> + </children> + <children xmi:type="notation:Node" xmi:id="_Fv5r8CXjEd6Laae2Tgx_FA" type="1005"> + <children xmi:type="notation:Node" xmi:id="_Fv_ykCXjEd6Laae2Tgx_FA" type="4010"/> + <children xmi:type="notation:Node" xmi:id="_FwAZoCXjEd6Laae2Tgx_FA" type="5008"> + <children xmi:type="notation:Node" xmi:id="_HkpnECXjEd6Laae2Tgx_FA" type="2006"> + <element xmi:type="ecore:EEnumLiteral" href="business.ecore#//OrderState/Ordered"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_HkpnESXjEd6Laae2Tgx_FA"/> + </children> + <children xmi:type="notation:Node" xmi:id="_MRX04CXjEd6Laae2Tgx_FA" type="2006"> + <element xmi:type="ecore:EEnumLiteral" href="business.ecore#//OrderState/Acknowledged"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_MRX04SXjEd6Laae2Tgx_FA"/> + </children> + <children xmi:type="notation:Node" xmi:id="_QqHWwCXjEd6Laae2Tgx_FA" type="2006"> + <element xmi:type="ecore:EEnumLiteral" href="business.ecore#//OrderState/Prepared"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_QqHWwSXjEd6Laae2Tgx_FA"/> + </children> + <children xmi:type="notation:Node" xmi:id="_RtthwCXjEd6Laae2Tgx_FA" type="2006"> + <element xmi:type="ecore:EEnumLiteral" href="business.ecore#//OrderState/Served"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_RtthwSXjEd6Laae2Tgx_FA"/> + </children> + <children xmi:type="notation:Node" xmi:id="_S-9HMCXjEd6Laae2Tgx_FA" type="2006"> + <element xmi:type="ecore:EEnumLiteral" href="business.ecore#//OrderState/Paid"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_S-9HMSXjEd6Laae2Tgx_FA"/> + </children> + <styles xmi:type="notation:DrawerStyle" xmi:id="_FwAZoSXjEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_FwAZoiXjEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_FwAZoyXjEd6Laae2Tgx_FA"/> + </children> + <styles xmi:type="notation:ShapeStyle" xmi:id="_Fv5r8SXjEd6Laae2Tgx_FA" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="7910650" lineColor="8421504"/> + <element xmi:type="ecore:EEnum" href="business.ecore#//OrderState"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Fv5r8iXjEd6Laae2Tgx_FA" x="220" y="253"/> + </children> + <children xmi:type="notation:Node" xmi:id="_8DfwsCXlEd6Laae2Tgx_FA" type="1001"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_8DvoUCXlEd6Laae2Tgx_FA" source="Shortcut"> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_8DvoUSXlEd6Laae2Tgx_FA" key="modelID" value="EcoreTools"/> + </eAnnotations> + <children xmi:type="notation:Node" xmi:id="_8DfwsyXlEd6Laae2Tgx_FA" type="4001"/> + <children xmi:type="notation:Node" xmi:id="_8DgXwCXlEd6Laae2Tgx_FA" type="5001"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_8DgXwSXlEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_8DgXwiXlEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_8DgXwyXlEd6Laae2Tgx_FA"/> + </children> + <children xmi:type="notation:Node" xmi:id="_8DgXxCXlEd6Laae2Tgx_FA" type="5002"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_8DgXxSXlEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_8DgXxiXlEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_8DgXxyXlEd6Laae2Tgx_FA"/> + </children> + <styles xmi:type="notation:ShapeStyle" xmi:id="_8DfwsSXlEd6Laae2Tgx_FA" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="15772310" lineColor="8421504"/> + <element xmi:type="ecore:EClass" href="platform:/resource/org.gastro.inventory/model/inventory.ecore#//MenuCard"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8DfwsiXlEd6Laae2Tgx_FA" x="410" y="167" width="122"/> + </children> + <styles xmi:type="notation:DiagramStyle" xmi:id="_C9lGsSRhEd6Laae2Tgx_FA"/> + <element xmi:type="ecore:EPackage" href="business.ecore#/"/> + <edges xmi:type="notation:Edge" xmi:id="_YPdeACRjEd6Laae2Tgx_FA" type="3002" source="_KFAcYCRhEd6Laae2Tgx_FA" target="_UAe8ICRjEd6Laae2Tgx_FA"> + <children xmi:type="notation:Node" xmi:id="_YPeFECRjEd6Laae2Tgx_FA" type="4011"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_YPeFESRjEd6Laae2Tgx_FA" x="-17" y="-8"/> + </children> + <children xmi:type="notation:Node" xmi:id="_YPeFEiRjEd6Laae2Tgx_FA" type="4012"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_YPeFEyRjEd6Laae2Tgx_FA" x="-7" y="12"/> + </children> + <styles xmi:type="notation:ConnectorStyle" xmi:id="_YPdeASRjEd6Laae2Tgx_FA" lineColor="4210752"/> + <styles xmi:type="notation:FontStyle" xmi:id="_YPdeAiRjEd6Laae2Tgx_FA" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/> + <element xmi:type="ecore:EReference" href="business.ecore#//BusinessDay/orders"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_YPdeAyRjEd6Laae2Tgx_FA" points="[2, 25, 1, -93]$[2, 98, 1, -20]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_h4vFZCRjEd6Laae2Tgx_FA" id="(0.5,0.5)"/> + <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_h4vFZSRjEd6Laae2Tgx_FA" id="(0.5,0.5)"/> + </edges> + <edges xmi:type="notation:Edge" xmi:id="_imkbwCRjEd6Laae2Tgx_FA" type="3002" source="_UAe8ICRjEd6Laae2Tgx_FA" target="_WKeugCRjEd6Laae2Tgx_FA"> + <children xmi:type="notation:Node" xmi:id="_imlC0yRjEd6Laae2Tgx_FA" type="4011"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_imlC1CRjEd6Laae2Tgx_FA" x="-6" y="-21"/> + </children> + <children xmi:type="notation:Node" xmi:id="_imlC1SRjEd6Laae2Tgx_FA" type="4012"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_imlC1iRjEd6Laae2Tgx_FA" x="-6" y="15"/> + </children> + <styles xmi:type="notation:ConnectorStyle" xmi:id="_imlC0CRjEd6Laae2Tgx_FA" lineColor="4210752"/> + <styles xmi:type="notation:FontStyle" xmi:id="_imlC0SRjEd6Laae2Tgx_FA" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/> + <element xmi:type="ecore:EReference" href="business.ecore#//Order/table"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_imlC0iRjEd6Laae2Tgx_FA" points="[50, -2, -213, 7]$[313, -9, 50, 0]"/> + </edges> + <edges xmi:type="notation:Edge" xmi:id="_v3-ncCRjEd6Laae2Tgx_FA" type="3002" source="_UAe8ICRjEd6Laae2Tgx_FA" target="_tXVPoCRjEd6Laae2Tgx_FA"> + <children xmi:type="notation:Node" xmi:id="_v3_OgCRjEd6Laae2Tgx_FA" type="4011"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_v3_OgSRjEd6Laae2Tgx_FA" x="-3" y="-41"/> + </children> + <children xmi:type="notation:Node" xmi:id="_v3_OgiRjEd6Laae2Tgx_FA" type="4012"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_v3_OgyRjEd6Laae2Tgx_FA" x="-3" y="16"/> + </children> + <styles xmi:type="notation:ConnectorStyle" xmi:id="_v3-ncSRjEd6Laae2Tgx_FA" lineColor="4210752"/> + <styles xmi:type="notation:FontStyle" xmi:id="_v3-nciRjEd6Laae2Tgx_FA" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/> + <element xmi:type="ecore:EReference" href="business.ecore#//Order/orderDetails"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_v3-ncyRjEd6Laae2Tgx_FA" points="[-4, 21, 6, -55]$[-11, 56, -1, -20]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_08wI5CRjEd6Laae2Tgx_FA" id="(0.5,0.5)"/> + <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_08wI5SRjEd6Laae2Tgx_FA" id="(0.5,0.5)"/> + </edges> + <edges xmi:type="notation:Edge" xmi:id="_5mvLwCRjEd6Laae2Tgx_FA" type="3002" source="_tXVPoCRjEd6Laae2Tgx_FA" target="_22fRsCRjEd6Laae2Tgx_FA"> + <children xmi:type="notation:Node" xmi:id="_5mvLxCRjEd6Laae2Tgx_FA" type="4011"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_5mvLxSRjEd6Laae2Tgx_FA" x="-5" y="-28"/> + </children> + <children xmi:type="notation:Node" xmi:id="_5mvy0CRjEd6Laae2Tgx_FA" type="4012"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_5mvy0SRjEd6Laae2Tgx_FA" x="37" y="-28"/> + </children> + <styles xmi:type="notation:ConnectorStyle" xmi:id="_5mvLwSRjEd6Laae2Tgx_FA" lineColor="4210752"/> + <styles xmi:type="notation:FontStyle" xmi:id="_5mvLwiRjEd6Laae2Tgx_FA" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/> + <element xmi:type="ecore:EReference" href="business.ecore#//OrderDetail/offering"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_5mvLwyRjEd6Laae2Tgx_FA" points="[0, 42, -375, 41]$[0, 77, -375, 76]$[375, 77, 0, 76]$[375, 30, 0, 29]"/> + </edges> + <edges xmi:type="notation:Edge" xmi:id="_AvKKgCRlEd6Laae2Tgx_FA" type="3002" source="_KFAcYCRhEd6Laae2Tgx_FA" target="_xl66gCRkEd6Laae2Tgx_FA"> + <children xmi:type="notation:Node" xmi:id="_AvKxkCRlEd6Laae2Tgx_FA" type="4011"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_AvKxkSRlEd6Laae2Tgx_FA" x="-4" y="-30"/> + </children> + <children xmi:type="notation:Node" xmi:id="_AvKxkiRlEd6Laae2Tgx_FA" type="4012"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_AvKxkyRlEd6Laae2Tgx_FA" x="-4" y="16"/> + </children> + <styles xmi:type="notation:ConnectorStyle" xmi:id="_AvKKgSRlEd6Laae2Tgx_FA" lineColor="4210752"/> + <styles xmi:type="notation:FontStyle" xmi:id="_AvKKgiRlEd6Laae2Tgx_FA" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/> + <element xmi:type="ecore:EReference" href="business.ecore#//BusinessDay/waiters"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_AvKKgyRlEd6Laae2Tgx_FA" points="[-1, -24, -2, 87]$[-1, -131, -2, -20]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_FYi7BCRmEd6Laae2Tgx_FA" id="(0.5,0.5)"/> + <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_FYi7BSRmEd6Laae2Tgx_FA" id="(0.5,0.5)"/> + </edges> + <edges xmi:type="notation:Edge" xmi:id="_dNWCYCRlEd6Laae2Tgx_FA" type="3002" source="_xl66gCRkEd6Laae2Tgx_FA" target="_WKeugCRjEd6Laae2Tgx_FA"> + <children xmi:type="notation:Node" xmi:id="_dNWCZCRlEd6Laae2Tgx_FA" type="4011"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_dNWCZSRlEd6Laae2Tgx_FA" x="-16" y="-12"/> + </children> + <children xmi:type="notation:Node" xmi:id="_dNWCZiRlEd6Laae2Tgx_FA" type="4012"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_dNWCZyRlEd6Laae2Tgx_FA" x="-8" y="12"/> + </children> + <styles xmi:type="notation:ConnectorStyle" xmi:id="_dNWCYSRlEd6Laae2Tgx_FA" lineColor="4210752"/> + <styles xmi:type="notation:FontStyle" xmi:id="_dNWCYiRlEd6Laae2Tgx_FA" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/> + <element xmi:type="ecore:EReference" href="business.ecore#//Waiter/tables"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_dNWCYyRlEd6Laae2Tgx_FA" points="[-50, 7, 140, -14]$[-192, 63, -2, 42]"/> + </edges> + <edges xmi:type="notation:Edge" xmi:id="_jUWc4CRlEd6Laae2Tgx_FA" type="3002" source="_xl66gCRkEd6Laae2Tgx_FA" target="_1GCLQCRkEd6Laae2Tgx_FA"> + <children xmi:type="notation:Node" xmi:id="_jUaHQCRlEd6Laae2Tgx_FA" type="4011"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_jUaHQSRlEd6Laae2Tgx_FA" x="-25" y="-14"/> + </children> + <children xmi:type="notation:Node" xmi:id="_jUaHQiRlEd6Laae2Tgx_FA" type="4012"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_jUaHQyRlEd6Laae2Tgx_FA" x="-8" y="11"/> + </children> + <styles xmi:type="notation:ConnectorStyle" xmi:id="_jUWc4SRlEd6Laae2Tgx_FA" lineColor="4210752"/> + <styles xmi:type="notation:FontStyle" xmi:id="_jUWc4iRlEd6Laae2Tgx_FA" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/> + <element xmi:type="ecore:EReference" href="business.ecore#//Waiter/employee"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_jUWc4yRlEd6Laae2Tgx_FA" points="[50, 5, -230, -17]$[280, 51, 0, 29]"/> + </edges> + <edges xmi:type="notation:Edge" xmi:id="_8DnsgCXlEd6Laae2Tgx_FA" type="3002" source="_KFAcYCRhEd6Laae2Tgx_FA" target="_8DfwsCXlEd6Laae2Tgx_FA"> + <children xmi:type="notation:Node" xmi:id="_8DoTkCXlEd6Laae2Tgx_FA" type="4011"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_8DoTkSXlEd6Laae2Tgx_FA" x="-24" y="-13"/> + </children> + <children xmi:type="notation:Node" xmi:id="_8DoTkiXlEd6Laae2Tgx_FA" type="4012"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_8DoTkyXlEd6Laae2Tgx_FA" x="-4" y="15"/> + </children> + <styles xmi:type="notation:ConnectorStyle" xmi:id="_8DnsgSXlEd6Laae2Tgx_FA" lineColor="4210752"/> + <styles xmi:type="notation:FontStyle" xmi:id="_8DnsgiXlEd6Laae2Tgx_FA" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/> + <element xmi:type="ecore:EReference" href="business.ecore#//BusinessDay/menuCard"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_8DnsgyXlEd6Laae2Tgx_FA" points="[-37, -24, 263, 172]$[-299, -195, 1, 1]"/> + </edges> +</notation:Diagram> diff --git a/plugins/org.gastro.business/model/business.genmodel b/plugins/org.gastro.business/model/business.genmodel new file mode 100644 index 0000000000..60e7fa6f6b --- /dev/null +++ b/plugins/org.gastro.business/model/business.genmodel @@ -0,0 +1,41 @@ +<?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.gastro.business/src" + creationIcons="false" editorDirectory="" modelPluginID="org.gastro.business" modelName="Business" + rootExtendsInterface="org.eclipse.emf.cdo.CDOObject" rootExtendsClass="org.eclipse.emf.internal.cdo.CDOObjectImpl" + reflectiveDelegation="true" codeFormatting="true" testsDirectory="" importerID="org.eclipse.emf.importer.cdo" + featureDelegation="Reflective" complianceLevel="5.0" copyrightFields="false" optimizedHasChildren="true" + usedGenPackages="../../org.gastro.inventory/model/inventory.genmodel#//inventory"> + <foreignModel>business.ecore</foreignModel> + <modelPluginVariables>CDO=org.eclipse.emf.cdo</modelPluginVariables> + <genPackages prefix="Business" basePackage="org.gastro" disposableProviderFactory="true" + ecorePackage="business.ecore#/"> + <genClasses ecoreClass="business.ecore#//BusinessDay"> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute business.ecore#//BusinessDay/date"/> + <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference business.ecore#//BusinessDay/menuCard"/> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference business.ecore#//BusinessDay/orders"/> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference business.ecore#//BusinessDay/waiters"/> + </genClasses> + <genClasses ecoreClass="business.ecore#//Order"> + <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference business.ecore#//Order/businessDay"/> + <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference business.ecore#//Order/table"/> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference business.ecore#//Order/orderDetails"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute business.ecore#//Order/number"/> + </genClasses> + <genClasses ecoreClass="business.ecore#//OrderDetail"> + <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference business.ecore#//OrderDetail/order"/> + <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference business.ecore#//OrderDetail/offering"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute business.ecore#//OrderDetail/quantity"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute business.ecore#//OrderDetail/prepared"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute business.ecore#//OrderDetail/served"/> + </genClasses> + <genClasses ecoreClass="business.ecore#//Waiter"> + <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference business.ecore#//Waiter/businessDay"/> + <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference business.ecore#//Waiter/tables"/> + <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference business.ecore#//Waiter/employee"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute business.ecore#//Waiter/from"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute business.ecore#//Waiter/until"/> + </genClasses> + </genPackages> +</genmodel:GenModel> diff --git a/plugins/org.gastro.business/plugin.properties b/plugins/org.gastro.business/plugin.properties new file mode 100644 index 0000000000..49cceaea7f --- /dev/null +++ b/plugins/org.gastro.business/plugin.properties @@ -0,0 +1,8 @@ + +# <copyright> +# </copyright> +# +# $Id: plugin.properties,v 1.1 2009-04-26 16:52:37 estepper Exp $ + +pluginName = Gastory Business Day Model +providerName = www.gastro.org diff --git a/plugins/org.gastro.business/plugin.xml b/plugins/org.gastro.business/plugin.xml new file mode 100644 index 0000000000..148c4adf0d --- /dev/null +++ b/plugins/org.gastro.business/plugin.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.0"?> + +<!-- + <copyright> + </copyright> + + $Id: plugin.xml,v 1.1 2009-04-26 16:52:37 estepper Exp $ +--> + +<plugin> + + <extension point="org.eclipse.emf.ecore.generated_package"> + <package + uri="http://www.gastro.org/business/1.0" + class="org.gastro.business.BusinessPackage" + genModel="model/business.genmodel"/> + </extension> + +</plugin> diff --git a/plugins/org.gastro.business/src/org/gastro/business/BusinessDay.java b/plugins/org.gastro.business/src/org/gastro/business/BusinessDay.java new file mode 100644 index 0000000000..38f0620bd5 --- /dev/null +++ b/plugins/org.gastro.business/src/org/gastro/business/BusinessDay.java @@ -0,0 +1,159 @@ +/** + * Copyright (c) 2009 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + * + * Initial Publication: + * Eclipse Magazin - http://www.eclipse-magazin.de + */ +package org.gastro.business; + +import org.eclipse.emf.cdo.CDOObject; + +import org.eclipse.emf.common.util.EList; + +import org.gastro.inventory.MenuCard; + +import java.util.Date; + +/** + * <!-- begin-user-doc --> A representation of the model object '<em><b>Day</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.gastro.business.BusinessDay#getDate <em>Date</em>}</li> + * <li>{@link org.gastro.business.BusinessDay#getMenuCard <em>Menu Card</em>}</li> + * <li>{@link org.gastro.business.BusinessDay#getOrders <em>Orders</em>}</li> + * <li>{@link org.gastro.business.BusinessDay#getWaiters <em>Waiters</em>}</li> + * <li>{@link org.gastro.business.BusinessDay#isClosed <em>Closed</em>}</li> + * </ul> + * </p> + * + * @see org.gastro.business.BusinessPackage#getBusinessDay() + * @model + * @extends CDOObject + * @generated + */ +public interface BusinessDay extends CDOObject +{ + /** + * Returns the value of the '<em><b>Date</b></em>' attribute. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>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>Date</em>' attribute. + * @see #setDate(Date) + * @see org.gastro.business.BusinessPackage#getBusinessDay_Date() + * @model + * @generated + */ + Date getDate(); + + /** + * Sets the value of the '{@link org.gastro.business.BusinessDay#getDate <em>Date</em>}' attribute. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Date</em>' attribute. + * @see #getDate() + * @generated + */ + void setDate(Date value); + + /** + * Returns the value of the '<em><b>Menu Card</b></em>' reference. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Menu Card</em>' reference isn't clear, there really should be more of a description + * here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Menu Card</em>' reference. + * @see #setMenuCard(MenuCard) + * @see org.gastro.business.BusinessPackage#getBusinessDay_MenuCard() + * @model required="true" + * @generated + */ + MenuCard getMenuCard(); + + /** + * Sets the value of the '{@link org.gastro.business.BusinessDay#getMenuCard <em>Menu Card</em>}' reference. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Menu Card</em>' reference. + * @see #getMenuCard() + * @generated + */ + void setMenuCard(MenuCard value); + + /** + * Returns the value of the '<em><b>Orders</b></em>' containment reference list. The list contents are of type + * {@link org.gastro.business.Order}. It is bidirectional and its opposite is ' + * {@link org.gastro.business.Order#getBusinessDay <em>Business Day</em>}'. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Orders</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>Orders</em>' containment reference list. + * @see org.gastro.business.BusinessPackage#getBusinessDay_Orders() + * @see org.gastro.business.Order#getBusinessDay + * @model opposite="businessDay" containment="true" + * @generated + */ + EList<Order> getOrders(); + + /** + * Returns the value of the '<em><b>Waiters</b></em>' containment reference list. The list contents are of type + * {@link org.gastro.business.Waiter}. It is bidirectional and its opposite is ' + * {@link org.gastro.business.Waiter#getBusinessDay <em>Business Day</em>}'. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Waiters</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>Waiters</em>' containment reference list. + * @see org.gastro.business.BusinessPackage#getBusinessDay_Waiters() + * @see org.gastro.business.Waiter#getBusinessDay + * @model opposite="businessDay" containment="true" required="true" + * @generated + */ + EList<Waiter> getWaiters(); + + /** + * Returns the value of the '<em><b>Closed</b></em>' attribute. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Closed</em>' attribute isn't clear, there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Closed</em>' attribute. + * @see #setClosed(boolean) + * @see org.gastro.business.BusinessPackage#getBusinessDay_Closed() + * @model + * @generated + */ + boolean isClosed(); + + /** + * Sets the value of the '{@link org.gastro.business.BusinessDay#isClosed <em>Closed</em>}' attribute. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Closed</em>' attribute. + * @see #isClosed() + * @generated + */ + void setClosed(boolean value); + +} // BusinessDay diff --git a/plugins/org.gastro.business/src/org/gastro/business/BusinessFactory.java b/plugins/org.gastro.business/src/org/gastro/business/BusinessFactory.java new file mode 100644 index 0000000000..84706d385a --- /dev/null +++ b/plugins/org.gastro.business/src/org/gastro/business/BusinessFactory.java @@ -0,0 +1,74 @@ +/** + * Copyright (c) 2009 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + * + * Initial Publication: + * Eclipse Magazin - http://www.eclipse-magazin.de + */ +package org.gastro.business; + +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.gastro.business.BusinessPackage + * @generated + */ +public interface BusinessFactory extends EFactory +{ + /** + * The singleton instance of the factory. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + BusinessFactory eINSTANCE = org.gastro.business.impl.BusinessFactoryImpl.init(); + + /** + * Returns a new object of class '<em>Day</em>'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return a new object of class '<em>Day</em>'. + * @generated + */ + BusinessDay createBusinessDay(); + + /** + * Returns a new object of class '<em>Order</em>'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return a new object of class '<em>Order</em>'. + * @generated + */ + Order createOrder(); + + /** + * Returns a new object of class '<em>Order Detail</em>'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return a new object of class '<em>Order Detail</em>'. + * @generated + */ + OrderDetail createOrderDetail(); + + /** + * Returns a new object of class '<em>Waiter</em>'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return a new object of class '<em>Waiter</em>'. + * @generated + */ + Waiter createWaiter(); + + /** + * Returns the package supported by this factory. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the package supported by this factory. + * @generated + */ + BusinessPackage getBusinessPackage(); + +} // BusinessFactory diff --git a/plugins/org.gastro.business/src/org/gastro/business/BusinessPackage.java b/plugins/org.gastro.business/src/org/gastro/business/BusinessPackage.java new file mode 100644 index 0000000000..5bd349f5d4 --- /dev/null +++ b/plugins/org.gastro.business/src/org/gastro/business/BusinessPackage.java @@ -0,0 +1,791 @@ +/** + * Copyright (c) 2009 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + * + * Initial Publication: + * Eclipse Magazin - http://www.eclipse-magazin.de + */ +package org.gastro.business; + +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.gastro.business.BusinessFactory + * @model kind="package" + * @generated + */ +public interface BusinessPackage extends EPackage +{ + /** + * The package name. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + String eNAME = "business"; + + /** + * The package namespace URI. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + String eNS_URI = "http://www.gastro.org/business/1.0"; + + /** + * The package namespace name. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + String eNS_PREFIX = "business"; + + /** + * The singleton instance of the package. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + BusinessPackage eINSTANCE = org.gastro.business.impl.BusinessPackageImpl.init(); + + /** + * The meta object id for the '{@link org.gastro.business.impl.BusinessDayImpl <em>Day</em>}' class. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @see org.gastro.business.impl.BusinessDayImpl + * @see org.gastro.business.impl.BusinessPackageImpl#getBusinessDay() + * @generated + */ + int BUSINESS_DAY = 0; + + /** + * The feature id for the '<em><b>Date</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int BUSINESS_DAY__DATE = 0; + + /** + * The feature id for the '<em><b>Menu Card</b></em>' reference. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int BUSINESS_DAY__MENU_CARD = 1; + + /** + * The feature id for the '<em><b>Orders</b></em>' containment reference list. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + * @ordered + */ + int BUSINESS_DAY__ORDERS = 2; + + /** + * The feature id for the '<em><b>Waiters</b></em>' containment reference list. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + * @ordered + */ + int BUSINESS_DAY__WAITERS = 3; + + /** + * The feature id for the '<em><b>Closed</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int BUSINESS_DAY__CLOSED = 4; + + /** + * The number of structural features of the '<em>Day</em>' class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int BUSINESS_DAY_FEATURE_COUNT = 5; + + /** + * The meta object id for the '{@link org.gastro.business.impl.OrderImpl <em>Order</em>}' class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @see org.gastro.business.impl.OrderImpl + * @see org.gastro.business.impl.BusinessPackageImpl#getOrder() + * @generated + */ + int ORDER = 1; + + /** + * The feature id for the '<em><b>Business Day</b></em>' container reference. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + * @ordered + */ + int ORDER__BUSINESS_DAY = 0; + + /** + * The feature id for the '<em><b>Table</b></em>' reference. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int ORDER__TABLE = 1; + + /** + * The feature id for the '<em><b>Order Details</b></em>' containment reference list. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + * @ordered + */ + int ORDER__ORDER_DETAILS = 2; + + /** + * The feature id for the '<em><b>Number</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int ORDER__NUMBER = 3; + + /** + * The number of structural features of the '<em>Order</em>' class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int ORDER_FEATURE_COUNT = 4; + + /** + * The meta object id for the '{@link org.gastro.business.impl.OrderDetailImpl <em>Order Detail</em>}' class. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @see org.gastro.business.impl.OrderDetailImpl + * @see org.gastro.business.impl.BusinessPackageImpl#getOrderDetail() + * @generated + */ + int ORDER_DETAIL = 2; + + /** + * The feature id for the '<em><b>Order</b></em>' container reference. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int ORDER_DETAIL__ORDER = 0; + + /** + * The feature id for the '<em><b>Offering</b></em>' reference. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int ORDER_DETAIL__OFFERING = 1; + + /** + * The feature id for the '<em><b>Quantity</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int ORDER_DETAIL__QUANTITY = 2; + + /** + * The feature id for the '<em><b>State</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int ORDER_DETAIL__STATE = 3; + + /** + * The feature id for the '<em><b>Price</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int ORDER_DETAIL__PRICE = 4; + + /** + * The number of structural features of the '<em>Order Detail</em>' class. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + * @ordered + */ + int ORDER_DETAIL_FEATURE_COUNT = 5; + + /** + * The meta object id for the '{@link org.gastro.business.impl.WaiterImpl <em>Waiter</em>}' class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @see org.gastro.business.impl.WaiterImpl + * @see org.gastro.business.impl.BusinessPackageImpl#getWaiter() + * @generated + */ + int WAITER = 3; + + /** + * The feature id for the '<em><b>Business Day</b></em>' container reference. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + * @ordered + */ + int WAITER__BUSINESS_DAY = 0; + + /** + * The feature id for the '<em><b>Tables</b></em>' reference list. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int WAITER__TABLES = 1; + + /** + * The feature id for the '<em><b>Employee</b></em>' reference. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int WAITER__EMPLOYEE = 2; + + /** + * The feature id for the '<em><b>From</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int WAITER__FROM = 3; + + /** + * The feature id for the '<em><b>Until</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int WAITER__UNTIL = 4; + + /** + * The number of structural features of the '<em>Waiter</em>' class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int WAITER_FEATURE_COUNT = 5; + + /** + * The meta object id for the '{@link org.gastro.business.OrderState <em>Order State</em>}' enum. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @see org.gastro.business.OrderState + * @see org.gastro.business.impl.BusinessPackageImpl#getOrderState() + * @generated + */ + int ORDER_STATE = 4; + + /** + * Returns the meta object for class '{@link org.gastro.business.BusinessDay <em>Day</em>}'. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for class '<em>Day</em>'. + * @see org.gastro.business.BusinessDay + * @generated + */ + EClass getBusinessDay(); + + /** + * Returns the meta object for the attribute '{@link org.gastro.business.BusinessDay#getDate <em>Date</em>}'. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Date</em>'. + * @see org.gastro.business.BusinessDay#getDate() + * @see #getBusinessDay() + * @generated + */ + EAttribute getBusinessDay_Date(); + + /** + * Returns the meta object for the reference '{@link org.gastro.business.BusinessDay#getMenuCard <em>Menu Card</em>}'. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the reference '<em>Menu Card</em>'. + * @see org.gastro.business.BusinessDay#getMenuCard() + * @see #getBusinessDay() + * @generated + */ + EReference getBusinessDay_MenuCard(); + + /** + * Returns the meta object for the containment reference list '{@link org.gastro.business.BusinessDay#getOrders + * <em>Orders</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the containment reference list '<em>Orders</em>'. + * @see org.gastro.business.BusinessDay#getOrders() + * @see #getBusinessDay() + * @generated + */ + EReference getBusinessDay_Orders(); + + /** + * Returns the meta object for the containment reference list '{@link org.gastro.business.BusinessDay#getWaiters + * <em>Waiters</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the containment reference list '<em>Waiters</em>'. + * @see org.gastro.business.BusinessDay#getWaiters() + * @see #getBusinessDay() + * @generated + */ + EReference getBusinessDay_Waiters(); + + /** + * Returns the meta object for the attribute '{@link org.gastro.business.BusinessDay#isClosed <em>Closed</em>}'. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Closed</em>'. + * @see org.gastro.business.BusinessDay#isClosed() + * @see #getBusinessDay() + * @generated + */ + EAttribute getBusinessDay_Closed(); + + /** + * Returns the meta object for class '{@link org.gastro.business.Order <em>Order</em>}'. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @return the meta object for class '<em>Order</em>'. + * @see org.gastro.business.Order + * @generated + */ + EClass getOrder(); + + /** + * Returns the meta object for the container reference '{@link org.gastro.business.Order#getBusinessDay + * <em>Business Day</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the container reference '<em>Business Day</em>'. + * @see org.gastro.business.Order#getBusinessDay() + * @see #getOrder() + * @generated + */ + EReference getOrder_BusinessDay(); + + /** + * Returns the meta object for the reference '{@link org.gastro.business.Order#getTable <em>Table</em>}'. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the reference '<em>Table</em>'. + * @see org.gastro.business.Order#getTable() + * @see #getOrder() + * @generated + */ + EReference getOrder_Table(); + + /** + * Returns the meta object for the containment reference list '{@link org.gastro.business.Order#getOrderDetails + * <em>Order Details</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the containment reference list '<em>Order Details</em>'. + * @see org.gastro.business.Order#getOrderDetails() + * @see #getOrder() + * @generated + */ + EReference getOrder_OrderDetails(); + + /** + * Returns the meta object for the attribute '{@link org.gastro.business.Order#getNumber <em>Number</em>}'. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Number</em>'. + * @see org.gastro.business.Order#getNumber() + * @see #getOrder() + * @generated + */ + EAttribute getOrder_Number(); + + /** + * Returns the meta object for class '{@link org.gastro.business.OrderDetail <em>Order Detail</em>}'. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for class '<em>Order Detail</em>'. + * @see org.gastro.business.OrderDetail + * @generated + */ + EClass getOrderDetail(); + + /** + * Returns the meta object for the container reference '{@link org.gastro.business.OrderDetail#getOrder + * <em>Order</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the container reference '<em>Order</em>'. + * @see org.gastro.business.OrderDetail#getOrder() + * @see #getOrderDetail() + * @generated + */ + EReference getOrderDetail_Order(); + + /** + * Returns the meta object for the reference '{@link org.gastro.business.OrderDetail#getOffering <em>Offering</em>}'. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the reference '<em>Offering</em>'. + * @see org.gastro.business.OrderDetail#getOffering() + * @see #getOrderDetail() + * @generated + */ + EReference getOrderDetail_Offering(); + + /** + * Returns the meta object for the attribute '{@link org.gastro.business.OrderDetail#getQuantity <em>Quantity</em>}'. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Quantity</em>'. + * @see org.gastro.business.OrderDetail#getQuantity() + * @see #getOrderDetail() + * @generated + */ + EAttribute getOrderDetail_Quantity(); + + /** + * Returns the meta object for the attribute '{@link org.gastro.business.OrderDetail#getState <em>State</em>}'. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>State</em>'. + * @see org.gastro.business.OrderDetail#getState() + * @see #getOrderDetail() + * @generated + */ + EAttribute getOrderDetail_State(); + + /** + * Returns the meta object for the attribute '{@link org.gastro.business.OrderDetail#getPrice <em>Price</em>}'. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Price</em>'. + * @see org.gastro.business.OrderDetail#getPrice() + * @see #getOrderDetail() + * @generated + */ + EAttribute getOrderDetail_Price(); + + /** + * Returns the meta object for class '{@link org.gastro.business.Waiter <em>Waiter</em>}'. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for class '<em>Waiter</em>'. + * @see org.gastro.business.Waiter + * @generated + */ + EClass getWaiter(); + + /** + * Returns the meta object for the container reference '{@link org.gastro.business.Waiter#getBusinessDay + * <em>Business Day</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the container reference '<em>Business Day</em>'. + * @see org.gastro.business.Waiter#getBusinessDay() + * @see #getWaiter() + * @generated + */ + EReference getWaiter_BusinessDay(); + + /** + * Returns the meta object for the reference list '{@link org.gastro.business.Waiter#getTables <em>Tables</em>}'. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the reference list '<em>Tables</em>'. + * @see org.gastro.business.Waiter#getTables() + * @see #getWaiter() + * @generated + */ + EReference getWaiter_Tables(); + + /** + * Returns the meta object for the reference '{@link org.gastro.business.Waiter#getEmployee <em>Employee</em>}'. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the reference '<em>Employee</em>'. + * @see org.gastro.business.Waiter#getEmployee() + * @see #getWaiter() + * @generated + */ + EReference getWaiter_Employee(); + + /** + * Returns the meta object for the attribute '{@link org.gastro.business.Waiter#getFrom <em>From</em>}'. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>From</em>'. + * @see org.gastro.business.Waiter#getFrom() + * @see #getWaiter() + * @generated + */ + EAttribute getWaiter_From(); + + /** + * Returns the meta object for the attribute '{@link org.gastro.business.Waiter#getUntil <em>Until</em>}'. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Until</em>'. + * @see org.gastro.business.Waiter#getUntil() + * @see #getWaiter() + * @generated + */ + EAttribute getWaiter_Until(); + + /** + * Returns the meta object for enum '{@link org.gastro.business.OrderState <em>Order State</em>}'. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @return the meta object for enum '<em>Order State</em>'. + * @see org.gastro.business.OrderState + * @generated + */ + EEnum getOrderState(); + + /** + * 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 + */ + BusinessFactory getBusinessFactory(); + + /** + * <!-- 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.gastro.business.impl.BusinessDayImpl <em>Day</em>}' class. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @see org.gastro.business.impl.BusinessDayImpl + * @see org.gastro.business.impl.BusinessPackageImpl#getBusinessDay() + * @generated + */ + EClass BUSINESS_DAY = eINSTANCE.getBusinessDay(); + + /** + * The meta object literal for the '<em><b>Date</b></em>' attribute feature. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + EAttribute BUSINESS_DAY__DATE = eINSTANCE.getBusinessDay_Date(); + + /** + * The meta object literal for the '<em><b>Menu Card</b></em>' reference feature. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + EReference BUSINESS_DAY__MENU_CARD = eINSTANCE.getBusinessDay_MenuCard(); + + /** + * The meta object literal for the '<em><b>Orders</b></em>' containment reference list feature. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + EReference BUSINESS_DAY__ORDERS = eINSTANCE.getBusinessDay_Orders(); + + /** + * The meta object literal for the '<em><b>Waiters</b></em>' containment reference list feature. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + EReference BUSINESS_DAY__WAITERS = eINSTANCE.getBusinessDay_Waiters(); + + /** + * The meta object literal for the '<em><b>Closed</b></em>' attribute feature. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + EAttribute BUSINESS_DAY__CLOSED = eINSTANCE.getBusinessDay_Closed(); + + /** + * The meta object literal for the '{@link org.gastro.business.impl.OrderImpl <em>Order</em>}' class. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @see org.gastro.business.impl.OrderImpl + * @see org.gastro.business.impl.BusinessPackageImpl#getOrder() + * @generated + */ + EClass ORDER = eINSTANCE.getOrder(); + + /** + * The meta object literal for the '<em><b>Business Day</b></em>' container reference feature. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + EReference ORDER__BUSINESS_DAY = eINSTANCE.getOrder_BusinessDay(); + + /** + * The meta object literal for the '<em><b>Table</b></em>' reference feature. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + EReference ORDER__TABLE = eINSTANCE.getOrder_Table(); + + /** + * The meta object literal for the '<em><b>Order Details</b></em>' containment reference list feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + EReference ORDER__ORDER_DETAILS = eINSTANCE.getOrder_OrderDetails(); + + /** + * The meta object literal for the '<em><b>Number</b></em>' attribute feature. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + EAttribute ORDER__NUMBER = eINSTANCE.getOrder_Number(); + + /** + * The meta object literal for the '{@link org.gastro.business.impl.OrderDetailImpl <em>Order Detail</em>}' class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.gastro.business.impl.OrderDetailImpl + * @see org.gastro.business.impl.BusinessPackageImpl#getOrderDetail() + * @generated + */ + EClass ORDER_DETAIL = eINSTANCE.getOrderDetail(); + + /** + * The meta object literal for the '<em><b>Order</b></em>' container reference feature. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + EReference ORDER_DETAIL__ORDER = eINSTANCE.getOrderDetail_Order(); + + /** + * The meta object literal for the '<em><b>Offering</b></em>' reference feature. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + EReference ORDER_DETAIL__OFFERING = eINSTANCE.getOrderDetail_Offering(); + + /** + * The meta object literal for the '<em><b>Quantity</b></em>' attribute feature. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + EAttribute ORDER_DETAIL__QUANTITY = eINSTANCE.getOrderDetail_Quantity(); + + /** + * The meta object literal for the '<em><b>State</b></em>' attribute feature. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + EAttribute ORDER_DETAIL__STATE = eINSTANCE.getOrderDetail_State(); + + /** + * The meta object literal for the '<em><b>Price</b></em>' attribute feature. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + EAttribute ORDER_DETAIL__PRICE = eINSTANCE.getOrderDetail_Price(); + + /** + * The meta object literal for the '{@link org.gastro.business.impl.WaiterImpl <em>Waiter</em>}' class. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @see org.gastro.business.impl.WaiterImpl + * @see org.gastro.business.impl.BusinessPackageImpl#getWaiter() + * @generated + */ + EClass WAITER = eINSTANCE.getWaiter(); + + /** + * The meta object literal for the '<em><b>Business Day</b></em>' container reference feature. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + EReference WAITER__BUSINESS_DAY = eINSTANCE.getWaiter_BusinessDay(); + + /** + * The meta object literal for the '<em><b>Tables</b></em>' reference list feature. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + EReference WAITER__TABLES = eINSTANCE.getWaiter_Tables(); + + /** + * The meta object literal for the '<em><b>Employee</b></em>' reference feature. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + EReference WAITER__EMPLOYEE = eINSTANCE.getWaiter_Employee(); + + /** + * The meta object literal for the '<em><b>From</b></em>' attribute feature. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + EAttribute WAITER__FROM = eINSTANCE.getWaiter_From(); + + /** + * The meta object literal for the '<em><b>Until</b></em>' attribute feature. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + EAttribute WAITER__UNTIL = eINSTANCE.getWaiter_Until(); + + /** + * The meta object literal for the '{@link org.gastro.business.OrderState <em>Order State</em>}' enum. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @see org.gastro.business.OrderState + * @see org.gastro.business.impl.BusinessPackageImpl#getOrderState() + * @generated + */ + EEnum ORDER_STATE = eINSTANCE.getOrderState(); + + } + +} // BusinessPackage diff --git a/plugins/org.gastro.business/src/org/gastro/business/Order.java b/plugins/org.gastro.business/src/org/gastro/business/Order.java new file mode 100644 index 0000000000..2da763af41 --- /dev/null +++ b/plugins/org.gastro.business/src/org/gastro/business/Order.java @@ -0,0 +1,140 @@ +/** + * Copyright (c) 2009 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + * + * Initial Publication: + * Eclipse Magazin - http://www.eclipse-magazin.de + */ +package org.gastro.business; + +import org.eclipse.emf.cdo.CDOObject; + +import org.eclipse.emf.common.util.EList; + +import org.gastro.inventory.Table; + +/** + * <!-- begin-user-doc --> A representation of the model object '<em><b>Order</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.gastro.business.Order#getBusinessDay <em>Business Day</em>}</li> + * <li>{@link org.gastro.business.Order#getTable <em>Table</em>}</li> + * <li>{@link org.gastro.business.Order#getOrderDetails <em>Order Details</em>}</li> + * <li>{@link org.gastro.business.Order#getNumber <em>Number</em>}</li> + * </ul> + * </p> + * + * @see org.gastro.business.BusinessPackage#getOrder() + * @model + * @extends CDOObject + * @generated + */ +public interface Order extends CDOObject +{ + /** + * Returns the value of the '<em><b>Business Day</b></em>' container reference. It is bidirectional and its opposite + * is '{@link org.gastro.business.BusinessDay#getOrders <em>Orders</em>}'. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Business Day</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>Business Day</em>' container reference. + * @see #setBusinessDay(BusinessDay) + * @see org.gastro.business.BusinessPackage#getOrder_BusinessDay() + * @see org.gastro.business.BusinessDay#getOrders + * @model opposite="orders" required="true" transient="false" + * @generated + */ + BusinessDay getBusinessDay(); + + /** + * Sets the value of the '{@link org.gastro.business.Order#getBusinessDay <em>Business Day</em>}' container reference. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Business Day</em>' container reference. + * @see #getBusinessDay() + * @generated + */ + void setBusinessDay(BusinessDay value); + + /** + * Returns the value of the '<em><b>Table</b></em>' reference. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Table</em>' reference isn't clear, there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Table</em>' reference. + * @see #setTable(Table) + * @see org.gastro.business.BusinessPackage#getOrder_Table() + * @model required="true" + * @generated + */ + Table getTable(); + + /** + * Sets the value of the '{@link org.gastro.business.Order#getTable <em>Table</em>}' reference. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Table</em>' reference. + * @see #getTable() + * @generated + */ + void setTable(Table value); + + /** + * Returns the value of the '<em><b>Order Details</b></em>' containment reference list. The list contents are of type + * {@link org.gastro.business.OrderDetail}. It is bidirectional and its opposite is ' + * {@link org.gastro.business.OrderDetail#getOrder <em>Order</em>}'. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Order Details</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>Order Details</em>' containment reference list. + * @see org.gastro.business.BusinessPackage#getOrder_OrderDetails() + * @see org.gastro.business.OrderDetail#getOrder + * @model opposite="order" containment="true" required="true" + * @generated + */ + EList<OrderDetail> getOrderDetails(); + + /** + * Returns the value of the '<em><b>Number</b></em>' attribute. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Number</em>' attribute isn't clear, there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Number</em>' attribute. + * @see #setNumber(int) + * @see org.gastro.business.BusinessPackage#getOrder_Number() + * @model + * @generated + */ + int getNumber(); + + /** + * Sets the value of the '{@link org.gastro.business.Order#getNumber <em>Number</em>}' attribute. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Number</em>' attribute. + * @see #getNumber() + * @generated + */ + void setNumber(int value); + +} // Order diff --git a/plugins/org.gastro.business/src/org/gastro/business/OrderDetail.java b/plugins/org.gastro.business/src/org/gastro/business/OrderDetail.java new file mode 100644 index 0000000000..1cf4c33730 --- /dev/null +++ b/plugins/org.gastro.business/src/org/gastro/business/OrderDetail.java @@ -0,0 +1,166 @@ +/** + * Copyright (c) 2009 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + * + * Initial Publication: + * Eclipse Magazin - http://www.eclipse-magazin.de + */ +package org.gastro.business; + +import org.eclipse.emf.cdo.CDOObject; + +import org.gastro.inventory.Offering; + +/** + * <!-- begin-user-doc --> A representation of the model object '<em><b>Order Detail</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.gastro.business.OrderDetail#getOrder <em>Order</em>}</li> + * <li>{@link org.gastro.business.OrderDetail#getOffering <em>Offering</em>}</li> + * <li>{@link org.gastro.business.OrderDetail#getQuantity <em>Quantity</em>}</li> + * <li>{@link org.gastro.business.OrderDetail#getState <em>State</em>}</li> + * <li>{@link org.gastro.business.OrderDetail#getPrice <em>Price</em>}</li> + * </ul> + * </p> + * + * @see org.gastro.business.BusinessPackage#getOrderDetail() + * @model + * @extends CDOObject + * @generated + */ +public interface OrderDetail extends CDOObject +{ + /** + * Returns the value of the '<em><b>Order</b></em>' container reference. It is bidirectional and its opposite is ' + * {@link org.gastro.business.Order#getOrderDetails <em>Order Details</em>}'. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Order</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>Order</em>' container reference. + * @see #setOrder(Order) + * @see org.gastro.business.BusinessPackage#getOrderDetail_Order() + * @see org.gastro.business.Order#getOrderDetails + * @model opposite="orderDetails" required="true" transient="false" + * @generated + */ + Order getOrder(); + + /** + * Sets the value of the '{@link org.gastro.business.OrderDetail#getOrder <em>Order</em>}' container reference. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Order</em>' container reference. + * @see #getOrder() + * @generated + */ + void setOrder(Order value); + + /** + * Returns the value of the '<em><b>Offering</b></em>' reference. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Offering</em>' reference isn't clear, there really should be more of a description + * here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Offering</em>' reference. + * @see #setOffering(Offering) + * @see org.gastro.business.BusinessPackage#getOrderDetail_Offering() + * @model required="true" + * @generated + */ + Offering getOffering(); + + /** + * Sets the value of the '{@link org.gastro.business.OrderDetail#getOffering <em>Offering</em>}' reference. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Offering</em>' reference. + * @see #getOffering() + * @generated + */ + void setOffering(Offering value); + + /** + * Returns the value of the '<em><b>Quantity</b></em>' attribute. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Quantity</em>' attribute isn't clear, there really should be more of a description + * here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Quantity</em>' attribute. + * @see #setQuantity(int) + * @see org.gastro.business.BusinessPackage#getOrderDetail_Quantity() + * @model + * @generated + */ + int getQuantity(); + + /** + * Sets the value of the '{@link org.gastro.business.OrderDetail#getQuantity <em>Quantity</em>}' attribute. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Quantity</em>' attribute. + * @see #getQuantity() + * @generated + */ + void setQuantity(int value); + + /** + * Returns the value of the '<em><b>State</b></em>' attribute. The literals are from the enumeration + * {@link org.gastro.business.OrderState}. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>State</em>' attribute isn't clear, there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>State</em>' attribute. + * @see org.gastro.business.OrderState + * @see #setState(OrderState) + * @see org.gastro.business.BusinessPackage#getOrderDetail_State() + * @model + * @generated + */ + OrderState getState(); + + /** + * Sets the value of the '{@link org.gastro.business.OrderDetail#getState <em>State</em>}' attribute. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>State</em>' attribute. + * @see org.gastro.business.OrderState + * @see #getState() + * @generated + */ + void setState(OrderState value); + + /** + * Returns the value of the '<em><b>Price</b></em>' attribute. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Price</em>' attribute isn't clear, there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Price</em>' attribute. + * @see org.gastro.business.BusinessPackage#getOrderDetail_Price() + * @model transient="true" changeable="false" volatile="true" derived="true" + * @generated + */ + float getPrice(); + +} // OrderDetail diff --git a/plugins/org.gastro.business/src/org/gastro/business/OrderState.java b/plugins/org.gastro.business/src/org/gastro/business/OrderState.java new file mode 100644 index 0000000000..68982612e3 --- /dev/null +++ b/plugins/org.gastro.business/src/org/gastro/business/OrderState.java @@ -0,0 +1,304 @@ +/** + * Copyright (c) 2009 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + * + * Initial Publication: + * Eclipse Magazin - http://www.eclipse-magazin.de + */ +package org.gastro.business; + +import org.eclipse.emf.common.util.Enumerator; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +/** + * <!-- begin-user-doc --> A representation of the literals of the enumeration '<em><b>Order State</b></em>', and + * utility methods for working with them. <!-- end-user-doc --> + * + * @see org.gastro.business.BusinessPackage#getOrderState() + * @model + * @generated + */ +public enum OrderState implements Enumerator +{ + /** + * The '<em><b>Ordered</b></em>' literal object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see #ORDERED_VALUE + * @generated + * @ordered + */ + ORDERED(0, "Ordered", "Ordered"), + + /** + * The '<em><b>Acknowledged</b></em>' literal object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see #ACKNOWLEDGED_VALUE + * @generated + * @ordered + */ + ACKNOWLEDGED(2, "Acknowledged", "Acknowledged"), + + /** + * The '<em><b>Prepared</b></em>' literal object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see #PREPARED_VALUE + * @generated + * @ordered + */ + PREPARED(1, "Prepared", "Prepared"), + + /** + * The '<em><b>Served</b></em>' literal object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see #SERVED_VALUE + * @generated + * @ordered + */ + SERVED(3, "Served", "Served"), + + /** + * The '<em><b>Paid</b></em>' literal object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see #PAID_VALUE + * @generated + * @ordered + */ + PAID(4, "Paid", "Paid"); + + /** + * The '<em><b>Ordered</b></em>' literal value. <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>Ordered</b></em>' literal object isn't clear, there really should be more of a + * description here... + * </p> + * <!-- end-user-doc --> + * + * @see #ORDERED + * @model name="Ordered" + * @generated + * @ordered + */ + public static final int ORDERED_VALUE = 0; + + /** + * The '<em><b>Acknowledged</b></em>' literal value. <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>Acknowledged</b></em>' literal object isn't clear, there really should be more of a + * description here... + * </p> + * <!-- end-user-doc --> + * + * @see #ACKNOWLEDGED + * @model name="Acknowledged" + * @generated + * @ordered + */ + public static final int ACKNOWLEDGED_VALUE = 2; + + /** + * The '<em><b>Prepared</b></em>' literal value. <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>Prepared</b></em>' literal object isn't clear, there really should be more of a + * description here... + * </p> + * <!-- end-user-doc --> + * + * @see #PREPARED + * @model name="Prepared" + * @generated + * @ordered + */ + public static final int PREPARED_VALUE = 1; + + /** + * The '<em><b>Served</b></em>' literal value. <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>Served</b></em>' literal object isn't clear, there really should be more of a description + * here... + * </p> + * <!-- end-user-doc --> + * + * @see #SERVED + * @model name="Served" + * @generated + * @ordered + */ + public static final int SERVED_VALUE = 3; + + /** + * The '<em><b>Paid</b></em>' literal value. <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>Paid</b></em>' literal object isn't clear, there really should be more of a description + * here... + * </p> + * <!-- end-user-doc --> + * + * @see #PAID + * @model name="Paid" + * @generated + * @ordered + */ + public static final int PAID_VALUE = 4; + + /** + * An array of all the '<em><b>Order State</b></em>' enumerators. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private static final OrderState[] VALUES_ARRAY = new OrderState[] { ORDERED, ACKNOWLEDGED, PREPARED, SERVED, PAID, }; + + /** + * A public read-only list of all the '<em><b>Order State</b></em>' enumerators. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + public static final List<OrderState> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the '<em><b>Order State</b></em>' literal with the specified literal value. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + public static OrderState get(String literal) + { + for (int i = 0; i < VALUES_ARRAY.length; ++i) + { + OrderState result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) + { + return result; + } + } + return null; + } + + /** + * Returns the '<em><b>Order State</b></em>' literal with the specified name. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + public static OrderState getByName(String name) + { + for (int i = 0; i < VALUES_ARRAY.length; ++i) + { + OrderState result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) + { + return result; + } + } + return null; + } + + /** + * Returns the '<em><b>Order State</b></em>' literal with the specified integer value. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + public static OrderState get(int value) + { + switch (value) + { + case ORDERED_VALUE: + return ORDERED; + case ACKNOWLEDGED_VALUE: + return ACKNOWLEDGED; + case PREPARED_VALUE: + return PREPARED; + case SERVED_VALUE: + return SERVED; + case PAID_VALUE: + return PAID; + } + 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 OrderState(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; + } + +} // OrderState diff --git a/plugins/org.gastro.business/src/org/gastro/business/Waiter.java b/plugins/org.gastro.business/src/org/gastro/business/Waiter.java new file mode 100644 index 0000000000..17b82daf47 --- /dev/null +++ b/plugins/org.gastro.business/src/org/gastro/business/Waiter.java @@ -0,0 +1,169 @@ +/** + * Copyright (c) 2009 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + * + * Initial Publication: + * Eclipse Magazin - http://www.eclipse-magazin.de + */ +package org.gastro.business; + +import org.eclipse.emf.cdo.CDOObject; + +import org.eclipse.emf.common.util.EList; + +import org.gastro.inventory.Employee; +import org.gastro.inventory.Table; + +import java.util.Date; + +/** + * <!-- begin-user-doc --> A representation of the model object '<em><b>Waiter</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.gastro.business.Waiter#getBusinessDay <em>Business Day</em>}</li> + * <li>{@link org.gastro.business.Waiter#getTables <em>Tables</em>}</li> + * <li>{@link org.gastro.business.Waiter#getEmployee <em>Employee</em>}</li> + * <li>{@link org.gastro.business.Waiter#getFrom <em>From</em>}</li> + * <li>{@link org.gastro.business.Waiter#getUntil <em>Until</em>}</li> + * </ul> + * </p> + * + * @see org.gastro.business.BusinessPackage#getWaiter() + * @model + * @extends CDOObject + * @generated + */ +public interface Waiter extends CDOObject +{ + /** + * Returns the value of the '<em><b>Business Day</b></em>' container reference. It is bidirectional and its opposite + * is '{@link org.gastro.business.BusinessDay#getWaiters <em>Waiters</em>}'. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Business Day</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>Business Day</em>' container reference. + * @see #setBusinessDay(BusinessDay) + * @see org.gastro.business.BusinessPackage#getWaiter_BusinessDay() + * @see org.gastro.business.BusinessDay#getWaiters + * @model opposite="waiters" transient="false" + * @generated + */ + BusinessDay getBusinessDay(); + + /** + * Sets the value of the '{@link org.gastro.business.Waiter#getBusinessDay <em>Business Day</em>}' container + * reference. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Business Day</em>' container reference. + * @see #getBusinessDay() + * @generated + */ + void setBusinessDay(BusinessDay value); + + /** + * Returns the value of the '<em><b>Tables</b></em>' reference list. The list contents are of type + * {@link org.gastro.inventory.Table}. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Tables</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>Tables</em>' reference list. + * @see org.gastro.business.BusinessPackage#getWaiter_Tables() + * @model + * @generated + */ + EList<Table> getTables(); + + /** + * Returns the value of the '<em><b>Employee</b></em>' reference. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Employee</em>' reference isn't clear, there really should be more of a description + * here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Employee</em>' reference. + * @see #setEmployee(Employee) + * @see org.gastro.business.BusinessPackage#getWaiter_Employee() + * @model required="true" + * @generated + */ + Employee getEmployee(); + + /** + * Sets the value of the '{@link org.gastro.business.Waiter#getEmployee <em>Employee</em>}' reference. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Employee</em>' reference. + * @see #getEmployee() + * @generated + */ + void setEmployee(Employee value); + + /** + * Returns the value of the '<em><b>From</b></em>' attribute. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>From</em>' attribute isn't clear, there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>From</em>' attribute. + * @see #setFrom(Date) + * @see org.gastro.business.BusinessPackage#getWaiter_From() + * @model + * @generated + */ + Date getFrom(); + + /** + * Sets the value of the '{@link org.gastro.business.Waiter#getFrom <em>From</em>}' attribute. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>From</em>' attribute. + * @see #getFrom() + * @generated + */ + void setFrom(Date value); + + /** + * Returns the value of the '<em><b>Until</b></em>' attribute. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Until</em>' attribute isn't clear, there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Until</em>' attribute. + * @see #setUntil(Date) + * @see org.gastro.business.BusinessPackage#getWaiter_Until() + * @model + * @generated + */ + Date getUntil(); + + /** + * Sets the value of the '{@link org.gastro.business.Waiter#getUntil <em>Until</em>}' attribute. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Until</em>' attribute. + * @see #getUntil() + * @generated + */ + void setUntil(Date value); + +} // Waiter diff --git a/plugins/org.gastro.business/src/org/gastro/business/impl/BusinessDayImpl.java b/plugins/org.gastro.business/src/org/gastro/business/impl/BusinessDayImpl.java new file mode 100644 index 0000000000..e7c548cdf9 --- /dev/null +++ b/plugins/org.gastro.business/src/org/gastro/business/impl/BusinessDayImpl.java @@ -0,0 +1,160 @@ +/** + * Copyright (c) 2009 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + * + * Initial Publication: + * Eclipse Magazin - http://www.eclipse-magazin.de + */ +package org.gastro.business.impl; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.gastro.business.BusinessDay; +import org.gastro.business.BusinessPackage; +import org.gastro.business.Order; +import org.gastro.business.Waiter; +import org.gastro.inventory.MenuCard; + +import java.util.Date; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Day</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.gastro.business.impl.BusinessDayImpl#getDate <em>Date</em>}</li> + * <li>{@link org.gastro.business.impl.BusinessDayImpl#getMenuCard <em>Menu Card</em>}</li> + * <li>{@link org.gastro.business.impl.BusinessDayImpl#getOrders <em>Orders</em>}</li> + * <li>{@link org.gastro.business.impl.BusinessDayImpl#getWaiters <em>Waiters</em>}</li> + * <li>{@link org.gastro.business.impl.BusinessDayImpl#isClosed <em>Closed</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class BusinessDayImpl extends CDOObjectImpl implements BusinessDay +{ + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected BusinessDayImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return BusinessPackage.Literals.BUSINESS_DAY; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public Date getDate() + { + return (Date)eGet(BusinessPackage.Literals.BUSINESS_DAY__DATE, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void setDate(Date newDate) + { + eSet(BusinessPackage.Literals.BUSINESS_DAY__DATE, newDate); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public MenuCard getMenuCard() + { + return (MenuCard)eGet(BusinessPackage.Literals.BUSINESS_DAY__MENU_CARD, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void setMenuCard(MenuCard newMenuCard) + { + eSet(BusinessPackage.Literals.BUSINESS_DAY__MENU_CARD, newMenuCard); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @SuppressWarnings("unchecked") + public EList<Order> getOrders() + { + return (EList<Order>)eGet(BusinessPackage.Literals.BUSINESS_DAY__ORDERS, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @SuppressWarnings("unchecked") + public EList<Waiter> getWaiters() + { + return (EList<Waiter>)eGet(BusinessPackage.Literals.BUSINESS_DAY__WAITERS, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public boolean isClosed() + { + return (Boolean)eGet(BusinessPackage.Literals.BUSINESS_DAY__CLOSED, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void setClosed(boolean newClosed) + { + eSet(BusinessPackage.Literals.BUSINESS_DAY__CLOSED, newClosed); + } + +} // BusinessDayImpl diff --git a/plugins/org.gastro.business/src/org/gastro/business/impl/BusinessFactoryImpl.java b/plugins/org.gastro.business/src/org/gastro/business/impl/BusinessFactoryImpl.java new file mode 100644 index 0000000000..2e492a81ce --- /dev/null +++ b/plugins/org.gastro.business/src/org/gastro/business/impl/BusinessFactoryImpl.java @@ -0,0 +1,218 @@ +/** + * Copyright (c) 2009 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + * + * Initial Publication: + * Eclipse Magazin - http://www.eclipse-magazin.de + */ +package org.gastro.business.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.gastro.business.BusinessDay; +import org.gastro.business.BusinessFactory; +import org.gastro.business.BusinessPackage; +import org.gastro.business.Order; +import org.gastro.business.OrderDetail; +import org.gastro.business.OrderState; +import org.gastro.business.Waiter; + +/** + * <!-- begin-user-doc --> An implementation of the model <b>Factory</b>. <!-- end-user-doc --> + * + * @generated + */ +public class BusinessFactoryImpl extends EFactoryImpl implements BusinessFactory +{ + /** + * Creates the default factory implementation. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public static BusinessFactory init() + { + try + { + BusinessFactory theBusinessFactory = (BusinessFactory)EPackage.Registry.INSTANCE + .getEFactory("http://www.gastro.org/business/1.0"); + if (theBusinessFactory != null) + { + return theBusinessFactory; + } + } + catch (Exception exception) + { + EcorePlugin.INSTANCE.log(exception); + } + return new BusinessFactoryImpl(); + } + + /** + * Creates an instance of the factory. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public BusinessFactoryImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EObject create(EClass eClass) + { + switch (eClass.getClassifierID()) + { + case BusinessPackage.BUSINESS_DAY: + return (EObject)createBusinessDay(); + case BusinessPackage.ORDER: + return (EObject)createOrder(); + case BusinessPackage.ORDER_DETAIL: + return (EObject)createOrderDetail(); + case BusinessPackage.WAITER: + return (EObject)createWaiter(); + 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 BusinessPackage.ORDER_STATE: + return createOrderStateFromString(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 BusinessPackage.ORDER_STATE: + return convertOrderStateToString(eDataType, instanceValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public BusinessDay createBusinessDay() + { + BusinessDayImpl businessDay = new BusinessDayImpl(); + return businessDay; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public Order createOrder() + { + OrderImpl order = new OrderImpl(); + return order; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public OrderDetail createOrderDetail() + { + OrderDetailImpl orderDetail = new OrderDetailImpl(); + return orderDetail; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public Waiter createWaiter() + { + WaiterImpl waiter = new WaiterImpl(); + return waiter; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public OrderState createOrderStateFromString(EDataType eDataType, String initialValue) + { + OrderState result = OrderState.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 convertOrderStateToString(EDataType eDataType, Object instanceValue) + { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public BusinessPackage getBusinessPackage() + { + return (BusinessPackage)getEPackage(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @deprecated + * @generated + */ + @Deprecated + public static BusinessPackage getPackage() + { + return BusinessPackage.eINSTANCE; + } + +} // BusinessFactoryImpl diff --git a/plugins/org.gastro.business/src/org/gastro/business/impl/BusinessPackageImpl.java b/plugins/org.gastro.business/src/org/gastro/business/impl/BusinessPackageImpl.java new file mode 100644 index 0000000000..cbf367d168 --- /dev/null +++ b/plugins/org.gastro.business/src/org/gastro/business/impl/BusinessPackageImpl.java @@ -0,0 +1,551 @@ +/** + * Copyright (c) 2009 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + * + * Initial Publication: + * Eclipse Magazin - http://www.eclipse-magazin.de + */ +package org.gastro.business.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.gastro.business.BusinessDay; +import org.gastro.business.BusinessFactory; +import org.gastro.business.BusinessPackage; +import org.gastro.business.Order; +import org.gastro.business.OrderDetail; +import org.gastro.business.OrderState; +import org.gastro.business.Waiter; +import org.gastro.inventory.InventoryPackage; + +/** + * <!-- begin-user-doc --> An implementation of the model <b>Package</b>. <!-- end-user-doc --> + * + * @generated + */ +public class BusinessPackageImpl extends EPackageImpl implements BusinessPackage +{ + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private EClass businessDayEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private EClass orderEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private EClass orderDetailEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private EClass waiterEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private EEnum orderStateEEnum = 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.gastro.business.BusinessPackage#eNS_URI + * @see #init() + * @generated + */ + private BusinessPackageImpl() + { + super(eNS_URI, BusinessFactory.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 BusinessPackage init() + { + if (isInited) + return (BusinessPackage)EPackage.Registry.INSTANCE.getEPackage(BusinessPackage.eNS_URI); + + // Obtain or create and register package + BusinessPackageImpl theBusinessPackage = (BusinessPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof BusinessPackageImpl ? EPackage.Registry.INSTANCE + .getEPackage(eNS_URI) + : new BusinessPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + InventoryPackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theBusinessPackage.createPackageContents(); + + // Initialize created meta-data + theBusinessPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theBusinessPackage.freeze(); + + return theBusinessPackage; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EClass getBusinessDay() + { + return businessDayEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EAttribute getBusinessDay_Date() + { + return (EAttribute)businessDayEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EReference getBusinessDay_MenuCard() + { + return (EReference)businessDayEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EReference getBusinessDay_Orders() + { + return (EReference)businessDayEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EReference getBusinessDay_Waiters() + { + return (EReference)businessDayEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EAttribute getBusinessDay_Closed() + { + return (EAttribute)businessDayEClass.getEStructuralFeatures().get(4); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EClass getOrder() + { + return orderEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EReference getOrder_BusinessDay() + { + return (EReference)orderEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EReference getOrder_Table() + { + return (EReference)orderEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EReference getOrder_OrderDetails() + { + return (EReference)orderEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EAttribute getOrder_Number() + { + return (EAttribute)orderEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EClass getOrderDetail() + { + return orderDetailEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EReference getOrderDetail_Order() + { + return (EReference)orderDetailEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EReference getOrderDetail_Offering() + { + return (EReference)orderDetailEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EAttribute getOrderDetail_Quantity() + { + return (EAttribute)orderDetailEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EAttribute getOrderDetail_State() + { + return (EAttribute)orderDetailEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EAttribute getOrderDetail_Price() + { + return (EAttribute)orderDetailEClass.getEStructuralFeatures().get(4); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EClass getWaiter() + { + return waiterEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EReference getWaiter_BusinessDay() + { + return (EReference)waiterEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EReference getWaiter_Tables() + { + return (EReference)waiterEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EReference getWaiter_Employee() + { + return (EReference)waiterEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EAttribute getWaiter_From() + { + return (EAttribute)waiterEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EAttribute getWaiter_Until() + { + return (EAttribute)waiterEClass.getEStructuralFeatures().get(4); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EEnum getOrderState() + { + return orderStateEEnum; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public BusinessFactory getBusinessFactory() + { + return (BusinessFactory)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 + businessDayEClass = createEClass(BUSINESS_DAY); + createEAttribute(businessDayEClass, BUSINESS_DAY__DATE); + createEReference(businessDayEClass, BUSINESS_DAY__MENU_CARD); + createEReference(businessDayEClass, BUSINESS_DAY__ORDERS); + createEReference(businessDayEClass, BUSINESS_DAY__WAITERS); + createEAttribute(businessDayEClass, BUSINESS_DAY__CLOSED); + + orderEClass = createEClass(ORDER); + createEReference(orderEClass, ORDER__BUSINESS_DAY); + createEReference(orderEClass, ORDER__TABLE); + createEReference(orderEClass, ORDER__ORDER_DETAILS); + createEAttribute(orderEClass, ORDER__NUMBER); + + orderDetailEClass = createEClass(ORDER_DETAIL); + createEReference(orderDetailEClass, ORDER_DETAIL__ORDER); + createEReference(orderDetailEClass, ORDER_DETAIL__OFFERING); + createEAttribute(orderDetailEClass, ORDER_DETAIL__QUANTITY); + createEAttribute(orderDetailEClass, ORDER_DETAIL__STATE); + createEAttribute(orderDetailEClass, ORDER_DETAIL__PRICE); + + waiterEClass = createEClass(WAITER); + createEReference(waiterEClass, WAITER__BUSINESS_DAY); + createEReference(waiterEClass, WAITER__TABLES); + createEReference(waiterEClass, WAITER__EMPLOYEE); + createEAttribute(waiterEClass, WAITER__FROM); + createEAttribute(waiterEClass, WAITER__UNTIL); + + // Create enums + orderStateEEnum = createEEnum(ORDER_STATE); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This method is guarded to have no affect on any + * invocation but its first. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void initializePackageContents() + { + if (isInitialized) + return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + InventoryPackage theInventoryPackage = (InventoryPackage)EPackage.Registry.INSTANCE + .getEPackage(InventoryPackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + + // Initialize classes and features; add operations and parameters + initEClass(businessDayEClass, BusinessDay.class, "BusinessDay", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getBusinessDay_Date(), ecorePackage.getEDate(), "date", null, 0, 1, BusinessDay.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getBusinessDay_MenuCard(), theInventoryPackage.getMenuCard(), null, "menuCard", null, 1, 1, + BusinessDay.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getBusinessDay_Orders(), this.getOrder(), this.getOrder_BusinessDay(), "orders", null, 0, -1, + BusinessDay.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getBusinessDay_Waiters(), this.getWaiter(), this.getWaiter_BusinessDay(), "waiters", null, 1, -1, + BusinessDay.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getBusinessDay_Closed(), ecorePackage.getEBoolean(), "closed", null, 0, 1, BusinessDay.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(orderEClass, Order.class, "Order", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getOrder_BusinessDay(), this.getBusinessDay(), this.getBusinessDay_Orders(), "businessDay", null, 1, + 1, Order.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getOrder_Table(), theInventoryPackage.getTable(), null, "table", null, 1, 1, Order.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + initEReference(getOrder_OrderDetails(), this.getOrderDetail(), this.getOrderDetail_Order(), "orderDetails", null, + 1, -1, Order.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getOrder_Number(), ecorePackage.getEInt(), "number", null, 0, 1, Order.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(orderDetailEClass, OrderDetail.class, "OrderDetail", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEReference(getOrderDetail_Order(), this.getOrder(), this.getOrder_OrderDetails(), "order", null, 1, 1, + OrderDetail.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getOrderDetail_Offering(), theInventoryPackage.getOffering(), null, "offering", null, 1, 1, + OrderDetail.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getOrderDetail_Quantity(), ecorePackage.getEInt(), "quantity", null, 0, 1, OrderDetail.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getOrderDetail_State(), this.getOrderState(), "state", null, 0, 1, OrderDetail.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getOrderDetail_Price(), ecorePackage.getEFloat(), "price", null, 0, 1, OrderDetail.class, + IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED); + + initEClass(waiterEClass, Waiter.class, "Waiter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getWaiter_BusinessDay(), this.getBusinessDay(), this.getBusinessDay_Waiters(), "businessDay", null, + 0, 1, Waiter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getWaiter_Tables(), theInventoryPackage.getTable(), null, "tables", null, 0, -1, Waiter.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + initEReference(getWaiter_Employee(), theInventoryPackage.getEmployee(), null, "employee", null, 1, 1, Waiter.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + initEAttribute(getWaiter_From(), ecorePackage.getEDate(), "from", null, 0, 1, Waiter.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getWaiter_Until(), ecorePackage.getEDate(), "until", null, 0, 1, Waiter.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Initialize enums and add enum literals + initEEnum(orderStateEEnum, OrderState.class, "OrderState"); + addEEnumLiteral(orderStateEEnum, OrderState.ORDERED); + addEEnumLiteral(orderStateEEnum, OrderState.ACKNOWLEDGED); + addEEnumLiteral(orderStateEEnum, OrderState.PREPARED); + addEEnumLiteral(orderStateEEnum, OrderState.SERVED); + addEEnumLiteral(orderStateEEnum, OrderState.PAID); + + // Create resource + createResource(eNS_URI); + } + +} // BusinessPackageImpl diff --git a/plugins/org.gastro.business/src/org/gastro/business/impl/OrderDetailImpl.java b/plugins/org.gastro.business/src/org/gastro/business/impl/OrderDetailImpl.java new file mode 100644 index 0000000000..a583338b14 --- /dev/null +++ b/plugins/org.gastro.business/src/org/gastro/business/impl/OrderDetailImpl.java @@ -0,0 +1,170 @@ +/** + * Copyright (c) 2009 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + * + * Initial Publication: + * Eclipse Magazin - http://www.eclipse-magazin.de + */ +package org.gastro.business.impl; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +import org.eclipse.emf.ecore.EClass; + +import org.gastro.business.BusinessPackage; +import org.gastro.business.Order; +import org.gastro.business.OrderDetail; +import org.gastro.business.OrderState; +import org.gastro.inventory.Offering; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Order Detail</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.gastro.business.impl.OrderDetailImpl#getOrder <em>Order</em>}</li> + * <li>{@link org.gastro.business.impl.OrderDetailImpl#getOffering <em>Offering</em>}</li> + * <li>{@link org.gastro.business.impl.OrderDetailImpl#getQuantity <em>Quantity</em>}</li> + * <li>{@link org.gastro.business.impl.OrderDetailImpl#getState <em>State</em>}</li> + * <li>{@link org.gastro.business.impl.OrderDetailImpl#getPrice <em>Price</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class OrderDetailImpl extends CDOObjectImpl implements OrderDetail +{ + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected OrderDetailImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return BusinessPackage.Literals.ORDER_DETAIL; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public Order getOrder() + { + return (Order)eGet(BusinessPackage.Literals.ORDER_DETAIL__ORDER, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void setOrder(Order newOrder) + { + eSet(BusinessPackage.Literals.ORDER_DETAIL__ORDER, newOrder); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public Offering getOffering() + { + return (Offering)eGet(BusinessPackage.Literals.ORDER_DETAIL__OFFERING, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void setOffering(Offering newOffering) + { + eSet(BusinessPackage.Literals.ORDER_DETAIL__OFFERING, newOffering); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public int getQuantity() + { + return (Integer)eGet(BusinessPackage.Literals.ORDER_DETAIL__QUANTITY, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void setQuantity(int newQuantity) + { + eSet(BusinessPackage.Literals.ORDER_DETAIL__QUANTITY, newQuantity); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public OrderState getState() + { + return (OrderState)eGet(BusinessPackage.Literals.ORDER_DETAIL__STATE, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void setState(OrderState newState) + { + eSet(BusinessPackage.Literals.ORDER_DETAIL__STATE, newState); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated NOT + */ + public float getPrice() + { + Offering offering = getOffering(); + if (offering != null) + { + return offering.getPrice() * getQuantity(); + } + + return 0f; + } +} // OrderDetailImpl diff --git a/plugins/org.gastro.business/src/org/gastro/business/impl/OrderImpl.java b/plugins/org.gastro.business/src/org/gastro/business/impl/OrderImpl.java new file mode 100644 index 0000000000..68f646a48d --- /dev/null +++ b/plugins/org.gastro.business/src/org/gastro/business/impl/OrderImpl.java @@ -0,0 +1,146 @@ +/** + * Copyright (c) 2009 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + * + * Initial Publication: + * Eclipse Magazin - http://www.eclipse-magazin.de + */ +package org.gastro.business.impl; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.gastro.business.BusinessDay; +import org.gastro.business.BusinessPackage; +import org.gastro.business.Order; +import org.gastro.business.OrderDetail; +import org.gastro.inventory.Table; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Order</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.gastro.business.impl.OrderImpl#getBusinessDay <em>Business Day</em>}</li> + * <li>{@link org.gastro.business.impl.OrderImpl#getTable <em>Table</em>}</li> + * <li>{@link org.gastro.business.impl.OrderImpl#getOrderDetails <em>Order Details</em>}</li> + * <li>{@link org.gastro.business.impl.OrderImpl#getNumber <em>Number</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class OrderImpl extends CDOObjectImpl implements Order +{ + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected OrderImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return BusinessPackage.Literals.ORDER; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public BusinessDay getBusinessDay() + { + return (BusinessDay)eGet(BusinessPackage.Literals.ORDER__BUSINESS_DAY, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void setBusinessDay(BusinessDay newBusinessDay) + { + eSet(BusinessPackage.Literals.ORDER__BUSINESS_DAY, newBusinessDay); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public Table getTable() + { + return (Table)eGet(BusinessPackage.Literals.ORDER__TABLE, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void setTable(Table newTable) + { + eSet(BusinessPackage.Literals.ORDER__TABLE, newTable); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @SuppressWarnings("unchecked") + public EList<OrderDetail> getOrderDetails() + { + return (EList<OrderDetail>)eGet(BusinessPackage.Literals.ORDER__ORDER_DETAILS, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public int getNumber() + { + return (Integer)eGet(BusinessPackage.Literals.ORDER__NUMBER, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void setNumber(int newNumber) + { + eSet(BusinessPackage.Literals.ORDER__NUMBER, newNumber); + } + +} // OrderImpl diff --git a/plugins/org.gastro.business/src/org/gastro/business/impl/WaiterImpl.java b/plugins/org.gastro.business/src/org/gastro/business/impl/WaiterImpl.java new file mode 100644 index 0000000000..475c3c942f --- /dev/null +++ b/plugins/org.gastro.business/src/org/gastro/business/impl/WaiterImpl.java @@ -0,0 +1,169 @@ +/** + * Copyright (c) 2009 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + * + * Initial Publication: + * Eclipse Magazin - http://www.eclipse-magazin.de + */ +package org.gastro.business.impl; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.gastro.business.BusinessDay; +import org.gastro.business.BusinessPackage; +import org.gastro.business.Waiter; +import org.gastro.inventory.Employee; +import org.gastro.inventory.Table; + +import java.util.Date; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Waiter</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.gastro.business.impl.WaiterImpl#getBusinessDay <em>Business Day</em>}</li> + * <li>{@link org.gastro.business.impl.WaiterImpl#getTables <em>Tables</em>}</li> + * <li>{@link org.gastro.business.impl.WaiterImpl#getEmployee <em>Employee</em>}</li> + * <li>{@link org.gastro.business.impl.WaiterImpl#getFrom <em>From</em>}</li> + * <li>{@link org.gastro.business.impl.WaiterImpl#getUntil <em>Until</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class WaiterImpl extends CDOObjectImpl implements Waiter +{ + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected WaiterImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return BusinessPackage.Literals.WAITER; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public BusinessDay getBusinessDay() + { + return (BusinessDay)eGet(BusinessPackage.Literals.WAITER__BUSINESS_DAY, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void setBusinessDay(BusinessDay newBusinessDay) + { + eSet(BusinessPackage.Literals.WAITER__BUSINESS_DAY, newBusinessDay); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @SuppressWarnings("unchecked") + public EList<Table> getTables() + { + return (EList<Table>)eGet(BusinessPackage.Literals.WAITER__TABLES, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public Employee getEmployee() + { + return (Employee)eGet(BusinessPackage.Literals.WAITER__EMPLOYEE, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void setEmployee(Employee newEmployee) + { + eSet(BusinessPackage.Literals.WAITER__EMPLOYEE, newEmployee); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public Date getFrom() + { + return (Date)eGet(BusinessPackage.Literals.WAITER__FROM, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void setFrom(Date newFrom) + { + eSet(BusinessPackage.Literals.WAITER__FROM, newFrom); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public Date getUntil() + { + return (Date)eGet(BusinessPackage.Literals.WAITER__UNTIL, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void setUntil(Date newUntil) + { + eSet(BusinessPackage.Literals.WAITER__UNTIL, newUntil); + } + +} // WaiterImpl diff --git a/plugins/org.gastro.business/src/org/gastro/business/util/BusinessAdapterFactory.java b/plugins/org.gastro.business/src/org/gastro/business/util/BusinessAdapterFactory.java new file mode 100644 index 0000000000..d412270355 --- /dev/null +++ b/plugins/org.gastro.business/src/org/gastro/business/util/BusinessAdapterFactory.java @@ -0,0 +1,198 @@ +/** + * Copyright (c) 2009 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + * + * Initial Publication: + * Eclipse Magazin - http://www.eclipse-magazin.de + */ +package org.gastro.business.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.gastro.business.BusinessDay; +import org.gastro.business.BusinessPackage; +import org.gastro.business.Order; +import org.gastro.business.OrderDetail; +import org.gastro.business.Waiter; + +/** + * <!-- 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.gastro.business.BusinessPackage + * @generated + */ +public class BusinessAdapterFactory extends AdapterFactoryImpl +{ + /** + * The cached model package. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected static BusinessPackage modelPackage; + + /** + * Creates an instance of the adapter factory. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public BusinessAdapterFactory() + { + if (modelPackage == null) + { + modelPackage = BusinessPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. <!-- begin-user-doc --> This implementation + * returns <code>true</code> if the object is either the model's package or is an instance object of the model. <!-- + * end-user-doc --> + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) + { + if (object == modelPackage) + { + return true; + } + if (object instanceof EObject) + { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the <code>createXXX</code> methods. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected BusinessSwitch<Adapter> modelSwitch = new BusinessSwitch<Adapter>() + { + @Override + public Adapter caseBusinessDay(BusinessDay object) + { + return createBusinessDayAdapter(); + } + + @Override + public Adapter caseOrder(Order object) + { + return createOrderAdapter(); + } + + @Override + public Adapter caseOrderDetail(OrderDetail object) + { + return createOrderDetailAdapter(); + } + + @Override + public Adapter caseWaiter(Waiter object) + { + return createWaiterAdapter(); + } + + @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.gastro.business.BusinessDay <em>Day</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.gastro.business.BusinessDay + * @generated + */ + public Adapter createBusinessDayAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.gastro.business.Order <em>Order</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.gastro.business.Order + * @generated + */ + public Adapter createOrderAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.gastro.business.OrderDetail <em>Order Detail</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.gastro.business.OrderDetail + * @generated + */ + public Adapter createOrderDetailAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.gastro.business.Waiter <em>Waiter</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.gastro.business.Waiter + * @generated + */ + public Adapter createWaiterAdapter() + { + 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; + } + +} // BusinessAdapterFactory diff --git a/plugins/org.gastro.business/src/org/gastro/business/util/BusinessSwitch.java b/plugins/org.gastro.business/src/org/gastro/business/util/BusinessSwitch.java new file mode 100644 index 0000000000..82697d1cc0 --- /dev/null +++ b/plugins/org.gastro.business/src/org/gastro/business/util/BusinessSwitch.java @@ -0,0 +1,214 @@ +/** + * Copyright (c) 2009 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + * + * Initial Publication: + * Eclipse Magazin - http://www.eclipse-magazin.de + */ +package org.gastro.business.util; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; + +import org.gastro.business.BusinessDay; +import org.gastro.business.BusinessPackage; +import org.gastro.business.Order; +import org.gastro.business.OrderDetail; +import org.gastro.business.Waiter; + +import java.util.List; + +/** + * <!-- 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.gastro.business.BusinessPackage + * @generated + */ +public class BusinessSwitch<T> +{ + /** + * The cached model package <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected static BusinessPackage modelPackage; + + /** + * Creates an instance of the switch. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public BusinessSwitch() + { + if (modelPackage == null) + { + modelPackage = BusinessPackage.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 BusinessPackage.BUSINESS_DAY: + { + BusinessDay businessDay = (BusinessDay)theEObject; + T result = caseBusinessDay(businessDay); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case BusinessPackage.ORDER: + { + Order order = (Order)theEObject; + T result = caseOrder(order); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case BusinessPackage.ORDER_DETAIL: + { + OrderDetail orderDetail = (OrderDetail)theEObject; + T result = caseOrderDetail(orderDetail); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case BusinessPackage.WAITER: + { + Waiter waiter = (Waiter)theEObject; + T result = caseWaiter(waiter); + if (result == null) + result = defaultCase(theEObject); + return result; + } + default: + return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Day</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>Day</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseBusinessDay(BusinessDay object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Order</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>Order</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseOrder(Order object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Order Detail</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>Order Detail</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseOrderDetail(OrderDetail object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Waiter</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>Waiter</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseWaiter(Waiter 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; + } + +} // BusinessSwitch diff --git a/plugins/org.gastro.inventory.edit/.classpath b/plugins/org.gastro.inventory.edit/.classpath new file mode 100644 index 0000000000..304e86186a --- /dev/null +++ b/plugins/org.gastro.inventory.edit/.classpath @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="src"/> + <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="output" path="bin"/> +</classpath> diff --git a/plugins/org.gastro.inventory.edit/.cvsignore b/plugins/org.gastro.inventory.edit/.cvsignore new file mode 100644 index 0000000000..693869726d --- /dev/null +++ b/plugins/org.gastro.inventory.edit/.cvsignore @@ -0,0 +1,2 @@ +bin +doc diff --git a/plugins/org.gastro.inventory.edit/.project b/plugins/org.gastro.inventory.edit/.project new file mode 100644 index 0000000000..a32a70c626 --- /dev/null +++ b/plugins/org.gastro.inventory.edit/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.gastro.inventory.edit</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.ManifestBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.SchemaBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + <nature>org.eclipse.pde.PluginNature</nature> + </natures> +</projectDescription> diff --git a/plugins/org.gastro.inventory.edit/META-INF/MANIFEST.MF b/plugins/org.gastro.inventory.edit/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..00f5cd8aec --- /dev/null +++ b/plugins/org.gastro.inventory.edit/META-INF/MANIFEST.MF @@ -0,0 +1,15 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: org.gastro.inventory.edit;singleton:=true +Bundle-Version: 1.0.0 +Bundle-ClassPath: . +Bundle-Activator: org.gastro.inventory.provider.InventoryEditPlugin$Implementation +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: J2SE-1.5 +Export-Package: org.gastro.inventory.provider +Require-Bundle: org.eclipse.core.runtime, + org.gastro.inventory;visibility:=reexport, + org.eclipse.emf.cdo.edit;visibility:=reexport +Bundle-ActivationPolicy: lazy diff --git a/plugins/org.gastro.inventory.edit/build.properties b/plugins/org.gastro.inventory.edit/build.properties new file mode 100644 index 0000000000..5fa0804043 --- /dev/null +++ b/plugins/org.gastro.inventory.edit/build.properties @@ -0,0 +1,17 @@ + +# <copyright> +# </copyright> +# +# $Id: build.properties,v 1.1 2009-04-26 16:52:38 estepper Exp $ + +bin.includes = .,\ + icons/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties,\ + copyright.txt,\ + epl-v10.html,\ + license.html +jars.compile.order = . +source.. = src/ +output.. = bin/ diff --git a/plugins/org.gastro.inventory.edit/copyright.txt b/plugins/org.gastro.inventory.edit/copyright.txt new file mode 100644 index 0000000000..d7088ff84e --- /dev/null +++ b/plugins/org.gastro.inventory.edit/copyright.txt @@ -0,0 +1,11 @@ +Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) 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: + Eike Stepper - initial API and implementation + +Initial Publication: + Eclipse Magazin - http://www.eclipse-magazin.de
\ No newline at end of file diff --git a/plugins/org.gastro.inventory.edit/epl-v10.html b/plugins/org.gastro.inventory.edit/epl-v10.html new file mode 100644 index 0000000000..d7b88e9416 --- /dev/null +++ b/plugins/org.gastro.inventory.edit/epl-v10.html @@ -0,0 +1,319 @@ +<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"><head> +<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> +<meta name="ProgId" content="Word.Document"> +<meta name="Generator" content="Microsoft Word 9"> +<meta name="Originator" content="Microsoft Word 9"> +<link rel="File-List" href="http://www.eclipse.org/org/documents/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml"><title>Eclipse Public License - Version 1.0</title><!--[if gte mso 9]><xml> + <o:DocumentProperties> + <o:Revision>2</o:Revision> + <o:TotalTime>3</o:TotalTime> + <o:Created>2004-03-05T23:03:00Z</o:Created> + <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved> + <o:Pages>4</o:Pages> + <o:Words>1626</o:Words> + <o:Characters>9270</o:Characters> + <o:Lines>77</o:Lines> + <o:Paragraphs>18</o:Paragraphs> + <o:CharactersWithSpaces>11384</o:CharactersWithSpaces> + <o:Version>9.4402</o:Version> + </o:DocumentProperties> +</xml><![endif]--><!--[if gte mso 9]><xml> + <w:WordDocument> + <w:TrackRevisions/> + </w:WordDocument> +</xml><![endif]--> + + +<style> +<!-- + /* Font Definitions */ +@font-face + {font-family:Tahoma; + panose-1:2 11 6 4 3 5 4 4 2 4; + mso-font-charset:0; + mso-generic-font-family:swiss; + mso-font-pitch:variable; + mso-font-signature:553679495 -2147483648 8 0 66047 0;} + /* Style Definitions */ +p.MsoNormal, li.MsoNormal, div.MsoNormal + {mso-style-parent:""; + margin:0in; + margin-bottom:.0001pt; + mso-pagination:widow-orphan; + font-size:12.0pt; + font-family:"Times New Roman"; + mso-fareast-font-family:"Times New Roman";} +p + {margin-right:0in; + mso-margin-top-alt:auto; + mso-margin-bottom-alt:auto; + margin-left:0in; + mso-pagination:widow-orphan; + font-size:12.0pt; + font-family:"Times New Roman"; + mso-fareast-font-family:"Times New Roman";} +p.BalloonText, li.BalloonText, div.BalloonText + {mso-style-name:"Balloon Text"; + margin:0in; + margin-bottom:.0001pt; + mso-pagination:widow-orphan; + font-size:8.0pt; + font-family:Tahoma; + mso-fareast-font-family:"Times New Roman";} +@page Section1 + {size:8.5in 11.0in; + margin:1.0in 1.25in 1.0in 1.25in; + mso-header-margin:.5in; + mso-footer-margin:.5in; + mso-paper-source:0;} +div.Section1 + {page:Section1;} +--> +</style></head> + +<body style="" lang="EN-US"> + +<div class="Section1"> + +<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b> +</p> + +<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER +THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, +REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE +OF THIS AGREEMENT.</span> </p> + +<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p> + +<p><span style="font-size: 10pt;">"Contribution" means:</span> </p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a) +in the case of the initial Contributor, the initial code and documentation +distributed under this Agreement, and<br clear="left"> +b) in the case of each subsequent Contributor:</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i) +changes to the Program, and</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii) +additions to the Program;</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where +such changes and/or additions to the Program originate from and are distributed +by that particular Contributor. A Contribution 'originates' from a Contributor +if it was added to the Program by such Contributor itself or anyone acting on +such Contributor's behalf. Contributions do not include additions to the +Program which: (i) are separate modules of software distributed in conjunction +with the Program under their own license agreement, and (ii) are not derivative +works of the Program. </span></p> + +<p><span style="font-size: 10pt;">"Contributor" means any person or +entity that distributes the Program.</span> </p> + +<p><span style="font-size: 10pt;">"Licensed Patents " mean patent +claims licensable by a Contributor which are necessarily infringed by the use +or sale of its Contribution alone or when combined with the Program. </span></p> + +<p><span style="font-size: 10pt;">"Program" means the Contributions +distributed in accordance with this Agreement.</span> </p> + +<p><span style="font-size: 10pt;">"Recipient" means anyone who +receives the Program under this Agreement, including all Contributors.</span> </p> + +<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a) +Subject to the terms of this Agreement, each Contributor hereby grants Recipient +a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly +display, publicly perform, distribute and sublicense the Contribution of such +Contributor, if any, and such derivative works, in source code and object code +form.</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) +Subject to the terms of this Agreement, each Contributor hereby grants +Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free +patent license under Licensed Patents to make, use, sell, offer to sell, import +and otherwise transfer the Contribution of such Contributor, if any, in source +code and object code form. This patent license shall apply to the combination +of the Contribution and the Program if, at the time the Contribution is added +by the Contributor, such addition of the Contribution causes such combination +to be covered by the Licensed Patents. The patent license shall not apply to +any other combinations which include the Contribution. No hardware per se is +licensed hereunder. </span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c) +Recipient understands that although each Contributor grants the licenses to its +Contributions set forth herein, no assurances are provided by any Contributor +that the Program does not infringe the patent or other intellectual property +rights of any other entity. Each Contributor disclaims any liability to Recipient +for claims brought by any other entity based on infringement of intellectual +property rights or otherwise. As a condition to exercising the rights and +licenses granted hereunder, each Recipient hereby assumes sole responsibility +to secure any other intellectual property rights needed, if any. For example, +if a third party patent license is required to allow Recipient to distribute +the Program, it is Recipient's responsibility to acquire that license before +distributing the Program.</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d) +Each Contributor represents that to its knowledge it has sufficient copyright +rights in its Contribution, if any, to grant the copyright license set forth in +this Agreement. </span></p> + +<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p> + +<p><span style="font-size: 10pt;">A Contributor may choose to distribute the +Program in object code form under its own license agreement, provided that:</span> +</p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a) +it complies with the terms and conditions of this Agreement; and</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) +its license agreement:</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i) +effectively disclaims on behalf of all Contributors all warranties and +conditions, express and implied, including warranties or conditions of title +and non-infringement, and implied warranties or conditions of merchantability +and fitness for a particular purpose; </span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii) +effectively excludes on behalf of all Contributors all liability for damages, +including direct, indirect, special, incidental and consequential damages, such +as lost profits; </span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii) +states that any provisions which differ from this Agreement are offered by that +Contributor alone and not by any other party; and</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv) +states that source code for the Program is available from such Contributor, and +informs licensees how to obtain it in a reasonable manner on or through a +medium customarily used for software exchange.<span style="color: blue;"> </span></span></p> + +<p><span style="font-size: 10pt;">When the Program is made available in source +code form:</span> </p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a) +it must be made available under this Agreement; and </span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a +copy of this Agreement must be included with each copy of the Program. </span></p> + +<p><span style="font-size: 10pt;">Contributors may not remove or alter any +copyright notices contained within the Program. </span></p> + +<p><span style="font-size: 10pt;">Each Contributor must identify itself as the +originator of its Contribution, if any, in a manner that reasonably allows +subsequent Recipients to identify the originator of the Contribution. </span></p> + +<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p> + +<p><span style="font-size: 10pt;">Commercial distributors of software may +accept certain responsibilities with respect to end users, business partners +and the like. While this license is intended to facilitate the commercial use +of the Program, the Contributor who includes the Program in a commercial +product offering should do so in a manner which does not create potential +liability for other Contributors. Therefore, if a Contributor includes the +Program in a commercial product offering, such Contributor ("Commercial +Contributor") hereby agrees to defend and indemnify every other +Contributor ("Indemnified Contributor") against any losses, damages and +costs (collectively "Losses") arising from claims, lawsuits and other +legal actions brought by a third party against the Indemnified Contributor to +the extent caused by the acts or omissions of such Commercial Contributor in +connection with its distribution of the Program in a commercial product +offering. The obligations in this section do not apply to any claims or Losses +relating to any actual or alleged intellectual property infringement. In order +to qualify, an Indemnified Contributor must: a) promptly notify the Commercial +Contributor in writing of such claim, and b) allow the Commercial Contributor +to control, and cooperate with the Commercial Contributor in, the defense and +any related settlement negotiations. The Indemnified Contributor may participate +in any such claim at its own expense.</span> </p> + +<p><span style="font-size: 10pt;">For example, a Contributor might include the +Program in a commercial product offering, Product X. That Contributor is then a +Commercial Contributor. If that Commercial Contributor then makes performance +claims, or offers warranties related to Product X, those performance claims and +warranties are such Commercial Contributor's responsibility alone. Under this +section, the Commercial Contributor would have to defend claims against the +other Contributors related to those performance claims and warranties, and if a +court requires any other Contributor to pay any damages as a result, the +Commercial Contributor must pay those damages.</span> </p> + +<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p> + +<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS +AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT +WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, +WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, +MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely +responsible for determining the appropriateness of using and distributing the +Program and assumes all risks associated with its exercise of rights under this +Agreement , including but not limited to the risks and costs of program errors, +compliance with applicable laws, damage to or loss of data, programs or +equipment, and unavailability or interruption of operations. </span></p> + +<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p> + +<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS +AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY +OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF +THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF +THE POSSIBILITY OF SUCH DAMAGES.</span> </p> + +<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p> + +<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid +or unenforceable under applicable law, it shall not affect the validity or +enforceability of the remainder of the terms of this Agreement, and without +further action by the parties hereto, such provision shall be reformed to the +minimum extent necessary to make such provision valid and enforceable.</span> </p> + +<p><span style="font-size: 10pt;">If Recipient institutes patent litigation +against any entity (including a cross-claim or counterclaim in a lawsuit) +alleging that the Program itself (excluding combinations of the Program with +other software or hardware) infringes such Recipient's patent(s), then such +Recipient's rights granted under Section 2(b) shall terminate as of the date +such litigation is filed. </span></p> + +<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement +shall terminate if it fails to comply with any of the material terms or +conditions of this Agreement and does not cure such failure in a reasonable +period of time after becoming aware of such noncompliance. If all Recipient's +rights under this Agreement terminate, Recipient agrees to cease use and +distribution of the Program as soon as reasonably practicable. However, +Recipient's obligations under this Agreement and any licenses granted by +Recipient relating to the Program shall continue and survive. </span></p> + +<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute +copies of this Agreement, but in order to avoid inconsistency the Agreement is +copyrighted and may only be modified in the following manner. The Agreement +Steward reserves the right to publish new versions (including revisions) of +this Agreement from time to time. No one other than the Agreement Steward has +the right to modify this Agreement. The Eclipse Foundation is the initial +Agreement Steward. The Eclipse Foundation may assign the responsibility to +serve as the Agreement Steward to a suitable separate entity. Each new version +of the Agreement will be given a distinguishing version number. The Program +(including Contributions) may always be distributed subject to the version of +the Agreement under which it was received. In addition, after a new version of +the Agreement is published, Contributor may elect to distribute the Program +(including its Contributions) under the new version. Except as expressly stated +in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to +the intellectual property of any Contributor under this Agreement, whether +expressly, by implication, estoppel or otherwise. All rights in the Program not +expressly granted under this Agreement are reserved.</span> </p> + +<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the +State of New York and the intellectual property laws of the United States of +America. No party to this Agreement will bring a legal action under this +Agreement more than one year after the cause of action arose. Each party waives +its rights to a jury trial in any resulting litigation.</span> </p> + +<p class="MsoNormal"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p> + +</div> + +</body></html>
\ No newline at end of file diff --git a/plugins/org.gastro.inventory.edit/icons/full/ctool16/CreateDepartment_recipes_Recipe.gif b/plugins/org.gastro.inventory.edit/icons/full/ctool16/CreateDepartment_recipes_Recipe.gif Binary files differnew file mode 100644 index 0000000000..99ae775708 --- /dev/null +++ b/plugins/org.gastro.inventory.edit/icons/full/ctool16/CreateDepartment_recipes_Recipe.gif diff --git a/plugins/org.gastro.inventory.edit/icons/full/ctool16/CreateMenuCard_offerings_Offering.gif b/plugins/org.gastro.inventory.edit/icons/full/ctool16/CreateMenuCard_offerings_Offering.gif Binary files differnew file mode 100644 index 0000000000..e8324a2c6f --- /dev/null +++ b/plugins/org.gastro.inventory.edit/icons/full/ctool16/CreateMenuCard_offerings_Offering.gif diff --git a/plugins/org.gastro.inventory.edit/icons/full/ctool16/CreateRecipe_ingredients_Ingredient.gif b/plugins/org.gastro.inventory.edit/icons/full/ctool16/CreateRecipe_ingredients_Ingredient.gif Binary files differnew file mode 100644 index 0000000000..d8b262a3bb --- /dev/null +++ b/plugins/org.gastro.inventory.edit/icons/full/ctool16/CreateRecipe_ingredients_Ingredient.gif diff --git a/plugins/org.gastro.inventory.edit/icons/full/ctool16/CreateRestaurant_departments_Department.gif b/plugins/org.gastro.inventory.edit/icons/full/ctool16/CreateRestaurant_departments_Department.gif Binary files differnew file mode 100644 index 0000000000..3cee5b616a --- /dev/null +++ b/plugins/org.gastro.inventory.edit/icons/full/ctool16/CreateRestaurant_departments_Department.gif diff --git a/plugins/org.gastro.inventory.edit/icons/full/ctool16/CreateRestaurant_menuCards_MenuCard.gif b/plugins/org.gastro.inventory.edit/icons/full/ctool16/CreateRestaurant_menuCards_MenuCard.gif Binary files differnew file mode 100644 index 0000000000..0855183b08 --- /dev/null +++ b/plugins/org.gastro.inventory.edit/icons/full/ctool16/CreateRestaurant_menuCards_MenuCard.gif diff --git a/plugins/org.gastro.inventory.edit/icons/full/ctool16/CreateRestaurant_stocks_Stock.gif b/plugins/org.gastro.inventory.edit/icons/full/ctool16/CreateRestaurant_stocks_Stock.gif Binary files differnew file mode 100644 index 0000000000..568a3d4c8f --- /dev/null +++ b/plugins/org.gastro.inventory.edit/icons/full/ctool16/CreateRestaurant_stocks_Stock.gif diff --git a/plugins/org.gastro.inventory.edit/icons/full/ctool16/CreateRestaurant_tables_Table.gif b/plugins/org.gastro.inventory.edit/icons/full/ctool16/CreateRestaurant_tables_Table.gif Binary files differnew file mode 100644 index 0000000000..9073955a8b --- /dev/null +++ b/plugins/org.gastro.inventory.edit/icons/full/ctool16/CreateRestaurant_tables_Table.gif diff --git a/plugins/org.gastro.inventory.edit/icons/full/ctool16/CreateStock_products_StockProduct.gif b/plugins/org.gastro.inventory.edit/icons/full/ctool16/CreateStock_products_StockProduct.gif Binary files differnew file mode 100644 index 0000000000..5ef0e32411 --- /dev/null +++ b/plugins/org.gastro.inventory.edit/icons/full/ctool16/CreateStock_products_StockProduct.gif diff --git a/plugins/org.gastro.inventory.edit/icons/full/obj16/Department.gif b/plugins/org.gastro.inventory.edit/icons/full/obj16/Department.gif Binary files differnew file mode 100644 index 0000000000..c4fb30e968 --- /dev/null +++ b/plugins/org.gastro.inventory.edit/icons/full/obj16/Department.gif diff --git a/plugins/org.gastro.inventory.edit/icons/full/obj16/Employee.gif b/plugins/org.gastro.inventory.edit/icons/full/obj16/Employee.gif Binary files differnew file mode 100644 index 0000000000..1e5345fb32 --- /dev/null +++ b/plugins/org.gastro.inventory.edit/icons/full/obj16/Employee.gif diff --git a/plugins/org.gastro.inventory.edit/icons/full/obj16/Ingredient.gif b/plugins/org.gastro.inventory.edit/icons/full/obj16/Ingredient.gif Binary files differnew file mode 100644 index 0000000000..c4a8af4184 --- /dev/null +++ b/plugins/org.gastro.inventory.edit/icons/full/obj16/Ingredient.gif diff --git a/plugins/org.gastro.inventory.edit/icons/full/obj16/MenuCard.gif b/plugins/org.gastro.inventory.edit/icons/full/obj16/MenuCard.gif Binary files differnew file mode 100644 index 0000000000..7c2aaac84e --- /dev/null +++ b/plugins/org.gastro.inventory.edit/icons/full/obj16/MenuCard.gif diff --git a/plugins/org.gastro.inventory.edit/icons/full/obj16/Offering.gif b/plugins/org.gastro.inventory.edit/icons/full/obj16/Offering.gif Binary files differnew file mode 100644 index 0000000000..498364f1c1 --- /dev/null +++ b/plugins/org.gastro.inventory.edit/icons/full/obj16/Offering.gif diff --git a/plugins/org.gastro.inventory.edit/icons/full/obj16/Recipe.gif b/plugins/org.gastro.inventory.edit/icons/full/obj16/Recipe.gif Binary files differnew file mode 100644 index 0000000000..c4a8af4184 --- /dev/null +++ b/plugins/org.gastro.inventory.edit/icons/full/obj16/Recipe.gif diff --git a/plugins/org.gastro.inventory.edit/icons/full/obj16/Restaurant.gif b/plugins/org.gastro.inventory.edit/icons/full/obj16/Restaurant.gif Binary files differnew file mode 100644 index 0000000000..739ebbfa6a --- /dev/null +++ b/plugins/org.gastro.inventory.edit/icons/full/obj16/Restaurant.gif diff --git a/plugins/org.gastro.inventory.edit/icons/full/obj16/Section.gif b/plugins/org.gastro.inventory.edit/icons/full/obj16/Section.gif Binary files differnew file mode 100644 index 0000000000..739ebbfa6a --- /dev/null +++ b/plugins/org.gastro.inventory.edit/icons/full/obj16/Section.gif diff --git a/plugins/org.gastro.inventory.edit/icons/full/obj16/Stock.gif b/plugins/org.gastro.inventory.edit/icons/full/obj16/Stock.gif Binary files differnew file mode 100644 index 0000000000..134551bff7 --- /dev/null +++ b/plugins/org.gastro.inventory.edit/icons/full/obj16/Stock.gif diff --git a/plugins/org.gastro.inventory.edit/icons/full/obj16/StockProduct.gif b/plugins/org.gastro.inventory.edit/icons/full/obj16/StockProduct.gif Binary files differnew file mode 100644 index 0000000000..7bac4fd380 --- /dev/null +++ b/plugins/org.gastro.inventory.edit/icons/full/obj16/StockProduct.gif diff --git a/plugins/org.gastro.inventory.edit/icons/full/obj16/Table.gif b/plugins/org.gastro.inventory.edit/icons/full/obj16/Table.gif Binary files differnew file mode 100644 index 0000000000..c3370c7ddd --- /dev/null +++ b/plugins/org.gastro.inventory.edit/icons/full/obj16/Table.gif diff --git a/plugins/org.gastro.inventory.edit/license.html b/plugins/org.gastro.inventory.edit/license.html new file mode 100644 index 0000000000..d7b88e9416 --- /dev/null +++ b/plugins/org.gastro.inventory.edit/license.html @@ -0,0 +1,319 @@ +<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"><head> +<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> +<meta name="ProgId" content="Word.Document"> +<meta name="Generator" content="Microsoft Word 9"> +<meta name="Originator" content="Microsoft Word 9"> +<link rel="File-List" href="http://www.eclipse.org/org/documents/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml"><title>Eclipse Public License - Version 1.0</title><!--[if gte mso 9]><xml> + <o:DocumentProperties> + <o:Revision>2</o:Revision> + <o:TotalTime>3</o:TotalTime> + <o:Created>2004-03-05T23:03:00Z</o:Created> + <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved> + <o:Pages>4</o:Pages> + <o:Words>1626</o:Words> + <o:Characters>9270</o:Characters> + <o:Lines>77</o:Lines> + <o:Paragraphs>18</o:Paragraphs> + <o:CharactersWithSpaces>11384</o:CharactersWithSpaces> + <o:Version>9.4402</o:Version> + </o:DocumentProperties> +</xml><![endif]--><!--[if gte mso 9]><xml> + <w:WordDocument> + <w:TrackRevisions/> + </w:WordDocument> +</xml><![endif]--> + + +<style> +<!-- + /* Font Definitions */ +@font-face + {font-family:Tahoma; + panose-1:2 11 6 4 3 5 4 4 2 4; + mso-font-charset:0; + mso-generic-font-family:swiss; + mso-font-pitch:variable; + mso-font-signature:553679495 -2147483648 8 0 66047 0;} + /* Style Definitions */ +p.MsoNormal, li.MsoNormal, div.MsoNormal + {mso-style-parent:""; + margin:0in; + margin-bottom:.0001pt; + mso-pagination:widow-orphan; + font-size:12.0pt; + font-family:"Times New Roman"; + mso-fareast-font-family:"Times New Roman";} +p + {margin-right:0in; + mso-margin-top-alt:auto; + mso-margin-bottom-alt:auto; + margin-left:0in; + mso-pagination:widow-orphan; + font-size:12.0pt; + font-family:"Times New Roman"; + mso-fareast-font-family:"Times New Roman";} +p.BalloonText, li.BalloonText, div.BalloonText + {mso-style-name:"Balloon Text"; + margin:0in; + margin-bottom:.0001pt; + mso-pagination:widow-orphan; + font-size:8.0pt; + font-family:Tahoma; + mso-fareast-font-family:"Times New Roman";} +@page Section1 + {size:8.5in 11.0in; + margin:1.0in 1.25in 1.0in 1.25in; + mso-header-margin:.5in; + mso-footer-margin:.5in; + mso-paper-source:0;} +div.Section1 + {page:Section1;} +--> +</style></head> + +<body style="" lang="EN-US"> + +<div class="Section1"> + +<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b> +</p> + +<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER +THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, +REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE +OF THIS AGREEMENT.</span> </p> + +<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p> + +<p><span style="font-size: 10pt;">"Contribution" means:</span> </p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a) +in the case of the initial Contributor, the initial code and documentation +distributed under this Agreement, and<br clear="left"> +b) in the case of each subsequent Contributor:</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i) +changes to the Program, and</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii) +additions to the Program;</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where +such changes and/or additions to the Program originate from and are distributed +by that particular Contributor. A Contribution 'originates' from a Contributor +if it was added to the Program by such Contributor itself or anyone acting on +such Contributor's behalf. Contributions do not include additions to the +Program which: (i) are separate modules of software distributed in conjunction +with the Program under their own license agreement, and (ii) are not derivative +works of the Program. </span></p> + +<p><span style="font-size: 10pt;">"Contributor" means any person or +entity that distributes the Program.</span> </p> + +<p><span style="font-size: 10pt;">"Licensed Patents " mean patent +claims licensable by a Contributor which are necessarily infringed by the use +or sale of its Contribution alone or when combined with the Program. </span></p> + +<p><span style="font-size: 10pt;">"Program" means the Contributions +distributed in accordance with this Agreement.</span> </p> + +<p><span style="font-size: 10pt;">"Recipient" means anyone who +receives the Program under this Agreement, including all Contributors.</span> </p> + +<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a) +Subject to the terms of this Agreement, each Contributor hereby grants Recipient +a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly +display, publicly perform, distribute and sublicense the Contribution of such +Contributor, if any, and such derivative works, in source code and object code +form.</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) +Subject to the terms of this Agreement, each Contributor hereby grants +Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free +patent license under Licensed Patents to make, use, sell, offer to sell, import +and otherwise transfer the Contribution of such Contributor, if any, in source +code and object code form. This patent license shall apply to the combination +of the Contribution and the Program if, at the time the Contribution is added +by the Contributor, such addition of the Contribution causes such combination +to be covered by the Licensed Patents. The patent license shall not apply to +any other combinations which include the Contribution. No hardware per se is +licensed hereunder. </span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c) +Recipient understands that although each Contributor grants the licenses to its +Contributions set forth herein, no assurances are provided by any Contributor +that the Program does not infringe the patent or other intellectual property +rights of any other entity. Each Contributor disclaims any liability to Recipient +for claims brought by any other entity based on infringement of intellectual +property rights or otherwise. As a condition to exercising the rights and +licenses granted hereunder, each Recipient hereby assumes sole responsibility +to secure any other intellectual property rights needed, if any. For example, +if a third party patent license is required to allow Recipient to distribute +the Program, it is Recipient's responsibility to acquire that license before +distributing the Program.</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d) +Each Contributor represents that to its knowledge it has sufficient copyright +rights in its Contribution, if any, to grant the copyright license set forth in +this Agreement. </span></p> + +<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p> + +<p><span style="font-size: 10pt;">A Contributor may choose to distribute the +Program in object code form under its own license agreement, provided that:</span> +</p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a) +it complies with the terms and conditions of this Agreement; and</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) +its license agreement:</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i) +effectively disclaims on behalf of all Contributors all warranties and +conditions, express and implied, including warranties or conditions of title +and non-infringement, and implied warranties or conditions of merchantability +and fitness for a particular purpose; </span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii) +effectively excludes on behalf of all Contributors all liability for damages, +including direct, indirect, special, incidental and consequential damages, such +as lost profits; </span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii) +states that any provisions which differ from this Agreement are offered by that +Contributor alone and not by any other party; and</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv) +states that source code for the Program is available from such Contributor, and +informs licensees how to obtain it in a reasonable manner on or through a +medium customarily used for software exchange.<span style="color: blue;"> </span></span></p> + +<p><span style="font-size: 10pt;">When the Program is made available in source +code form:</span> </p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a) +it must be made available under this Agreement; and </span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a +copy of this Agreement must be included with each copy of the Program. </span></p> + +<p><span style="font-size: 10pt;">Contributors may not remove or alter any +copyright notices contained within the Program. </span></p> + +<p><span style="font-size: 10pt;">Each Contributor must identify itself as the +originator of its Contribution, if any, in a manner that reasonably allows +subsequent Recipients to identify the originator of the Contribution. </span></p> + +<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p> + +<p><span style="font-size: 10pt;">Commercial distributors of software may +accept certain responsibilities with respect to end users, business partners +and the like. While this license is intended to facilitate the commercial use +of the Program, the Contributor who includes the Program in a commercial +product offering should do so in a manner which does not create potential +liability for other Contributors. Therefore, if a Contributor includes the +Program in a commercial product offering, such Contributor ("Commercial +Contributor") hereby agrees to defend and indemnify every other +Contributor ("Indemnified Contributor") against any losses, damages and +costs (collectively "Losses") arising from claims, lawsuits and other +legal actions brought by a third party against the Indemnified Contributor to +the extent caused by the acts or omissions of such Commercial Contributor in +connection with its distribution of the Program in a commercial product +offering. The obligations in this section do not apply to any claims or Losses +relating to any actual or alleged intellectual property infringement. In order +to qualify, an Indemnified Contributor must: a) promptly notify the Commercial +Contributor in writing of such claim, and b) allow the Commercial Contributor +to control, and cooperate with the Commercial Contributor in, the defense and +any related settlement negotiations. The Indemnified Contributor may participate +in any such claim at its own expense.</span> </p> + +<p><span style="font-size: 10pt;">For example, a Contributor might include the +Program in a commercial product offering, Product X. That Contributor is then a +Commercial Contributor. If that Commercial Contributor then makes performance +claims, or offers warranties related to Product X, those performance claims and +warranties are such Commercial Contributor's responsibility alone. Under this +section, the Commercial Contributor would have to defend claims against the +other Contributors related to those performance claims and warranties, and if a +court requires any other Contributor to pay any damages as a result, the +Commercial Contributor must pay those damages.</span> </p> + +<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p> + +<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS +AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT +WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, +WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, +MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely +responsible for determining the appropriateness of using and distributing the +Program and assumes all risks associated with its exercise of rights under this +Agreement , including but not limited to the risks and costs of program errors, +compliance with applicable laws, damage to or loss of data, programs or +equipment, and unavailability or interruption of operations. </span></p> + +<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p> + +<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS +AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY +OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF +THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF +THE POSSIBILITY OF SUCH DAMAGES.</span> </p> + +<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p> + +<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid +or unenforceable under applicable law, it shall not affect the validity or +enforceability of the remainder of the terms of this Agreement, and without +further action by the parties hereto, such provision shall be reformed to the +minimum extent necessary to make such provision valid and enforceable.</span> </p> + +<p><span style="font-size: 10pt;">If Recipient institutes patent litigation +against any entity (including a cross-claim or counterclaim in a lawsuit) +alleging that the Program itself (excluding combinations of the Program with +other software or hardware) infringes such Recipient's patent(s), then such +Recipient's rights granted under Section 2(b) shall terminate as of the date +such litigation is filed. </span></p> + +<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement +shall terminate if it fails to comply with any of the material terms or +conditions of this Agreement and does not cure such failure in a reasonable +period of time after becoming aware of such noncompliance. If all Recipient's +rights under this Agreement terminate, Recipient agrees to cease use and +distribution of the Program as soon as reasonably practicable. However, +Recipient's obligations under this Agreement and any licenses granted by +Recipient relating to the Program shall continue and survive. </span></p> + +<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute +copies of this Agreement, but in order to avoid inconsistency the Agreement is +copyrighted and may only be modified in the following manner. The Agreement +Steward reserves the right to publish new versions (including revisions) of +this Agreement from time to time. No one other than the Agreement Steward has +the right to modify this Agreement. The Eclipse Foundation is the initial +Agreement Steward. The Eclipse Foundation may assign the responsibility to +serve as the Agreement Steward to a suitable separate entity. Each new version +of the Agreement will be given a distinguishing version number. The Program +(including Contributions) may always be distributed subject to the version of +the Agreement under which it was received. In addition, after a new version of +the Agreement is published, Contributor may elect to distribute the Program +(including its Contributions) under the new version. Except as expressly stated +in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to +the intellectual property of any Contributor under this Agreement, whether +expressly, by implication, estoppel or otherwise. All rights in the Program not +expressly granted under this Agreement are reserved.</span> </p> + +<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the +State of New York and the intellectual property laws of the United States of +America. No party to this Agreement will bring a legal action under this +Agreement more than one year after the cause of action arose. Each party waives +its rights to a jury trial in any resulting litigation.</span> </p> + +<p class="MsoNormal"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p> + +</div> + +</body></html>
\ No newline at end of file diff --git a/plugins/org.gastro.inventory.edit/plugin.properties b/plugins/org.gastro.inventory.edit/plugin.properties new file mode 100644 index 0000000000..d28a90ff45 --- /dev/null +++ b/plugins/org.gastro.inventory.edit/plugin.properties @@ -0,0 +1,81 @@ + +# <copyright> +# </copyright> +# +# $Id: plugin.properties,v 1.1 2009-04-26 16:52:38 estepper Exp $ + +pluginName = Gastory Inventory Edit Support +providerName = www.gastro.org + +_UI_CreateChild_text = {0} +_UI_CreateChild_text2 = {1} {0} +_UI_CreateChild_text3 = {1} +_UI_CreateChild_tooltip = Create New {0} Under {1} Feature +_UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}. +_UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent. + +_UI_PropertyDescriptor_description = The {0} of the {1} + +_UI_Stock_type = Lager +_UI_Product_type = Produkt +_UI_StockProduct_type = Lagerprodukt +_UI_Recipe_type = Rezept +_UI_Ingredient_type = Zutat +_UI_MenuCard_type = Menükarte +_UI_Restaurant_type = Restaurant +_UI_Department_type = Abteilung +_UI_Offering_type = Angebot +_UI_Table_type = Tisch +_UI_Unknown_type = Objekt + +_UI_Unknown_datatype= Wert + +_UI_Stock_products_feature = Produkte +_UI_Stock_name_feature = Name +_UI_Stock_restaurant_feature = Restaurant +_UI_Product_name_feature = Name +_UI_StockProduct_stock_feature = Lager +_UI_StockProduct_cost_feature = Kosten +_UI_StockProduct_available_feature = Verfügbar +_UI_StockProduct_orderLimit_feature = Bestellgrenze +_UI_Recipe_ingredients_feature = Zutaten +_UI_Recipe_department_feature = Abteilung +_UI_Ingredient_recipe_feature = Rezept +_UI_Ingredient_product_feature = Produkt +_UI_Ingredient_quantity_feature = Menge +_UI_MenuCard_title_feature = Titel +_UI_MenuCard_offerings_feature = Angebote +_UI_MenuCard_restaurant_feature = Restaurant +_UI_Restaurant_name_feature = Name +_UI_Restaurant_stocks_feature = Läger +_UI_Restaurant_departments_feature = Abteilungen +_UI_Restaurant_menuCards_feature = Menükarten +_UI_Restaurant_tables_feature = Tische +_UI_Department_recipes_feature = Rezepte +_UI_Department_restaurant_feature = Restaurant +_UI_Offering_product_feature = Produkt +_UI_Offering_menuCard_feature = Menükarte +_UI_Offering_description_feature = Beschreibung +_UI_Offering_price_feature = Preis +_UI_Table_seats_feature = Plätze +_UI_Table_restaurant_feature = Restaurant +_UI_Unknown_feature = Unbekannt + +_UI_Employee_type = Mitarbeiter +_UI_Stock_department_feature = Abteilung +_UI_Department_employees_feature = Mitarbeiter +_UI_Department_stocks_feature = Läger +_UI_Employee_department_feature = Abteilung +_UI_Station_type = Station +_UI_Recipe_cost_feature = Kosten +_UI_Restaurant_stations_feature = Stationen +_UI_Employee_name_feature = Name +_UI_Station_stationID_feature = Stations-ID +_UI_Section_type = Abschnitt +_UI_MenuCard_sections_feature = Abschnitte +_UI_Offering_section_feature = Abschnitt +_UI_Section_menuCard_feature = Menükarte +_UI_Section_offerings_feature = Angebote +_UI_Section_title_feature = Titel +_UI_Offering_name_feature = Name +_UI_Section_text_feature = Text diff --git a/plugins/org.gastro.inventory.edit/plugin.xml b/plugins/org.gastro.inventory.edit/plugin.xml new file mode 100644 index 0000000000..16d5e15d75 --- /dev/null +++ b/plugins/org.gastro.inventory.edit/plugin.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.0"?> + +<!-- + <copyright> + </copyright> + + $Id: plugin.xml,v 1.1 2009-04-26 16:52:38 estepper Exp $ +--> + +<plugin> + + <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories"> + <factory + uri="http://www.gastro.org/inventory/1.0" + class="org.gastro.inventory.provider.InventoryItemProviderAdapterFactory" + supportedTypes= + "org.eclipse.emf.edit.provider.IEditingDomainItemProvider + org.eclipse.emf.edit.provider.IStructuredItemContentProvider + org.eclipse.emf.edit.provider.ITreeItemContentProvider + org.eclipse.emf.edit.provider.IItemLabelProvider + org.eclipse.emf.edit.provider.IItemPropertySource"/> + </extension> + +</plugin> diff --git a/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/DepartmentItemProvider.java b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/DepartmentItemProvider.java new file mode 100644 index 0000000000..db4713f540 --- /dev/null +++ b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/DepartmentItemProvider.java @@ -0,0 +1,170 @@ +/** + * Copyright (c) 2009 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + * + * Initial Publication: + * Eclipse Magazin - http://www.eclipse-magazin.de + */ +package org.gastro.inventory.provider; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.gastro.inventory.Department; +import org.gastro.inventory.InventoryFactory; +import org.gastro.inventory.InventoryPackage; + +import java.util.Collection; +import java.util.List; + +/** + * This is the item provider adapter for a {@link org.gastro.inventory.Department} object. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ +public class DepartmentItemProvider extends StationItemProvider implements IEditingDomainItemProvider, + IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource +{ + /** + * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public DepartmentItemProvider(AdapterFactory adapterFactory) + { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) + { + if (itemPropertyDescriptors == null) + { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) + { + if (childrenFeatures == null) + { + super.getChildrenFeatures(object); + childrenFeatures.add(InventoryPackage.Literals.DEPARTMENT__RECIPES); + childrenFeatures.add(InventoryPackage.Literals.DEPARTMENT__EMPLOYEES); + childrenFeatures.add(InventoryPackage.Literals.DEPARTMENT__STOCKS); + } + return childrenFeatures; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) + { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns Department.gif. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) + { + return overlayImage(object, getResourceLocator().getImage("full/obj16/Department")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public String getText(Object object) + { + String label = ((Department)object).getStationID(); + return label == null || label.length() == 0 ? getString("_UI_Department_type") : label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached children and by creating a + * viewer notification, which it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) + { + updateChildren(notification); + + switch (notification.getFeatureID(Department.class)) + { + case InventoryPackage.DEPARTMENT__RECIPES: + case InventoryPackage.DEPARTMENT__EMPLOYEES: + case InventoryPackage.DEPARTMENT__STOCKS: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children that can be created under + * this object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) + { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add(createChildParameter(InventoryPackage.Literals.DEPARTMENT__RECIPES, + InventoryFactory.eINSTANCE.createRecipe())); + + newChildDescriptors.add(createChildParameter(InventoryPackage.Literals.DEPARTMENT__EMPLOYEES, + InventoryFactory.eINSTANCE.createEmployee())); + + newChildDescriptors.add(createChildParameter(InventoryPackage.Literals.DEPARTMENT__STOCKS, + InventoryFactory.eINSTANCE.createStock())); + } + +} diff --git a/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/EmployeeItemProvider.java b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/EmployeeItemProvider.java new file mode 100644 index 0000000000..bb33a1a117 --- /dev/null +++ b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/EmployeeItemProvider.java @@ -0,0 +1,163 @@ +/** + * Copyright (c) 2009 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + * + * Initial Publication: + * Eclipse Magazin - http://www.eclipse-magazin.de + */ +package org.gastro.inventory.provider; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.ResourceLocator; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.gastro.inventory.Employee; +import org.gastro.inventory.InventoryPackage; + +import java.util.Collection; +import java.util.List; + +/** + * This is the item provider adapter for a {@link org.gastro.inventory.Employee} object. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ +public class EmployeeItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, + IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource +{ + /** + * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EmployeeItemProvider(AdapterFactory adapterFactory) + { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) + { + if (itemPropertyDescriptors == null) + { + super.getPropertyDescriptors(object); + + addNamePropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Name feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addNamePropertyDescriptor(Object object) + { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory) + .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Employee_name_feature"), getString( + "_UI_PropertyDescriptor_description", "_UI_Employee_name_feature", "_UI_Employee_type"), + InventoryPackage.Literals.EMPLOYEE__NAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, + null)); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean hasChildren(Object object) + { + return hasChildren(object, true); + } + + /** + * This returns Employee.gif. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) + { + return overlayImage(object, getResourceLocator().getImage("full/obj16/Employee")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public String getText(Object object) + { + String label = ((Employee)object).getName(); + return label == null || label.length() == 0 ? getString("_UI_Employee_type") : label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached children and by creating a + * viewer notification, which it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) + { + updateChildren(notification); + + switch (notification.getFeatureID(Employee.class)) + { + case InventoryPackage.EMPLOYEE__NAME: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children that can be created under + * this object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) + { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() + { + return InventoryEditPlugin.INSTANCE; + } + +} diff --git a/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/IngredientItemProvider.java b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/IngredientItemProvider.java new file mode 100644 index 0000000000..9fecdbc70e --- /dev/null +++ b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/IngredientItemProvider.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2009 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + * + * Initial Publication: + * Eclipse Magazin - http://www.eclipse-magazin.de + */ +package org.gastro.inventory.provider; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.ResourceLocator; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.gastro.inventory.Ingredient; +import org.gastro.inventory.InventoryPackage; + +import java.util.Collection; +import java.util.List; + +/** + * This is the item provider adapter for a {@link org.gastro.inventory.Ingredient} object. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ +public class IngredientItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, + IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource +{ + /** + * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public IngredientItemProvider(AdapterFactory adapterFactory) + { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) + { + if (itemPropertyDescriptors == null) + { + super.getPropertyDescriptors(object); + + addProductPropertyDescriptor(object); + addQuantityPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Product feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addProductPropertyDescriptor(Object object) + { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory) + .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Ingredient_product_feature"), getString( + "_UI_PropertyDescriptor_description", "_UI_Ingredient_product_feature", "_UI_Ingredient_type"), + InventoryPackage.Literals.INGREDIENT__PRODUCT, true, false, true, null, null, null)); + } + + /** + * This adds a property descriptor for the Quantity feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addQuantityPropertyDescriptor(Object object) + { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory) + .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Ingredient_quantity_feature"), getString( + "_UI_PropertyDescriptor_description", "_UI_Ingredient_quantity_feature", "_UI_Ingredient_type"), + InventoryPackage.Literals.INGREDIENT__QUANTITY, true, false, false, + ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean hasChildren(Object object) + { + return hasChildren(object, true); + } + + /** + * This returns Ingredient.gif. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) + { + return overlayImage(object, getResourceLocator().getImage("full/obj16/Ingredient")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public String getText(Object object) + { + Ingredient ingredient = (Ingredient)object; + return ingredient.getProduct() == null ? getString("_UI_Ingredient_type") : ingredient.getProduct().getName() + " " + + ingredient.getQuantity(); + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached children and by creating a + * viewer notification, which it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public void notifyChanged(Notification notification) + { + updateChildren(notification); + + switch (notification.getFeatureID(Ingredient.class)) + { + case InventoryPackage.INGREDIENT__PRODUCT: + case InventoryPackage.INGREDIENT__QUANTITY: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children that can be created under + * this object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) + { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() + { + return InventoryEditPlugin.INSTANCE; + } + +} diff --git a/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/InventoryEditPlugin.java b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/InventoryEditPlugin.java new file mode 100644 index 0000000000..14412aeed9 --- /dev/null +++ b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/InventoryEditPlugin.java @@ -0,0 +1,95 @@ +/** + * Copyright (c) 2009 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + * + * Initial Publication: + * Eclipse Magazin - http://www.eclipse-magazin.de + */ +package org.gastro.inventory.provider; + +import org.eclipse.emf.common.EMFPlugin; +import org.eclipse.emf.common.util.ResourceLocator; + +/** + * This is the central singleton for the Inventory edit plugin. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public final class InventoryEditPlugin extends EMFPlugin +{ + /** + * Keep track of the singleton. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public static final InventoryEditPlugin INSTANCE = new InventoryEditPlugin(); + + /** + * Keep track of the singleton. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private static Implementation plugin; + + /** + * Create the instance. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public InventoryEditPlugin() + { + super(new ResourceLocator[] {}); + } + + /** + * Returns the singleton instance of the Eclipse plugin. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the singleton instance. + * @generated + */ + @Override + public ResourceLocator getPluginResourceLocator() + { + return plugin; + } + + /** + * Returns the singleton instance of the Eclipse plugin. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the singleton instance. + * @generated + */ + public static Implementation getPlugin() + { + return plugin; + } + + /** + * The actual implementation of the Eclipse <b>Plugin</b>. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public static class Implementation extends EclipsePlugin + { + /** + * Creates an instance. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public Implementation() + { + super(); + + // Remember the static instance. + // + plugin = this; + } + } + +} diff --git a/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/InventoryItemProviderAdapterFactory.java b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/InventoryItemProviderAdapterFactory.java new file mode 100644 index 0000000000..4a7dd51413 --- /dev/null +++ b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/InventoryItemProviderAdapterFactory.java @@ -0,0 +1,483 @@ +/** + * Copyright (c) 2009 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + * + * Initial Publication: + * Eclipse Magazin - http://www.eclipse-magazin.de + */ +package org.gastro.inventory.provider; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.Notifier; +import org.eclipse.emf.edit.provider.ChangeNotifier; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.ComposedAdapterFactory; +import org.eclipse.emf.edit.provider.IChangeNotifier; +import org.eclipse.emf.edit.provider.IDisposable; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.INotifyChangedListener; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; + +import org.gastro.inventory.util.InventoryAdapterFactory; + +import java.util.ArrayList; +import java.util.Collection; + +/** + * This is the factory that is used to provide the interfaces needed to support Viewers. The adapters generated by this + * factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}. The adapters + * also support Eclipse property sheets. Note that most of the adapters are shared among multiple instances. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class InventoryItemProviderAdapterFactory extends InventoryAdapterFactory implements ComposeableAdapterFactory, + IChangeNotifier, IDisposable +{ + /** + * This keeps track of the root adapter factory that delegates to this adapter factory. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + protected ComposedAdapterFactory parentAdapterFactory; + + /** + * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + protected IChangeNotifier changeNotifier = new ChangeNotifier(); + + /** + * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected Collection<Object> supportedTypes = new ArrayList<Object>(); + + /** + * This constructs an instance. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public InventoryItemProviderAdapterFactory() + { + supportedTypes.add(IEditingDomainItemProvider.class); + supportedTypes.add(IStructuredItemContentProvider.class); + supportedTypes.add(ITreeItemContentProvider.class); + supportedTypes.add(IItemLabelProvider.class); + supportedTypes.add(IItemPropertySource.class); + } + + /** + * This keeps track of the one adapter used for all {@link org.gastro.inventory.Stock} instances. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + protected StockItemProvider stockItemProvider; + + /** + * This creates an adapter for a {@link org.gastro.inventory.Stock}. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createStockAdapter() + { + if (stockItemProvider == null) + { + stockItemProvider = new StockItemProvider(this); + } + + return stockItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.gastro.inventory.StockProduct} instances. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected StockProductItemProvider stockProductItemProvider; + + /** + * This creates an adapter for a {@link org.gastro.inventory.StockProduct}. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + */ + @Override + public Adapter createStockProductAdapter() + { + if (stockProductItemProvider == null) + { + stockProductItemProvider = new StockProductItemProvider(this); + } + + return stockProductItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.gastro.inventory.Recipe} instances. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + protected RecipeItemProvider recipeItemProvider; + + /** + * This creates an adapter for a {@link org.gastro.inventory.Recipe}. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createRecipeAdapter() + { + if (recipeItemProvider == null) + { + recipeItemProvider = new RecipeItemProvider(this); + } + + return recipeItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.gastro.inventory.Ingredient} instances. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected IngredientItemProvider ingredientItemProvider; + + /** + * This creates an adapter for a {@link org.gastro.inventory.Ingredient}. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + */ + @Override + public Adapter createIngredientAdapter() + { + if (ingredientItemProvider == null) + { + ingredientItemProvider = new IngredientItemProvider(this); + } + + return ingredientItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.gastro.inventory.MenuCard} instances. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected MenuCardItemProvider menuCardItemProvider; + + /** + * This creates an adapter for a {@link org.gastro.inventory.MenuCard}. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createMenuCardAdapter() + { + if (menuCardItemProvider == null) + { + menuCardItemProvider = new MenuCardItemProvider(this); + } + + return menuCardItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.gastro.inventory.Restaurant} instances. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected RestaurantItemProvider restaurantItemProvider; + + /** + * This creates an adapter for a {@link org.gastro.inventory.Restaurant}. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + */ + @Override + public Adapter createRestaurantAdapter() + { + if (restaurantItemProvider == null) + { + restaurantItemProvider = new RestaurantItemProvider(this); + } + + return restaurantItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.gastro.inventory.Department} instances. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected DepartmentItemProvider departmentItemProvider; + + /** + * This creates an adapter for a {@link org.gastro.inventory.Department}. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + */ + @Override + public Adapter createDepartmentAdapter() + { + if (departmentItemProvider == null) + { + departmentItemProvider = new DepartmentItemProvider(this); + } + + return departmentItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.gastro.inventory.Offering} instances. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected OfferingItemProvider offeringItemProvider; + + /** + * This creates an adapter for a {@link org.gastro.inventory.Offering}. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createOfferingAdapter() + { + if (offeringItemProvider == null) + { + offeringItemProvider = new OfferingItemProvider(this); + } + + return offeringItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.gastro.inventory.Table} instances. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + protected TableItemProvider tableItemProvider; + + /** + * This creates an adapter for a {@link org.gastro.inventory.Table}. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createTableAdapter() + { + if (tableItemProvider == null) + { + tableItemProvider = new TableItemProvider(this); + } + + return tableItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.gastro.inventory.Employee} instances. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected EmployeeItemProvider employeeItemProvider; + + /** + * This creates an adapter for a {@link org.gastro.inventory.Employee}. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createEmployeeAdapter() + { + if (employeeItemProvider == null) + { + employeeItemProvider = new EmployeeItemProvider(this); + } + + return employeeItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.gastro.inventory.Section} instances. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected SectionItemProvider sectionItemProvider; + + /** + * This creates an adapter for a {@link org.gastro.inventory.Section}. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createSectionAdapter() + { + if (sectionItemProvider == null) + { + sectionItemProvider = new SectionItemProvider(this); + } + + return sectionItemProvider; + } + + /** + * This returns the root adapter factory that contains this factory. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public ComposeableAdapterFactory getRootAdapterFactory() + { + return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory(); + } + + /** + * This sets the composed adapter factory that contains this factory. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) + { + this.parentAdapterFactory = parentAdapterFactory; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean isFactoryForType(Object type) + { + return supportedTypes.contains(type) || super.isFactoryForType(type); + } + + /** + * This implementation substitutes the factory itself as the key for the adapter. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Adapter adapt(Notifier notifier, Object type) + { + return super.adapt(notifier, this); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object adapt(Object object, Object type) + { + if (isFactoryForType(type)) + { + Object adapter = super.adapt(object, type); + if (!(type instanceof Class<?>) || (((Class<?>)type).isInstance(adapter))) + { + return adapter; + } + } + + return null; + } + + /** + * This adds a listener. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void addListener(INotifyChangedListener notifyChangedListener) + { + changeNotifier.addListener(notifyChangedListener); + } + + /** + * This removes a listener. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void removeListener(INotifyChangedListener notifyChangedListener) + { + changeNotifier.removeListener(notifyChangedListener); + } + + /** + * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + public void fireNotifyChanged(Notification notification) + { + changeNotifier.fireNotifyChanged(notification); + + if (parentAdapterFactory != null) + { + parentAdapterFactory.fireNotifyChanged(notification); + } + } + + /** + * This disposes all of the item providers created by this factory. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void dispose() + { + if (stockItemProvider != null) + stockItemProvider.dispose(); + if (stockProductItemProvider != null) + stockProductItemProvider.dispose(); + if (recipeItemProvider != null) + recipeItemProvider.dispose(); + if (ingredientItemProvider != null) + ingredientItemProvider.dispose(); + if (menuCardItemProvider != null) + menuCardItemProvider.dispose(); + if (restaurantItemProvider != null) + restaurantItemProvider.dispose(); + if (departmentItemProvider != null) + departmentItemProvider.dispose(); + if (offeringItemProvider != null) + offeringItemProvider.dispose(); + if (tableItemProvider != null) + tableItemProvider.dispose(); + if (employeeItemProvider != null) + employeeItemProvider.dispose(); + if (sectionItemProvider != null) + sectionItemProvider.dispose(); + } + +} diff --git a/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/MenuCardItemProvider.java b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/MenuCardItemProvider.java new file mode 100644 index 0000000000..1c79aa9406 --- /dev/null +++ b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/MenuCardItemProvider.java @@ -0,0 +1,204 @@ +/** + * Copyright (c) 2009 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + * + * Initial Publication: + * Eclipse Magazin - http://www.eclipse-magazin.de + */ +package org.gastro.inventory.provider; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.ResourceLocator; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.gastro.inventory.InventoryFactory; +import org.gastro.inventory.InventoryPackage; +import org.gastro.inventory.MenuCard; + +import java.util.Collection; +import java.util.List; + +/** + * This is the item provider adapter for a {@link org.gastro.inventory.MenuCard} object. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ +public class MenuCardItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, + IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource +{ + /** + * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public MenuCardItemProvider(AdapterFactory adapterFactory) + { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) + { + if (itemPropertyDescriptors == null) + { + super.getPropertyDescriptors(object); + + addTitlePropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Title feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addTitlePropertyDescriptor(Object object) + { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory) + .getRootAdapterFactory(), getResourceLocator(), getString("_UI_MenuCard_title_feature"), getString( + "_UI_PropertyDescriptor_description", "_UI_MenuCard_title_feature", "_UI_MenuCard_type"), + InventoryPackage.Literals.MENU_CARD__TITLE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, null)); + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) + { + if (childrenFeatures == null) + { + super.getChildrenFeatures(object); + childrenFeatures.add(InventoryPackage.Literals.MENU_CARD__SECTIONS); + } + return childrenFeatures; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) + { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean hasChildren(Object object) + { + return hasChildren(object, true); + } + + /** + * This returns MenuCard.gif. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) + { + return overlayImage(object, getResourceLocator().getImage("full/obj16/MenuCard")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public String getText(Object object) + { + String label = ((MenuCard)object).getTitle(); + return label == null || label.length() == 0 ? getString("_UI_MenuCard_type") : label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached children and by creating a + * viewer notification, which it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) + { + updateChildren(notification); + + switch (notification.getFeatureID(MenuCard.class)) + { + case InventoryPackage.MENU_CARD__TITLE: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + case InventoryPackage.MENU_CARD__SECTIONS: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children that can be created under + * this object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) + { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add(createChildParameter(InventoryPackage.Literals.MENU_CARD__SECTIONS, + InventoryFactory.eINSTANCE.createSection())); + } + + /** + * Return the resource locator for this item provider's resources. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() + { + return InventoryEditPlugin.INSTANCE; + } + +} diff --git a/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/OfferingItemProvider.java b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/OfferingItemProvider.java new file mode 100644 index 0000000000..aa10fa2a09 --- /dev/null +++ b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/OfferingItemProvider.java @@ -0,0 +1,209 @@ +/** + * Copyright (c) 2009 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + * + * Initial Publication: + * Eclipse Magazin - http://www.eclipse-magazin.de + */ +package org.gastro.inventory.provider; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.ResourceLocator; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.gastro.inventory.InventoryPackage; +import org.gastro.inventory.Offering; + +import java.util.Collection; +import java.util.List; + +/** + * This is the item provider adapter for a {@link org.gastro.inventory.Offering} object. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ +public class OfferingItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, + IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource +{ + /** + * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public OfferingItemProvider(AdapterFactory adapterFactory) + { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) + { + if (itemPropertyDescriptors == null) + { + super.getPropertyDescriptors(object); + + addProductPropertyDescriptor(object); + addNamePropertyDescriptor(object); + addDescriptionPropertyDescriptor(object); + addPricePropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Product feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addProductPropertyDescriptor(Object object) + { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory) + .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Offering_product_feature"), getString( + "_UI_PropertyDescriptor_description", "_UI_Offering_product_feature", "_UI_Offering_type"), + InventoryPackage.Literals.OFFERING__PRODUCT, true, false, true, null, null, null)); + } + + /** + * This adds a property descriptor for the Name feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addNamePropertyDescriptor(Object object) + { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory) + .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Offering_name_feature"), getString( + "_UI_PropertyDescriptor_description", "_UI_Offering_name_feature", "_UI_Offering_type"), + InventoryPackage.Literals.OFFERING__NAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, + null)); + } + + /** + * This adds a property descriptor for the Description feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addDescriptionPropertyDescriptor(Object object) + { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory) + .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Offering_description_feature"), getString( + "_UI_PropertyDescriptor_description", "_UI_Offering_description_feature", "_UI_Offering_type"), + InventoryPackage.Literals.OFFERING__DESCRIPTION, true, false, false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * This adds a property descriptor for the Price feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addPricePropertyDescriptor(Object object) + { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory) + .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Offering_price_feature"), getString( + "_UI_PropertyDescriptor_description", "_UI_Offering_price_feature", "_UI_Offering_type"), + InventoryPackage.Literals.OFFERING__PRICE, true, false, false, ItemPropertyDescriptor.REAL_VALUE_IMAGE, null, + null)); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean hasChildren(Object object) + { + return hasChildren(object, true); + } + + /** + * This returns Offering.gif. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) + { + return overlayImage(object, getResourceLocator().getImage("full/obj16/Offering")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public String getText(Object object) + { + String label = ((Offering)object).getName(); + return label == null || label.length() == 0 ? getString("_UI_Offering_type") : label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached children and by creating a + * viewer notification, which it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) + { + updateChildren(notification); + + switch (notification.getFeatureID(Offering.class)) + { + case InventoryPackage.OFFERING__NAME: + case InventoryPackage.OFFERING__DESCRIPTION: + case InventoryPackage.OFFERING__PRICE: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children that can be created under + * this object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) + { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() + { + return InventoryEditPlugin.INSTANCE; + } + +} diff --git a/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/ProductItemProvider.java b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/ProductItemProvider.java new file mode 100644 index 0000000000..96baa1b970 --- /dev/null +++ b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/ProductItemProvider.java @@ -0,0 +1,152 @@ +/** + * Copyright (c) 2009 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + * + * Initial Publication: + * Eclipse Magazin - http://www.eclipse-magazin.de + */ +package org.gastro.inventory.provider; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.ResourceLocator; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.gastro.inventory.InventoryPackage; +import org.gastro.inventory.Product; + +import java.util.Collection; +import java.util.List; + +/** + * This is the item provider adapter for a {@link org.gastro.inventory.Product} object. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ +public class ProductItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, + IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource +{ + /** + * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public ProductItemProvider(AdapterFactory adapterFactory) + { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) + { + if (itemPropertyDescriptors == null) + { + super.getPropertyDescriptors(object); + + addNamePropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Name feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addNamePropertyDescriptor(Object object) + { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory) + .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Product_name_feature"), getString( + "_UI_PropertyDescriptor_description", "_UI_Product_name_feature", "_UI_Product_type"), + InventoryPackage.Literals.PRODUCT__NAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, + null)); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean hasChildren(Object object) + { + return hasChildren(object, true); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public String getText(Object object) + { + String label = ((Product)object).getName(); + return label == null || label.length() == 0 ? getString("_UI_Product_type") : label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached children and by creating a + * viewer notification, which it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) + { + updateChildren(notification); + + switch (notification.getFeatureID(Product.class)) + { + case InventoryPackage.PRODUCT__NAME: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children that can be created under + * this object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) + { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() + { + return InventoryEditPlugin.INSTANCE; + } + +} diff --git a/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/RecipeItemProvider.java b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/RecipeItemProvider.java new file mode 100644 index 0000000000..4305b117a9 --- /dev/null +++ b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/RecipeItemProvider.java @@ -0,0 +1,180 @@ +/** + * Copyright (c) 2009 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + * + * Initial Publication: + * Eclipse Magazin - http://www.eclipse-magazin.de + */ +package org.gastro.inventory.provider; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.gastro.inventory.InventoryFactory; +import org.gastro.inventory.InventoryPackage; +import org.gastro.inventory.Recipe; + +import java.util.Collection; +import java.util.List; + +/** + * This is the item provider adapter for a {@link org.gastro.inventory.Recipe} object. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ +public class RecipeItemProvider extends ProductItemProvider implements IEditingDomainItemProvider, + IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource +{ + /** + * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public RecipeItemProvider(AdapterFactory adapterFactory) + { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) + { + if (itemPropertyDescriptors == null) + { + super.getPropertyDescriptors(object); + + addCostPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Cost feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addCostPropertyDescriptor(Object object) + { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory) + .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Recipe_cost_feature"), getString( + "_UI_PropertyDescriptor_description", "_UI_Recipe_cost_feature", "_UI_Recipe_type"), + InventoryPackage.Literals.RECIPE__COST, false, false, false, ItemPropertyDescriptor.REAL_VALUE_IMAGE, null, + null)); + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) + { + if (childrenFeatures == null) + { + super.getChildrenFeatures(object); + childrenFeatures.add(InventoryPackage.Literals.RECIPE__INGREDIENTS); + } + return childrenFeatures; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) + { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns Recipe.gif. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) + { + return overlayImage(object, getResourceLocator().getImage("full/obj16/Recipe")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public String getText(Object object) + { + String label = ((Recipe)object).getName(); + return label == null || label.length() == 0 ? getString("_UI_Recipe_type") : label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached children and by creating a + * viewer notification, which it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) + { + updateChildren(notification); + + switch (notification.getFeatureID(Recipe.class)) + { + case InventoryPackage.RECIPE__COST: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + case InventoryPackage.RECIPE__INGREDIENTS: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children that can be created under + * this object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) + { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add(createChildParameter(InventoryPackage.Literals.RECIPE__INGREDIENTS, + InventoryFactory.eINSTANCE.createIngredient())); + } + +} diff --git a/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/RestaurantItemProvider.java b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/RestaurantItemProvider.java new file mode 100644 index 0000000000..22d43035b4 --- /dev/null +++ b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/RestaurantItemProvider.java @@ -0,0 +1,228 @@ +/** + * Copyright (c) 2009 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + * + * Initial Publication: + * Eclipse Magazin - http://www.eclipse-magazin.de + */ +package org.gastro.inventory.provider; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.ResourceLocator; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.gastro.inventory.InventoryFactory; +import org.gastro.inventory.InventoryPackage; +import org.gastro.inventory.Restaurant; + +import java.util.Collection; +import java.util.List; + +/** + * This is the item provider adapter for a {@link org.gastro.inventory.Restaurant} object. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ +public class RestaurantItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, + IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource +{ + /** + * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public RestaurantItemProvider(AdapterFactory adapterFactory) + { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) + { + if (itemPropertyDescriptors == null) + { + super.getPropertyDescriptors(object); + + addNamePropertyDescriptor(object); + addStationsPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Name feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addNamePropertyDescriptor(Object object) + { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory) + .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Restaurant_name_feature"), getString( + "_UI_PropertyDescriptor_description", "_UI_Restaurant_name_feature", "_UI_Restaurant_type"), + InventoryPackage.Literals.RESTAURANT__NAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, null)); + } + + /** + * This adds a property descriptor for the Stations feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addStationsPropertyDescriptor(Object object) + { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory) + .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Restaurant_stations_feature"), getString( + "_UI_PropertyDescriptor_description", "_UI_Restaurant_stations_feature", "_UI_Restaurant_type"), + InventoryPackage.Literals.RESTAURANT__STATIONS, false, false, false, null, null, null)); + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) + { + if (childrenFeatures == null) + { + super.getChildrenFeatures(object); + childrenFeatures.add(InventoryPackage.Literals.RESTAURANT__DEPARTMENTS); + childrenFeatures.add(InventoryPackage.Literals.RESTAURANT__MENU_CARDS); + childrenFeatures.add(InventoryPackage.Literals.RESTAURANT__TABLES); + } + return childrenFeatures; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) + { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean hasChildren(Object object) + { + return hasChildren(object, true); + } + + /** + * This returns Restaurant.gif. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) + { + return overlayImage(object, getResourceLocator().getImage("full/obj16/Restaurant")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public String getText(Object object) + { + String label = ((Restaurant)object).getName(); + return label == null || label.length() == 0 ? getString("_UI_Restaurant_type") : label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached children and by creating a + * viewer notification, which it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) + { + updateChildren(notification); + + switch (notification.getFeatureID(Restaurant.class)) + { + case InventoryPackage.RESTAURANT__NAME: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + case InventoryPackage.RESTAURANT__DEPARTMENTS: + case InventoryPackage.RESTAURANT__MENU_CARDS: + case InventoryPackage.RESTAURANT__TABLES: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children that can be created under + * this object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) + { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add(createChildParameter(InventoryPackage.Literals.RESTAURANT__DEPARTMENTS, + InventoryFactory.eINSTANCE.createDepartment())); + + newChildDescriptors.add(createChildParameter(InventoryPackage.Literals.RESTAURANT__MENU_CARDS, + InventoryFactory.eINSTANCE.createMenuCard())); + + newChildDescriptors.add(createChildParameter(InventoryPackage.Literals.RESTAURANT__TABLES, + InventoryFactory.eINSTANCE.createTable())); + } + + /** + * Return the resource locator for this item provider's resources. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() + { + return InventoryEditPlugin.INSTANCE; + } + +} diff --git a/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/SectionItemProvider.java b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/SectionItemProvider.java new file mode 100644 index 0000000000..160c361d56 --- /dev/null +++ b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/SectionItemProvider.java @@ -0,0 +1,220 @@ +/** + * Copyright (c) 2009 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + * + * Initial Publication: + * Eclipse Magazin - http://www.eclipse-magazin.de + */ +package org.gastro.inventory.provider; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.ResourceLocator; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.gastro.inventory.InventoryFactory; +import org.gastro.inventory.InventoryPackage; +import org.gastro.inventory.Section; + +import java.util.Collection; +import java.util.List; + +/** + * This is the item provider adapter for a {@link org.gastro.inventory.Section} object. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ +public class SectionItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, + IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource +{ + /** + * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public SectionItemProvider(AdapterFactory adapterFactory) + { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) + { + if (itemPropertyDescriptors == null) + { + super.getPropertyDescriptors(object); + + addTitlePropertyDescriptor(object); + addTextPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Title feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addTitlePropertyDescriptor(Object object) + { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory) + .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Section_title_feature"), getString( + "_UI_PropertyDescriptor_description", "_UI_Section_title_feature", "_UI_Section_type"), + InventoryPackage.Literals.SECTION__TITLE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, + null)); + } + + /** + * This adds a property descriptor for the Text feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addTextPropertyDescriptor(Object object) + { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory) + .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Section_text_feature"), getString( + "_UI_PropertyDescriptor_description", "_UI_Section_text_feature", "_UI_Section_type"), + InventoryPackage.Literals.SECTION__TEXT, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, + null)); + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) + { + if (childrenFeatures == null) + { + super.getChildrenFeatures(object); + childrenFeatures.add(InventoryPackage.Literals.SECTION__OFFERINGS); + } + return childrenFeatures; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) + { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean hasChildren(Object object) + { + return hasChildren(object, true); + } + + /** + * This returns Section.gif. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) + { + return overlayImage(object, getResourceLocator().getImage("full/obj16/Section")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public String getText(Object object) + { + String label = ((Section)object).getTitle(); + return label == null || label.length() == 0 ? getString("_UI_Section_type") : label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached children and by creating a + * viewer notification, which it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) + { + updateChildren(notification); + + switch (notification.getFeatureID(Section.class)) + { + case InventoryPackage.SECTION__TITLE: + case InventoryPackage.SECTION__TEXT: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + case InventoryPackage.SECTION__OFFERINGS: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children that can be created under + * this object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) + { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add(createChildParameter(InventoryPackage.Literals.SECTION__OFFERINGS, + InventoryFactory.eINSTANCE.createOffering())); + } + + /** + * Return the resource locator for this item provider's resources. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() + { + return InventoryEditPlugin.INSTANCE; + } + +} diff --git a/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/StationItemProvider.java b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/StationItemProvider.java new file mode 100644 index 0000000000..c484e52b4a --- /dev/null +++ b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/StationItemProvider.java @@ -0,0 +1,152 @@ +/** + * Copyright (c) 2009 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + * + * Initial Publication: + * Eclipse Magazin - http://www.eclipse-magazin.de + */ +package org.gastro.inventory.provider; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.ResourceLocator; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.gastro.inventory.InventoryPackage; +import org.gastro.inventory.Station; + +import java.util.Collection; +import java.util.List; + +/** + * This is the item provider adapter for a {@link org.gastro.inventory.Station} object. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ +public class StationItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, + IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource +{ + /** + * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public StationItemProvider(AdapterFactory adapterFactory) + { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) + { + if (itemPropertyDescriptors == null) + { + super.getPropertyDescriptors(object); + + addStationIDPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Station ID feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addStationIDPropertyDescriptor(Object object) + { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory) + .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Station_stationID_feature"), getString( + "_UI_PropertyDescriptor_description", "_UI_Station_stationID_feature", "_UI_Station_type"), + InventoryPackage.Literals.STATION__STATION_ID, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, null)); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean hasChildren(Object object) + { + return hasChildren(object, true); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public String getText(Object object) + { + String label = ((Station)object).getStationID(); + return label == null || label.length() == 0 ? getString("_UI_Station_type") : label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached children and by creating a + * viewer notification, which it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) + { + updateChildren(notification); + + switch (notification.getFeatureID(Station.class)) + { + case InventoryPackage.STATION__STATION_ID: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children that can be created under + * this object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) + { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() + { + return InventoryEditPlugin.INSTANCE; + } + +} diff --git a/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/StockItemProvider.java b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/StockItemProvider.java new file mode 100644 index 0000000000..ca04d8204b --- /dev/null +++ b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/StockItemProvider.java @@ -0,0 +1,204 @@ +/** + * Copyright (c) 2009 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + * + * Initial Publication: + * Eclipse Magazin - http://www.eclipse-magazin.de + */ +package org.gastro.inventory.provider; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.ResourceLocator; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.gastro.inventory.InventoryFactory; +import org.gastro.inventory.InventoryPackage; +import org.gastro.inventory.Stock; + +import java.util.Collection; +import java.util.List; + +/** + * This is the item provider adapter for a {@link org.gastro.inventory.Stock} object. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ +public class StockItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, + IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource +{ + /** + * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public StockItemProvider(AdapterFactory adapterFactory) + { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) + { + if (itemPropertyDescriptors == null) + { + super.getPropertyDescriptors(object); + + addNamePropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Name feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addNamePropertyDescriptor(Object object) + { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory) + .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Stock_name_feature"), getString( + "_UI_PropertyDescriptor_description", "_UI_Stock_name_feature", "_UI_Stock_type"), + InventoryPackage.Literals.STOCK__NAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, + null)); + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) + { + if (childrenFeatures == null) + { + super.getChildrenFeatures(object); + childrenFeatures.add(InventoryPackage.Literals.STOCK__PRODUCTS); + } + return childrenFeatures; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) + { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean hasChildren(Object object) + { + return hasChildren(object, true); + } + + /** + * This returns Stock.gif. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) + { + return overlayImage(object, getResourceLocator().getImage("full/obj16/Stock")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public String getText(Object object) + { + String label = ((Stock)object).getName(); + return label == null || label.length() == 0 ? getString("_UI_Stock_type") : label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached children and by creating a + * viewer notification, which it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) + { + updateChildren(notification); + + switch (notification.getFeatureID(Stock.class)) + { + case InventoryPackage.STOCK__NAME: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + case InventoryPackage.STOCK__PRODUCTS: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children that can be created under + * this object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) + { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add(createChildParameter(InventoryPackage.Literals.STOCK__PRODUCTS, InventoryFactory.eINSTANCE + .createStockProduct())); + } + + /** + * Return the resource locator for this item provider's resources. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() + { + return InventoryEditPlugin.INSTANCE; + } + +} diff --git a/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/StockProductItemProvider.java b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/StockProductItemProvider.java new file mode 100644 index 0000000000..c443c97fab --- /dev/null +++ b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/StockProductItemProvider.java @@ -0,0 +1,171 @@ +/** + * Copyright (c) 2009 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + * + * Initial Publication: + * Eclipse Magazin - http://www.eclipse-magazin.de + */ +package org.gastro.inventory.provider; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.gastro.inventory.InventoryPackage; +import org.gastro.inventory.StockProduct; + +import java.util.Collection; +import java.util.List; + +/** + * This is the item provider adapter for a {@link org.gastro.inventory.StockProduct} object. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ +public class StockProductItemProvider extends ProductItemProvider implements IEditingDomainItemProvider, + IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource +{ + /** + * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public StockProductItemProvider(AdapterFactory adapterFactory) + { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) + { + if (itemPropertyDescriptors == null) + { + super.getPropertyDescriptors(object); + + addCostPropertyDescriptor(object); + addAvailablePropertyDescriptor(object); + addOrderLimitPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Cost feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addCostPropertyDescriptor(Object object) + { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory) + .getRootAdapterFactory(), getResourceLocator(), getString("_UI_StockProduct_cost_feature"), getString( + "_UI_PropertyDescriptor_description", "_UI_StockProduct_cost_feature", "_UI_StockProduct_type"), + InventoryPackage.Literals.STOCK_PRODUCT__COST, true, false, false, ItemPropertyDescriptor.REAL_VALUE_IMAGE, + null, null)); + } + + /** + * This adds a property descriptor for the Available feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addAvailablePropertyDescriptor(Object object) + { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory) + .getRootAdapterFactory(), getResourceLocator(), getString("_UI_StockProduct_available_feature"), getString( + "_UI_PropertyDescriptor_description", "_UI_StockProduct_available_feature", "_UI_StockProduct_type"), + InventoryPackage.Literals.STOCK_PRODUCT__AVAILABLE, true, false, false, + ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); + } + + /** + * This adds a property descriptor for the Order Limit feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addOrderLimitPropertyDescriptor(Object object) + { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory) + .getRootAdapterFactory(), getResourceLocator(), getString("_UI_StockProduct_orderLimit_feature"), getString( + "_UI_PropertyDescriptor_description", "_UI_StockProduct_orderLimit_feature", "_UI_StockProduct_type"), + InventoryPackage.Literals.STOCK_PRODUCT__ORDER_LIMIT, true, false, false, + ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); + } + + /** + * This returns StockProduct.gif. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) + { + return overlayImage(object, getResourceLocator().getImage("full/obj16/StockProduct")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public String getText(Object object) + { + String label = ((StockProduct)object).getName(); + return label == null || label.length() == 0 ? getString("_UI_StockProduct_type") : label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached children and by creating a + * viewer notification, which it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) + { + updateChildren(notification); + + switch (notification.getFeatureID(StockProduct.class)) + { + case InventoryPackage.STOCK_PRODUCT__COST: + case InventoryPackage.STOCK_PRODUCT__AVAILABLE: + case InventoryPackage.STOCK_PRODUCT__ORDER_LIMIT: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children that can be created under + * this object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) + { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/TableItemProvider.java b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/TableItemProvider.java new file mode 100644 index 0000000000..67b1f164a9 --- /dev/null +++ b/plugins/org.gastro.inventory.edit/src/org/gastro/inventory/provider/TableItemProvider.java @@ -0,0 +1,139 @@ +/** + * Copyright (c) 2009 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + * + * Initial Publication: + * Eclipse Magazin - http://www.eclipse-magazin.de + */ +package org.gastro.inventory.provider; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.gastro.inventory.InventoryPackage; +import org.gastro.inventory.Table; + +import java.util.Collection; +import java.util.List; + +/** + * This is the item provider adapter for a {@link org.gastro.inventory.Table} object. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ +public class TableItemProvider extends StationItemProvider implements IEditingDomainItemProvider, + IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource +{ + /** + * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public TableItemProvider(AdapterFactory adapterFactory) + { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) + { + if (itemPropertyDescriptors == null) + { + super.getPropertyDescriptors(object); + + addSeatsPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Seats feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addSeatsPropertyDescriptor(Object object) + { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory) + .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Table_seats_feature"), getString( + "_UI_PropertyDescriptor_description", "_UI_Table_seats_feature", "_UI_Table_type"), + InventoryPackage.Literals.TABLE__SEATS, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, + null)); + } + + /** + * This returns Table.gif. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) + { + return overlayImage(object, getResourceLocator().getImage("full/obj16/Table")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public String getText(Object object) + { + String label = ((Table)object).getStationID(); + return label == null || label.length() == 0 ? getString("_UI_Table_type") : label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached children and by creating a + * viewer notification, which it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) + { + updateChildren(notification); + + switch (notification.getFeatureID(Table.class)) + { + case InventoryPackage.TABLE__SEATS: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children that can be created under + * this object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) + { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/plugins/org.gastro.inventory/.classpath b/plugins/org.gastro.inventory/.classpath new file mode 100644 index 0000000000..304e86186a --- /dev/null +++ b/plugins/org.gastro.inventory/.classpath @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="src"/> + <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="output" path="bin"/> +</classpath> diff --git a/plugins/org.gastro.inventory/.cvsignore b/plugins/org.gastro.inventory/.cvsignore new file mode 100644 index 0000000000..693869726d --- /dev/null +++ b/plugins/org.gastro.inventory/.cvsignore @@ -0,0 +1,2 @@ +bin +doc diff --git a/plugins/org.gastro.inventory/.project b/plugins/org.gastro.inventory/.project new file mode 100644 index 0000000000..3730e4b3a4 --- /dev/null +++ b/plugins/org.gastro.inventory/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.gastro.inventory</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.ManifestBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.SchemaBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + <nature>org.eclipse.pde.PluginNature</nature> + </natures> +</projectDescription> diff --git a/plugins/org.gastro.inventory/.settings/org.eclipse.core.resources.prefs b/plugins/org.gastro.inventory/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000000..0591f954d8 --- /dev/null +++ b/plugins/org.gastro.inventory/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,4 @@ +#Wed Apr 08 19:12:33 CEST 2009 +eclipse.preferences.version=1 +encoding//model/inventory.ecore=UTF-8 +encoding//model/inventory.ecorediag=UTF-8 diff --git a/plugins/org.gastro.inventory/META-INF/CDO.MF b/plugins/org.gastro.inventory/META-INF/CDO.MF new file mode 100644 index 0000000000..bbfa1b0550 --- /dev/null +++ b/plugins/org.gastro.inventory/META-INF/CDO.MF @@ -0,0 +1 @@ +This is a marker file for bundles with CDO native models. diff --git a/plugins/org.gastro.inventory/META-INF/MANIFEST.MF b/plugins/org.gastro.inventory/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..0c622fc389 --- /dev/null +++ b/plugins/org.gastro.inventory/META-INF/MANIFEST.MF @@ -0,0 +1,16 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: org.gastro.inventory;singleton:=true +Bundle-Version: 1.0.0 +Bundle-ClassPath: . +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: J2SE-1.5 +Export-Package: org.gastro.inventory, + org.gastro.inventory.impl, + org.gastro.inventory.util +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.emf.ecore;visibility:=reexport, + org.eclipse.emf.cdo;visibility:=reexport +Bundle-ActivationPolicy: lazy diff --git a/plugins/org.gastro.inventory/build.properties b/plugins/org.gastro.inventory/build.properties new file mode 100644 index 0000000000..e8ee381f01 --- /dev/null +++ b/plugins/org.gastro.inventory/build.properties @@ -0,0 +1,17 @@ + +# <copyright> +# </copyright> +# +# $Id: build.properties,v 1.1 2009-04-26 16:52:38 estepper Exp $ + +bin.includes = .,\ + model/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties,\ + copyright.txt,\ + epl-v10.html,\ + license.html +jars.compile.order = . +source.. = src/ +output.. = bin/ diff --git a/plugins/org.gastro.inventory/copyright.txt b/plugins/org.gastro.inventory/copyright.txt new file mode 100644 index 0000000000..d7088ff84e --- /dev/null +++ b/plugins/org.gastro.inventory/copyright.txt @@ -0,0 +1,11 @@ +Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) 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: + Eike Stepper - initial API and implementation + +Initial Publication: + Eclipse Magazin - http://www.eclipse-magazin.de
\ No newline at end of file diff --git a/plugins/org.gastro.inventory/epl-v10.html b/plugins/org.gastro.inventory/epl-v10.html new file mode 100644 index 0000000000..d7b88e9416 --- /dev/null +++ b/plugins/org.gastro.inventory/epl-v10.html @@ -0,0 +1,319 @@ +<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"><head> +<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> +<meta name="ProgId" content="Word.Document"> +<meta name="Generator" content="Microsoft Word 9"> +<meta name="Originator" content="Microsoft Word 9"> +<link rel="File-List" href="http://www.eclipse.org/org/documents/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml"><title>Eclipse Public License - Version 1.0</title><!--[if gte mso 9]><xml> + <o:DocumentProperties> + <o:Revision>2</o:Revision> + <o:TotalTime>3</o:TotalTime> + <o:Created>2004-03-05T23:03:00Z</o:Created> + <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved> + <o:Pages>4</o:Pages> + <o:Words>1626</o:Words> + <o:Characters>9270</o:Characters> + <o:Lines>77</o:Lines> + <o:Paragraphs>18</o:Paragraphs> + <o:CharactersWithSpaces>11384</o:CharactersWithSpaces> + <o:Version>9.4402</o:Version> + </o:DocumentProperties> +</xml><![endif]--><!--[if gte mso 9]><xml> + <w:WordDocument> + <w:TrackRevisions/> + </w:WordDocument> +</xml><![endif]--> + + +<style> +<!-- + /* Font Definitions */ +@font-face + {font-family:Tahoma; + panose-1:2 11 6 4 3 5 4 4 2 4; + mso-font-charset:0; + mso-generic-font-family:swiss; + mso-font-pitch:variable; + mso-font-signature:553679495 -2147483648 8 0 66047 0;} + /* Style Definitions */ +p.MsoNormal, li.MsoNormal, div.MsoNormal + {mso-style-parent:""; + margin:0in; + margin-bottom:.0001pt; + mso-pagination:widow-orphan; + font-size:12.0pt; + font-family:"Times New Roman"; + mso-fareast-font-family:"Times New Roman";} +p + {margin-right:0in; + mso-margin-top-alt:auto; + mso-margin-bottom-alt:auto; + margin-left:0in; + mso-pagination:widow-orphan; + font-size:12.0pt; + font-family:"Times New Roman"; + mso-fareast-font-family:"Times New Roman";} +p.BalloonText, li.BalloonText, div.BalloonText + {mso-style-name:"Balloon Text"; + margin:0in; + margin-bottom:.0001pt; + mso-pagination:widow-orphan; + font-size:8.0pt; + font-family:Tahoma; + mso-fareast-font-family:"Times New Roman";} +@page Section1 + {size:8.5in 11.0in; + margin:1.0in 1.25in 1.0in 1.25in; + mso-header-margin:.5in; + mso-footer-margin:.5in; + mso-paper-source:0;} +div.Section1 + {page:Section1;} +--> +</style></head> + +<body style="" lang="EN-US"> + +<div class="Section1"> + +<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b> +</p> + +<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER +THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, +REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE +OF THIS AGREEMENT.</span> </p> + +<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p> + +<p><span style="font-size: 10pt;">"Contribution" means:</span> </p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a) +in the case of the initial Contributor, the initial code and documentation +distributed under this Agreement, and<br clear="left"> +b) in the case of each subsequent Contributor:</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i) +changes to the Program, and</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii) +additions to the Program;</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where +such changes and/or additions to the Program originate from and are distributed +by that particular Contributor. A Contribution 'originates' from a Contributor +if it was added to the Program by such Contributor itself or anyone acting on +such Contributor's behalf. Contributions do not include additions to the +Program which: (i) are separate modules of software distributed in conjunction +with the Program under their own license agreement, and (ii) are not derivative +works of the Program. </span></p> + +<p><span style="font-size: 10pt;">"Contributor" means any person or +entity that distributes the Program.</span> </p> + +<p><span style="font-size: 10pt;">"Licensed Patents " mean patent +claims licensable by a Contributor which are necessarily infringed by the use +or sale of its Contribution alone or when combined with the Program. </span></p> + +<p><span style="font-size: 10pt;">"Program" means the Contributions +distributed in accordance with this Agreement.</span> </p> + +<p><span style="font-size: 10pt;">"Recipient" means anyone who +receives the Program under this Agreement, including all Contributors.</span> </p> + +<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a) +Subject to the terms of this Agreement, each Contributor hereby grants Recipient +a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly +display, publicly perform, distribute and sublicense the Contribution of such +Contributor, if any, and such derivative works, in source code and object code +form.</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) +Subject to the terms of this Agreement, each Contributor hereby grants +Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free +patent license under Licensed Patents to make, use, sell, offer to sell, import +and otherwise transfer the Contribution of such Contributor, if any, in source +code and object code form. This patent license shall apply to the combination +of the Contribution and the Program if, at the time the Contribution is added +by the Contributor, such addition of the Contribution causes such combination +to be covered by the Licensed Patents. The patent license shall not apply to +any other combinations which include the Contribution. No hardware per se is +licensed hereunder. </span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c) +Recipient understands that although each Contributor grants the licenses to its +Contributions set forth herein, no assurances are provided by any Contributor +that the Program does not infringe the patent or other intellectual property +rights of any other entity. Each Contributor disclaims any liability to Recipient +for claims brought by any other entity based on infringement of intellectual +property rights or otherwise. As a condition to exercising the rights and +licenses granted hereunder, each Recipient hereby assumes sole responsibility +to secure any other intellectual property rights needed, if any. For example, +if a third party patent license is required to allow Recipient to distribute +the Program, it is Recipient's responsibility to acquire that license before +distributing the Program.</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d) +Each Contributor represents that to its knowledge it has sufficient copyright +rights in its Contribution, if any, to grant the copyright license set forth in +this Agreement. </span></p> + +<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p> + +<p><span style="font-size: 10pt;">A Contributor may choose to distribute the +Program in object code form under its own license agreement, provided that:</span> +</p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a) +it complies with the terms and conditions of this Agreement; and</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) +its license agreement:</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i) +effectively disclaims on behalf of all Contributors all warranties and +conditions, express and implied, including warranties or conditions of title +and non-infringement, and implied warranties or conditions of merchantability +and fitness for a particular purpose; </span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii) +effectively excludes on behalf of all Contributors all liability for damages, +including direct, indirect, special, incidental and consequential damages, such +as lost profits; </span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii) +states that any provisions which differ from this Agreement are offered by that +Contributor alone and not by any other party; and</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv) +states that source code for the Program is available from such Contributor, and +informs licensees how to obtain it in a reasonable manner on or through a +medium customarily used for software exchange.<span style="color: blue;"> </span></span></p> + +<p><span style="font-size: 10pt;">When the Program is made available in source +code form:</span> </p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a) +it must be made available under this Agreement; and </span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a +copy of this Agreement must be included with each copy of the Program. </span></p> + +<p><span style="font-size: 10pt;">Contributors may not remove or alter any +copyright notices contained within the Program. </span></p> + +<p><span style="font-size: 10pt;">Each Contributor must identify itself as the +originator of its Contribution, if any, in a manner that reasonably allows +subsequent Recipients to identify the originator of the Contribution. </span></p> + +<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p> + +<p><span style="font-size: 10pt;">Commercial distributors of software may +accept certain responsibilities with respect to end users, business partners +and the like. While this license is intended to facilitate the commercial use +of the Program, the Contributor who includes the Program in a commercial +product offering should do so in a manner which does not create potential +liability for other Contributors. Therefore, if a Contributor includes the +Program in a commercial product offering, such Contributor ("Commercial +Contributor") hereby agrees to defend and indemnify every other +Contributor ("Indemnified Contributor") against any losses, damages and +costs (collectively "Losses") arising from claims, lawsuits and other +legal actions brought by a third party against the Indemnified Contributor to +the extent caused by the acts or omissions of such Commercial Contributor in +connection with its distribution of the Program in a commercial product +offering. The obligations in this section do not apply to any claims or Losses +relating to any actual or alleged intellectual property infringement. In order +to qualify, an Indemnified Contributor must: a) promptly notify the Commercial +Contributor in writing of such claim, and b) allow the Commercial Contributor +to control, and cooperate with the Commercial Contributor in, the defense and +any related settlement negotiations. The Indemnified Contributor may participate +in any such claim at its own expense.</span> </p> + +<p><span style="font-size: 10pt;">For example, a Contributor might include the +Program in a commercial product offering, Product X. That Contributor is then a +Commercial Contributor. If that Commercial Contributor then makes performance +claims, or offers warranties related to Product X, those performance claims and +warranties are such Commercial Contributor's responsibility alone. Under this +section, the Commercial Contributor would have to defend claims against the +other Contributors related to those performance claims and warranties, and if a +court requires any other Contributor to pay any damages as a result, the +Commercial Contributor must pay those damages.</span> </p> + +<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p> + +<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS +AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT +WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, +WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, +MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely +responsible for determining the appropriateness of using and distributing the +Program and assumes all risks associated with its exercise of rights under this +Agreement , including but not limited to the risks and costs of program errors, +compliance with applicable laws, damage to or loss of data, programs or +equipment, and unavailability or interruption of operations. </span></p> + +<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p> + +<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS +AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY +OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF +THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF +THE POSSIBILITY OF SUCH DAMAGES.</span> </p> + +<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p> + +<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid +or unenforceable under applicable law, it shall not affect the validity or +enforceability of the remainder of the terms of this Agreement, and without +further action by the parties hereto, such provision shall be reformed to the +minimum extent necessary to make such provision valid and enforceable.</span> </p> + +<p><span style="font-size: 10pt;">If Recipient institutes patent litigation +against any entity (including a cross-claim or counterclaim in a lawsuit) +alleging that the Program itself (excluding combinations of the Program with +other software or hardware) infringes such Recipient's patent(s), then such +Recipient's rights granted under Section 2(b) shall terminate as of the date +such litigation is filed. </span></p> + +<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement +shall terminate if it fails to comply with any of the material terms or +conditions of this Agreement and does not cure such failure in a reasonable +period of time after becoming aware of such noncompliance. If all Recipient's +rights under this Agreement terminate, Recipient agrees to cease use and +distribution of the Program as soon as reasonably practicable. However, +Recipient's obligations under this Agreement and any licenses granted by +Recipient relating to the Program shall continue and survive. </span></p> + +<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute +copies of this Agreement, but in order to avoid inconsistency the Agreement is +copyrighted and may only be modified in the following manner. The Agreement +Steward reserves the right to publish new versions (including revisions) of +this Agreement from time to time. No one other than the Agreement Steward has +the right to modify this Agreement. The Eclipse Foundation is the initial +Agreement Steward. The Eclipse Foundation may assign the responsibility to +serve as the Agreement Steward to a suitable separate entity. Each new version +of the Agreement will be given a distinguishing version number. The Program +(including Contributions) may always be distributed subject to the version of +the Agreement under which it was received. In addition, after a new version of +the Agreement is published, Contributor may elect to distribute the Program +(including its Contributions) under the new version. Except as expressly stated +in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to +the intellectual property of any Contributor under this Agreement, whether +expressly, by implication, estoppel or otherwise. All rights in the Program not +expressly granted under this Agreement are reserved.</span> </p> + +<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the +State of New York and the intellectual property laws of the United States of +America. No party to this Agreement will bring a legal action under this +Agreement more than one year after the cause of action arose. Each party waives +its rights to a jury trial in any resulting litigation.</span> </p> + +<p class="MsoNormal"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p> + +</div> + +</body></html>
\ No newline at end of file diff --git a/plugins/org.gastro.inventory/license.html b/plugins/org.gastro.inventory/license.html new file mode 100644 index 0000000000..d7b88e9416 --- /dev/null +++ b/plugins/org.gastro.inventory/license.html @@ -0,0 +1,319 @@ +<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"><head> +<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> +<meta name="ProgId" content="Word.Document"> +<meta name="Generator" content="Microsoft Word 9"> +<meta name="Originator" content="Microsoft Word 9"> +<link rel="File-List" href="http://www.eclipse.org/org/documents/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml"><title>Eclipse Public License - Version 1.0</title><!--[if gte mso 9]><xml> + <o:DocumentProperties> + <o:Revision>2</o:Revision> + <o:TotalTime>3</o:TotalTime> + <o:Created>2004-03-05T23:03:00Z</o:Created> + <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved> + <o:Pages>4</o:Pages> + <o:Words>1626</o:Words> + <o:Characters>9270</o:Characters> + <o:Lines>77</o:Lines> + <o:Paragraphs>18</o:Paragraphs> + <o:CharactersWithSpaces>11384</o:CharactersWithSpaces> + <o:Version>9.4402</o:Version> + </o:DocumentProperties> +</xml><![endif]--><!--[if gte mso 9]><xml> + <w:WordDocument> + <w:TrackRevisions/> + </w:WordDocument> +</xml><![endif]--> + + +<style> +<!-- + /* Font Definitions */ +@font-face + {font-family:Tahoma; + panose-1:2 11 6 4 3 5 4 4 2 4; + mso-font-charset:0; + mso-generic-font-family:swiss; + mso-font-pitch:variable; + mso-font-signature:553679495 -2147483648 8 0 66047 0;} + /* Style Definitions */ +p.MsoNormal, li.MsoNormal, div.MsoNormal + {mso-style-parent:""; + margin:0in; + margin-bottom:.0001pt; + mso-pagination:widow-orphan; + font-size:12.0pt; + font-family:"Times New Roman"; + mso-fareast-font-family:"Times New Roman";} +p + {margin-right:0in; + mso-margin-top-alt:auto; + mso-margin-bottom-alt:auto; + margin-left:0in; + mso-pagination:widow-orphan; + font-size:12.0pt; + font-family:"Times New Roman"; + mso-fareast-font-family:"Times New Roman";} +p.BalloonText, li.BalloonText, div.BalloonText + {mso-style-name:"Balloon Text"; + margin:0in; + margin-bottom:.0001pt; + mso-pagination:widow-orphan; + font-size:8.0pt; + font-family:Tahoma; + mso-fareast-font-family:"Times New Roman";} +@page Section1 + {size:8.5in 11.0in; + margin:1.0in 1.25in 1.0in 1.25in; + mso-header-margin:.5in; + mso-footer-margin:.5in; + mso-paper-source:0;} +div.Section1 + {page:Section1;} +--> +</style></head> + +<body style="" lang="EN-US"> + +<div class="Section1"> + +<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b> +</p> + +<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER +THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, +REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE +OF THIS AGREEMENT.</span> </p> + +<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p> + +<p><span style="font-size: 10pt;">"Contribution" means:</span> </p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a) +in the case of the initial Contributor, the initial code and documentation +distributed under this Agreement, and<br clear="left"> +b) in the case of each subsequent Contributor:</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i) +changes to the Program, and</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii) +additions to the Program;</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where +such changes and/or additions to the Program originate from and are distributed +by that particular Contributor. A Contribution 'originates' from a Contributor +if it was added to the Program by such Contributor itself or anyone acting on +such Contributor's behalf. Contributions do not include additions to the +Program which: (i) are separate modules of software distributed in conjunction +with the Program under their own license agreement, and (ii) are not derivative +works of the Program. </span></p> + +<p><span style="font-size: 10pt;">"Contributor" means any person or +entity that distributes the Program.</span> </p> + +<p><span style="font-size: 10pt;">"Licensed Patents " mean patent +claims licensable by a Contributor which are necessarily infringed by the use +or sale of its Contribution alone or when combined with the Program. </span></p> + +<p><span style="font-size: 10pt;">"Program" means the Contributions +distributed in accordance with this Agreement.</span> </p> + +<p><span style="font-size: 10pt;">"Recipient" means anyone who +receives the Program under this Agreement, including all Contributors.</span> </p> + +<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a) +Subject to the terms of this Agreement, each Contributor hereby grants Recipient +a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly +display, publicly perform, distribute and sublicense the Contribution of such +Contributor, if any, and such derivative works, in source code and object code +form.</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) +Subject to the terms of this Agreement, each Contributor hereby grants +Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free +patent license under Licensed Patents to make, use, sell, offer to sell, import +and otherwise transfer the Contribution of such Contributor, if any, in source +code and object code form. This patent license shall apply to the combination +of the Contribution and the Program if, at the time the Contribution is added +by the Contributor, such addition of the Contribution causes such combination +to be covered by the Licensed Patents. The patent license shall not apply to +any other combinations which include the Contribution. No hardware per se is +licensed hereunder. </span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c) +Recipient understands that although each Contributor grants the licenses to its +Contributions set forth herein, no assurances are provided by any Contributor +that the Program does not infringe the patent or other intellectual property +rights of any other entity. Each Contributor disclaims any liability to Recipient +for claims brought by any other entity based on infringement of intellectual +property rights or otherwise. As a condition to exercising the rights and +licenses granted hereunder, each Recipient hereby assumes sole responsibility +to secure any other intellectual property rights needed, if any. For example, +if a third party patent license is required to allow Recipient to distribute +the Program, it is Recipient's responsibility to acquire that license before +distributing the Program.</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d) +Each Contributor represents that to its knowledge it has sufficient copyright +rights in its Contribution, if any, to grant the copyright license set forth in +this Agreement. </span></p> + +<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p> + +<p><span style="font-size: 10pt;">A Contributor may choose to distribute the +Program in object code form under its own license agreement, provided that:</span> +</p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a) +it complies with the terms and conditions of this Agreement; and</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) +its license agreement:</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i) +effectively disclaims on behalf of all Contributors all warranties and +conditions, express and implied, including warranties or conditions of title +and non-infringement, and implied warranties or conditions of merchantability +and fitness for a particular purpose; </span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii) +effectively excludes on behalf of all Contributors all liability for damages, +including direct, indirect, special, incidental and consequential damages, such +as lost profits; </span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii) +states that any provisions which differ from this Agreement are offered by that +Contributor alone and not by any other party; and</span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv) +states that source code for the Program is available from such Contributor, and +informs licensees how to obtain it in a reasonable manner on or through a +medium customarily used for software exchange.<span style="color: blue;"> </span></span></p> + +<p><span style="font-size: 10pt;">When the Program is made available in source +code form:</span> </p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a) +it must be made available under this Agreement; and </span></p> + +<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a +copy of this Agreement must be included with each copy of the Program. </span></p> + +<p><span style="font-size: 10pt;">Contributors may not remove or alter any +copyright notices contained within the Program. </span></p> + +<p><span style="font-size: 10pt;">Each Contributor must identify itself as the +originator of its Contribution, if any, in a manner that reasonably allows +subsequent Recipients to identify the originator of the Contribution. </span></p> + +<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p> + +<p><span style="font-size: 10pt;">Commercial distributors of software may +accept certain responsibilities with respect to end users, business partners +and the like. While this license is intended to facilitate the commercial use +of the Program, the Contributor who includes the Program in a commercial +product offering should do so in a manner which does not create potential +liability for other Contributors. Therefore, if a Contributor includes the +Program in a commercial product offering, such Contributor ("Commercial +Contributor") hereby agrees to defend and indemnify every other +Contributor ("Indemnified Contributor") against any losses, damages and +costs (collectively "Losses") arising from claims, lawsuits and other +legal actions brought by a third party against the Indemnified Contributor to +the extent caused by the acts or omissions of such Commercial Contributor in +connection with its distribution of the Program in a commercial product +offering. The obligations in this section do not apply to any claims or Losses +relating to any actual or alleged intellectual property infringement. In order +to qualify, an Indemnified Contributor must: a) promptly notify the Commercial +Contributor in writing of such claim, and b) allow the Commercial Contributor +to control, and cooperate with the Commercial Contributor in, the defense and +any related settlement negotiations. The Indemnified Contributor may participate +in any such claim at its own expense.</span> </p> + +<p><span style="font-size: 10pt;">For example, a Contributor might include the +Program in a commercial product offering, Product X. That Contributor is then a +Commercial Contributor. If that Commercial Contributor then makes performance +claims, or offers warranties related to Product X, those performance claims and +warranties are such Commercial Contributor's responsibility alone. Under this +section, the Commercial Contributor would have to defend claims against the +other Contributors related to those performance claims and warranties, and if a +court requires any other Contributor to pay any damages as a result, the +Commercial Contributor must pay those damages.</span> </p> + +<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p> + +<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS +AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT +WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, +WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, +MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely +responsible for determining the appropriateness of using and distributing the +Program and assumes all risks associated with its exercise of rights under this +Agreement , including but not limited to the risks and costs of program errors, +compliance with applicable laws, damage to or loss of data, programs or +equipment, and unavailability or interruption of operations. </span></p> + +<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p> + +<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS +AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY +OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF +THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF +THE POSSIBILITY OF SUCH DAMAGES.</span> </p> + +<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p> + +<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid +or unenforceable under applicable law, it shall not affect the validity or +enforceability of the remainder of the terms of this Agreement, and without +further action by the parties hereto, such provision shall be reformed to the +minimum extent necessary to make such provision valid and enforceable.</span> </p> + +<p><span style="font-size: 10pt;">If Recipient institutes patent litigation +against any entity (including a cross-claim or counterclaim in a lawsuit) +alleging that the Program itself (excluding combinations of the Program with +other software or hardware) infringes such Recipient's patent(s), then such +Recipient's rights granted under Section 2(b) shall terminate as of the date +such litigation is filed. </span></p> + +<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement +shall terminate if it fails to comply with any of the material terms or +conditions of this Agreement and does not cure such failure in a reasonable +period of time after becoming aware of such noncompliance. If all Recipient's +rights under this Agreement terminate, Recipient agrees to cease use and +distribution of the Program as soon as reasonably practicable. However, +Recipient's obligations under this Agreement and any licenses granted by +Recipient relating to the Program shall continue and survive. </span></p> + +<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute +copies of this Agreement, but in order to avoid inconsistency the Agreement is +copyrighted and may only be modified in the following manner. The Agreement +Steward reserves the right to publish new versions (including revisions) of +this Agreement from time to time. No one other than the Agreement Steward has +the right to modify this Agreement. The Eclipse Foundation is the initial +Agreement Steward. The Eclipse Foundation may assign the responsibility to +serve as the Agreement Steward to a suitable separate entity. Each new version +of the Agreement will be given a distinguishing version number. The Program +(including Contributions) may always be distributed subject to the version of +the Agreement under which it was received. In addition, after a new version of +the Agreement is published, Contributor may elect to distribute the Program +(including its Contributions) under the new version. Except as expressly stated +in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to +the intellectual property of any Contributor under this Agreement, whether +expressly, by implication, estoppel or otherwise. All rights in the Program not +expressly granted under this Agreement are reserved.</span> </p> + +<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the +State of New York and the intellectual property laws of the United States of +America. No party to this Agreement will bring a legal action under this +Agreement more than one year after the cause of action arose. Each party waives +its rights to a jury trial in any resulting litigation.</span> </p> + +<p class="MsoNormal"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p> + +</div> + +</body></html>
\ No newline at end of file diff --git a/plugins/org.gastro.inventory/model/inventory.ecore b/plugins/org.gastro.inventory/model/inventory.ecore new file mode 100644 index 0000000000..876f1c642d --- /dev/null +++ b/plugins/org.gastro.inventory/model/inventory.ecore @@ -0,0 +1,97 @@ +<?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="inventory" + nsURI="http://www.gastro.org/inventory/1.0" nsPrefix="inventory"> + <eClassifiers xsi:type="ecore:EClass" name="Stock"> + <eStructuralFeatures xsi:type="ecore:EReference" name="products" upperBound="-1" + eType="#//StockProduct" containment="true" eOpposite="#//StockProduct/stock"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="department" lowerBound="1" + eType="#//Department" eOpposite="#//Department/stocks"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="Product" abstract="true"> + <eOperations name="getCost" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFloat"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="StockProduct" eSuperTypes="#//Product"> + <eStructuralFeatures xsi:type="ecore:EReference" name="stock" lowerBound="1" eType="#//Stock" + eOpposite="#//Stock/products"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="cost" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFloat"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="available" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="orderLimit" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="Recipe" eSuperTypes="#//Product"> + <eStructuralFeatures xsi:type="ecore:EReference" name="ingredients" upperBound="-1" + eType="#//Ingredient" containment="true" eOpposite="#//Ingredient/recipe"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="department" eType="#//Department" + eOpposite="#//Department/recipes"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="cost" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFloat" + changeable="false" volatile="true" transient="true" derived="true"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="Ingredient"> + <eStructuralFeatures xsi:type="ecore:EReference" name="recipe" lowerBound="1" + eType="#//Recipe" eOpposite="#//Recipe/ingredients"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="product" lowerBound="1" + eType="#//Product"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="quantity" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="MenuCard"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="title" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="restaurant" lowerBound="1" + eType="#//Restaurant" eOpposite="#//Restaurant/menuCards"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="sections" lowerBound="1" + upperBound="-1" eType="#//Section" containment="true" eOpposite="#//Section/menuCard"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="Restaurant"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="departments" upperBound="-1" + eType="#//Department" containment="true" eOpposite="#//Department/restaurant"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="menuCards" upperBound="-1" + eType="#//MenuCard" containment="true" eOpposite="#//MenuCard/restaurant"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="tables" upperBound="-1" + eType="#//Table" containment="true" eOpposite="#//Table/restaurant"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="stations" upperBound="-1" + eType="#//Station" changeable="false" volatile="true" transient="true" derived="true"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="Department" eSuperTypes="#//Station"> + <eStructuralFeatures xsi:type="ecore:EReference" name="recipes" upperBound="-1" + eType="#//Recipe" containment="true" eOpposite="#//Recipe/department"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="restaurant" lowerBound="1" + eType="#//Restaurant" eOpposite="#//Restaurant/departments"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="employees" upperBound="-1" + eType="#//Employee" containment="true" eOpposite="#//Employee/department"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="stocks" lowerBound="1" + upperBound="-1" eType="#//Stock" containment="true" eOpposite="#//Stock/department"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="Offering"> + <eStructuralFeatures xsi:type="ecore:EReference" name="product" lowerBound="1" + eType="#//Product"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="description" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="price" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFloat"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="section" lowerBound="1" + eType="#//Section" eOpposite="#//Section/offerings"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="Table" eSuperTypes="#//Station"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="seats" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="restaurant" lowerBound="1" + eType="#//Restaurant" eOpposite="#//Restaurant/tables"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="Employee"> + <eStructuralFeatures xsi:type="ecore:EReference" name="department" eType="#//Department" + eOpposite="#//Department/employees"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="Station" abstract="true"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="stationID" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="Section"> + <eStructuralFeatures xsi:type="ecore:EReference" name="menuCard" lowerBound="1" + eType="#//MenuCard" eOpposite="#//MenuCard/sections"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="offerings" lowerBound="1" + upperBound="-1" eType="#//Offering" containment="true" eOpposite="#//Offering/section"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="title" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="text" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> + </eClassifiers> +</ecore:EPackage> diff --git a/plugins/org.gastro.inventory/model/inventory.ecorediag b/plugins/org.gastro.inventory/model/inventory.ecorediag new file mode 100644 index 0000000000..4faea0320f --- /dev/null +++ b/plugins/org.gastro.inventory/model/inventory.ecorediag @@ -0,0 +1,481 @@ +<?xml version="1.0" encoding="UTF-8"?> +<notation:Diagram 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:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmi:id="_nnG-cCRYEd6Laae2Tgx_FA" type="EcoreTools" name="inventory" measurementUnit="Pixel"> + <children xmi:type="notation:Node" xmi:id="_wh69UCRYEd6Laae2Tgx_FA" type="1001"> + <children xmi:type="notation:Node" xmi:id="_wh8ygCRYEd6Laae2Tgx_FA" type="4001"/> + <children xmi:type="notation:Node" xmi:id="_wh8ygSRYEd6Laae2Tgx_FA" type="5001"> + <children xmi:type="notation:Node" xmi:id="_8-7bICRZEd6Laae2Tgx_FA" type="2001"> + <element xmi:type="ecore:EAttribute" href="inventory.ecore#//Product/name"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_8-7bISRZEd6Laae2Tgx_FA"/> + </children> + <styles xmi:type="notation:DrawerStyle" xmi:id="_wh8ygiRYEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_wh8ygyRYEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_wh8yhCRYEd6Laae2Tgx_FA"/> + </children> + <children xmi:type="notation:Node" xmi:id="_wh8yhSRYEd6Laae2Tgx_FA" type="5002"> + <children xmi:type="notation:Node" xmi:id="_yJaYMCRbEd6Laae2Tgx_FA" type="2002"> + <element xmi:type="ecore:EOperation" href="inventory.ecore#//Product/getCost"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_yJa_QCRbEd6Laae2Tgx_FA"/> + </children> + <styles xmi:type="notation:DrawerStyle" xmi:id="_wh8yhiRYEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_wh8yhyRYEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_wh8yiCRYEd6Laae2Tgx_FA"/> + </children> + <styles xmi:type="notation:ShapeStyle" xmi:id="_wh69USRYEd6Laae2Tgx_FA" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="15772310" lineColor="8421504"/> + <element xmi:type="ecore:EClass" href="inventory.ecore#//Product"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_wh69UiRYEd6Laae2Tgx_FA" x="245" y="29"/> + </children> + <children xmi:type="notation:Node" xmi:id="_xidNQCRYEd6Laae2Tgx_FA" type="1001"> + <children xmi:type="notation:Node" xmi:id="_xid0UCRYEd6Laae2Tgx_FA" type="4001"/> + <children xmi:type="notation:Node" xmi:id="_xid0USRYEd6Laae2Tgx_FA" type="5001"> + <children xmi:type="notation:Node" xmi:id="_D7LQ4CXhEd6Laae2Tgx_FA" type="2001"> + <element xmi:type="ecore:EAttribute" href="inventory.ecore#//Recipe/cost"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_D7LQ4SXhEd6Laae2Tgx_FA"/> + </children> + <styles xmi:type="notation:DrawerStyle" xmi:id="_xid0UiRYEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_xid0UyRYEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_xid0VCRYEd6Laae2Tgx_FA"/> + </children> + <children xmi:type="notation:Node" xmi:id="_xifCcCRYEd6Laae2Tgx_FA" type="5002"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_xifCcSRYEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_xifCciRYEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_xifCcyRYEd6Laae2Tgx_FA"/> + </children> + <styles xmi:type="notation:ShapeStyle" xmi:id="_xidNQSRYEd6Laae2Tgx_FA" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="15772310" lineColor="8421504"/> + <element xmi:type="ecore:EClass" href="inventory.ecore#//Recipe"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_xidNQiRYEd6Laae2Tgx_FA" x="306" y="129"/> + </children> + <children xmi:type="notation:Node" xmi:id="_065IsCRYEd6Laae2Tgx_FA" type="1001"> + <children xmi:type="notation:Node" xmi:id="_065vwCRYEd6Laae2Tgx_FA" type="4001"/> + <children xmi:type="notation:Node" xmi:id="_065vwSRYEd6Laae2Tgx_FA" type="5001"> + <children xmi:type="notation:Node" xmi:id="_bT4nYCRaEd6Laae2Tgx_FA" type="2001"> + <element xmi:type="ecore:EAttribute" href="inventory.ecore#//Ingredient/quantity"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_bT4nYSRaEd6Laae2Tgx_FA"/> + </children> + <styles xmi:type="notation:DrawerStyle" xmi:id="_065vwiRYEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_065vwyRYEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_065vxCRYEd6Laae2Tgx_FA"/> + </children> + <children xmi:type="notation:Node" xmi:id="_066W0CRYEd6Laae2Tgx_FA" type="5002"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_066W0SRYEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_066W0iRYEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_066W0yRYEd6Laae2Tgx_FA"/> + </children> + <styles xmi:type="notation:ShapeStyle" xmi:id="_065IsSRYEd6Laae2Tgx_FA" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="15772310" lineColor="8421504"/> + <element xmi:type="ecore:EClass" href="inventory.ecore#//Ingredient"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_065IsiRYEd6Laae2Tgx_FA" x="493" y="125"/> + </children> + <children xmi:type="notation:Node" xmi:id="_i4T3kCRZEd6Laae2Tgx_FA" type="1001"> + <children xmi:type="notation:Node" xmi:id="_i4UeoCRZEd6Laae2Tgx_FA" type="4001"/> + <children xmi:type="notation:Node" xmi:id="_i4UeoSRZEd6Laae2Tgx_FA" type="5001"> + <children xmi:type="notation:Node" xmi:id="_d5940CRaEd6Laae2Tgx_FA" type="2001"> + <element xmi:type="ecore:EAttribute" href="inventory.ecore#//Stock/name"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_d5940SRaEd6Laae2Tgx_FA"/> + </children> + <styles xmi:type="notation:DrawerStyle" xmi:id="_i4UeoiRZEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_i4UeoyRZEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_i4UepCRZEd6Laae2Tgx_FA"/> + </children> + <children xmi:type="notation:Node" xmi:id="_i4VFsCRZEd6Laae2Tgx_FA" type="5002"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_i4VFsSRZEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_i4VFsiRZEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_i4VFsyRZEd6Laae2Tgx_FA"/> + </children> + <styles xmi:type="notation:ShapeStyle" xmi:id="_i4T3kSRZEd6Laae2Tgx_FA" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="15772310" lineColor="8421504"/> + <element xmi:type="ecore:EClass" href="inventory.ecore#//Stock"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_i4T3kiRZEd6Laae2Tgx_FA" x="167" y="254"/> + </children> + <children xmi:type="notation:Node" xmi:id="_kC7QkCRZEd6Laae2Tgx_FA" type="1001"> + <children xmi:type="notation:Node" xmi:id="_kC73oCRZEd6Laae2Tgx_FA" type="4001"/> + <children xmi:type="notation:Node" xmi:id="_kC73oSRZEd6Laae2Tgx_FA" type="5001"> + <children xmi:type="notation:Node" xmi:id="_IOsfMCRaEd6Laae2Tgx_FA" type="2001"> + <element xmi:type="ecore:EAttribute" href="inventory.ecore#//StockProduct/available"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_IOsfMSRaEd6Laae2Tgx_FA"/> + </children> + <children xmi:type="notation:Node" xmi:id="_PbBjACRaEd6Laae2Tgx_FA" type="2001"> + <element xmi:type="ecore:EAttribute" href="inventory.ecore#//StockProduct/orderLimit"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_PbBjASRaEd6Laae2Tgx_FA"/> + </children> + <children xmi:type="notation:Node" xmi:id="_eG_ywCRbEd6Laae2Tgx_FA" type="2001"> + <element xmi:type="ecore:EAttribute" href="inventory.ecore#//StockProduct/cost"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_eG_ywSRbEd6Laae2Tgx_FA"/> + </children> + <styles xmi:type="notation:DrawerStyle" xmi:id="_kC73oiRZEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_kC73oyRZEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_kC73pCRZEd6Laae2Tgx_FA"/> + </children> + <children xmi:type="notation:Node" xmi:id="_kC73pSRZEd6Laae2Tgx_FA" type="5002"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_kC73piRZEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_kC73pyRZEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_kC73qCRZEd6Laae2Tgx_FA"/> + </children> + <styles xmi:type="notation:ShapeStyle" xmi:id="_kC7QkSRZEd6Laae2Tgx_FA" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="15772310" lineColor="8421504"/> + <element xmi:type="ecore:EClass" href="inventory.ecore#//StockProduct"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_kC7QkiRZEd6Laae2Tgx_FA" x="163" y="129"/> + </children> + <children xmi:type="notation:Node" xmi:id="_Of66wCRcEd6Laae2Tgx_FA" type="1001"> + <children xmi:type="notation:Node" xmi:id="_Of7h0CRcEd6Laae2Tgx_FA" type="4001"/> + <children xmi:type="notation:Node" xmi:id="_Of7h0SRcEd6Laae2Tgx_FA" type="5001"> + <children xmi:type="notation:Node" xmi:id="_B43BsCReEd6Laae2Tgx_FA" type="2001"> + <element xmi:type="ecore:EAttribute" href="inventory.ecore#//MenuCard/title"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_B43BsSReEd6Laae2Tgx_FA"/> + </children> + <styles xmi:type="notation:DrawerStyle" xmi:id="_Of7h0iRcEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_Of7h0yRcEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_Of7h1CRcEd6Laae2Tgx_FA"/> + </children> + <children xmi:type="notation:Node" xmi:id="_Of8I4CRcEd6Laae2Tgx_FA" type="5002"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_Of8I4SRcEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_Of8I4iRcEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_Of8I4yRcEd6Laae2Tgx_FA"/> + </children> + <styles xmi:type="notation:ShapeStyle" xmi:id="_Of66wSRcEd6Laae2Tgx_FA" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="15772310" lineColor="8421504"/> + <element xmi:type="ecore:EClass" href="inventory.ecore#//MenuCard"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Of66wiRcEd6Laae2Tgx_FA" x="47" y="428"/> + </children> + <children xmi:type="notation:Node" xmi:id="_TxrvUCRcEd6Laae2Tgx_FA" type="1001"> + <children xmi:type="notation:Node" xmi:id="_TxsWYSRcEd6Laae2Tgx_FA" type="4001"/> + <children xmi:type="notation:Node" xmi:id="_TxsWYiRcEd6Laae2Tgx_FA" type="5001"> + <children xmi:type="notation:Node" xmi:id="_U5ed0CRcEd6Laae2Tgx_FA" type="2001"> + <element xmi:type="ecore:EAttribute" href="inventory.ecore#//Restaurant/name"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_U5ed0SRcEd6Laae2Tgx_FA"/> + </children> + <styles xmi:type="notation:DrawerStyle" xmi:id="_TxsWYyRcEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_TxsWZCRcEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_TxsWZSRcEd6Laae2Tgx_FA"/> + </children> + <children xmi:type="notation:Node" xmi:id="_Txs9cCRcEd6Laae2Tgx_FA" type="5002"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_Txs9cSRcEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_Txs9ciRcEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_Txs9cyRcEd6Laae2Tgx_FA"/> + </children> + <styles xmi:type="notation:ShapeStyle" xmi:id="_TxrvUSRcEd6Laae2Tgx_FA" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="15772310" lineColor="8421504"/> + <element xmi:type="ecore:EClass" href="inventory.ecore#//Restaurant"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_TxsWYCRcEd6Laae2Tgx_FA" x="343" y="428"/> + </children> + <children xmi:type="notation:Node" xmi:id="_xCORMCRcEd6Laae2Tgx_FA" type="1001"> + <children xmi:type="notation:Node" xmi:id="_xCORMyRcEd6Laae2Tgx_FA" type="4001"/> + <children xmi:type="notation:Node" xmi:id="_xCO4QCRcEd6Laae2Tgx_FA" type="5001"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_xCO4QSRcEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_xCO4QiRcEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_xCO4QyRcEd6Laae2Tgx_FA"/> + </children> + <children xmi:type="notation:Node" xmi:id="_xCO4RCRcEd6Laae2Tgx_FA" type="5002"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_xCO4RSRcEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_xCO4RiRcEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_xCO4RyRcEd6Laae2Tgx_FA"/> + </children> + <styles xmi:type="notation:ShapeStyle" xmi:id="_xCORMSRcEd6Laae2Tgx_FA" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="15772310" lineColor="8421504"/> + <element xmi:type="ecore:EClass" href="inventory.ecore#//Department"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_xCORMiRcEd6Laae2Tgx_FA" x="353" y="334"/> + </children> + <children xmi:type="notation:Node" xmi:id="_Vnw1QCReEd6Laae2Tgx_FA" type="1001"> + <children xmi:type="notation:Node" xmi:id="_VnxcUCReEd6Laae2Tgx_FA" type="4001"/> + <children xmi:type="notation:Node" xmi:id="_VnxcUSReEd6Laae2Tgx_FA" type="5001"> + <children xmi:type="notation:Node" xmi:id="_t67tkCZ0Ed6IxZnGa5VTNA" type="2001"> + <element xmi:type="ecore:EAttribute" href="inventory.ecore#//Offering/name"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_t67tkSZ0Ed6IxZnGa5VTNA"/> + </children> + <children xmi:type="notation:Node" xmi:id="_iJfQcCReEd6Laae2Tgx_FA" type="2001"> + <element xmi:type="ecore:EAttribute" href="inventory.ecore#//Offering/description"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_iJfQcSReEd6Laae2Tgx_FA"/> + </children> + <children xmi:type="notation:Node" xmi:id="_kPmBUCReEd6Laae2Tgx_FA" type="2001"> + <element xmi:type="ecore:EAttribute" href="inventory.ecore#//Offering/price"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_kPmBUSReEd6Laae2Tgx_FA"/> + </children> + <styles xmi:type="notation:DrawerStyle" xmi:id="_VnxcUiReEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_VnxcUyReEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_VnxcVCReEd6Laae2Tgx_FA"/> + </children> + <children xmi:type="notation:Node" xmi:id="_VnyDYCReEd6Laae2Tgx_FA" type="5002"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_VnyDYSReEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_VnyDYiReEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_VnyDYyReEd6Laae2Tgx_FA"/> + </children> + <styles xmi:type="notation:ShapeStyle" xmi:id="_Vnw1QSReEd6Laae2Tgx_FA" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="15772310" lineColor="8421504"/> + <element xmi:type="ecore:EClass" href="inventory.ecore#//Offering"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Vnw1QiReEd6Laae2Tgx_FA" x="25" y="16"/> + </children> + <children xmi:type="notation:Node" xmi:id="_vUl_0CReEd6Laae2Tgx_FA" type="1001"> + <children xmi:type="notation:Node" xmi:id="_vUmm4CReEd6Laae2Tgx_FA" type="4001"/> + <children xmi:type="notation:Node" xmi:id="_vUmm4SReEd6Laae2Tgx_FA" type="5001"> + <children xmi:type="notation:Node" xmi:id="_0y-7ICReEd6Laae2Tgx_FA" type="2001"> + <element xmi:type="ecore:EAttribute" href="inventory.ecore#//Table/seats"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_0y-7ISReEd6Laae2Tgx_FA"/> + </children> + <styles xmi:type="notation:DrawerStyle" xmi:id="_vUmm4iReEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_vUmm4yReEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_vUmm5CReEd6Laae2Tgx_FA"/> + </children> + <children xmi:type="notation:Node" xmi:id="_vUnN8CReEd6Laae2Tgx_FA" type="5002"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_vUnN8SReEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_vUnN8iReEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_vUnN8yReEd6Laae2Tgx_FA"/> + </children> + <styles xmi:type="notation:ShapeStyle" xmi:id="_vUl_0SReEd6Laae2Tgx_FA" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="15772310" lineColor="8421504"/> + <element xmi:type="ecore:EClass" href="inventory.ecore#//Table"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_vUl_0iReEd6Laae2Tgx_FA" x="523" y="428"/> + </children> + <children xmi:type="notation:Node" xmi:id="_RhqT0CRkEd6Laae2Tgx_FA" type="1001"> + <children xmi:type="notation:Node" xmi:id="_Rhq64CRkEd6Laae2Tgx_FA" type="4001"/> + <children xmi:type="notation:Node" xmi:id="_Rhq64SRkEd6Laae2Tgx_FA" type="5001"> + <children xmi:type="notation:Node" xmi:id="_crNUoCXkEd6Laae2Tgx_FA" type="2001"> + <element xmi:type="ecore:EAttribute" href="inventory.ecore#//Employee/name"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_crNUoSXkEd6Laae2Tgx_FA"/> + </children> + <styles xmi:type="notation:DrawerStyle" xmi:id="_Rhq64iRkEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_Rhq64yRkEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_Rhq65CRkEd6Laae2Tgx_FA"/> + </children> + <children xmi:type="notation:Node" xmi:id="_Rhrh8CRkEd6Laae2Tgx_FA" type="5002"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_Rhrh8SRkEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_Rhrh8iRkEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_Rhrh8yRkEd6Laae2Tgx_FA"/> + </children> + <styles xmi:type="notation:ShapeStyle" xmi:id="_RhqT0SRkEd6Laae2Tgx_FA" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="15772310" lineColor="8421504"/> + <element xmi:type="ecore:EClass" href="inventory.ecore#//Employee"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_RhqT0iRkEd6Laae2Tgx_FA" x="167" y="334"/> + </children> + <children xmi:type="notation:Node" xmi:id="_9h16oCW8Ed6Laae2Tgx_FA" type="1001"> + <children xmi:type="notation:Node" xmi:id="_9h2hsCW8Ed6Laae2Tgx_FA" type="4001"/> + <children xmi:type="notation:Node" xmi:id="_9h2hsSW8Ed6Laae2Tgx_FA" type="5001"> + <children xmi:type="notation:Node" xmi:id="_AfgloCW9Ed6Laae2Tgx_FA" type="2001"> + <element xmi:type="ecore:EAttribute" href="inventory.ecore#//Station/stationID"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_AfgloSW9Ed6Laae2Tgx_FA"/> + </children> + <styles xmi:type="notation:DrawerStyle" xmi:id="_9h2hsiW8Ed6Laae2Tgx_FA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_9h2hsyW8Ed6Laae2Tgx_FA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_9h2htCW8Ed6Laae2Tgx_FA"/> + </children> + <children xmi:type="notation:Node" xmi:id="_9h2htSW8Ed6Laae2Tgx_FA" type="5002"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_9h2htiW8Ed6Laae2Tgx_FA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_9h2htyW8Ed6Laae2Tgx_FA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_9h2huCW8Ed6Laae2Tgx_FA"/> + </children> + <styles xmi:type="notation:ShapeStyle" xmi:id="_9h16oSW8Ed6Laae2Tgx_FA" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="15772310" lineColor="8421504"/> + <element xmi:type="ecore:EClass" href="inventory.ecore#//Station"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_9h16oiW8Ed6Laae2Tgx_FA" x="423" y="211"/> + </children> + <children xmi:type="notation:Node" xmi:id="_RSp1ECXxEd6Laae2Tgx_FA" type="1001"> + <children xmi:type="notation:Node" xmi:id="_RSqcICXxEd6Laae2Tgx_FA" type="4001"/> + <children xmi:type="notation:Node" xmi:id="_RSqcISXxEd6Laae2Tgx_FA" type="5001"> + <children xmi:type="notation:Node" xmi:id="_G4E3ICXyEd6Laae2Tgx_FA" type="2001"> + <element xmi:type="ecore:EAttribute" href="inventory.ecore#//Section/title"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_G4E3ISXyEd6Laae2Tgx_FA"/> + </children> + <children xmi:type="notation:Node" xmi:id="_mJoUcCZ0Ed6IxZnGa5VTNA" type="2001"> + <element xmi:type="ecore:EAttribute" href="inventory.ecore#//Section/text"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_mJoUcSZ0Ed6IxZnGa5VTNA"/> + </children> + <styles xmi:type="notation:DrawerStyle" xmi:id="_RSqcIiXxEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_RSqcIyXxEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_RSqcJCXxEd6Laae2Tgx_FA"/> + </children> + <children xmi:type="notation:Node" xmi:id="_RSqcJSXxEd6Laae2Tgx_FA" type="5002"> + <styles xmi:type="notation:DrawerStyle" xmi:id="_RSqcJiXxEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_RSqcJyXxEd6Laae2Tgx_FA"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_RSqcKCXxEd6Laae2Tgx_FA"/> + </children> + <styles xmi:type="notation:ShapeStyle" xmi:id="_RSp1ESXxEd6Laae2Tgx_FA" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="15772310" lineColor="8421504"/> + <element xmi:type="ecore:EClass" href="inventory.ecore#//Section"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_RSp1EiXxEd6Laae2Tgx_FA" x="44" y="317" width="110"/> + </children> + <styles xmi:type="notation:DiagramStyle" xmi:id="_nnG-cSRYEd6Laae2Tgx_FA"/> + <element xmi:type="ecore:EPackage" href="inventory.ecore#/"/> + <edges xmi:type="notation:Edge" xmi:id="_3ELwcCRYEd6Laae2Tgx_FA" type="3003" source="_xidNQCRYEd6Laae2Tgx_FA" target="_wh69UCRYEd6Laae2Tgx_FA"> + <styles xmi:type="notation:ConnectorStyle" xmi:id="_3ELwcSRYEd6Laae2Tgx_FA" lineColor="4210752"/> + <styles xmi:type="notation:FontStyle" xmi:id="_3ELwciRYEd6Laae2Tgx_FA" fontName="Segoe UI"/> + <element xsi:nil="true"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_3ELwcyRYEd6Laae2Tgx_FA" points="[0, -20, 70, 77]$[0, -42, 70, 55]$[-70, -42, 0, 55]$[-70, -76, 0, 21]"/> + </edges> + <edges xmi:type="notation:Edge" xmi:id="_54g5QCRYEd6Laae2Tgx_FA" type="3002" source="_xidNQCRYEd6Laae2Tgx_FA" target="_065IsCRYEd6Laae2Tgx_FA"> + <children xmi:type="notation:Node" xmi:id="_54iHYCRYEd6Laae2Tgx_FA" type="4011"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_54iHYSRYEd6Laae2Tgx_FA" x="-25" y="-12"/> + </children> + <children xmi:type="notation:Node" xmi:id="_54iucCRYEd6Laae2Tgx_FA" type="4012"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_54jVgCRYEd6Laae2Tgx_FA" x="2" y="12"/> + </children> + <styles xmi:type="notation:ConnectorStyle" xmi:id="_54g5QSRYEd6Laae2Tgx_FA" lineColor="4210752"/> + <styles xmi:type="notation:FontStyle" xmi:id="_54g5QiRYEd6Laae2Tgx_FA" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/> + <element xmi:type="ecore:EReference" href="inventory.ecore#//Recipe/ingredients"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_54g5QyRYEd6Laae2Tgx_FA" points="[50, 0, -124, 0]$[224, 0, 50, 0]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_C-Q80CRZEd6Laae2Tgx_FA" id="(0.5,0.5)"/> + <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_C-Q80SRZEd6Laae2Tgx_FA" id="(0.5,0.5)"/> + </edges> + <edges xmi:type="notation:Edge" xmi:id="_HozZUCRZEd6Laae2Tgx_FA" type="3002" source="_065IsCRYEd6Laae2Tgx_FA" target="_wh69UCRYEd6Laae2Tgx_FA"> + <children xmi:type="notation:Node" xmi:id="_Ho0AYCRZEd6Laae2Tgx_FA" type="4011"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_Ho0AYSRZEd6Laae2Tgx_FA" x="-6" y="-10"/> + </children> + <children xmi:type="notation:Node" xmi:id="_Ho0AYiRZEd6Laae2Tgx_FA" type="4012"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_Ho0AYyRZEd6Laae2Tgx_FA" x="7" y="15"/> + </children> + <styles xmi:type="notation:ConnectorStyle" xmi:id="_HozZUSRZEd6Laae2Tgx_FA" lineColor="4210752"/> + <styles xmi:type="notation:FontStyle" xmi:id="_HozZUiRZEd6Laae2Tgx_FA" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/> + <element xmi:type="ecore:EReference" href="inventory.ecore#//Ingredient/product"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_HozZUyRZEd6Laae2Tgx_FA" points="[0, -24, 237, 68]$[0, -92, 237, 0]$[-173, -92, 64, 0]"/> + </edges> + <edges xmi:type="notation:Edge" xmi:id="_nIc3ECRZEd6Laae2Tgx_FA" type="3003" source="_kC7QkCRZEd6Laae2Tgx_FA" target="_wh69UCRYEd6Laae2Tgx_FA"> + <styles xmi:type="notation:ConnectorStyle" xmi:id="_nIc3ESRZEd6Laae2Tgx_FA" lineColor="4210752"/> + <styles xmi:type="notation:FontStyle" xmi:id="_nIc3EiRZEd6Laae2Tgx_FA" fontName="Segoe UI"/> + <element xsi:nil="true"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_nIc3EyRZEd6Laae2Tgx_FA" points="[35, -20, -101, 65]$[159, -64, 23, 21]"/> + </edges> + <edges xmi:type="notation:Edge" xmi:id="_rDIj8CRZEd6Laae2Tgx_FA" type="3002" source="_i4T3kCRZEd6Laae2Tgx_FA" target="_kC7QkCRZEd6Laae2Tgx_FA"> + <children xmi:type="notation:Node" xmi:id="_rDJLACRZEd6Laae2Tgx_FA" type="4011"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_rDJLASRZEd6Laae2Tgx_FA" x="-9" y="-30"/> + </children> + <children xmi:type="notation:Node" xmi:id="_rDJLAiRZEd6Laae2Tgx_FA" type="4012"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_rDJLAyRZEd6Laae2Tgx_FA" x="-9" y="14"/> + </children> + <styles xmi:type="notation:ConnectorStyle" xmi:id="_rDIj8SRZEd6Laae2Tgx_FA" lineColor="4210752"/> + <styles xmi:type="notation:FontStyle" xmi:id="_rDIj8iRZEd6Laae2Tgx_FA" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/> + <element xmi:type="ecore:EReference" href="inventory.ecore#//Stock/products"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_rDIj8yRZEd6Laae2Tgx_FA" points="[50, 1, -154, 1]$[176, 21, -28, 21]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_xVy01CRZEd6Laae2Tgx_FA" id="(0.5,0.5)"/> + <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_xVy01SRZEd6Laae2Tgx_FA" id="(0.5,0.5)"/> + </edges> + <edges xmi:type="notation:Edge" xmi:id="_YROAQCRdEd6Laae2Tgx_FA" type="3002" source="_xCORMCRcEd6Laae2Tgx_FA" target="_xidNQCRYEd6Laae2Tgx_FA"> + <children xmi:type="notation:Node" xmi:id="_YROnUCRdEd6Laae2Tgx_FA" type="4011"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_YROnUSRdEd6Laae2Tgx_FA" x="9" y="-23"/> + </children> + <children xmi:type="notation:Node" xmi:id="_YROnUiRdEd6Laae2Tgx_FA" type="4012"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_YROnUyRdEd6Laae2Tgx_FA" x="9" y="16"/> + </children> + <styles xmi:type="notation:ConnectorStyle" xmi:id="_YROAQSRdEd6Laae2Tgx_FA" lineColor="4210752"/> + <styles xmi:type="notation:FontStyle" xmi:id="_YROAQiRdEd6Laae2Tgx_FA" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/> + <element xmi:type="ecore:EReference" href="inventory.ecore#//Department/recipes"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_YROAQyRdEd6Laae2Tgx_FA" points="[-13, -20, 34, 181]$[-47, -76, 0, 125]$[-47, -176, 0, 25]"/> + </edges> + <edges xmi:type="notation:Edge" xmi:id="_sjJoYCRdEd6Laae2Tgx_FA" type="3002" source="_TxrvUCRcEd6Laae2Tgx_FA" target="_xCORMCRcEd6Laae2Tgx_FA"> + <children xmi:type="notation:Node" xmi:id="_sjK2gCRdEd6Laae2Tgx_FA" type="4011"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_sjK2gSRdEd6Laae2Tgx_FA" x="-4" y="42"/> + </children> + <children xmi:type="notation:Node" xmi:id="_sjK2giRdEd6Laae2Tgx_FA" type="4012"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_sjK2gyRdEd6Laae2Tgx_FA" x="-4" y="-13"/> + </children> + <styles xmi:type="notation:ConnectorStyle" xmi:id="_sjJoYSRdEd6Laae2Tgx_FA" lineColor="4210752"/> + <styles xmi:type="notation:FontStyle" xmi:id="_sjJoYiRdEd6Laae2Tgx_FA" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/> + <element xmi:type="ecore:EReference" href="inventory.ecore#//Restaurant/departments"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_sjJoYyRdEd6Laae2Tgx_FA" points="[18, -24, -54, 82]$[118, -130, 46, -24]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_xXgINCRdEd6Laae2Tgx_FA" id="(0.5,0.5)"/> + <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_xXgINSRdEd6Laae2Tgx_FA" id="(0.5,0.5)"/> + </edges> + <edges xmi:type="notation:Edge" xmi:id="_XSHeQCReEd6Laae2Tgx_FA" type="3002" source="_Vnw1QCReEd6Laae2Tgx_FA" target="_wh69UCRYEd6Laae2Tgx_FA"> + <children xmi:type="notation:Node" xmi:id="_XSHeRCReEd6Laae2Tgx_FA" type="4011"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_XSHeRSReEd6Laae2Tgx_FA" x="-19" y="-15"/> + </children> + <children xmi:type="notation:Node" xmi:id="_XSHeRiReEd6Laae2Tgx_FA" type="4012"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_XSHeRyReEd6Laae2Tgx_FA" x="-7" y="15"/> + </children> + <styles xmi:type="notation:ConnectorStyle" xmi:id="_XSHeQSReEd6Laae2Tgx_FA" lineColor="4210752"/> + <styles xmi:type="notation:FontStyle" xmi:id="_XSHeQiReEd6Laae2Tgx_FA" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/> + <element xmi:type="ecore:EReference" href="inventory.ecore#//Offering/product"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_XSHeQyReEd6Laae2Tgx_FA" points="[73, -1, -163, 0]$[172, -1, -64, 0]"/> + </edges> + <edges xmi:type="notation:Edge" xmi:id="_qOYT8CReEd6Laae2Tgx_FA" type="3002" source="_TxrvUCRcEd6Laae2Tgx_FA" target="_Of66wCRcEd6Laae2Tgx_FA"> + <children xmi:type="notation:Node" xmi:id="_qOZiECReEd6Laae2Tgx_FA" type="4011"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_qOZiESReEd6Laae2Tgx_FA" x="-8" y="-10"/> + </children> + <children xmi:type="notation:Node" xmi:id="_qOZiEiReEd6Laae2Tgx_FA" type="4012"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_qOZiEyReEd6Laae2Tgx_FA" x="16" y="16"/> + </children> + <styles xmi:type="notation:ConnectorStyle" xmi:id="_qOYT8SReEd6Laae2Tgx_FA" lineColor="4210752"/> + <styles xmi:type="notation:FontStyle" xmi:id="_qOYT8iReEd6Laae2Tgx_FA" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/> + <element xmi:type="ecore:EReference" href="inventory.ecore#//Restaurant/menuCards"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_qOYT8yReEd6Laae2Tgx_FA" points="[-56, 1, 142, 1]$[-199, 25, -1, 25]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_t0mzwCReEd6Laae2Tgx_FA" id="(0.5,0.5)"/> + <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_t0mzwSReEd6Laae2Tgx_FA" id="(0.5,0.5)"/> + </edges> + <edges xmi:type="notation:Edge" xmi:id="_2xtRoCReEd6Laae2Tgx_FA" type="3002" source="_TxrvUCRcEd6Laae2Tgx_FA" target="_vUl_0CReEd6Laae2Tgx_FA"> + <children xmi:type="notation:Node" xmi:id="_2xt4sCReEd6Laae2Tgx_FA" type="4011"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_2xt4sSReEd6Laae2Tgx_FA" x="-13" y="-10"/> + </children> + <children xmi:type="notation:Node" xmi:id="_2xt4siReEd6Laae2Tgx_FA" type="4012"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_2xt4syReEd6Laae2Tgx_FA" x="-1" y="10"/> + </children> + <styles xmi:type="notation:ConnectorStyle" xmi:id="_2xtRoSReEd6Laae2Tgx_FA" lineColor="4210752"/> + <styles xmi:type="notation:FontStyle" xmi:id="_2xtRoiReEd6Laae2Tgx_FA" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/> + <element xmi:type="ecore:EReference" href="inventory.ecore#//Restaurant/tables"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_2xtRoyReEd6Laae2Tgx_FA" points="[57, 5, -183, -6]$[279, 44, 39, 33]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_6uwWASReEd6Laae2Tgx_FA" id="(0.5,0.5)"/> + <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_6uwWAiReEd6Laae2Tgx_FA" id="(0.5,0.5)"/> + </edges> + <edges xmi:type="notation:Edge" xmi:id="_S1odICRkEd6Laae2Tgx_FA" type="3002" source="_xCORMCRcEd6Laae2Tgx_FA" target="_RhqT0CRkEd6Laae2Tgx_FA"> + <children xmi:type="notation:Node" xmi:id="_S1odJCRkEd6Laae2Tgx_FA" type="4011"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_S1odJSRkEd6Laae2Tgx_FA" x="-24" y="-12"/> + </children> + <children xmi:type="notation:Node" xmi:id="_S1pEMCRkEd6Laae2Tgx_FA" type="4012"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_S1pEMSRkEd6Laae2Tgx_FA" x="-6" y="12"/> + </children> + <styles xmi:type="notation:ConnectorStyle" xmi:id="_S1odISRkEd6Laae2Tgx_FA" lineColor="4210752"/> + <styles xmi:type="notation:FontStyle" xmi:id="_S1odIiRkEd6Laae2Tgx_FA" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/> + <element xmi:type="ecore:EReference" href="inventory.ecore#//Department/employees"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_S1odIyRkEd6Laae2Tgx_FA" points="[57, 2, -135, 4]$[242, 17, 50, 19]"/> + </edges> + <edges xmi:type="notation:Edge" xmi:id="_juf3sCRkEd6Laae2Tgx_FA" type="3002" source="_xCORMCRcEd6Laae2Tgx_FA" target="_i4T3kCRZEd6Laae2Tgx_FA"> + <children xmi:type="notation:Node" xmi:id="_jugewCRkEd6Laae2Tgx_FA" type="4011"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_jugewSRkEd6Laae2Tgx_FA" x="-3" y="-9"/> + </children> + <children xmi:type="notation:Node" xmi:id="_jugewiRkEd6Laae2Tgx_FA" type="4012"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_jugewyRkEd6Laae2Tgx_FA" x="6" y="11"/> + </children> + <styles xmi:type="notation:ConnectorStyle" xmi:id="_juf3sSRkEd6Laae2Tgx_FA" lineColor="4210752"/> + <styles xmi:type="notation:FontStyle" xmi:id="_juf3siRkEd6Laae2Tgx_FA" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/> + <element xmi:type="ecore:EReference" href="inventory.ecore#//Department/stocks"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_juf3syRkEd6Laae2Tgx_FA" points="[-23, -20, 157, 56]$[-85, -76, 95, 0]$[-123, -76, 57, 0]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_pKoJNCRkEd6Laae2Tgx_FA" id="(0.5,0.5)"/> + <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_pKowQCRkEd6Laae2Tgx_FA" id="(0.5,0.5)"/> + </edges> + <edges xmi:type="notation:Edge" xmi:id="_RfCB0CW9Ed6Laae2Tgx_FA" type="3003" source="_xCORMCRcEd6Laae2Tgx_FA" target="_9h16oCW8Ed6Laae2Tgx_FA"> + <styles xmi:type="notation:ConnectorStyle" xmi:id="_RfCB0SW9Ed6Laae2Tgx_FA" lineColor="4210752"/> + <styles xmi:type="notation:FontStyle" xmi:id="_RfCB0iW9Ed6Laae2Tgx_FA" fontName="Segoe UI"/> + <element xsi:nil="true"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_RfCB0yW9Ed6Laae2Tgx_FA" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/> + </edges> + <edges xmi:type="notation:Edge" xmi:id="_Vi0nYCW9Ed6Laae2Tgx_FA" type="3003" source="_vUl_0CReEd6Laae2Tgx_FA" target="_9h16oCW8Ed6Laae2Tgx_FA"> + <styles xmi:type="notation:ConnectorStyle" xmi:id="_Vi0nYSW9Ed6Laae2Tgx_FA" lineColor="4210752"/> + <styles xmi:type="notation:FontStyle" xmi:id="_Vi0nYiW9Ed6Laae2Tgx_FA" fontName="Segoe UI"/> + <element xsi:nil="true"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_Vi0nYyW9Ed6Laae2Tgx_FA" points="[2, -33, -15, 203]$[19, -211, 2, 25]"/> + </edges> + <edges xmi:type="notation:Edge" xmi:id="_hW0Z4CW9Ed6Laae2Tgx_FA" type="3002" source="_TxrvUCRcEd6Laae2Tgx_FA" target="_9h16oCW8Ed6Laae2Tgx_FA"> + <children xmi:type="notation:Node" xmi:id="_hW1A8CW9Ed6Laae2Tgx_FA" type="4011"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_hW1A8SW9Ed6Laae2Tgx_FA" x="-7" y="-56"/> + </children> + <children xmi:type="notation:Node" xmi:id="_hW1A8iW9Ed6Laae2Tgx_FA" type="4012"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_hW1A8yW9Ed6Laae2Tgx_FA" x="17" y="-64"/> + </children> + <styles xmi:type="notation:ConnectorStyle" xmi:id="_hW0Z4SW9Ed6Laae2Tgx_FA" lineColor="4210752"/> + <styles xmi:type="notation:FontStyle" xmi:id="_hW0Z4iW9Ed6Laae2Tgx_FA" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/> + <element xmi:type="ecore:EReference" href="inventory.ecore#//Restaurant/stations"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_hW0Z4yW9Ed6Laae2Tgx_FA" points="[0, 25, -90, 242]$[0, 52, -90, 269]$[247, 52, 157, 269]$[247, -217, 157, 0]$[156, -217, 66, 0]"/> + </edges> + <edges xmi:type="notation:Edge" xmi:id="_Z57M4CXxEd6Laae2Tgx_FA" type="3002" source="_Of66wCRcEd6Laae2Tgx_FA" target="_RSp1ECXxEd6Laae2Tgx_FA"> + <children xmi:type="notation:Node" xmi:id="_Z6E94CXxEd6Laae2Tgx_FA" type="4011"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_Z6E94SXxEd6Laae2Tgx_FA" x="-4" y="-28"/> + </children> + <children xmi:type="notation:Node" xmi:id="_Z6E94iXxEd6Laae2Tgx_FA" type="4012"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_Z6E94yXxEd6Laae2Tgx_FA" x="-4" y="14"/> + </children> + <styles xmi:type="notation:ConnectorStyle" xmi:id="_Z57M4SXxEd6Laae2Tgx_FA" lineColor="4210752"/> + <styles xmi:type="notation:FontStyle" xmi:id="_Z57M4iXxEd6Laae2Tgx_FA" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/> + <element xmi:type="ecore:EReference" href="inventory.ecore#//MenuCard/sections"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_Z57M4yXxEd6Laae2Tgx_FA" points="[-4, -24, 13, 144]$[-67, -167, -50, 1]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_fX_YECXxEd6Laae2Tgx_FA" id="(0.5,0.5)"/> + <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_fX_YESXxEd6Laae2Tgx_FA" id="(0.5,0.5)"/> + </edges> + <edges xmi:type="notation:Edge" xmi:id="_k_fMECXxEd6Laae2Tgx_FA" type="3002" source="_RSp1ECXxEd6Laae2Tgx_FA" target="_Vnw1QCReEd6Laae2Tgx_FA"> + <children xmi:type="notation:Node" xmi:id="_k_fzICXxEd6Laae2Tgx_FA" type="4011"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_k_fzISXxEd6Laae2Tgx_FA" x="20" y="-32"/> + </children> + <children xmi:type="notation:Node" xmi:id="_k_gaMCXxEd6Laae2Tgx_FA" type="4012"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_k_gaMSXxEd6Laae2Tgx_FA" x="20" y="11"/> + </children> + <styles xmi:type="notation:ConnectorStyle" xmi:id="_k_fMESXxEd6Laae2Tgx_FA" lineColor="4210752"/> + <styles xmi:type="notation:FontStyle" xmi:id="_k_fMEiXxEd6Laae2Tgx_FA" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/> + <element xmi:type="ecore:EReference" href="inventory.ecore#//Section/offerings"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_k_fMEyXxEd6Laae2Tgx_FA" points="[1, -20, -16, 206]$[19, -259, 2, -33]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_pjfixCXxEd6Laae2Tgx_FA" id="(0.5,0.5)"/> + <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_pjfixSXxEd6Laae2Tgx_FA" id="(0.5,0.5)"/> + </edges> +</notation:Diagram> diff --git a/plugins/org.gastro.inventory/model/inventory.genmodel b/plugins/org.gastro.inventory/model/inventory.genmodel new file mode 100644 index 0000000000..b27d0283b7 --- /dev/null +++ b/plugins/org.gastro.inventory/model/inventory.genmodel @@ -0,0 +1,81 @@ +<?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.gastro.inventory/src" + creationIcons="false" editorDirectory="" modelPluginID="org.gastro.inventory" + modelName="Inventory" rootExtendsInterface="org.eclipse.emf.cdo.CDOObject" rootExtendsClass="org.eclipse.emf.internal.cdo.CDOObjectImpl" + reflectiveDelegation="true" codeFormatting="true" testsDirectory="" importerID="org.eclipse.emf.importer.cdo" + featureDelegation="Reflective" complianceLevel="5.0" copyrightFields="false" optimizedHasChildren="true"> + <foreignModel>inventory.ecore</foreignModel> + <modelPluginVariables>CDO=org.eclipse.emf.cdo</modelPluginVariables> + <genPackages prefix="Inventory" basePackage="org.gastro" disposableProviderFactory="true" + ecorePackage="inventory.ecore#/"> + <genClasses ecoreClass="inventory.ecore#//Stock"> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference inventory.ecore#//Stock/products"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute inventory.ecore#//Stock/name"/> + <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference inventory.ecore#//Stock/department"/> + </genClasses> + <genClasses image="false" ecoreClass="inventory.ecore#//Product"> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute inventory.ecore#//Product/name"/> + <genOperations ecoreOperation="inventory.ecore#//Product/getCost"/> + </genClasses> + <genClasses ecoreClass="inventory.ecore#//StockProduct"> + <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference inventory.ecore#//StockProduct/stock"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute inventory.ecore#//StockProduct/cost"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute inventory.ecore#//StockProduct/available"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute inventory.ecore#//StockProduct/orderLimit"/> + </genClasses> + <genClasses ecoreClass="inventory.ecore#//Recipe"> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference inventory.ecore#//Recipe/ingredients"/> + <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference inventory.ecore#//Recipe/department"/> + <genFeatures property="Readonly" createChild="false" ecoreFeature="ecore:EAttribute inventory.ecore#//Recipe/cost"/> + </genClasses> + <genClasses ecoreClass="inventory.ecore#//Ingredient"> + <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference inventory.ecore#//Ingredient/recipe"/> + <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference inventory.ecore#//Ingredient/product"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute inventory.ecore#//Ingredient/quantity"/> + </genClasses> + <genClasses ecoreClass="inventory.ecore#//MenuCard"> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute inventory.ecore#//MenuCard/title"/> + <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference inventory.ecore#//MenuCard/restaurant"/> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference inventory.ecore#//MenuCard/sections"/> + </genClasses> + <genClasses ecoreClass="inventory.ecore#//Restaurant"> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute inventory.ecore#//Restaurant/name"/> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference inventory.ecore#//Restaurant/departments"/> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference inventory.ecore#//Restaurant/menuCards"/> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference inventory.ecore#//Restaurant/tables"/> + <genFeatures property="Readonly" notify="false" createChild="false" ecoreFeature="ecore:EReference inventory.ecore#//Restaurant/stations"/> + </genClasses> + <genClasses ecoreClass="inventory.ecore#//Department"> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference inventory.ecore#//Department/recipes"/> + <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference inventory.ecore#//Department/restaurant"/> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference inventory.ecore#//Department/employees"/> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference inventory.ecore#//Department/stocks"/> + </genClasses> + <genClasses ecoreClass="inventory.ecore#//Offering"> + <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference inventory.ecore#//Offering/product"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute inventory.ecore#//Offering/name"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute inventory.ecore#//Offering/description"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute inventory.ecore#//Offering/price"/> + <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference inventory.ecore#//Offering/section"/> + </genClasses> + <genClasses ecoreClass="inventory.ecore#//Table"> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute inventory.ecore#//Table/seats"/> + <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference inventory.ecore#//Table/restaurant"/> + </genClasses> + <genClasses ecoreClass="inventory.ecore#//Employee"> + <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference inventory.ecore#//Employee/department"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute inventory.ecore#//Employee/name"/> + </genClasses> + <genClasses image="false" ecoreClass="inventory.ecore#//Station"> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute inventory.ecore#//Station/stationID"/> + </genClasses> + <genClasses ecoreClass="inventory.ecore#//Section"> + <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference inventory.ecore#//Section/menuCard"/> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference inventory.ecore#//Section/offerings"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute inventory.ecore#//Section/title"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute inventory.ecore#//Section/text"/> + </genClasses> + </genPackages> +</genmodel:GenModel> diff --git a/plugins/org.gastro.inventory/plugin.properties b/plugins/org.gastro.inventory/plugin.properties new file mode 100644 index 0000000000..e51897f209 --- /dev/null +++ b/plugins/org.gastro.inventory/plugin.properties @@ -0,0 +1,8 @@ + +# <copyright> +# </copyright> +# +# $Id: plugin.properties,v 1.1 2009-04-26 16:52:39 estepper Exp $ + +pluginName = Gastory Inventory Model +providerName = www.gastro.org diff --git a/plugins/org.gastro.inventory/plugin.xml b/plugins/org.gastro.inventory/plugin.xml new file mode 100644 index 0000000000..a94f1d10ff --- /dev/null +++ b/plugins/org.gastro.inventory/plugin.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.0"?> + +<!-- + <copyright> + </copyright> + + $Id: plugin.xml,v 1.1 2009-04-26 16:52:39 estepper Exp $ +--> + +<plugin> + + <extension point="org.eclipse.emf.ecore.generated_package"> + <package + uri="http://www.gastro.org/inventory/1.0" + class="org.gastro.inventory.InventoryPackage" + genModel="model/inventory.genmodel"/> + </extension> + +</plugin> diff --git a/plugins/org.gastro.inventory/src/org/gastro/inventory/Department.java b/plugins/org.gastro.inventory/src/org/gastro/inventory/Department.java new file mode 100644 index 0000000000..2603329dbc --- /dev/null +++ b/plugins/org.gastro.inventory/src/org/gastro/inventory/Department.java @@ -0,0 +1,119 @@ +/** + * Copyright (c) 2009 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + * + * Initial Publication: + * Eclipse Magazin - http://www.eclipse-magazin.de + */ +package org.gastro.inventory; + +import org.eclipse.emf.common.util.EList; + +/** + * <!-- begin-user-doc --> A representation of the model object '<em><b>Department</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.gastro.inventory.Department#getRecipes <em>Recipes</em>}</li> + * <li>{@link org.gastro.inventory.Department#getRestaurant <em>Restaurant</em>}</li> + * <li>{@link org.gastro.inventory.Department#getEmployees <em>Employees</em>}</li> + * <li>{@link org.gastro.inventory.Department#getStocks <em>Stocks</em>}</li> + * </ul> + * </p> + * + * @see org.gastro.inventory.InventoryPackage#getDepartment() + * @model + * @generated + */ +public interface Department extends Station +{ + /** + * Returns the value of the '<em><b>Recipes</b></em>' containment reference list. The list contents are of type + * {@link org.gastro.inventory.Recipe}. It is bidirectional and its opposite is ' + * {@link org.gastro.inventory.Recipe#getDepartment <em>Department</em>}'. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Recipes</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>Recipes</em>' containment reference list. + * @see org.gastro.inventory.InventoryPackage#getDepartment_Recipes() + * @see org.gastro.inventory.Recipe#getDepartment + * @model opposite="department" containment="true" + * @generated + */ + EList<Recipe> getRecipes(); + + /** + * Returns the value of the '<em><b>Restaurant</b></em>' container reference. It is bidirectional and its opposite is + * '{@link org.gastro.inventory.Restaurant#getDepartments <em>Departments</em>}'. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Restaurant</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>Restaurant</em>' container reference. + * @see #setRestaurant(Restaurant) + * @see org.gastro.inventory.InventoryPackage#getDepartment_Restaurant() + * @see org.gastro.inventory.Restaurant#getDepartments + * @model opposite="departments" required="true" transient="false" + * @generated + */ + Restaurant getRestaurant(); + + /** + * Sets the value of the '{@link org.gastro.inventory.Department#getRestaurant <em>Restaurant</em>}' container + * reference. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Restaurant</em>' container reference. + * @see #getRestaurant() + * @generated + */ + void setRestaurant(Restaurant value); + + /** + * Returns the value of the '<em><b>Employees</b></em>' containment reference list. The list contents are of type + * {@link org.gastro.inventory.Employee}. It is bidirectional and its opposite is ' + * {@link org.gastro.inventory.Employee#getDepartment <em>Department</em>}'. <!-- 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.gastro.inventory.InventoryPackage#getDepartment_Employees() + * @see org.gastro.inventory.Employee#getDepartment + * @model opposite="department" containment="true" + * @generated + */ + EList<Employee> getEmployees(); + + /** + * Returns the value of the '<em><b>Stocks</b></em>' containment reference list. The list contents are of type + * {@link org.gastro.inventory.Stock}. It is bidirectional and its opposite is ' + * {@link org.gastro.inventory.Stock#getDepartment <em>Department</em>}'. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Stocks</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>Stocks</em>' containment reference list. + * @see org.gastro.inventory.InventoryPackage#getDepartment_Stocks() + * @see org.gastro.inventory.Stock#getDepartment + * @model opposite="department" containment="true" required="true" + * @generated + */ + EList<Stock> getStocks(); + +} // Department diff --git a/plugins/org.gastro.inventory/src/org/gastro/inventory/Employee.java b/plugins/org.gastro.inventory/src/org/gastro/inventory/Employee.java new file mode 100644 index 0000000000..194efeb9ce --- /dev/null +++ b/plugins/org.gastro.inventory/src/org/gastro/inventory/Employee.java @@ -0,0 +1,90 @@ +/** + * Copyright (c) 2009 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + * + * Initial Publication: + * Eclipse Magazin - http://www.eclipse-magazin.de + */ +package org.gastro.inventory; + +import org.eclipse.emf.cdo.CDOObject; + +/** + * <!-- 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.gastro.inventory.Employee#getDepartment <em>Department</em>}</li> + * <li>{@link org.gastro.inventory.Employee#getName <em>Name</em>}</li> + * </ul> + * </p> + * + * @see org.gastro.inventory.InventoryPackage#getEmployee() + * @model + * @extends CDOObject + * @generated + */ +public interface Employee extends CDOObject +{ + /** + * Returns the value of the '<em><b>Department</b></em>' container reference. It is bidirectional and its opposite is + * '{@link org.gastro.inventory.Department#getEmployees <em>Employees</em>}'. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Department</em>' reference isn't clear, there really should be more of a description + * here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Department</em>' container reference. + * @see #setDepartment(Department) + * @see org.gastro.inventory.InventoryPackage#getEmployee_Department() + * @see org.gastro.inventory.Department#getEmployees + * @model opposite="employees" transient="false" + * @generated + */ + Department getDepartment(); + + /** + * Sets the value of the '{@link org.gastro.inventory.Employee#getDepartment <em>Department</em>}' reference. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Department</em>' reference. + * @see #getDepartment() + * @generated + */ + void setDepartment(Department value); + + /** + * 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.gastro.inventory.InventoryPackage#getEmployee_Name() + * @model + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.gastro.inventory.Employee#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); + +} // Employee diff --git a/plugins/org.gastro.inventory/src/org/gastro/inventory/Ingredient.java b/plugins/org.gastro.inventory/src/org/gastro/inventory/Ingredient.java new file mode 100644 index 0000000000..9ad48128ed --- /dev/null +++ b/plugins/org.gastro.inventory/src/org/gastro/inventory/Ingredient.java @@ -0,0 +1,119 @@ +/** + * Copyright (c) 2009 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + * + * Initial Publication: + * Eclipse Magazin - http://www.eclipse-magazin.de + */ +package org.gastro.inventory; + +import org.eclipse.emf.cdo.CDOObject; + +/** + * <!-- begin-user-doc --> A representation of the model object '<em><b>Ingredient</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.gastro.inventory.Ingredient#getRecipe <em>Recipe</em>}</li> + * <li>{@link org.gastro.inventory.Ingredient#getProduct <em>Product</em>}</li> + * <li>{@link org.gastro.inventory.Ingredient#getQuantity <em>Quantity</em>}</li> + * </ul> + * </p> + * + * @see org.gastro.inventory.InventoryPackage#getIngredient() + * @model + * @extends CDOObject + * @generated + */ +public interface Ingredient extends CDOObject +{ + /** + * Returns the value of the '<em><b>Recipe</b></em>' container reference. It is bidirectional and its opposite is ' + * {@link org.gastro.inventory.Recipe#getIngredients <em>Ingredients</em>}'. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Recipe</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>Recipe</em>' container reference. + * @see #setRecipe(Recipe) + * @see org.gastro.inventory.InventoryPackage#getIngredient_Recipe() + * @see org.gastro.inventory.Recipe#getIngredients + * @model opposite="ingredients" required="true" transient="false" + * @generated + */ + Recipe getRecipe(); + + /** + * Sets the value of the '{@link org.gastro.inventory.Ingredient#getRecipe <em>Recipe</em>}' container reference. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Recipe</em>' container reference. + * @see #getRecipe() + * @generated + */ + void setRecipe(Recipe value); + + /** + * Returns the value of the '<em><b>Product</b></em>' reference. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Product</em>' reference isn't clear, there really should be more of a description + * here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Product</em>' reference. + * @see #setProduct(Product) + * @see org.gastro.inventory.InventoryPackage#getIngredient_Product() + * @model required="true" + * @generated + */ + Product getProduct(); + + /** + * Sets the value of the '{@link org.gastro.inventory.Ingredient#getProduct <em>Product</em>}' reference. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Product</em>' reference. + * @see #getProduct() + * @generated + */ + void setProduct(Product value); + + /** + * Returns the value of the '<em><b>Quantity</b></em>' attribute. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Quantity</em>' attribute isn't clear, there really should be more of a description + * here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Quantity</em>' attribute. + * @see #setQuantity(int) + * @see org.gastro.inventory.InventoryPackage#getIngredient_Quantity() + * @model + * @generated + */ + int getQuantity(); + + /** + * Sets the value of the '{@link org.gastro.inventory.Ingredient#getQuantity <em>Quantity</em>}' attribute. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Quantity</em>' attribute. + * @see #getQuantity() + * @generated + */ + void setQuantity(int value); + +} // Ingredient diff --git a/plugins/org.gastro.inventory/src/org/gastro/inventory/InventoryFactory.java b/plugins/org.gastro.inventory/src/org/gastro/inventory/InventoryFactory.java new file mode 100644 index 0000000000..6cc185afd3 --- /dev/null +++ b/plugins/org.gastro.inventory/src/org/gastro/inventory/InventoryFactory.java @@ -0,0 +1,130 @@ +/** + * Copyright (c) 2009 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + * + * Initial Publication: + * Eclipse Magazin - http://www.eclipse-magazin.de + */ +package org.gastro.inventory; + +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.gastro.inventory.InventoryPackage + * @generated + */ +public interface InventoryFactory extends EFactory +{ + /** + * The singleton instance of the factory. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + InventoryFactory eINSTANCE = org.gastro.inventory.impl.InventoryFactoryImpl.init(); + + /** + * Returns a new object of class '<em>Stock</em>'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return a new object of class '<em>Stock</em>'. + * @generated + */ + Stock createStock(); + + /** + * Returns a new object of class '<em>Stock Product</em>'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return a new object of class '<em>Stock Product</em>'. + * @generated + */ + StockProduct createStockProduct(); + + /** + * Returns a new object of class '<em>Recipe</em>'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return a new object of class '<em>Recipe</em>'. + * @generated + */ + Recipe createRecipe(); + + /** + * Returns a new object of class '<em>Ingredient</em>'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return a new object of class '<em>Ingredient</em>'. + * @generated + */ + Ingredient createIngredient(); + + /** + * Returns a new object of class '<em>Menu Card</em>'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return a new object of class '<em>Menu Card</em>'. + * @generated + */ + MenuCard createMenuCard(); + + /** + * Returns a new object of class '<em>Restaurant</em>'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return a new object of class '<em>Restaurant</em>'. + * @generated + */ + Restaurant createRestaurant(); + + /** + * Returns a new object of class '<em>Department</em>'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return a new object of class '<em>Department</em>'. + * @generated + */ + Department createDepartment(); + + /** + * Returns a new object of class '<em>Offering</em>'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return a new object of class '<em>Offering</em>'. + * @generated + */ + Offering createOffering(); + + /** + * Returns a new object of class '<em>Table</em>'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return a new object of class '<em>Table</em>'. + * @generated + */ + Table createTable(); + + /** + * 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 a new object of class '<em>Section</em>'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return a new object of class '<em>Section</em>'. + * @generated + */ + Section createSection(); + + /** + * Returns the package supported by this factory. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the package supported by this factory. + * @generated + */ + InventoryPackage getInventoryPackage(); + +} // InventoryFactory diff --git a/plugins/org.gastro.inventory/src/org/gastro/inventory/InventoryPackage.java b/plugins/org.gastro.inventory/src/org/gastro/inventory/InventoryPackage.java new file mode 100644 index 0000000000..f21ff1e496 --- /dev/null +++ b/plugins/org.gastro.inventory/src/org/gastro/inventory/InventoryPackage.java @@ -0,0 +1,1713 @@ +/** + * Copyright (c) 2009 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + * + * Initial Publication: + * Eclipse Magazin - http://www.eclipse-magazin.de + */ +package org.gastro.inventory; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +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.gastro.inventory.InventoryFactory + * @model kind="package" + * @generated + */ +public interface InventoryPackage extends EPackage +{ + /** + * The package name. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + String eNAME = "inventory"; + + /** + * The package namespace URI. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + String eNS_URI = "http://www.gastro.org/inventory/1.0"; + + /** + * The package namespace name. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + String eNS_PREFIX = "inventory"; + + /** + * The singleton instance of the package. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + InventoryPackage eINSTANCE = org.gastro.inventory.impl.InventoryPackageImpl.init(); + + /** + * The meta object id for the '{@link org.gastro.inventory.impl.StockImpl <em>Stock</em>}' class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @see org.gastro.inventory.impl.StockImpl + * @see org.gastro.inventory.impl.InventoryPackageImpl#getStock() + * @generated + */ + int STOCK = 0; + + /** + * The feature id for the '<em><b>Products</b></em>' containment reference list. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + * @ordered + */ + int STOCK__PRODUCTS = 0; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int STOCK__NAME = 1; + + /** + * The feature id for the '<em><b>Department</b></em>' container reference. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + * @ordered + */ + int STOCK__DEPARTMENT = 2; + + /** + * The number of structural features of the '<em>Stock</em>' class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int STOCK_FEATURE_COUNT = 3; + + /** + * The meta object id for the '{@link org.gastro.inventory.impl.ProductImpl <em>Product</em>}' class. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @see org.gastro.inventory.impl.ProductImpl + * @see org.gastro.inventory.impl.InventoryPackageImpl#getProduct() + * @generated + */ + int PRODUCT = 1; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PRODUCT__NAME = 0; + + /** + * The number of structural features of the '<em>Product</em>' class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PRODUCT_FEATURE_COUNT = 1; + + /** + * The meta object id for the '{@link org.gastro.inventory.impl.StockProductImpl <em>Stock Product</em>}' class. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @see org.gastro.inventory.impl.StockProductImpl + * @see org.gastro.inventory.impl.InventoryPackageImpl#getStockProduct() + * @generated + */ + int STOCK_PRODUCT = 2; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int STOCK_PRODUCT__NAME = PRODUCT__NAME; + + /** + * The feature id for the '<em><b>Stock</b></em>' container reference. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int STOCK_PRODUCT__STOCK = PRODUCT_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Cost</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int STOCK_PRODUCT__COST = PRODUCT_FEATURE_COUNT + 1; + + /** + * The feature id for the '<em><b>Available</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int STOCK_PRODUCT__AVAILABLE = PRODUCT_FEATURE_COUNT + 2; + + /** + * The feature id for the '<em><b>Order Limit</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int STOCK_PRODUCT__ORDER_LIMIT = PRODUCT_FEATURE_COUNT + 3; + + /** + * The number of structural features of the '<em>Stock Product</em>' class. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + * @ordered + */ + int STOCK_PRODUCT_FEATURE_COUNT = PRODUCT_FEATURE_COUNT + 4; + + /** + * The meta object id for the '{@link org.gastro.inventory.impl.RecipeImpl <em>Recipe</em>}' class. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @see org.gastro.inventory.impl.RecipeImpl + * @see org.gastro.inventory.impl.InventoryPackageImpl#getRecipe() + * @generated + */ + int RECIPE = 3; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int RECIPE__NAME = PRODUCT__NAME; + + /** + * The feature id for the '<em><b>Ingredients</b></em>' containment reference list. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + * @ordered + */ + int RECIPE__INGREDIENTS = PRODUCT_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Department</b></em>' container reference. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + * @ordered + */ + int RECIPE__DEPARTMENT = PRODUCT_FEATURE_COUNT + 1; + + /** + * The feature id for the '<em><b>Cost</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int RECIPE__COST = PRODUCT_FEATURE_COUNT + 2; + + /** + * The number of structural features of the '<em>Recipe</em>' class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int RECIPE_FEATURE_COUNT = PRODUCT_FEATURE_COUNT + 3; + + /** + * The meta object id for the '{@link org.gastro.inventory.impl.IngredientImpl <em>Ingredient</em>}' class. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @see org.gastro.inventory.impl.IngredientImpl + * @see org.gastro.inventory.impl.InventoryPackageImpl#getIngredient() + * @generated + */ + int INGREDIENT = 4; + + /** + * The feature id for the '<em><b>Recipe</b></em>' container reference. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int INGREDIENT__RECIPE = 0; + + /** + * The feature id for the '<em><b>Product</b></em>' reference. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int INGREDIENT__PRODUCT = 1; + + /** + * The feature id for the '<em><b>Quantity</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int INGREDIENT__QUANTITY = 2; + + /** + * The number of structural features of the '<em>Ingredient</em>' class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int INGREDIENT_FEATURE_COUNT = 3; + + /** + * The meta object id for the '{@link org.gastro.inventory.impl.MenuCardImpl <em>Menu Card</em>}' class. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @see org.gastro.inventory.impl.MenuCardImpl + * @see org.gastro.inventory.impl.InventoryPackageImpl#getMenuCard() + * @generated + */ + int MENU_CARD = 5; + + /** + * The feature id for the '<em><b>Title</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int MENU_CARD__TITLE = 0; + + /** + * The feature id for the '<em><b>Restaurant</b></em>' container reference. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + * @ordered + */ + int MENU_CARD__RESTAURANT = 1; + + /** + * The feature id for the '<em><b>Sections</b></em>' containment reference list. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + * @ordered + */ + int MENU_CARD__SECTIONS = 2; + + /** + * The number of structural features of the '<em>Menu Card</em>' class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int MENU_CARD_FEATURE_COUNT = 3; + + /** + * The meta object id for the '{@link org.gastro.inventory.impl.RestaurantImpl <em>Restaurant</em>}' class. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @see org.gastro.inventory.impl.RestaurantImpl + * @see org.gastro.inventory.impl.InventoryPackageImpl#getRestaurant() + * @generated + */ + int RESTAURANT = 6; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int RESTAURANT__NAME = 0; + + /** + * The feature id for the '<em><b>Departments</b></em>' containment reference list. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + * @ordered + */ + int RESTAURANT__DEPARTMENTS = 1; + + /** + * The feature id for the '<em><b>Menu Cards</b></em>' containment reference list. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + * @ordered + */ + int RESTAURANT__MENU_CARDS = 2; + + /** + * The feature id for the '<em><b>Tables</b></em>' containment reference list. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + * @ordered + */ + int RESTAURANT__TABLES = 3; + + /** + * The feature id for the '<em><b>Stations</b></em>' reference list. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int RESTAURANT__STATIONS = 4; + + /** + * The number of structural features of the '<em>Restaurant</em>' class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int RESTAURANT_FEATURE_COUNT = 5; + + /** + * The meta object id for the '{@link org.gastro.inventory.impl.StationImpl <em>Station</em>}' class. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @see org.gastro.inventory.impl.StationImpl + * @see org.gastro.inventory.impl.InventoryPackageImpl#getStation() + * @generated + */ + int STATION = 11; + + /** + * The feature id for the '<em><b>Station ID</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int STATION__STATION_ID = 0; + + /** + * The number of structural features of the '<em>Station</em>' class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int STATION_FEATURE_COUNT = 1; + + /** + * The meta object id for the '{@link org.gastro.inventory.impl.DepartmentImpl <em>Department</em>}' class. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @see org.gastro.inventory.impl.DepartmentImpl + * @see org.gastro.inventory.impl.InventoryPackageImpl#getDepartment() + * @generated + */ + int DEPARTMENT = 7; + + /** + * The feature id for the '<em><b>Station ID</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int DEPARTMENT__STATION_ID = STATION__STATION_ID; + + /** + * The feature id for the '<em><b>Recipes</b></em>' containment reference list. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + * @ordered + */ + int DEPARTMENT__RECIPES = STATION_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Restaurant</b></em>' container reference. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + * @ordered + */ + int DEPARTMENT__RESTAURANT = STATION_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 DEPARTMENT__EMPLOYEES = STATION_FEATURE_COUNT + 2; + + /** + * The feature id for the '<em><b>Stocks</b></em>' containment reference list. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + * @ordered + */ + int DEPARTMENT__STOCKS = STATION_FEATURE_COUNT + 3; + + /** + * The number of structural features of the '<em>Department</em>' class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int DEPARTMENT_FEATURE_COUNT = STATION_FEATURE_COUNT + 4; + + /** + * The meta object id for the '{@link org.gastro.inventory.impl.OfferingImpl <em>Offering</em>}' class. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @see org.gastro.inventory.impl.OfferingImpl + * @see org.gastro.inventory.impl.InventoryPackageImpl#getOffering() + * @generated + */ + int OFFERING = 8; + + /** + * The feature id for the '<em><b>Product</b></em>' reference. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ |