Skip to content
Browse files

initial commit of prototype code, reorganized as modular maven

projects..
  • Loading branch information...
1 parent a446aa0 commit cba8f4605b88a4be0946e8a12f3fd520914061ec @gregjan committed Jul 28, 2012
Showing with 11,168 additions and 0 deletions.
  1. +5 −0 .classpath
  2. +23 −0 .project
  3. +4 −0 .settings/org.eclipse.m2e.core.prefs
  4. +8 −0 game-model/.classpath
  5. +47 −0 game-model/.project
  6. +3 −0 game-model/.settings/org.eclipse.core.resources.prefs
  7. +8 −0 game-model/.settings/org.eclipse.jdt.core.prefs
  8. +4 −0 game-model/.settings/org.eclipse.m2e.core.prefs
  9. +4 −0 game-model/.settings/org.eclipse.wst.common.project.facet.core.xml
  10. +8 −0 game-model/.settings/org.maven.ide.eclipse.prefs
  11. +16 −0 game-model/META-INF/MANIFEST.MF
  12. +15 −0 game-model/build.properties
  13. +24 −0 game-model/model/games.ecore
  14. +26 −0 game-model/model/games.genmodel
  15. +8 −0 game-model/plugin.properties
  16. +19 −0 game-model/plugin.xml
  17. +30 −0 game-model/pom.xml
  18. +46 −0 game-model/src/main/java/org/meekmok/Games/Game.java
  19. +73 −0 game-model/src/main/java/org/meekmok/Games/GamesFactory.java
  20. +411 −0 game-model/src/main/java/org/meekmok/Games/GamesPackage.java
  21. +54 −0 game-model/src/main/java/org/meekmok/Games/Player.java
  22. +100 −0 game-model/src/main/java/org/meekmok/Games/Profile.java
  23. +46 −0 game-model/src/main/java/org/meekmok/Games/Profiles.java
  24. +156 −0 game-model/src/main/java/org/meekmok/Games/impl/GameImpl.java
  25. +132 −0 game-model/src/main/java/org/meekmok/Games/impl/GamesFactoryImpl.java
  26. +300 −0 game-model/src/main/java/org/meekmok/Games/impl/GamesPackageImpl.java
  27. +161 −0 game-model/src/main/java/org/meekmok/Games/impl/PlayerImpl.java
  28. +263 −0 game-model/src/main/java/org/meekmok/Games/impl/ProfileImpl.java
  29. +138 −0 game-model/src/main/java/org/meekmok/Games/impl/ProfilesImpl.java
  30. +178 −0 game-model/src/main/java/org/meekmok/Games/util/GamesAdapterFactory.java
  31. +193 −0 game-model/src/main/java/org/meekmok/Games/util/GamesSwitch.java
  32. +89 −0 game-model/src/texo/java/com/meekmok/games/Game.java
  33. +49 −0 game-model/src/texo/java/com/meekmok/games/Games.ecore
  34. +512 −0 game-model/src/texo/java/com/meekmok/games/GamesModelFactory.java
  35. +342 −0 game-model/src/texo/java/com/meekmok/games/GamesModelPackage.java
  36. +52 −0 game-model/src/texo/java/com/meekmok/games/Player.java
  37. +152 −0 game-model/src/texo/java/com/meekmok/games/Profile.java
  38. +89 −0 game-model/src/texo/java/com/meekmok/games/Profiles.java
  39. +32 −0 pom.xml
  40. +7 −0 warmok-model/.classpath
  41. +40 −0 warmok-model/.project
  42. +3 −0 warmok-model/.settings/org.eclipse.core.resources.prefs
  43. +8 −0 warmok-model/.settings/org.eclipse.jdt.core.prefs
  44. +4 −0 warmok-model/.settings/org.eclipse.m2e.core.prefs
  45. +8 −0 warmok-model/.settings/org.maven.ide.eclipse.prefs
  46. +12 −0 warmok-model/META-INF/MANIFEST.MF
  47. +15 −0 warmok-model/build.properties
  48. +82 −0 warmok-model/model/warmok.ecore
  49. +70 −0 warmok-model/model/warmok.genmodel
  50. +8 −0 warmok-model/plugin.properties
  51. +19 −0 warmok-model/plugin.xml
  52. +31 −0 warmok-model/pom.xml
  53. +107 −0 warmok-model/src/main/java/org/meekmok/Warmok/Buy.java
  54. +81 −0 warmok-model/src/main/java/org/meekmok/Warmok/GeoPoint.java
  55. +71 −0 warmok-model/src/main/java/org/meekmok/Warmok/Move.java
  56. +229 −0 warmok-model/src/main/java/org/meekmok/Warmok/Nation.java
  57. +54 −0 warmok-model/src/main/java/org/meekmok/Warmok/NationType.java
  58. +22 −0 warmok-model/src/main/java/org/meekmok/Warmok/Order.java
  59. +100 −0 warmok-model/src/main/java/org/meekmok/Warmok/Orders.java
  60. +22 −0 warmok-model/src/main/java/org/meekmok/Warmok/Round.java
  61. +127 −0 warmok-model/src/main/java/org/meekmok/Warmok/Territory.java
  62. +83 −0 warmok-model/src/main/java/org/meekmok/Warmok/Unit.java
  63. +108 −0 warmok-model/src/main/java/org/meekmok/Warmok/UnitType.java
  64. +145 −0 warmok-model/src/main/java/org/meekmok/Warmok/WarmokFactory.java
  65. +73 −0 warmok-model/src/main/java/org/meekmok/Warmok/WarmokGame.java
  66. +1,529 −0 warmok-model/src/main/java/org/meekmok/Warmok/WarmokPackage.java
  67. +100 −0 warmok-model/src/main/java/org/meekmok/Warmok/World.java
  68. +289 −0 warmok-model/src/main/java/org/meekmok/Warmok/impl/BuyImpl.java
  69. +221 −0 warmok-model/src/main/java/org/meekmok/Warmok/impl/GeoPointImpl.java
  70. +202 −0 warmok-model/src/main/java/org/meekmok/Warmok/impl/MoveImpl.java
  71. +568 −0 warmok-model/src/main/java/org/meekmok/Warmok/impl/NationImpl.java
  72. +167 −0 warmok-model/src/main/java/org/meekmok/Warmok/impl/NationTypeImpl.java
  73. +45 −0 warmok-model/src/main/java/org/meekmok/Warmok/impl/OrderImpl.java
  74. +287 −0 warmok-model/src/main/java/org/meekmok/Warmok/impl/OrdersImpl.java
  75. +45 −0 warmok-model/src/main/java/org/meekmok/Warmok/impl/RoundImpl.java
  76. +324 −0 warmok-model/src/main/java/org/meekmok/Warmok/impl/TerritoryImpl.java
  77. +275 −0 warmok-model/src/main/java/org/meekmok/Warmok/impl/UnitImpl.java
  78. +275 −0 warmok-model/src/main/java/org/meekmok/Warmok/impl/UnitTypeImpl.java
  79. +220 −0 warmok-model/src/main/java/org/meekmok/Warmok/impl/WarmokFactoryImpl.java
  80. +204 −0 warmok-model/src/main/java/org/meekmok/Warmok/impl/WarmokGameImpl.java
  81. +797 −0 warmok-model/src/main/java/org/meekmok/Warmok/impl/WarmokPackageImpl.java
  82. +271 −0 warmok-model/src/main/java/org/meekmok/Warmok/impl/WorldImpl.java
Sorry, we could not display the entire diff because it was too big.
View
5 .classpath
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
View
23 .project
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>Warmok</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
View
4 .settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
View
8 game-model/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" output="target/classes" path="src/main/java"/>
+ <classpathentry kind="src" path="src/texo/java"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
View
47 game-model/.project
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>Games Model</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <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>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.eclipse.emf.texo.eclipse.nature</nature>
+ </natures>
+</projectDescription>
View
3 game-model/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
+encoding/src=UTF-8
View
8 game-model/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.source=1.6
View
4 game-model/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
View
4 game-model/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <installed facet="java" version="1.6"/>
+</faceted-project>
View
8 game-model/.settings/org.maven.ide.eclipse.prefs
@@ -0,0 +1,8 @@
+#Mon Sep 05 14:04:49 EDT 2011
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1
View
16 game-model/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: Games_Model;singleton:=true
+Bundle-Version: 1.0.0
+Bundle-ClassPath: .
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.emf.ecore;visibility:=reexport,
+ org.eclipse.emf.texo;bundle-version="0.1.0";visibility:=reexport,
+ org.eclipse.emf.texo.xml;bundle-version="0.1.0";visibility:=reexport
+Export-Package: org.meekmok.Games,
+ org.meekmok.Games.impl,
+ org.meekmok.Games.util
View
15 game-model/build.properties
@@ -0,0 +1,15 @@
+
+# <copyright>
+# </copyright>
+#
+# $Id$
+
+bin.includes = .,\
+ model/,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties
+jars.compile.order = .
+source.. = src/main/java/,src/texo/java
+output.. = target/classes
+jre.compilation.profile = J2SE-1.5
View
24 game-model/model/games.ecore
@@ -0,0 +1,24 @@
+<?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="Games"
+ nsURI="http://www.meekmok.com/Games" nsPrefix="games">
+ <eClassifiers xsi:type="ecore:EClass" name="Profile">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="openid" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="players" upperBound="-1"
+ eType="#//Player"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Game">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="players" upperBound="-1"
+ eType="#//Player" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Player">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="profile" lowerBound="1"
+ eType="#//Profile"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Profiles">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="profiles" upperBound="-1"
+ eType="#//Profile"/>
+ </eClassifiers>
+</ecore:EPackage>
View
26 game-model/model/games.genmodel
@@ -0,0 +1,26 @@
+<?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="/Games Model/src/main/java"
+ editDirectory="/Games Model.edit/src/main/java" modelPluginID="Games_Model" modelName="Games"
+ testsDirectory="/Games Model.tests/src/main/java" importerID="org.eclipse.emf.importer.ecore"
+ complianceLevel="5.0" copyrightFields="false">
+ <foreignModel>games.ecore</foreignModel>
+ <genPackages prefix="Games" basePackage="org.meekmok" disposableProviderFactory="true"
+ ecorePackage="games.ecore#/">
+ <genClasses ecoreClass="games.ecore#//Profile">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute games.ecore#//Profile/name"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute games.ecore#//Profile/openid"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference games.ecore#//Profile/players"/>
+ </genClasses>
+ <genClasses ecoreClass="games.ecore#//Game">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference games.ecore#//Game/players"/>
+ </genClasses>
+ <genClasses ecoreClass="games.ecore#//Player">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference games.ecore#//Player/profile"/>
+ </genClasses>
+ <genClasses ecoreClass="games.ecore#//Profiles">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference games.ecore#//Profiles/profiles"/>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
View
8 game-model/plugin.properties
@@ -0,0 +1,8 @@
+
+# <copyright>
+# </copyright>
+#
+# $Id$
+
+pluginName = Warmok Model
+providerName = www.example.org
View
19 game-model/plugin.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+ <copyright>
+ </copyright>
+
+ $Id$
+-->
+
+<plugin>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <package
+ uri="http://www.meekmok.com/Games"
+ class="org.meekmok.Games.GamesPackage"/>
+ </extension>
+
+</plugin>
View
30 game-model/pom.xml
@@ -0,0 +1,30 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>game-model</artifactId>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>${tycho-groupid}</groupId>
+ <artifactId>tycho-maven-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <extensions>true</extensions>
+ </plugin>
+ <plugin>
+ <groupId>${tycho-groupid}</groupId>
+ <artifactId>maven-osgi-compiler-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <parent>
+ <groupId>com.meekmok</groupId>
+ <artifactId>warmok</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <relativePath>..</relativePath>
+ </parent>
+</project>
View
46 game-model/src/main/java/org/meekmok/Games/Game.java
@@ -0,0 +1,46 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.meekmok.Games;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Game</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.meekmok.Games.Game#getPlayers <em>Players</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.meekmok.Games.GamesPackage#getGame()
+ * @model
+ * @generated
+ */
+public interface Game extends EObject {
+ /**
+ * Returns the value of the '<em><b>Players</b></em>' containment reference list.
+ * The list contents are of type {@link org.meekmok.Games.Player}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Players</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>Players</em>' containment reference list.
+ * @see org.meekmok.Games.GamesPackage#getGame_Players()
+ * @model containment="true"
+ * @generated
+ */
+ EList<Player> getPlayers();
+
+} // Game
View
73 game-model/src/main/java/org/meekmok/Games/GamesFactory.java
@@ -0,0 +1,73 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.meekmok.Games;
+
+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.meekmok.Games.GamesPackage
+ * @generated
+ */
+public interface GamesFactory extends EFactory {
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ GamesFactory eINSTANCE = org.meekmok.Games.impl.GamesFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Profile</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Profile</em>'.
+ * @generated
+ */
+ Profile createProfile();
+
+ /**
+ * Returns a new object of class '<em>Game</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Game</em>'.
+ * @generated
+ */
+ Game createGame();
+
+ /**
+ * Returns a new object of class '<em>Player</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Player</em>'.
+ * @generated
+ */
+ Player createPlayer();
+
+ /**
+ * Returns a new object of class '<em>Profiles</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Profiles</em>'.
+ * @generated
+ */
+ Profiles createProfiles();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ GamesPackage getGamesPackage();
+
+} //GamesFactory
View
411 game-model/src/main/java/org/meekmok/Games/GamesPackage.java
@@ -0,0 +1,411 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.meekmok.Games;
+
+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.meekmok.Games.GamesFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface GamesPackage extends EPackage {
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "Games";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://www.meekmok.com/Games";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "games";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ GamesPackage eINSTANCE = org.meekmok.Games.impl.GamesPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.meekmok.Games.impl.ProfileImpl <em>Profile</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.meekmok.Games.impl.ProfileImpl
+ * @see org.meekmok.Games.impl.GamesPackageImpl#getProfile()
+ * @generated
+ */
+ int PROFILE = 0;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PROFILE__NAME = 0;
+
+ /**
+ * The feature id for the '<em><b>Openid</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PROFILE__OPENID = 1;
+
+ /**
+ * The feature id for the '<em><b>Players</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PROFILE__PLAYERS = 2;
+
+ /**
+ * The number of structural features of the '<em>Profile</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PROFILE_FEATURE_COUNT = 3;
+
+ /**
+ * The meta object id for the '{@link org.meekmok.Games.impl.GameImpl <em>Game</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.meekmok.Games.impl.GameImpl
+ * @see org.meekmok.Games.impl.GamesPackageImpl#getGame()
+ * @generated
+ */
+ int GAME = 1;
+
+ /**
+ * The feature id for the '<em><b>Players</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GAME__PLAYERS = 0;
+
+ /**
+ * The number of structural features of the '<em>Game</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GAME_FEATURE_COUNT = 1;
+
+ /**
+ * The meta object id for the '{@link org.meekmok.Games.impl.PlayerImpl <em>Player</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.meekmok.Games.impl.PlayerImpl
+ * @see org.meekmok.Games.impl.GamesPackageImpl#getPlayer()
+ * @generated
+ */
+ int PLAYER = 2;
+
+ /**
+ * The feature id for the '<em><b>Profile</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PLAYER__PROFILE = 0;
+
+ /**
+ * The number of structural features of the '<em>Player</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PLAYER_FEATURE_COUNT = 1;
+
+ /**
+ * The meta object id for the '{@link org.meekmok.Games.impl.ProfilesImpl <em>Profiles</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.meekmok.Games.impl.ProfilesImpl
+ * @see org.meekmok.Games.impl.GamesPackageImpl#getProfiles()
+ * @generated
+ */
+ int PROFILES = 3;
+
+ /**
+ * The feature id for the '<em><b>Profiles</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PROFILES__PROFILES = 0;
+
+ /**
+ * The number of structural features of the '<em>Profiles</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PROFILES_FEATURE_COUNT = 1;
+
+
+ /**
+ * Returns the meta object for class '{@link org.meekmok.Games.Profile <em>Profile</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Profile</em>'.
+ * @see org.meekmok.Games.Profile
+ * @generated
+ */
+ EClass getProfile();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.meekmok.Games.Profile#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see org.meekmok.Games.Profile#getName()
+ * @see #getProfile()
+ * @generated
+ */
+ EAttribute getProfile_Name();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.meekmok.Games.Profile#getOpenid <em>Openid</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Openid</em>'.
+ * @see org.meekmok.Games.Profile#getOpenid()
+ * @see #getProfile()
+ * @generated
+ */
+ EAttribute getProfile_Openid();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.meekmok.Games.Profile#getPlayers <em>Players</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Players</em>'.
+ * @see org.meekmok.Games.Profile#getPlayers()
+ * @see #getProfile()
+ * @generated
+ */
+ EReference getProfile_Players();
+
+ /**
+ * Returns the meta object for class '{@link org.meekmok.Games.Game <em>Game</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Game</em>'.
+ * @see org.meekmok.Games.Game
+ * @generated
+ */
+ EClass getGame();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.meekmok.Games.Game#getPlayers <em>Players</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Players</em>'.
+ * @see org.meekmok.Games.Game#getPlayers()
+ * @see #getGame()
+ * @generated
+ */
+ EReference getGame_Players();
+
+ /**
+ * Returns the meta object for class '{@link org.meekmok.Games.Player <em>Player</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Player</em>'.
+ * @see org.meekmok.Games.Player
+ * @generated
+ */
+ EClass getPlayer();
+
+ /**
+ * Returns the meta object for the reference '{@link org.meekmok.Games.Player#getProfile <em>Profile</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Profile</em>'.
+ * @see org.meekmok.Games.Player#getProfile()
+ * @see #getPlayer()
+ * @generated
+ */
+ EReference getPlayer_Profile();
+
+ /**
+ * Returns the meta object for class '{@link org.meekmok.Games.Profiles <em>Profiles</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Profiles</em>'.
+ * @see org.meekmok.Games.Profiles
+ * @generated
+ */
+ EClass getProfiles();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.meekmok.Games.Profiles#getProfiles <em>Profiles</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Profiles</em>'.
+ * @see org.meekmok.Games.Profiles#getProfiles()
+ * @see #getProfiles()
+ * @generated
+ */
+ EReference getProfiles_Profiles();
+
+ /**
+ * 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
+ */
+ GamesFactory getGamesFactory();
+
+ /**
+ * <!-- 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.meekmok.Games.impl.ProfileImpl <em>Profile</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.meekmok.Games.impl.ProfileImpl
+ * @see org.meekmok.Games.impl.GamesPackageImpl#getProfile()
+ * @generated
+ */
+ EClass PROFILE = eINSTANCE.getProfile();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute PROFILE__NAME = eINSTANCE.getProfile_Name();
+
+ /**
+ * The meta object literal for the '<em><b>Openid</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute PROFILE__OPENID = eINSTANCE.getProfile_Openid();
+
+ /**
+ * The meta object literal for the '<em><b>Players</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PROFILE__PLAYERS = eINSTANCE.getProfile_Players();
+
+ /**
+ * The meta object literal for the '{@link org.meekmok.Games.impl.GameImpl <em>Game</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.meekmok.Games.impl.GameImpl
+ * @see org.meekmok.Games.impl.GamesPackageImpl#getGame()
+ * @generated
+ */
+ EClass GAME = eINSTANCE.getGame();
+
+ /**
+ * The meta object literal for the '<em><b>Players</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference GAME__PLAYERS = eINSTANCE.getGame_Players();
+
+ /**
+ * The meta object literal for the '{@link org.meekmok.Games.impl.PlayerImpl <em>Player</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.meekmok.Games.impl.PlayerImpl
+ * @see org.meekmok.Games.impl.GamesPackageImpl#getPlayer()
+ * @generated
+ */
+ EClass PLAYER = eINSTANCE.getPlayer();
+
+ /**
+ * The meta object literal for the '<em><b>Profile</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PLAYER__PROFILE = eINSTANCE.getPlayer_Profile();
+
+ /**
+ * The meta object literal for the '{@link org.meekmok.Games.impl.ProfilesImpl <em>Profiles</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.meekmok.Games.impl.ProfilesImpl
+ * @see org.meekmok.Games.impl.GamesPackageImpl#getProfiles()
+ * @generated
+ */
+ EClass PROFILES = eINSTANCE.getProfiles();
+
+ /**
+ * The meta object literal for the '<em><b>Profiles</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PROFILES__PROFILES = eINSTANCE.getProfiles_Profiles();
+
+ }
+
+} //GamesPackage
View
54 game-model/src/main/java/org/meekmok/Games/Player.java
@@ -0,0 +1,54 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.meekmok.Games;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Player</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.meekmok.Games.Player#getProfile <em>Profile</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.meekmok.Games.GamesPackage#getPlayer()
+ * @model
+ * @generated
+ */
+public interface Player extends EObject {
+ /**
+ * Returns the value of the '<em><b>Profile</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Profile</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Profile</em>' reference.
+ * @see #setProfile(Profile)
+ * @see org.meekmok.Games.GamesPackage#getPlayer_Profile()
+ * @model required="true"
+ * @generated
+ */
+ Profile getProfile();
+
+ /**
+ * Sets the value of the '{@link org.meekmok.Games.Player#getProfile <em>Profile</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Profile</em>' reference.
+ * @see #getProfile()
+ * @generated
+ */
+ void setProfile(Profile value);
+
+} // Player
View
100 game-model/src/main/java/org/meekmok/Games/Profile.java
@@ -0,0 +1,100 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.meekmok.Games;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Profile</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.meekmok.Games.Profile#getName <em>Name</em>}</li>
+ * <li>{@link org.meekmok.Games.Profile#getOpenid <em>Openid</em>}</li>
+ * <li>{@link org.meekmok.Games.Profile#getPlayers <em>Players</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.meekmok.Games.GamesPackage#getProfile()
+ * @model
+ * @generated
+ */
+public interface Profile extends EObject {
+ /**
+ * 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.meekmok.Games.GamesPackage#getProfile_Name()
+ * @model required="true"
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.meekmok.Games.Profile#getName <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Name</em>' attribute.
+ * @see #getName()
+ * @generated
+ */
+ void setName(String value);
+
+ /**
+ * Returns the value of the '<em><b>Openid</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Openid</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Openid</em>' attribute.
+ * @see #setOpenid(String)
+ * @see org.meekmok.Games.GamesPackage#getProfile_Openid()
+ * @model
+ * @generated
+ */
+ String getOpenid();
+
+ /**
+ * Sets the value of the '{@link org.meekmok.Games.Profile#getOpenid <em>Openid</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Openid</em>' attribute.
+ * @see #getOpenid()
+ * @generated
+ */
+ void setOpenid(String value);
+
+ /**
+ * Returns the value of the '<em><b>Players</b></em>' reference list.
+ * The list contents are of type {@link org.meekmok.Games.Player}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Players</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>Players</em>' reference list.
+ * @see org.meekmok.Games.GamesPackage#getProfile_Players()
+ * @model
+ * @generated
+ */
+ EList<Player> getPlayers();
+
+} // Profile
View
46 game-model/src/main/java/org/meekmok/Games/Profiles.java
@@ -0,0 +1,46 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.meekmok.Games;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Profiles</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.meekmok.Games.Profiles#getProfiles <em>Profiles</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.meekmok.Games.GamesPackage#getProfiles()
+ * @model
+ * @generated
+ */
+public interface Profiles extends EObject {
+ /**
+ * Returns the value of the '<em><b>Profiles</b></em>' reference list.
+ * The list contents are of type {@link org.meekmok.Games.Profile}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Profiles</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>Profiles</em>' reference list.
+ * @see org.meekmok.Games.GamesPackage#getProfiles_Profiles()
+ * @model
+ * @generated
+ */
+ EList<Profile> getProfiles();
+
+} // Profiles
View
156 game-model/src/main/java/org/meekmok/Games/impl/GameImpl.java
@@ -0,0 +1,156 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.meekmok.Games.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.meekmok.Games.Game;
+import org.meekmok.Games.GamesPackage;
+import org.meekmok.Games.Player;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Game</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.meekmok.Games.impl.GameImpl#getPlayers <em>Players</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class GameImpl extends EObjectImpl implements Game {
+ /**
+ * The cached value of the '{@link #getPlayers() <em>Players</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getPlayers()
+ * @generated
+ * @ordered
+ */
+ protected EList<Player> players;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected GameImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return GamesPackage.Literals.GAME;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Player> getPlayers() {
+ if (players == null) {
+ players = new EObjectContainmentEList<Player>(Player.class, this, GamesPackage.GAME__PLAYERS);
+ }
+ return players;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case GamesPackage.GAME__PLAYERS:
+ return ((InternalEList<?>)getPlayers()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case GamesPackage.GAME__PLAYERS:
+ return getPlayers();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case GamesPackage.GAME__PLAYERS:
+ getPlayers().clear();
+ getPlayers().addAll((Collection<? extends Player>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case GamesPackage.GAME__PLAYERS:
+ getPlayers().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case GamesPackage.GAME__PLAYERS:
+ return players != null && !players.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //GameImpl
View
132 game-model/src/main/java/org/meekmok/Games/impl/GamesFactoryImpl.java
@@ -0,0 +1,132 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.meekmok.Games.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+import org.meekmok.Games.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class GamesFactoryImpl extends EFactoryImpl implements GamesFactory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static GamesFactory init() {
+ try {
+ GamesFactory theGamesFactory = (GamesFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.meekmok.com/Games");
+ if (theGamesFactory != null) {
+ return theGamesFactory;
+ }
+ }
+ catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new GamesFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GamesFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case GamesPackage.PROFILE: return createProfile();
+ case GamesPackage.GAME: return createGame();
+ case GamesPackage.PLAYER: return createPlayer();
+ case GamesPackage.PROFILES: return createProfiles();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Profile createProfile() {
+ ProfileImpl profile = new ProfileImpl();
+ return profile;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Game createGame() {
+ GameImpl game = new GameImpl();
+ return game;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Player createPlayer() {
+ PlayerImpl player = new PlayerImpl();
+ return player;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Profiles createProfiles() {
+ ProfilesImpl profiles = new ProfilesImpl();
+ return profiles;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GamesPackage getGamesPackage() {
+ return (GamesPackage)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static GamesPackage getPackage() {
+ return GamesPackage.eINSTANCE;
+ }
+
+} //GamesFactoryImpl
View
300 game-model/src/main/java/org/meekmok/Games/impl/GamesPackageImpl.java
@@ -0,0 +1,300 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.meekmok.Games.impl;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+import org.meekmok.Games.Game;
+import org.meekmok.Games.GamesFactory;
+import org.meekmok.Games.GamesPackage;
+import org.meekmok.Games.Player;
+import org.meekmok.Games.Profile;
+import org.meekmok.Games.Profiles;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class GamesPackageImpl extends EPackageImpl implements GamesPackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass profileEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass gameEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass playerEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass profilesEClass = 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.meekmok.Games.GamesPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private GamesPackageImpl() {
+ super(eNS_URI, GamesFactory.eINSTANCE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>This method is used to initialize {@link GamesPackage#eINSTANCE} when that field is accessed.
+ * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static GamesPackage init() {
+ if (isInited) return (GamesPackage)EPackage.Registry.INSTANCE.getEPackage(GamesPackage.eNS_URI);
+
+ // Obtain or create and register package
+ GamesPackageImpl theGamesPackage = (GamesPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof GamesPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new GamesPackageImpl());
+
+ isInited = true;
+
+ // Create package meta-data objects
+ theGamesPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theGamesPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theGamesPackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(GamesPackage.eNS_URI, theGamesPackage);
+ return theGamesPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getProfile() {
+ return profileEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getProfile_Name() {
+ return (EAttribute)profileEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getProfile_Openid() {
+ return (EAttribute)profileEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getProfile_Players() {
+ return (EReference)profileEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getGame() {
+ return gameEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getGame_Players() {
+ return (EReference)gameEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getPlayer() {
+ return playerEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPlayer_Profile() {
+ return (EReference)playerEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getProfiles() {
+ return profilesEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getProfiles_Profiles() {
+ return (EReference)profilesEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GamesFactory getGamesFactory() {
+ return (GamesFactory)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
+ profileEClass = createEClass(PROFILE);
+ createEAttribute(profileEClass, PROFILE__NAME);
+ createEAttribute(profileEClass, PROFILE__OPENID);
+ createEReference(profileEClass, PROFILE__PLAYERS);
+
+ gameEClass = createEClass(GAME);
+ createEReference(gameEClass, GAME__PLAYERS);
+
+ playerEClass = createEClass(PLAYER);
+ createEReference(playerEClass, PLAYER__PROFILE);
+
+ profilesEClass = createEClass(PROFILES);
+ createEReference(profilesEClass, PROFILES__PROFILES);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+
+ // Initialize classes and features; add operations and parameters
+ initEClass(profileEClass, Profile.class, "Profile", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getProfile_Name(), ecorePackage.getEString(), "name", null, 1, 1, Profile.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getProfile_Openid(), ecorePackage.getEString(), "openid", null, 0, 1, Profile.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getProfile_Players(), this.getPlayer(), null, "players", null, 0, -1, Profile.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(gameEClass, Game.class, "Game", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getGame_Players(), this.getPlayer(), null, "players", null, 0, -1, Game.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(playerEClass, Player.class, "Player", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getPlayer_Profile(), this.getProfile(), null, "profile", null, 1, 1, Player.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(profilesEClass, Profiles.class, "Profiles", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getProfiles_Profiles(), this.getProfile(), null, "profiles", null, 0, -1, Profiles.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ // Create resource
+ createResource(eNS_URI);
+ }
+
+} //GamesPackageImpl
View
161 game-model/src/main/java/org/meekmok/Games/impl/PlayerImpl.java
@@ -0,0 +1,161 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.meekmok.Games.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+
+import org.meekmok.Games.GamesPackage;
+import org.meekmok.Games.Player;
+import org.meekmok.Games.Profile;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Player</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.meekmok.Games.impl.PlayerImpl#getProfile <em>Profile</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class PlayerImpl extends EObjectImpl implements Player {
+ /**
+ * The cached value of the '{@link #getProfile() <em>Profile</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getProfile()
+ * @generated
+ * @ordered
+ */
+ protected Profile profile;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PlayerImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return GamesPackage.Literals.PLAYER;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Profile getProfile() {
+ if (profile != null && profile.eIsProxy()) {
+ InternalEObject oldProfile = (InternalEObject)profile;
+ profile = (Profile)eResolveProxy(oldProfile);
+ if (profile != oldProfile) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, GamesPackage.PLAYER__PROFILE, oldProfile, profile));
+ }
+ }
+ return profile;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Profile basicGetProfile() {
+ return profile;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setProfile(Profile newProfile) {
+ Profile oldProfile = profile;
+ profile = newProfile;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, GamesPackage.PLAYER__PROFILE, oldProfile, profile));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case GamesPackage.PLAYER__PROFILE:
+ if (resolve) return getProfile();
+ return basicGetProfile();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case GamesPackage.PLAYER__PROFILE:
+ setProfile((Profile)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case GamesPackage.PLAYER__PROFILE:
+ setProfile((Profile)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case GamesPackage.PLAYER__PROFILE:
+ return profile != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //PlayerImpl
View
263 game-model/src/main/java/org/meekmok/Games/impl/ProfileImpl.java
@@ -0,0 +1,263 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.meekmok.Games.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+
+import org.eclipse.emf.ecore.util.EObjectResolvingEList;
+
+import org.meekmok.Games.GamesPackage;
+import org.meekmok.Games.Player;
+import org.meekmok.Games.Profile;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Profile</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.meekmok.Games.impl.ProfileImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.meekmok.Games.impl.ProfileImpl#getOpenid <em>Openid</em>}</li>
+ * <li>{@link org.meekmok.Games.impl.ProfileImpl#getPlayers <em>Players</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ProfileImpl extends EObjectImpl implements Profile {
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getOpenid() <em>Openid</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getOpenid()
+ * @generated
+ * @ordered
+ */
+ protected static final String OPENID_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getOpenid() <em>Openid</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getOpenid()
+ * @generated
+ * @ordered
+ */
+ protected String openid = OPENID_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getPlayers() <em>Players</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getPlayers()
+ * @generated
+ * @ordered
+ */
+ protected EList<Player> players;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ProfileImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return GamesPackage.Literals.PROFILE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName) {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, GamesPackage.PROFILE__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getOpenid() {
+ return openid;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setOpenid(String newOpenid) {
+ String oldOpenid = openid;
+ openid = newOpenid;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, GamesPackage.PROFILE__OPENID, oldOpenid, openid));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Player> getPlayers() {
+ if (players == null) {
+ players = new EObjectResolvingEList<Player>(Player.class, this, GamesPackage.PROFILE__PLAYERS);
+ }
+ return players;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case GamesPackage.PROFILE__NAME:
+ return getName();
+ case GamesPackage.PROFILE__OPENID:
+ return getOpenid();
+ case GamesPackage.PROFILE__PLAYERS:
+ return getPlayers();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case GamesPackage.PROFILE__NAME:
+ setName((String)newValue);
+ return;
+ case GamesPackage.PROFILE__OPENID:
+ setOpenid((String)newValue);
+ return;
+ case GamesPackage.PROFILE__PLAYERS:
+ getPlayers().clear();
+ getPlayers().addAll((Collection<? extends Player>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case GamesPackage.PROFILE__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case GamesPackage.PROFILE__OPENID:
+ setOpenid(OPENID_EDEFAULT);
+ return;
+ case GamesPackage.PROFILE__PLAYERS:
+ getPlayers().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case GamesPackage.PROFILE__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case GamesPackage.PROFILE__OPENID:
+ return OPENID_EDEFAULT == null ? openid != null : !OPENID_EDEFAULT.equals(openid);
+ case GamesPackage.PROFILE__PLAYERS:
+ return players != null && !players.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (name: ");
+ result.append(name);
+ result.append(", openid: ");
+ result.append(openid);
+ result.append(')');
+ return result.toString();
+ }
+
+} //ProfileImpl
View
138 game-model/src/main/java/org/meekmok/Games/impl/ProfilesImpl.java
@@ -0,0 +1,138 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.meekmok.Games.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+
+import org.eclipse.emf.ecore.util.EObjectResolvingEList;
+
+import org.meekmok.Games.GamesPackage;
+import org.meekmok.Games.Profile;
+import org.meekmok.Games.Profiles;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Profiles</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.meekmok.Games.impl.ProfilesImpl#getProfiles <em>Profiles</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ProfilesImpl extends EObjectImpl implements Profiles {
+ /**
+ * The cached value of the '{@link #getProfiles() <em>Profiles</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getProfiles()
+ * @generated
+ * @ordered
+ */
+ protected EList<Profile> profiles;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ProfilesImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return GamesPackage.Literals.PROFILES;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Profile> getProfiles() {
+ if (profiles == null) {
+ profiles = new EObjectResolvingEList<Profile>(Profile.class, this, GamesPackage.PROFILES__PROFILES);
+ }
+ return profiles;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case GamesPackage.PROFILES__PROFILES:
+ return getProfiles();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case GamesPackage.PROFILES__PROFILES:
+ getProfiles().clear();
+ getProfiles().addAll((Collection<? extends Profile>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case GamesPackage.PROFILES__PROFILES:
+ getProfiles().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case GamesPackage.PROFILES__PROFILES:
+ return profiles != null && !profiles.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //ProfilesImpl
View
178 game-model/src/main/java/org/meekmok/Games/util/GamesAdapterFactory.java
@@ -0,0 +1,178 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.meekmok.Games.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.meekmok.Games.*;
+
+/**
+ * <!-- 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.meekmok.Games.GamesPackage
+ * @generated
+ */
+public class GamesAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static GamesPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GamesAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = GamesPackage.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 GamesSwitch<Adapter> modelSwitch =
+ new GamesSwitch<Adapter>() {
+ @Override
+ public Adapter caseProfile(Profile object) {
+ return createProfileAdapter();
+ }
+ @Override
+ public Adapter caseGame(Game object) {
+ return createGameAdapter();
+ }
+ @Override
+ public Adapter casePlayer(Player object) {
+ return createPlayerAdapter();
+ }
+ @Override
+ public Adapter caseProfiles(Profiles object) {
+ return createProfilesAdapter();
+ }
+ @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.meekmok.Games.Profile <em>Profile</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.meekmok.Games.Profile
+ * @generated
+ */
+ public Adapter createProfileAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.meekmok.Games.Game <em>Game</em>}'.
+ * <!-- begin-user-doc -->