Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

upfitted tycho build, v0.15.0, EMF model plugins built by maven now

using remote/standard p2 repositories and target def only
reconciled dependencies within master project
updated Texo pojos and exported package
maven builds work

still have a compile problem, due to halfway through replacing jersey
with spring mvc for rest controllers
  • Loading branch information...
commit 44807a3d4d276af476411e72621c170b29c116ea 1 parent eb451fc
@gregjan authored
Showing with 820 additions and 356 deletions.
  1. +3 −3 game-model/.classpath
  2. +3 −3 game-model/.settings/org.eclipse.jdt.core.prefs
  3. +5 −4 game-model/META-INF/MANIFEST.MF
  4. +4 −3 game-model/build.properties
  5. +5 −7 game-model/model/games.genmodel
  6. +3 −20 game-model/pom.xml
  7. +27 −27 game-model/{src/texo/java → src-gen}/com/meekmok/games/Game.java
  8. +2 −4 game-model/{src/texo/java → src-gen}/com/meekmok/games/Games.ecore
  9. +69 −62 game-model/{src/texo/java → src-gen}/com/meekmok/games/GamesModelFactory.java
  10. +98 −89 game-model/{src/texo/java → src-gen}/com/meekmok/games/GamesModelPackage.java
  11. +21 −19 game-model/{src/texo/java → src-gen}/com/meekmok/games/Player.java
  12. +52 −49 game-model/{src/texo/java → src-gen}/com/meekmok/games/Profile.java
  13. +28 −27 game-model/{src/texo/java → src-gen}/com/meekmok/games/Profiles.java
  14. +61 −8 pom.xml
  15. +1 −1  warmok-model/.classpath
  16. +3 −3 warmok-model/.settings/org.eclipse.jdt.core.prefs
  17. +7 −4 warmok-model/META-INF/MANIFEST.MF
  18. +0 −1  warmok-model/build.properties
  19. +4 −22 warmok-model/pom.xml
  20. +15 −0 webapp/.classpath
  21. +42 −0 webapp/.project
  22. +12 −0 webapp/.settings/.jsdtscope
  23. +9 −0 webapp/.settings/org.eclipse.jdt.core.prefs
  24. +10 −0 webapp/.settings/org.eclipse.wst.common.component
  25. +8 −0 webapp/.settings/org.eclipse.wst.common.project.facet.core.xml
  26. +1 −0  webapp/.settings/org.eclipse.wst.jsdt.ui.superType.container
  27. +1 −0  webapp/.settings/org.eclipse.wst.jsdt.ui.superType.name
  28. +8 −0 webapp/.settings/org.maven.ide.eclipse.prefs
  29. +90 −0 webapp/pom.xml
  30. +136 −0 webapp/src/main/java/org/meekmok/warmok/dao/ProfileDao.java
  31. +68 −0 webapp/src/main/java/org/meekmok/warmok/rest/ProfileRestController.java
  32. +19 −0 webapp/src/main/webapp/WEB-INF/web.xml
  33. +5 −0 webapp/src/main/webapp/index.jsp
View
6 game-model/.classpath
@@ -1,8 +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.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<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="src" path="src/main/java"/>
+ <classpathentry kind="src" path="src-gen"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
View
6 game-model/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +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.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.compliance=1.7
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
+org.eclipse.jdt.core.compiler.source=1.7
View
9 game-model/META-INF/MANIFEST.MF
@@ -1,16 +1,17 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
-Bundle-SymbolicName: Games_Model;singleton:=true
-Bundle-Version: 1.0.0
+Bundle-SymbolicName: game-model;singleton:=true
+Bundle-Version: 1.0.0.qualifier
Bundle-ClassPath: .
Bundle-Vendor: %providerName
Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
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,
+Export-Package: com.meekmok.games,
+ org.meekmok.Games,
org.meekmok.Games.impl,
org.meekmok.Games.util
View
7 game-model/build.properties
@@ -10,6 +10,7 @@ bin.includes = .,\
plugin.xml,\
plugin.properties
jars.compile.order = .
-source.. = src/main/java/,src/texo/java
-output.. = target/classes
-jre.compilation.profile = J2SE-1.5
+source.. = src/main/java/,\
+ src-gen/
+output.. = target/classes,\
+ bin/
View
12 game-model/model/games.genmodel
@@ -1,12 +1,10 @@
<?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">
+<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"
+ <genPackages prefix="Games" basePackage="com.meekmok" disposableProviderFactory="true"
ecorePackage="games.ecore#/">
<genClasses ecoreClass="games.ecore#//Profile">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute games.ecore#//Profile/name"/>
View
23 game-model/pom.xml
@@ -2,29 +2,12 @@
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>
+ <packaging>eclipse-plugin</packaging>
<parent>
<groupId>com.meekmok</groupId>
<artifactId>warmok</artifactId>
- <version>0.0.1-SNAPSHOT</version>
+ <version>1.0.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
+ <name>Games Model</name>
</project>
View
54 game-model/src/texo/java/com/meekmok/games/Game.java → game-model/src-gen/com/meekmok/games/Game.java
@@ -3,26 +3,26 @@
import java.util.ArrayList;
import java.util.List;
-/**
- * A representation of the model object '<em><b>Game</b></em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
+/**
+ * A representation of the model object '<em><b>Game</b></em>'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
*/
public class Game {
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
*/
private List<Player> players = new ArrayList<Player>();
/**
* Returns the value of '<em><b>players</b></em>' feature.
- *
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ *
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @return the value of '<em><b>players</b></em>' feature
* @generated
*/
@@ -32,20 +32,18 @@
/**
* Adds to the <em>players</em> feature.
+ *
* @generated
*/
public void addToPlayers(Player playersValue) {
-
if (!players.contains(playersValue)) {
-
players.add(playersValue);
-
}
-
}
- /**
+ /**
* Removes from the <em>players</em> feature.
+ *
* @generated
*/
public void removeFromPlayers(Player playersValue) {
@@ -54,22 +52,24 @@ public void removeFromPlayers(Player playersValue) {
}
}
- /**
+ /**
* Clears the <em>players</em> feature.
+ *
* @generated
*/
public void clearPlayers() {
- for (Player playersElement : players) {
- removeFromPlayers(playersElement);
+ while (!players.isEmpty()) {
+ removeFromPlayers(players.iterator().next());
}
}
/**
* Sets the '{@link Game#getPlayers() <em>players</em>}' feature.
- *
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param the new value of the '{@link Game#getPlayers() players}' feature.
+ *
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param the
+ * new value of the '{@link Game#getPlayers() players}' feature.
* @generated
*/
public void setPlayers(List<Player> newPlayers) {
@@ -77,9 +77,9 @@ public void setPlayers(List<Player> newPlayers) {
}
/**
- * A toString method which prints the values of all EAttributes of this instance.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * A toString method which prints the values of all EAttributes of this
+ * instance. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
@Override
View
6 ...model/src/texo/java/com/meekmok/games/Games.ecore → game-model/src-gen/com/meekmok/games/Games.ecore
@@ -1,8 +1,6 @@
<?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">
+<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">
<eAnnotations source="org.eclipse.emf.texo">
View
131 ...exo/java/com/meekmok/games/GamesModelFactory.java → .../src-gen/com/meekmok/games/GamesModelFactory.java
@@ -11,19 +11,21 @@
import org.eclipse.emf.texo.model.ModelPackage;
/**
- * The <b>{@link ModelFactory}</b> for the types of this model: Games.
- * It contains code to create instances {@link ModelObject} wrappers and instances for EClasses and convert objects back and forth from their String (XML) representation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The <b>{@link ModelFactory}</b> for the types of this model: Games. It
+ * contains code to create instances {@link ModelObject} wrappers and instances
+ * for EClasses and convert objects back and forth from their String (XML)
+ * representation. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public class GamesModelFactory implements ModelFactory {
/**
- * Creates an instance for an {@link EClass}
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param eClass creates a Object instance for this EClass
+ * Creates an instance for an {@link EClass} <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param eClass
+ * creates a Object instance for this EClass
* @return an object representing the eClass
* @generated
*/
@@ -43,10 +45,9 @@ public Object create(EClass eClass) {
}
/**
- * Wraps an object in a {@link ModelObject}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
+ * Wraps an object in a {@link ModelObject}. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
* @param eClass
* the EClass of the object
* @param adaptee
@@ -82,7 +83,7 @@ public ModelObject createModelObject(EClass eClass, Object adaptee) {
* Creates a feature map entry instance for a certain EStructuralFeature.
*
* @param eStructuralFeature
- * the feature map feature
+ * the feature map feature
* @return the pojo feature map entry
* @generated
*/
@@ -92,13 +93,14 @@ public Object createFeatureMapEntry(EStructuralFeature eFeature) {
}
/**
- * Wraps a feature map entry pojo in a {@link AbstractModelFeatureMapEntry}. If the feature map
- * entry is null then a new one is created and <!-- begin-user-doc --> <!-- end-user-doc -->
+ * Wraps a feature map entry pojo in a {@link AbstractModelFeatureMapEntry}.
+ * If the feature map entry is null then a new one is created and <!--
+ * begin-user-doc --> <!-- end-user-doc -->
*
* @param eStructuralFeature
- * the feature map feature of the object
+ * the feature map feature of the object
* @param adaptee
- * the pojo feature map entry being wrapped/adapted
+ * the pojo feature map entry being wrapped/adapted
* @return the wrapper {@link ModelFeatureMapEntry}
* @generated
*/
@@ -109,8 +111,8 @@ public Object createFeatureMapEntry(EStructuralFeature eFeature) {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @return an instance of the model object representing the EClass Profile
* @generated
*/
@@ -119,8 +121,8 @@ public Profile createProfile() {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @return an instance of the model object representing the EClass Player
* @generated
*/
@@ -129,8 +131,8 @@ public Player createPlayer() {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @return an instance of the model object representing the EClass Game
* @generated
*/
@@ -139,8 +141,8 @@ public Game createGame() {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @return an instance of the model object representing the EClass Profiles
* @generated
*/
@@ -149,11 +151,14 @@ public Profiles createProfiles() {
}
/**
- * Converts an instance of an {@link EDataType} to a String.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param eDataType the {@link EDataType} defining the type
- * @param value the object to convert, if the value is null then null is returned.
+ * Converts an instance of an {@link EDataType} to a String. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param eDataType
+ * the {@link EDataType} defining the type
+ * @param value
+ * the object to convert, if the value is null then null is
+ * returned.
* @generated
*/
public Object createFromString(EDataType eDataType, String value) {
@@ -164,11 +169,13 @@ public Object createFromString(EDataType eDataType, String value) {
}
/**
- * Converts an instance of an {@link EDataType} to a String.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param eDataType the {@link EDataType} defining the type
- * @param value the object to convert, if value == null then null is returned
+ * Converts an instance of an {@link EDataType} to a String. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param eDataType
+ * the {@link EDataType} defining the type
+ * @param value
+ * the object to convert, if value == null then null is returned
* @generated
*/
public String convertToString(EDataType eDataType, Object value) {
@@ -178,11 +185,11 @@ public String convertToString(EDataType eDataType, Object value) {
+ "' is not defined in this EPackage.");
}
- /**
- * The adapter/wrapper for the EClass '<em><b>Profile</b></em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
+ /**
+ * The adapter/wrapper for the EClass '<em><b>Profile</b></em>'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
*/
public static class ProfileModelObject<E extends Profile> extends
AbstractModelObject<E> {
@@ -263,18 +270,18 @@ public void eRemoveFrom(EStructuralFeature eStructuralFeature,
switch (featureID) {
case GamesModelPackage.PROFILE_PLAYERS_FEATURE_ID:
- getTarget().getPlayers().remove((Player) value);
+ getTarget().getPlayers().remove(value);
return;
}
- super.eAddTo(eStructuralFeature, value);
+ super.eRemoveFrom(eStructuralFeature, value);
}
}
- /**
- * The adapter/wrapper for the EClass '<em><b>Player</b></em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
+ /**
+ * The adapter/wrapper for the EClass '<em><b>Player</b></em>'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
*/
public static class PlayerModelObject<E extends Player> extends
AbstractModelObject<E> {
@@ -341,15 +348,15 @@ public void eRemoveFrom(EStructuralFeature eStructuralFeature,
switch (featureID) {
}
- super.eAddTo(eStructuralFeature, value);
+ super.eRemoveFrom(eStructuralFeature, value);
}
}
- /**
- * The adapter/wrapper for the EClass '<em><b>Game</b></em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
+ /**
+ * The adapter/wrapper for the EClass '<em><b>Game</b></em>'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
*/
public static class GameModelObject<E extends Game> extends
AbstractModelObject<E> {
@@ -420,18 +427,18 @@ public void eRemoveFrom(EStructuralFeature eStructuralFeature,
switch (featureID) {
case GamesModelPackage.GAME_PLAYERS_FEATURE_ID:
- getTarget().getPlayers().remove((Player) value);
+ getTarget().getPlayers().remove(value);
return;
}
- super.eAddTo(eStructuralFeature, value);
+ super.eRemoveFrom(eStructuralFeature, value);
}
}
- /**
- * The adapter/wrapper for the EClass '<em><b>Profiles</b></em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
+ /**
+ * The adapter/wrapper for the EClass '<em><b>Profiles</b></em>'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
*/
public static class ProfilesModelObject<E extends Profiles> extends
AbstractModelObject<E> {
@@ -502,10 +509,10 @@ public void eRemoveFrom(EStructuralFeature eStructuralFeature,
switch (featureID) {
case GamesModelPackage.PROFILES_PROFILES_FEATURE_ID:
- getTarget().getProfiles().remove((Profile) value);
+ getTarget().getProfiles().remove(value);
return;
}
- super.eAddTo(eStructuralFeature, value);
+ super.eRemoveFrom(eStructuralFeature, value);
}
}
View
187 ...exo/java/com/meekmok/games/GamesModelPackage.java → .../src-gen/com/meekmok/games/GamesModelPackage.java
@@ -12,119 +12,120 @@
import org.eclipse.emf.texo.utils.ModelUtils;
/**
- * The <b>Package</b> for the model '<em><b>Games</b></em>'.
- * It contains initialization code and access to the Factory to instantiate types of this package.
+ * The <b>Package</b> for the model '<em><b>Games</b></em>'. It contains
+ * initialization code and access to the Factory to instantiate types of this
+ * package.
+ *
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
*
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
* @generated
*/
public class GamesModelPackage extends ModelPackage {
/**
* Is set when the package has been initialized.
+ *
* @generated
*/
private static boolean isInitialized = false;
/**
- * The package namespace URI.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The package namespace URI. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public static final String NS_URI = "http://www.meekmok.com/Games";
/**
- * The {@link ModelFactory} for this package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The {@link ModelFactory} for this package. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
* @generated
*/
public static final GamesModelFactory MODELFACTORY = new GamesModelFactory();
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public static final int PROFILE_CLASSIFIER_ID = 0;
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public static final int PROFILE_NAME_FEATURE_ID = 0;
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public static final int PROFILE_OPENID_FEATURE_ID = 1;
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public static final int PROFILE_PLAYERS_FEATURE_ID = 2;
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public static final int PLAYER_CLASSIFIER_ID = 2;
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public static final int PLAYER_PROFILE_FEATURE_ID = 0;
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public static final int GAME_CLASSIFIER_ID = 1;
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public static final int GAME_PLAYERS_FEATURE_ID = 0;
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public static final int PROFILES_CLASSIFIER_ID = 3;
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public static final int PROFILES_PROFILES_FEATURE_ID = 0;
/**
- * The static member with the instance of this {@link ModelPackage}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * The static member with the instance of this {@link ModelPackage}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public static final GamesModelPackage INSTANCE = initialize();
/**
- * Initializes this {@link ModelPackage}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Initializes this {@link ModelPackage}. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
* @generated
*/
public static GamesModelPackage initialize() {
@@ -138,12 +139,16 @@ public static GamesModelPackage initialize() {
ModelResolver.getInstance().registerModelPackage(modelPackage);
- isInitialized = true;
-
- // read the model from the ecore file, the EPackage is registered in the EPackage.Registry
+ // read the model from the ecore file, the EPackage is registered in the
+ // EPackage.Registry
// see the ModelResolver getEPackageRegistry method
ModelUtils.readEPackagesFromFile(modelPackage);
+ isInitialized = true;
+
+ // force the initialization of the EFactory proxy
+ modelPackage.getEPackage();
+
// register the relation between a Class and its EClassifier
ModelResolver.getInstance().registerClassModelMapping(Profile.class,
modelPackage.getProfileEClass(), modelPackage);
@@ -159,9 +164,8 @@ public static GamesModelPackage initialize() {
}
/**
- * Returns the {@link ModelFactory} of this ModelPackage.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * Returns the {@link ModelFactory} of this ModelPackage. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
*
* @return the {@link GamesModelFactory} instance.
* @generated
@@ -171,12 +175,11 @@ public GamesModelFactory getModelFactory() {
return MODELFACTORY;
}
- /**
- * Returns the nsUri of the {@link EPackage} managed by this Package instance.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * Returns the nsUri of the {@link EPackage} managed by this Package
+ * instance. <!-- begin-user-doc --> <!-- end-user-doc -->
*
- * @return the nsUri of the EPackage
+ * @return the nsUri of the EPackage
* @generated
*/
@Override
@@ -184,12 +187,12 @@ public String getNsURI() {
return NS_URI;
}
- /**
- * Returns the name of the ecore file containing the ecore model of the {@link EPackage} managed here.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ /**
+ * Returns the name of the ecore file containing the ecore model of the
+ * {@link EPackage} managed here. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
*
- * @return the name of the ecore file
+ * @return the name of the ecore file
* @generated
*/
@Override
@@ -198,10 +201,10 @@ public String getEcoreFileName() {
}
/**
- * Returns the {@link EClass} '<em><b>Profile</b></em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return an instance of the {@link EClass} '<em><b>Profile</b></em>'
+ * Returns the {@link EClass} '<em><b>Profile</b></em>'. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @return an instance of the {@link EClass} '<em><b>Profile</b></em>'
* @generated
*/
public EClass getProfileEClass() {
@@ -211,9 +214,10 @@ public EClass getProfileEClass() {
/**
* Returns the {@link EStructuralFeature} '<em><b>Profile.name</b></em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return an instance of the {@link EStructuralFeature}: '<em><b>Profile.name</b></em>'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return an instance of the {@link EStructuralFeature}: '
+ * <em><b>Profile.name</b></em>'.
* @generated
*/
public EAttribute getProfile_Name() {
@@ -223,9 +227,10 @@ public EAttribute getProfile_Name() {
/**
* Returns the {@link EStructuralFeature} '<em><b>Profile.openid</b></em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return an instance of the {@link EStructuralFeature}: '<em><b>Profile.openid</b></em>'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return an instance of the {@link EStructuralFeature}: '
+ * <em><b>Profile.openid</b></em>'.
* @generated
*/
public EAttribute getProfile_Openid() {
@@ -235,9 +240,10 @@ public EAttribute getProfile_Openid() {
/**
* Returns the {@link EStructuralFeature} '<em><b>Profile.players</b></em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return an instance of the {@link EStructuralFeature}: '<em><b>Profile.players</b></em>'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return an instance of the {@link EStructuralFeature}: '
+ * <em><b>Profile.players</b></em>'.
* @generated
*/
public EReference getProfile_Players() {
@@ -246,10 +252,10 @@ public EReference getProfile_Players() {
}
/**
- * Returns the {@link EClass} '<em><b>Player</b></em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return an instance of the {@link EClass} '<em><b>Player</b></em>'
+ * Returns the {@link EClass} '<em><b>Player</b></em>'. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @return an instance of the {@link EClass} '<em><b>Player</b></em>'
* @generated
*/
public EClass getPlayerEClass() {
@@ -259,9 +265,10 @@ public EClass getPlayerEClass() {
/**
* Returns the {@link EStructuralFeature} '<em><b>Player.profile</b></em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return an instance of the {@link EStructuralFeature}: '<em><b>Player.profile</b></em>'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return an instance of the {@link EStructuralFeature}: '
+ * <em><b>Player.profile</b></em>'.
* @generated
*/
public EReference getPlayer_Profile() {
@@ -270,10 +277,10 @@ public EReference getPlayer_Profile() {
}
/**
- * Returns the {@link EClass} '<em><b>Game</b></em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return an instance of the {@link EClass} '<em><b>Game</b></em>'
+ * Returns the {@link EClass} '<em><b>Game</b></em>'. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @return an instance of the {@link EClass} '<em><b>Game</b></em>'
* @generated
*/
public EClass getGameEClass() {
@@ -282,9 +289,10 @@ public EClass getGameEClass() {
/**
* Returns the {@link EStructuralFeature} '<em><b>Game.players</b></em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return an instance of the {@link EStructuralFeature}: '<em><b>Game.players</b></em>'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return an instance of the {@link EStructuralFeature}: '
+ * <em><b>Game.players</b></em>'.
* @generated
*/
public EReference getGame_Players() {
@@ -293,10 +301,10 @@ public EReference getGame_Players() {
}
/**
- * Returns the {@link EClass} '<em><b>Profiles</b></em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return an instance of the {@link EClass} '<em><b>Profiles</b></em>'
+ * Returns the {@link EClass} '<em><b>Profiles</b></em>'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return an instance of the {@link EClass} '<em><b>Profiles</b></em>'
* @generated
*/
public EClass getProfilesEClass() {
@@ -305,10 +313,11 @@ public EClass getProfilesEClass() {
}
/**
- * Returns the {@link EStructuralFeature} '<em><b>Profiles.profiles</b></em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return an instance of the {@link EStructuralFeature}: '<em><b>Profiles.profiles</b></em>'.
+ * Returns the {@link EStructuralFeature} '<em><b>Profiles.profiles</b></em>
+ * '. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return an instance of the {@link EStructuralFeature}: '
+ * <em><b>Profiles.profiles</b></em>'.
* @generated
*/
public EReference getProfiles_Profiles() {
@@ -317,8 +326,8 @@ public EReference getProfiles_Profiles() {
}
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @param eClassifier
* the {@link EClassifier}
* @return the class implementing a specific {@link EClass}.
View
40 ...model/src/texo/java/com/meekmok/games/Player.java → game-model/src-gen/com/meekmok/games/Player.java
@@ -1,25 +1,25 @@
package com.meekmok.games;
-/**
- * A representation of the model object '<em><b>Player</b></em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
+/**
+ * A representation of the model object '<em><b>Player</b></em>'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
*/
public class Player {
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
*/
private Profile profile = null;
/**
* Returns the value of '<em><b>profile</b></em>' feature.
- *
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ *
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @return the value of '<em><b>profile</b></em>' feature
* @generated
*/
@@ -29,10 +29,12 @@ public Profile getProfile() {
/**
* Sets the '{@link Player#getProfile() <em>profile</em>}' feature.
- *
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param the new value of the '{@link Player#getProfile() profile}' feature.
+ *
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param the
+ * new value of the '{@link Player#getProfile() profile}'
+ * feature.
* @generated
*/
public void setProfile(Profile newProfile) {
@@ -40,9 +42,9 @@ public void setProfile(Profile newProfile) {
}
/**
- * A toString method which prints the values of all EAttributes of this instance.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * A toString method which prints the values of all EAttributes of this
+ * instance. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
@Override
View
101 ...odel/src/texo/java/com/meekmok/games/Profile.java → game-model/src-gen/com/meekmok/games/Profile.java
@@ -3,40 +3,40 @@
import java.util.ArrayList;
import java.util.List;
-/**
- * A representation of the model object '<em><b>Profile</b></em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
+/**
+ * A representation of the model object '<em><b>Profile</b></em>'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
*/
public class Profile {
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
*/
private String name = null;
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
*/
private String openid = null;
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
*/
private List<Player> players = new ArrayList<Player>();
/**
* Returns the value of '<em><b>name</b></em>' feature.
- *
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ *
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @return the value of '<em><b>name</b></em>' feature
* @generated
*/
@@ -46,10 +46,11 @@ public String getName() {
/**
* Sets the '{@link Profile#getName() <em>name</em>}' feature.
- *
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param the new value of the '{@link Profile#getName() name}' feature.
+ *
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param the
+ * new value of the '{@link Profile#getName() name}' feature.
* @generated
*/
public void setName(String newName) {
@@ -58,9 +59,9 @@ public void setName(String newName) {
/**
* Returns the value of '<em><b>openid</b></em>' feature.
- *
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ *
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @return the value of '<em><b>openid</b></em>' feature
* @generated
*/
@@ -70,10 +71,11 @@ public String getOpenid() {
/**
* Sets the '{@link Profile#getOpenid() <em>openid</em>}' feature.
- *
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param the new value of the '{@link Profile#getOpenid() openid}' feature.
+ *
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param the
+ * new value of the '{@link Profile#getOpenid() openid}' feature.
* @generated
*/
public void setOpenid(String newOpenid) {
@@ -82,9 +84,9 @@ public void setOpenid(String newOpenid) {
/**
* Returns the value of '<em><b>players</b></em>' feature.
- *
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ *
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @return the value of '<em><b>players</b></em>' feature
* @generated
*/
@@ -94,20 +96,18 @@ public void setOpenid(String newOpenid) {
/**
* Adds to the <em>players</em> feature.
+ *
* @generated
*/
public void addToPlayers(Player playersValue) {
-
if (!players.contains(playersValue)) {
-
players.add(playersValue);
-
}
-
}
- /**
+ /**
* Removes from the <em>players</em> feature.
+ *
* @generated
*/
public void removeFromPlayers(Player playersValue) {
@@ -116,22 +116,25 @@ public void removeFromPlayers(Player playersValue) {
}
}
- /**
+ /**
* Clears the <em>players</em> feature.
+ *
* @generated
*/
public void clearPlayers() {
- for (Player playersElement : players) {
- removeFromPlayers(playersElement);
+ while (!players.isEmpty()) {
+ removeFromPlayers(players.iterator().next());
}
}
/**
* Sets the '{@link Profile#getPlayers() <em>players</em>}' feature.
- *
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param the new value of the '{@link Profile#getPlayers() players}' feature.
+ *
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param the
+ * new value of the '{@link Profile#getPlayers() players}'
+ * feature.
* @generated
*/
public void setPlayers(List<Player> newPlayers) {
@@ -139,9 +142,9 @@ public void setPlayers(List<Player> newPlayers) {
}
/**
- * A toString method which prints the values of all EAttributes of this instance.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * A toString method which prints the values of all EAttributes of this
+ * instance. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
@Override
View
55 ...del/src/texo/java/com/meekmok/games/Profiles.java → game-model/src-gen/com/meekmok/games/Profiles.java
@@ -3,26 +3,26 @@
import java.util.ArrayList;
import java.util.List;
-/**
- * A representation of the model object '<em><b>Profiles</b></em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
+/**
+ * A representation of the model object '<em><b>Profiles</b></em>'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
*/
public class Profiles {
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
*/
private List<Profile> profiles = new ArrayList<Profile>();
/**
* Returns the value of '<em><b>profiles</b></em>' feature.
- *
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ *
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @return the value of '<em><b>profiles</b></em>' feature
* @generated
*/
@@ -32,20 +32,18 @@
/**
* Adds to the <em>profiles</em> feature.
+ *
* @generated
*/
public void addToProfiles(Profile profilesValue) {
-
if (!profiles.contains(profilesValue)) {
-
profiles.add(profilesValue);
-
}
-
}
- /**
+ /**
* Removes from the <em>profiles</em> feature.
+ *
* @generated
*/
public void removeFromProfiles(Profile profilesValue) {
@@ -54,22 +52,25 @@ public void removeFromProfiles(Profile profilesValue) {
}
}
- /**
+ /**
* Clears the <em>profiles</em> feature.
+ *
* @generated
*/
public void clearProfiles() {
- for (Profile profilesElement : profiles) {
- removeFromProfiles(profilesElement);
+ while (!profiles.isEmpty()) {
+ removeFromProfiles(profiles.iterator().next());
}
}
/**
* Sets the '{@link Profiles#getProfiles() <em>profiles</em>}' feature.
- *
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param the new value of the '{@link Profiles#getProfiles() profiles}' feature.
+ *
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param the
+ * new value of the '{@link Profiles#getProfiles() profiles}'
+ * feature.
* @generated
*/
public void setProfiles(List<Profile> newProfiles) {
@@ -77,9 +78,9 @@ public void setProfiles(List<Profile> newProfiles) {
}
/**
- * A toString method which prints the values of all EAttributes of this instance.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * A toString method which prints the values of all EAttributes of this
+ * instance. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
@Override
View
69 pom.xml
@@ -3,30 +3,83 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.meekmok</groupId>
<artifactId>warmok</artifactId>
- <version>0.0.1-SNAPSHOT</version>
+ <version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<properties>
- <tycho-version>0.12.0</tycho-version>
- <tycho-groupid>org.eclipse.tycho </tycho-groupid>
+ <tycho-version>0.15.0</tycho-version>
+ <tycho-groupid>org.eclipse.tycho</tycho-groupid>
<eclipse-repository-url>http://download.eclipse.org/eclipse/updates/3.6</eclipse-repository-url>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
- <sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>2.3.2</version>
+ <groupId>${tycho-groupid}</groupId>
+ <artifactId>tycho-maven-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <extensions>true</extensions>
+ </plugin>
+ <plugin>
+ <groupId>${tycho-groupid}</groupId>
+ <artifactId>target-platform-configuration</artifactId>
+ <version>${tycho-version}</version>
<configuration>
- <source />
- <target />
+ <resolver>p2</resolver>
+ <ignoreTychoRepositories>true</ignoreTychoRepositories>
+ <!--<pomDependencies>consider</pomDependencies> -->
+ <environments>
+ <environment>
+ <os>linux</os>
+ <ws>gtk</ws>
+ <arch>x86_64</arch>
+ </environment>
+ <environment>
+ <os>linux</os>
+ <ws>gtk</ws>
+ <arch>x86</arch>
+ </environment>
+ <environment>
+ <os>macosx</os>
+ <ws>cocoa</ws>
+ <arch>x86</arch>
+ </environment>
+ <environment>
+ <os>macosx</os>
+ <ws>cocoa</ws>
+ <arch>x86_64</arch>
+ </environment>
+ <environment>
+ <os>win32</os>
+ <ws>win32</ws>
+ <arch>x86</arch>
+ </environment>
+ <environment>
+ <os>win32</os>
+ <ws>win32</ws>
+ <arch>x86_64</arch>
+ </environment>
+ </environments>
</configuration>
</plugin>
</plugins>
</build>
+ <repositories>
+ <repository>
+ <id>eclipse-juno</id>
+ <layout>p2</layout>
+ <url>http://download.eclipse.org/releases/juno</url>
+ </repository>
+ <repository>
+ <id>eclipse-texo</id>
+ <layout>p2</layout>
+ <url>http://download.eclipse.org/modeling/emft/texo/updates/interim/</url>
+ </repository>
+ </repositories>
<modules>
<module>game-model</module>
<module>warmok-model</module>
+ <module>webapp</module>
</modules>
+ <name>Warmok Tool Kit</name>
</project>
View
2  warmok-model/.classpath
@@ -1,6 +1,6 @@
<?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.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="output" path="target/classes"/>
View
6 warmok-model/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +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.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.compliance=1.7
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
+org.eclipse.jdt.core.compiler.source=1.7
View
11 warmok-model/META-INF/MANIFEST.MF
@@ -1,12 +1,15 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
-Bundle-SymbolicName: Warmok_Model;singleton:=true
-Bundle-Version: 1.0.0
+Bundle-SymbolicName: warmok-model;singleton:=true
+Bundle-Version: 1.0.0.qualifier
Bundle-ClassPath: .
Bundle-Vendor: %providerName
Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.emf.ecore;visibility:=reexport,
- Games_Model;bundle-version="1.0.0"
+ game-model;bundle-version="1.0.0"
+Export-Package: org.meekmok.Warmok,
+ org.meekmok.Warmok.impl,
+ org.meekmok.Warmok.util
View
1  warmok-model/build.properties
@@ -12,4 +12,3 @@ bin.includes = .,\
jars.compile.order = .
source.. = src/main/java
output.. = target/classes
-jre.compilation.profile = J2SE-1.5
View
26 warmok-model/pom.xml
@@ -1,31 +1,13 @@
<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>
- <groupId>org.meekmok</groupId>
- <artifactId>warmok</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>
+ <artifactId>warmok-model</artifactId>
<parent>
<groupId>com.meekmok</groupId>
<artifactId>warmok</artifactId>
- <version>0.0.1-SNAPSHOT</version>
+ <version>1.0.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
+ <name>Warmok Model</name>
+ <packaging>eclipse-plugin</packaging>
</project>
View
15 webapp/.classpath
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" output="target/classes" path="src/main/java"/>
+ <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
+ <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.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
+ <classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v7.0">
+ <attributes>
+ <attribute name="owner.project.facets" value="jst.web"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
View
42 webapp/.project
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>webapp</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <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.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
+ </natures>
+</projectDescription>
View
12 webapp/.settings/.jsdtscope
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="WebContent"/>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
+ <attributes>
+ <attribute name="hide" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
+ <classpathentry kind="output" path=""/>
+</classpath>
View
9 webapp/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,9 @@
+#Tue Sep 13 23:18:38 EDT 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.source=1.5
View
10 webapp/.settings/org.eclipse.wst.common.component
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+ <wb-module deploy-name="rest">
+ <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
+ <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
+ <wb-resource deploy-path="/" source-path="/src/main/webapp"/>
+ <property name="java-output-path" value="/rest/target/classes"/>
+ <property name="context-root" value="ROOT"/>
+ </wb-module>
+</project-modules>
View
8 webapp/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <runtime name="Apache Tomcat v7.0"/>
+ <fixed facet="wst.jsdt.web"/>
+ <installed facet="java" version="1.6"/>
+ <installed facet="jst.web" version="3.0"/>
+ <installed facet="wst.jsdt.web" version="1.0"/>
+</faceted-project>
View
1  webapp/.settings/org.eclipse.wst.jsdt.ui.superType.container
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary
View
1  webapp/.settings/org.eclipse.wst.jsdt.ui.superType.name
@@ -0,0 +1 @@
+Window
View
8 webapp/.settings/org.maven.ide.eclipse.prefs
@@ -0,0 +1,8 @@
+#Mon Sep 05 13:26:04 EDT 2011
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1
View
90 webapp/pom.xml
@@ -0,0 +1,90 @@
+<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/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>com.meekmok</groupId>
+ <artifactId>webapp</artifactId>
+ <packaging>war</packaging>
+ <name>REST Services Webapp</name>
+ <url>http://maven.apache.org</url>
+ <repositories>
+ <repository>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <id>javanet</id>
+ <name>Java.net</name>
+ <url>https://maven.java.net/content/repositories/public</url>
+ </repository>
+ </repositories>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-core</artifactId>
+ <version>1.9</version>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-json</artifactId>
+ <version>1.9</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.emf</groupId>
+ <artifactId>ecore</artifactId>
+ <version>2.3.0-v200706262000</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.emf</groupId>
+ <artifactId>common</artifactId>
+ <version>2.3.0-v200706262000</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.emf</groupId>
+ <artifactId>ecore-xmi</artifactId>
+ <version>2.2.3</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.emf.ecore</groupId>
+ <artifactId>edit</artifactId>
+ <version>2.3.0-v200706262000</version>
+ <type>jar</type>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-servlet</artifactId>
+ <version>1.10-b01</version>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-bundle</artifactId>
+ <version>1.10-b01</version>
+ </dependency>
+ <dependency>
+ <groupId>com.meekmok</groupId>
+ <artifactId>game-model</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <type>eclipse-plugin</type>
+ </dependency>
+ <dependency>
+ <groupId>com.meekmok</groupId>
+ <artifactId>warmok-model</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <type>eclipse-plugin</type>
+ </dependency>
+ </dependencies>
+ <build>
+ <finalName>rest</finalName>
+ </build>
+ <parent>
+ <groupId>com.meekmok</groupId>
+ <artifactId>warmok</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>..</relativePath>
+ </parent>
+</project>
View
136 webapp/src/main/java/org/meekmok/warmok/dao/ProfileDao.java
@@ -0,0 +1,136 @@
+package org.meekmok.warmok.dao;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.emf.ecore.xmi.XMLResource;
+import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl;
+import org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl;
+import org.meekmok.Games.GamesFactory;
+import org.meekmok.Games.GamesPackage;
+import org.meekmok.Games.Profile;
+import org.meekmok.Games.Profiles;
+import org.meekmok.Games.impl.ProfileImpl;
+import org.meekmok.Warmok.WarmokPackage;
+
+public enum ProfileDao {
+ instance;
+
+ private static final Map<Object,Object> saveOptions = new HashMap<Object,Object>();
+
+ static {
+ saveOptions.put(XMLResource.OPTION_ENCODING, "utf-8");
+ }
+
+ private static final String FILE_NAME = "profiles.xmi";
+ GamesPackage gamesPackage = GamesPackage.eINSTANCE;
+ WarmokPackage warmokPackage = WarmokPackage.eINSTANCE;
+
+ private XMIResourceImpl resource = null;
+
+ ProfileDao() {
+ File f = new File(FILE_NAME);
+ if(f.exists()) {
+ loadModel();
+ } else {
+ createModel();
+ }
+ }
+
+ public List<Profile> getList() {
+ return ((Profiles) resource.getAllContents().next()).getProfiles();
+ }
+
+ private Profiles getProfiles() {
+ return (Profiles) resource.getAllContents().next();
+ }
+
+ public Profile get(String id) {
+ return (Profile)resource.getEObject(id);
+ }
+
+ private void createModel() {
+ // Create a resource set.
+ ResourceSet resourceSet = new ResourceSetImpl();
+
+ // Register the default resource factory -- only needed for stand-alone!
+ XMIResourceFactoryImpl fact = new XMIResourceFactoryImpl();
+ resourceSet
+ .getResourceFactoryRegistry()
+ .getExtensionToFactoryMap()
+ .put(Resource.Factory.Registry.DEFAULT_EXTENSION,
+ fact);
+
+ // Get the URI of the model file.
+ URI fileURI = URI.createFileURI(new File(FILE_NAME).getAbsolutePath());
+
+ // Create a resource for this file.
+ resource = (XMIResourceImpl) resourceSet.createResource(fileURI);
+
+
+ // Add the Profiles object
+ Profiles profiles = GamesFactory.eINSTANCE.createProfiles();
+ resource.getContents().add(profiles);
+
+ // Add example Profile
+ Profile example = GamesFactory.eINSTANCE.createProfile();
+ example.setName("Example Profile");
+ example.setOpenid("example@google.com");
+ profiles.getProfiles().add(example);
+
+ // Save the contents of the resource to the file system.
+ try {
+ resource.save(saveOptions);
+ } catch (IOException e) {
+ }
+ }
+
+ private void loadModel() {
+ // Create a resource set.
+ ResourceSet resourceSet = new ResourceSetImpl();
+
+ // Register the default resource factory -- only needed for stand-alone!
+ resourceSet
+ .getResourceFactoryRegistry()
+ .getExtensionToFactoryMap()
+ .put(Resource.Factory.Registry.DEFAULT_EXTENSION,
+ new XMIResourceFactoryImpl());
+
+ // Register the package -- only needed for stand-alone!
+
+ // Get the URI of the model file.
+ URI fileURI = URI.createFileURI(new File(FILE_NAME).getAbsolutePath());
+
+ // Demand load the resource for this file.
+ resource = (XMIResourceImpl) resourceSet.getResource(fileURI, true);
+
+ // Print the contents of the resource to System.out.
+ try {
+ resource.save(System.out, saveOptions);
+ } catch (IOException e) {
+ }
+ }
+
+ private void saveModel() {
+ // Save the contents of the resource to the file system.
+ try {
+ resource.save(saveOptions);
+ } catch (IOException e) {
+ }
+ }
+
+ public String add(Profile profile) {
+ this.getProfiles().getProfiles().add(profile);
+ this.saveModel();
+ return this.resource.getID(profile);
+ }
+
+}
View
68 webapp/src/main/java/org/meekmok/warmok/rest/ProfileRestController.java
@@ -0,0 +1,68 @@
+package org.meekmok.warmok.rest;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.List;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.GET;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Request;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.UriInfo;
+import javax.xml.bind.JAXBElement;
+
+import org.meekmok.Games.Profile;
+import org.meekmok.Games.impl.ProfileImpl;
+import org.meekmok.warmok.dao.ProfileDao;
+
+@Path("/profile")
+public class ProfileRestController {
+
+ @Context
+ UriInfo uriInfo;
+
+ @Context
+ Request request;
+
+ @GET
+ @Produces( { MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ public List<com.meekmok.games.Profile> get() {
+ List<Profile> eObjects = ProfileDao.instance.getList();
+ List<Object> convertedModelObjects = new EMFModelConverter().convert(eObjects);
+ }
+
+ @GET
+ @Path("{id}")
+ @Produces( { MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ public Profile get(@PathParam("id") String id) {
+ return ProfileDao.instance.get(id);
+ }
+
+ @PUT
+ @Consumes(MediaType.APPLICATION_JSON)
+ public Response put(JAXBElement<ProfileImpl> profile) {
+ // TODO how to create profile via factory JAXB is wrong..
+ Profile p = profile.getValue();
+ return putAndGetResponse(p);
+ }
+
+ private Response putAndGetResponse(Profile profile) {
+ Response res = null;
+ if(ProfileDao.instance.getList().contains(profile)) {
+ res = Response.noContent().build();
+ } else {
+ String id = ProfileDao.instance.add(profile);
+ try {
+ res = Response.created(new URI(id)).build();
+ } catch (URISyntaxException ignored) {
+ }
+ }
+ return res;
+ }
+}
View
19 webapp/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,19 @@
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd" >
+
+<web-app>
+ <display-name>Archetype Created Web Application</display-name>
+ <servlet>
+ <servlet-name>Jersey REST Service</servlet-name>
+ <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
+ <init-param>
+ <param-name>com.sun.jersey.config.property.packages</param-name>
+ <param-value>org.meekmok.warmok.rest</param-value>
+ </init-param>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Jersey REST Service</servlet-name>
+ <url-pattern>/rest/*</url-pattern>
+ </servlet-mapping>
+</web-app>
View
5 webapp/src/main/webapp/index.jsp
@@ -0,0 +1,5 @@
+<html>
+<body>
+<h2>Hello World!</h2>
+</body>
+</html>
Please sign in to comment.
Something went wrong with that request. Please try again.