Browse Source

Archived gmodel code

main
notme 3 years ago
parent
commit
c8156320bc
  1. BIN
      gmodel-commit-history.pdf
  2. 27
      src/trunk/Hudson-configuration.txt
  3. 7
      src/trunk/mvn-clean-build.sh
  4. 7
      src/trunk/org.gmodel.artifactpool.tests/.classpath
  5. 28
      src/trunk/org.gmodel.artifactpool.tests/.project
  6. 8
      src/trunk/org.gmodel.artifactpool.tests/.settings/org.eclipse.jdt.core.prefs
  7. 8
      src/trunk/org.gmodel.artifactpool.tests/META-INF/MANIFEST.MF
  8. 4
      src/trunk/org.gmodel.artifactpool.tests/build.properties
  9. 79
      src/trunk/org.gmodel.artifactpool.tests/src/org/gmodel/artifactpool/HashMapArtifactPoolTest.java
  10. 7
      src/trunk/org.gmodel.artifactpool/.classpath
  11. 28
      src/trunk/org.gmodel.artifactpool/.project
  12. 8
      src/trunk/org.gmodel.artifactpool/.settings/org.eclipse.jdt.core.prefs
  13. 8
      src/trunk/org.gmodel.artifactpool/META-INF/MANIFEST.MF
  14. 4
      src/trunk/org.gmodel.artifactpool/build.properties
  15. 43
      src/trunk/org.gmodel.artifactpool/src/org/gmodel/artifactpool/ArtifactPool.java
  16. 87
      src/trunk/org.gmodel.artifactpool/src/org/gmodel/artifactpool/HashMapArtifactPool.java
  17. 88
      src/trunk/org.gmodel.artifactpool/src/org/gmodel/artifactpool/HashMapObjectPool.java
  18. 43
      src/trunk/org.gmodel.artifactpool/src/org/gmodel/artifactpool/ObjectPool.java
  19. 7
      src/trunk/org.gmodel.common/.classpath
  20. 26
      src/trunk/org.gmodel.common/.project
  21. 7
      src/trunk/org.gmodel.common/META-INF/MANIFEST.MF
  22. 3
      src/trunk/org.gmodel.common/build.properties
  23. 85
      src/trunk/org.gmodel.common/src/org/gmodel/common/search/BasicSearchIdentity.java
  24. 79
      src/trunk/org.gmodel.common/src/org/gmodel/common/search/BasicSearchResult.java
  25. 41
      src/trunk/org.gmodel.common/src/org/gmodel/common/search/SearchResult.java
  26. 9
      src/trunk/org.gmodel.connector.database.db2/.classpath
  27. 26
      src/trunk/org.gmodel.connector.database.db2/.project
  28. 70
      src/trunk/org.gmodel.connector.database.db2/.settings/org.eclipse.jdt.core.prefs
  29. 54
      src/trunk/org.gmodel.connector.database.db2/.settings/org.eclipse.jdt.ui.prefs
  30. 30
      src/trunk/org.gmodel.connector.database.db2/DB2.sql
  31. 11
      src/trunk/org.gmodel.connector.database.db2/META-INF/MANIFEST.MF
  32. 6
      src/trunk/org.gmodel.connector.database.db2/build.properties
  33. 7
      src/trunk/org.gmodel.connector.database.db2/fragment.xml
  34. BIN
      src/trunk/org.gmodel.connector.database.db2/lib/db2jcc.jar
  35. BIN
      src/trunk/org.gmodel.connector.database.db2/lib/db2jcc_license_cu.jar
  36. 10
      src/trunk/org.gmodel.connector.database.db2/pom.xml
  37. 52
      src/trunk/org.gmodel.connector.database.db2/src/org/gmodel/connector/database/db2/DB2Connector.java
  38. 8
      src/trunk/org.gmodel.connector.database.mysql/.classpath
  39. 26
      src/trunk/org.gmodel.connector.database.mysql/.project
  40. 70
      src/trunk/org.gmodel.connector.database.mysql/.settings/org.eclipse.jdt.core.prefs
  41. 54
      src/trunk/org.gmodel.connector.database.mysql/.settings/org.eclipse.jdt.ui.prefs
  42. 9
      src/trunk/org.gmodel.connector.database.mysql/META-INF/MANIFEST.MF
  43. 176
      src/trunk/org.gmodel.connector.database.mysql/MySQL.sql
  44. 5
      src/trunk/org.gmodel.connector.database.mysql/build.properties
  45. 7
      src/trunk/org.gmodel.connector.database.mysql/fragment.xml
  46. BIN
      src/trunk/org.gmodel.connector.database.mysql/lib/mysql-connector-java-5.1.13-bin.jar
  47. 10
      src/trunk/org.gmodel.connector.database.mysql/pom.xml
  48. 42
      src/trunk/org.gmodel.connector.database.mysql/src/org/gmodel/connector/database/mysql/MySQLConnector.java
  49. 8
      src/trunk/org.gmodel.connector.database.postgresql/.classpath
  50. 26
      src/trunk/org.gmodel.connector.database.postgresql/.project
  51. 70
      src/trunk/org.gmodel.connector.database.postgresql/.settings/org.eclipse.jdt.core.prefs
  52. 54
      src/trunk/org.gmodel.connector.database.postgresql/.settings/org.eclipse.jdt.ui.prefs
  53. 10
      src/trunk/org.gmodel.connector.database.postgresql/META-INF/MANIFEST.MF
  54. 48
      src/trunk/org.gmodel.connector.database.postgresql/PostgreSQL.sql
  55. 5
      src/trunk/org.gmodel.connector.database.postgresql/build.properties
  56. 7
      src/trunk/org.gmodel.connector.database.postgresql/fragment.xml
  57. BIN
      src/trunk/org.gmodel.connector.database.postgresql/lib/postgresql-8.4-701.jdbc3.jar
  58. 10
      src/trunk/org.gmodel.connector.database.postgresql/pom.xml
  59. 42
      src/trunk/org.gmodel.connector.database.postgresql/src/org/gmodel/connector/database/postgresql/PostgreSQLConnector.java
  60. 7
      src/trunk/org.gmodel.connector.database.ui/.classpath
  61. 26
      src/trunk/org.gmodel.connector.database.ui/.project
  62. 70
      src/trunk/org.gmodel.connector.database.ui/.settings/org.eclipse.jdt.core.prefs
  63. 54
      src/trunk/org.gmodel.connector.database.ui/.settings/org.eclipse.jdt.ui.prefs
  64. 7
      src/trunk/org.gmodel.connector.database.ui/META-INF/MANIFEST.MF
  65. 3
      src/trunk/org.gmodel.connector.database.ui/build.properties
  66. 10
      src/trunk/org.gmodel.connector.database.ui/pom.xml
  67. 7
      src/trunk/org.gmodel.connector.database/.classpath
  68. 26
      src/trunk/org.gmodel.connector.database/.project
  69. 70
      src/trunk/org.gmodel.connector.database/.settings/org.eclipse.jdt.core.prefs
  70. 54
      src/trunk/org.gmodel.connector.database/.settings/org.eclipse.jdt.ui.prefs
  71. 16
      src/trunk/org.gmodel.connector.database/META-INF/MANIFEST.MF
  72. 7
      src/trunk/org.gmodel.connector.database/build.properties
  73. BIN
      src/trunk/org.gmodel.connector.database/lib/db2jcc.jar
  74. BIN
      src/trunk/org.gmodel.connector.database/lib/db2jcc_license_cu.jar
  75. 7
      src/trunk/org.gmodel.connector.database/plugin.xml
  76. 10
      src/trunk/org.gmodel.connector.database/pom.xml
  77. 102
      src/trunk/org.gmodel.connector.database/schema/org.gmodel.connector.database.type.exsd
  78. 74
      src/trunk/org.gmodel.connector.database/src/org/gmodel/connector/database/AbstractDatabaseConnector.java
  79. 42
      src/trunk/org.gmodel.connector.database/src/org/gmodel/connector/database/ConnectionMetadata.java
  80. 48
      src/trunk/org.gmodel.connector.database/src/org/gmodel/connector/database/DatabaseConnector.java
  81. 176
      src/trunk/org.gmodel.connector.database/src/org/gmodel/connector/database/DatabaseConnectorSupport.java
  82. 7
      src/trunk/org.gmodel.connector/.classpath
  83. 28
      src/trunk/org.gmodel.connector/.project
  84. 8
      src/trunk/org.gmodel.connector/.settings/org.eclipse.jdt.core.prefs
  85. 9
      src/trunk/org.gmodel.connector/META-INF/MANIFEST.MF
  86. 4
      src/trunk/org.gmodel.connector/build.properties
  87. 10
      src/trunk/org.gmodel.connector/pom.xml
  88. 34
      src/trunk/org.gmodel.connector/src/org/gmodel/connector/Component.java
  89. 9
      src/trunk/org.gmodel.documentation/.project
  90. 1
      src/trunk/org.gmodel.documentation/README.txt
  91. BIN
      src/trunk/org.gmodel.documentation/articles/0.1/Changing Repository.docx
  92. BIN
      src/trunk/org.gmodel.documentation/articles/0.1/Introduction_to_the_gmodel_metalanguage/advanced_modelling_made_simple.synctex.gz
  93. BIN
      src/trunk/org.gmodel.documentation/articles/0.1/Introduction_to_the_gmodel_metalanguage/emf_supersetreferences.png
  94. 40
      src/trunk/org.gmodel.documentation/articles/0.1/Introduction_to_the_gmodel_metalanguage/introduction_to_the_gmodel_metalanguage.aux
  95. 323
      src/trunk/org.gmodel.documentation/articles/0.1/Introduction_to_the_gmodel_metalanguage/introduction_to_the_gmodel_metalanguage.log
  96. BIN
      src/trunk/org.gmodel.documentation/articles/0.1/Introduction_to_the_gmodel_metalanguage/introduction_to_the_gmodel_metalanguage.pdf
  97. BIN
      src/trunk/org.gmodel.documentation/articles/0.1/Introduction_to_the_gmodel_metalanguage/introduction_to_the_gmodel_metalanguage.synctex.gz
  98. 339
      src/trunk/org.gmodel.documentation/articles/0.1/Introduction_to_the_gmodel_metalanguage/introduction_to_the_gmodel_metalanguage.tex
  99. BIN
      src/trunk/org.gmodel.documentation/articles/0.1/advanced_modelling_made_simple.zip
  100. 1670
      src/trunk/org.gmodel.documentation/articles/0.1/advanced_modelling_made_simple/acm/acm_proc_article-sp.cls
  101. Some files were not shown because too many files have changed in this diff Show More

BIN
gmodel-commit-history.pdf

Binary file not shown.

27
src/trunk/Hudson-configuration.txt

@ -0,0 +1,27 @@
---------
SBT build
---------
Schedule:
*/10 * * * *
"Execute Shell" command:
./sbt.sh clean compile
----------------------------------
Maven Tycho build (works on Linux)
----------------------------------
Schedule:
*/10 * * * *
"Execute Shell" command:
export M2_HOME="/usr/local/maven/apache-maven-3.0.3"
./mvn-clean-build.sh

7
src/trunk/mvn-clean-build.sh

@ -0,0 +1,7 @@
# Remove Tycho p2 caches
rm -rf ~/.m2/repository/.cache
rm -rf ~/.m2/repository/.meta
# Execute build
set MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=256m"
sh $M2_HOME/bin/mvn clean install

7
src/trunk/org.gmodel.artifactpool.tests/.classpath

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>

28
src/trunk/org.gmodel.artifactpool.tests/.project

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.gmodel.artifactpool.tests</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

8
src/trunk/org.gmodel.artifactpool.tests/.settings/org.eclipse.jdt.core.prefs

@ -0,0 +1,8 @@
#Fri Dec 10 16:47:18 CET 2010
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.source=1.5

8
src/trunk/org.gmodel.artifactpool.tests/META-INF/MANIFEST.MF

@ -0,0 +1,8 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: org.gmodel.artifactpool.tests
Bundle-SymbolicName: org.gmodel.artifactpool.tests
Bundle-Version: 0.0.0
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Fragment-Host: org.gmodel.artifactpool
Require-Bundle: org.junit

4
src/trunk/org.gmodel.artifactpool.tests/build.properties

@ -0,0 +1,4 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.

79
src/trunk/org.gmodel.artifactpool.tests/src/org/gmodel/artifactpool/HashMapArtifactPoolTest.java

@ -0,0 +1,79 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Gmodel.
*
* The Initial Developer of the Original Code is
* Sofismo AG (Sofismo).
* Portions created by the Initial Developer are
* Copyright (C) 2009-2011 Sofismo AG.
* All Rights Reserved.
*
* Contributor(s):
* Andrew Shewring
* ***** END LICENSE BLOCK ***** */
package org.gmodel.artifactpool;
import junit.framework.TestCase;
public class HashMapArtifactPoolTest extends TestCase {
private HashMapObjectPool<Integer, String> pool;
@Override
protected void setUp() throws Exception {
pool = new HashMapObjectPool<Integer, String>();
}
public void testContains() {
Integer key = 1;
assertFalse(pool.contains(key));
pool.put(key, "artifact");
assertTrue(pool.contains(key));
}
public void testExpire() {
assertEquals(0, pool.size());
Integer key = 1;
pool.put(key, "artifact");
assertEquals(1, pool.size());
pool.expire();
assertEquals(0, pool.size());
}
public void testPutAndGet() {
Integer key = 1;
String value = "artifact";
pool.put(key, value);
assertEquals(value, pool.get(key));
}
public void testRemove() {
Integer key = 1;
pool.put(key, "artifact");
assertEquals(1, pool.size());
pool.remove(1);
assertEquals(0, pool.size());
}
public void testLimitedCacheSize() {
for (int i = 0; i < 2000; i++) {
pool.put(i, "Value " + i);
}
assertEquals(1000, pool.size());
}
}

7
src/trunk/org.gmodel.artifactpool/.classpath

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>

28
src/trunk/org.gmodel.artifactpool/.project

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.gmodel.artifactpool</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

8
src/trunk/org.gmodel.artifactpool/.settings/org.eclipse.jdt.core.prefs

@ -0,0 +1,8 @@
#Thu Dec 09 15:46:04 CET 2010
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.source=1.5

8
src/trunk/org.gmodel.artifactpool/META-INF/MANIFEST.MF

@ -0,0 +1,8 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: org.gmodel.artifactpool
Bundle-SymbolicName: org.gmodel.artifactpool;singleton:=true
Bundle-Version: 1.0.0
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Export-Package: org.gmodel.artifactpool

4
src/trunk/org.gmodel.artifactpool/build.properties

@ -0,0 +1,4 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.

43
src/trunk/org.gmodel.artifactpool/src/org/gmodel/artifactpool/ArtifactPool.java

@ -0,0 +1,43 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: SMTL 1.0
*
* The contents of this file are subject to the Sofismo Model Technology License Version
* 1.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.sofismo.ch/SMTL/
*
* Software distributed under the License is distributed on an "AS IS" basis.
* See the License for the specific language governing rights and limitations
* under the License.
*
* The Original Code is Gmodel Semantic Extensions Edition.
*
* The Initial Developer of the Original Code is
* Sofismo AG (Sofismo).
* Portions created by the Initial Developer are
* Copyright (C) 2009-2010 Sofismo AG.
* All Rights Reserved.
*
* Contributor(s):
* Jorn Bettin
* Chul Kim
* ***** END LICENSE BLOCK ***** */
package org.gmodel.artifactpool;
public interface ArtifactPool<K, V> {
boolean contains(K key);
void expire();
V get(K key);
void put(K key, V artifact);
void remove(K key);
int size();
}

87
src/trunk/org.gmodel.artifactpool/src/org/gmodel/artifactpool/HashMapArtifactPool.java

@ -0,0 +1,87 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: SMTL 1.0
*
* The contents of this file are subject to the Sofismo Model Technology License Version
* 1.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.sofismo.ch/SMTL/
*
* Software distributed under the License is distributed on an "AS IS" basis.
* See the License for the specific language governing rights and limitations
* under the License.
*
* The Original Code is Gmodel Semantic Extensions Edition.
*
* The Initial Developer of the Original Code is
* Sofismo AG (Sofismo).
* Portions created by the Initial Developer are
* Copyright (C) 2009-2010 Sofismo AG.
* All Rights Reserved.
*
* Contributor(s):
* Jorn Bettin
* Chul Kim
* ***** END LICENSE BLOCK ***** */
package org.gmodel.artifactpool;
import java.util.LinkedHashMap;
import java.util.Map;
public class HashMapArtifactPool<K,V> implements ArtifactPool<K,V> {
private static final int MAX_SIZE = 100;
private final Map<K,V> cache;
public HashMapArtifactPool() {
cache = new LinkedHashMap<K,V>(MAX_SIZE, 0.75F, true) {
private static final long serialVersionUID = 1L;
@SuppressWarnings("unchecked")
protected boolean removeEldestEntry(Map.Entry eldest) {
return size() > MAX_SIZE;
}
};
}
public boolean contains(K key) {
synchronized(cache) {
return cache.containsKey(key);
}
}
public void expire() {
synchronized(cache) {
cache.clear();
}
}
public V get(K key) {
synchronized(cache) {
return cache.get(key);
}
}
public void put(K key, V artifact) {
synchronized(cache) {
if (!cache.containsKey(key)) {
cache.put(key, artifact);
}
}
}
public void remove(K key) {
synchronized(cache) {
cache.remove(key);
}
}
public int size() {
synchronized(cache) {
return cache.size();
}
}
}

88
src/trunk/org.gmodel.artifactpool/src/org/gmodel/artifactpool/HashMapObjectPool.java

@ -0,0 +1,88 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: SMTL 1.0
*
* The contents of this file are subject to the Sofismo Model Technology License Version
* 1.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.sofismo.ch/SMTL/
*
* Software distributed under the License is distributed on an "AS IS" basis.
* See the License for the specific language governing rights and limitations
* under the License.
*
* The Original Code is Gmodel Semantic Extensions Edition.
*
* The Initial Developer of the Original Code is
* Sofismo AG (Sofismo).
* Portions created by the Initial Developer are
* Copyright (C) 2009-2010 Sofismo AG.
* All Rights Reserved.
*
* Contributor(s):
* Jorn Bettin
* Chul Kim
* ***** END LICENSE BLOCK ***** */
package org.gmodel.artifactpool;
import java.util.LinkedHashMap;
import java.util.Map;
public class HashMapObjectPool<K,V> implements ObjectPool<K,V> {
private static final int MAX_SIZE = 1000;
private final Map<K,V> cache;
public HashMapObjectPool() {
cache = new LinkedHashMap<K,V>(MAX_SIZE, 0.75F, true) {
private static final long serialVersionUID = 1L;
@Override
@SuppressWarnings("unchecked")
protected boolean removeEldestEntry(final Map.Entry eldest) {
return size() > MAX_SIZE;
}
};
}
public boolean contains(final K key) {
synchronized(cache) {
return cache.containsKey(key);
}
}
public void expire() {
synchronized(cache) {
cache.clear();
}
}
public V get(final K key) {
synchronized(cache) {
return cache.get(key);
}
}
public void put(final K key, final V artifact) {
synchronized(cache) {
if (!cache.containsKey(key)) {
cache.put(key, artifact);
}
}
}
public void remove(final K key) {
synchronized(cache) {
cache.remove(key);
}
}
public int size() {
synchronized(cache) {
return cache.size();
}
}
}

43
src/trunk/org.gmodel.artifactpool/src/org/gmodel/artifactpool/ObjectPool.java

@ -0,0 +1,43 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: SMTL 1.0
*
* The contents of this file are subject to the Sofismo Model Technology License Version
* 1.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.sofismo.ch/SMTL/
*
* Software distributed under the License is distributed on an "AS IS" basis.
* See the License for the specific language governing rights and limitations
* under the License.
*
* The Original Code is Gmodel Semantic Extensions Edition.
*
* The Initial Developer of the Original Code is
* Sofismo AG (Sofismo).
* Portions created by the Initial Developer are
* Copyright (C) 2009-2010 Sofismo AG.
* All Rights Reserved.
*
* Contributor(s):
* Jorn Bettin
* Chul Kim
* ***** END LICENSE BLOCK ***** */
package org.gmodel.artifactpool;
public interface ObjectPool<K, V> {
boolean contains(K key);
void expire();
V get(K key);
void put(K key, V artifact);
void remove(K key);
int size();
}

7
src/trunk/org.gmodel.common/.classpath

@ -0,0 +1,7 @@
<?xml version='1.0' encoding='UTF-8'?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"></classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"></classpathentry>
<classpathentry kind="src" path="src"></classpathentry>
<classpathentry kind="output" path="bin"></classpathentry>
</classpath>

26
src/trunk/org.gmodel.common/.project

@ -0,0 +1,26 @@
<?xml version='1.0' encoding='UTF-8'?>
<projectDescription>
<name>org.gmodel.common</name>
<comment></comment>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
</natures>
</projectDescription>

7
src/trunk/org.gmodel.common/META-INF/MANIFEST.MF

@ -0,0 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: org.gmodel.common
Bundle-SymbolicName: org.gmodel.common; singleton:=true
Bundle-Version: 1.0.0
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Export-Package: org.gmodel.common.search

3
src/trunk/org.gmodel.common/build.properties

@ -0,0 +1,3 @@
source.. = src/
bin.includes = META-INF/,\
.

85
src/trunk/org.gmodel.common/src/org/gmodel/common/search/BasicSearchIdentity.java

@ -0,0 +1,85 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Gmodel.
*
* The Initial Developer of the Original Code is
* Sofismo AG (Sofismo).
* Portions created by the Initial Developer are
* Copyright (C) 2009-2010 Sofismo AG.
* All Rights Reserved.
*
* Contributor(s):
* Chul Kim
* ***** END LICENSE BLOCK ***** */
package org.gmodel.common.search;
import java.util.UUID;
public class BasicSearchIdentity {
private final String name;
private final String pluralName;
private final UUID uuid;
public BasicSearchIdentity(final String name, final String pluralName, final UUID uuid) {
super();
this.name = name;
this.pluralName = pluralName;
this.uuid = uuid;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((uuid == null) ? 0 : uuid.hashCode());
return result;
}
@Override
public boolean equals(final Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final BasicSearchIdentity other = (BasicSearchIdentity) obj;
if (uuid == null) {
if (other.uuid != null) {
return false;
}
} else if (!uuid.equals(other.uuid)) {
return false;
}
return true;
}
public String getName() {
return name;
}
public String getPluralName() {
return pluralName;
}
public UUID getUUID() {
return uuid;
}
}

79
src/trunk/org.gmodel.common/src/org/gmodel/common/search/BasicSearchResult.java

@ -0,0 +1,79 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Gmodel.
*
* The Initial Developer of the Original Code is
* Sofismo AG (Sofismo).
* Portions created by the Initial Developer are
* Copyright (C) 2009-2010 Sofismo AG.
* All Rights Reserved.
*
* Contributor(s):
* Jorn Bettin
* ***** END LICENSE BLOCK ***** */
package org.gmodel.common.search;
public class BasicSearchResult implements SearchResult {
private static final String NOT_DEFINED_VALUE = "NOT DEFINED";
private final BasicSearchIdentity instanceIdentity;
private final BasicSearchIdentity parentIdentity;
private final String categoryName;
private final String categoryTypeName;
private String errorCode;
public BasicSearchResult(final String errorCode) {
this(NOT_DEFINED_VALUE, NOT_DEFINED_VALUE, null, null);
this.errorCode = errorCode;
}
public BasicSearchResult(final String categoryName, final String categoryTypeName, final BasicSearchIdentity parentIdentity, final BasicSearchIdentity instanceIdentity) {
this.categoryName = categoryName;
this.categoryTypeName = categoryTypeName;
this.parentIdentity = parentIdentity;
this.instanceIdentity = instanceIdentity;
}
public BasicSearchIdentity getArtifactIdentity() {
return parentIdentity;
}
public String getErrorCode() {
return errorCode;
}
public BasicSearchIdentity getInstanceIdentity() {
return instanceIdentity;
}
public String getCategoryName() {
return this.categoryName;
}
public String getCategoryTypeName() {
return this.categoryTypeName;
}
public void setErrorCode(final String errorCode) {
this.errorCode = errorCode;
}
@Override
public String toString() {
return "BasicSearchResult [instanceIdentity=" + instanceIdentity
+ ", parentIdentity=" + parentIdentity + "]";
}
}

41
src/trunk/org.gmodel.common/src/org/gmodel/common/search/SearchResult.java

@ -0,0 +1,41 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Gmodel.
*
* The Initial Developer of the Original Code is
* Sofismo AG (Sofismo).
* Portions created by the Initial Developer are
* Copyright (C) 2009-2010 Sofismo AG.
* All Rights Reserved.
*
* Contributor(s):
* Jorn Bettin
* ***** END LICENSE BLOCK ***** */
package org.gmodel.common.search;
public interface SearchResult {
String getCategoryTypeName();
String getCategoryName();
BasicSearchIdentity getArtifactIdentity();
BasicSearchIdentity getInstanceIdentity();
String getErrorCode();
}

9
src/trunk/org.gmodel.connector.database.db2/.classpath

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="lib" path="lib/db2jcc_license_cu.jar"/>
<classpathentry kind="lib" path="lib/db2jcc.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

26
src/trunk/org.gmodel.connector.database.db2/.project

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.gmodel.connector.database.db2</name>
<comment></comment>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
</natures>
</projectDescription>

70
src/trunk/org.gmodel.connector.database.db2/.settings/org.eclipse.jdt.core.prefs

@ -0,0 +1,70 @@
#Wed May 13 15:07:03 CEST 2009
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.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
org.eclipse.jdt.core.compiler.problem.deprecation=warning
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
org.eclipse.jdt.core.compiler.problem.nullReference=warning
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
org.eclipse.jdt.core.compiler.problem.unusedImport=warning
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.source=1.5

54
src/trunk/org.gmodel.connector.database.db2/.settings/org.eclipse.jdt.ui.prefs

@ -0,0 +1,54 @@
#Mon Jun 01 15:10:28 CEST 2009
eclipse.preferences.version=1
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
sp_cleanup.add_default_serial_version_id=true
sp_cleanup.add_generated_serial_version_id=false
sp_cleanup.add_missing_annotations=true
sp_cleanup.add_missing_deprecated_annotations=true
sp_cleanup.add_missing_methods=false
sp_cleanup.add_missing_nls_tags=false
sp_cleanup.add_missing_override_annotations=true
sp_cleanup.add_serial_version_id=false
sp_cleanup.always_use_blocks=true
sp_cleanup.always_use_parentheses_in_expressions=false
sp_cleanup.always_use_this_for_non_static_field_access=false
sp_cleanup.always_use_this_for_non_static_method_access=false
sp_cleanup.convert_to_enhanced_for_loop=true
sp_cleanup.correct_indentation=false
sp_cleanup.format_source_code=false
sp_cleanup.format_source_code_changes_only=false
sp_cleanup.make_local_variable_final=true
sp_cleanup.make_parameters_final=true
sp_cleanup.make_private_fields_final=true
sp_cleanup.make_type_abstract_if_missing_method=false
sp_cleanup.make_variable_declarations_final=true
sp_cleanup.never_use_blocks=false
sp_cleanup.never_use_parentheses_in_expressions=true
sp_cleanup.on_save_use_additional_actions=true
sp_cleanup.organize_imports=true
sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
sp_cleanup.remove_private_constructors=true
sp_cleanup.remove_trailing_whitespaces=true
sp_cleanup.remove_trailing_whitespaces_all=true
sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
sp_cleanup.remove_unnecessary_casts=true
sp_cleanup.remove_unnecessary_nls_tags=false
sp_cleanup.remove_unused_imports=true
sp_cleanup.remove_unused_local_variables=false
sp_cleanup.remove_unused_private_fields=true
sp_cleanup.remove_unused_private_members=false
sp_cleanup.remove_unused_private_methods=true
sp_cleanup.remove_unused_private_types=true
sp_cleanup.sort_members=false
sp_cleanup.sort_members_all=false
sp_cleanup.use_blocks=true
sp_cleanup.use_blocks_only_for_return_and_throw=false
sp_cleanup.use_parentheses_in_expressions=false
sp_cleanup.use_this_for_non_static_field_access=false
sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
sp_cleanup.use_this_for_non_static_method_access=false
sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true

30
src/trunk/org.gmodel.connector.database.db2/DB2.sql

@ -0,0 +1,30 @@
-- ------------------------------- --
-- Gmodel setup script for IBM DB2 --
-- ------------------------------- --
-- Create database
create database gmodel using codeset UTF-8 territory us collate using identity
-- Connect to it
connect to gmodel user db2admin using db2admin
-- Create tables
CREATE TABLE document (
id varchar(36) NOT NULL PRIMARY KEY,
serialized_instance CLOB(3M) NOT NULL
)
CREATE TABLE index (
uuid varchar(36) NOT NULL PRIMARY KEY,
urr varchar(36) NOT NULL,
name varchar(256) NOT NULL,
plural_name varchar(256) NOT NULL,
type varchar(256) NOT NULL,
identity varchar(36) NOT NULL,
meta_element_id varchar(36) NOT NULL,
content_id varchar(36) NOT NULL,
FOREIGN KEY (content_id)
REFERENCES document(id)
)
-- Example connection string: jdbc:db2j:net://localhost:50000/gmodel

11
src/trunk/org.gmodel.connector.database.db2/META-INF/MANIFEST.MF

@ -0,0 +1,11 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: org.gmodel.connector.database.db2
Bundle-SymbolicName: org.gmodel.connector.database.db2;singleton:=true
Fragment-Host: org.gmodel.connector.database
Bundle-Version: 1.0.0
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Import-Package: org.hibernate.cfg
Bundle-ClassPath: lib/db2jcc.jar,
lib/db2jcc_license_cu.jar,
.

6
src/trunk/org.gmodel.connector.database.db2/build.properties

@ -0,0 +1,6 @@
source.. = src/
bin.includes = META-INF/,\
.,\
fragment.xml,\
lib/db2jcc_license_cu.jar,\
lib/db2jcc.jar

7
src/trunk/org.gmodel.connector.database.db2/fragment.xml

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<fragment>
<extension point="org.gmodel.connector.database.type">
<client class="org.gmodel.connector.database.db2.DB2Connector"/>
</extension>
</fragment>

BIN
src/trunk/org.gmodel.connector.database.db2/lib/db2jcc.jar

Binary file not shown.

BIN
src/trunk/org.gmodel.connector.database.db2/lib/db2jcc_license_cu.jar

Binary file not shown.

10
src/trunk/org.gmodel.connector.database.db2/pom.xml

@ -0,0 +1,10 @@
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.gmodel</groupId>
<artifactId>org.gmodel.eclipse</artifactId>
<version>1.0.0</version>
</parent>
<artifactId>org.gmodel.connector.database.db2</artifactId>
<packaging>eclipse-plugin</packaging>
</project>

52
src/trunk/org.gmodel.connector.database.db2/src/org/gmodel/connector/database/db2/DB2Connector.java

@ -0,0 +1,52 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Gmodel.
*
* The Initial Developer of the Original Code is
* Sofismo AG (Sofismo).
* Portions created by the Initial Developer are
* Copyright (C) 2009-2011 Sofismo AG.
* All Rights Reserved.
*
* Contributor(s):
* Andrew Shewring
* ***** END LICENSE BLOCK ***** */
package org.gmodel.connector.database.db2;
import org.gmodel.connector.database.AbstractDatabaseConnector;
public final class DB2Connector extends AbstractDatabaseConnector {
private static final String DRIVER_CLASS = "com.ibm.db2.jcc.DB2Driver";
private static final String DIALECT = "org.hibernate.dialect.DB2Dialect";
private static final int DEFAULT_PORT = 50000;
private static final String CONNECTION_URL_PREFIX = "jdbc:db2j:net://";
public DB2Connector() {
super("DB2", DRIVER_CLASS, DIALECT, DEFAULT_PORT);
}
/**
* Example URL: jdbc:db2j:net://localhost:50000/gmodel
*/
@Override
public String createConnectionUrl(final String hostname, final int port, final String databaseName) {
return CONNECTION_URL_PREFIX + hostname + ":" + port + "/" + databaseName;
}
}

8
src/trunk/org.gmodel.connector.database.mysql/.classpath

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="lib" path="lib/mysql-connector-java-5.1.13-bin.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

26
src/trunk/org.gmodel.connector.database.mysql/.project

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.gmodel.connector.database.mysql</name>
<comment></comment>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
</natures>
</projectDescription>

70
src/trunk/org.gmodel.connector.database.mysql/.settings/org.eclipse.jdt.core.prefs

@ -0,0 +1,70 @@
#Wed May 13 15:07:03 CEST 2009
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.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
org.eclipse.jdt.core.compiler.problem.deprecation=warning
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
org.eclipse.jdt.core.compiler.problem.nullReference=warning
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
org.eclipse.jdt.core.compiler.problem.unusedImport=warning
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.source=1.5

54
src/trunk/org.gmodel.connector.database.mysql/.settings/org.eclipse.jdt.ui.prefs

@ -0,0 +1,54 @@
#Mon Jun 01 15:10:28 CEST 2009
eclipse.preferences.version=1
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
sp_cleanup.add_default_serial_version_id=true
sp_cleanup.add_generated_serial_version_id=false
sp_cleanup.add_missing_annotations=true
sp_cleanup.add_missing_deprecated_annotations=true
sp_cleanup.add_missing_methods=false
sp_cleanup.add_missing_nls_tags=false
sp_cleanup.add_missing_override_annotations=true
sp_cleanup.add_serial_version_id=false
sp_cleanup.always_use_blocks=true
sp_cleanup.always_use_parentheses_in_expressions=false
sp_cleanup.always_use_this_for_non_static_field_access=false
sp_cleanup.always_use_this_for_non_static_method_access=false
sp_cleanup.convert_to_enhanced_for_loop=true
sp_cleanup.correct_indentation=false
sp_cleanup.format_source_code=false
sp_cleanup.format_source_code_changes_only=false
sp_cleanup.make_local_variable_final=true
sp_cleanup.make_parameters_final=true
sp_cleanup.make_private_fields_final=true
sp_cleanup.make_type_abstract_if_missing_method=false
sp_cleanup.make_variable_declarations_final=true
sp_cleanup.never_use_blocks=false
sp_cleanup.never_use_parentheses_in_expressions=true
sp_cleanup.on_save_use_additional_actions=true
sp_cleanup.organize_imports=true
sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
sp_cleanup.remove_private_constructors=true
sp_cleanup.remove_trailing_whitespaces=true
sp_cleanup.remove_trailing_whitespaces_all=true
sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
sp_cleanup.remove_unnecessary_casts=true
sp_cleanup.remove_unnecessary_nls_tags=false
sp_cleanup.remove_unused_imports=true
sp_cleanup.remove_unused_local_variables=false
sp_cleanup.remove_unused_private_fields=true
sp_cleanup.remove_unused_private_members=false
sp_cleanup.remove_unused_private_methods=true
sp_cleanup.remove_unused_private_types=true
sp_cleanup.sort_members=false
sp_cleanup.sort_members_all=false
sp_cleanup.use_blocks=true
sp_cleanup.use_blocks_only_for_return_and_throw=false
sp_cleanup.use_parentheses_in_expressions=false
sp_cleanup.use_this_for_non_static_field_access=false
sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
sp_cleanup.use_this_for_non_static_method_access=false
sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true

9
src/trunk/org.gmodel.connector.database.mysql/META-INF/MANIFEST.MF

@ -0,0 +1,9 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: org.gmodel.connector.database.mysql
Bundle-SymbolicName: org.gmodel.connector.database.mysql;singleton:=true
Fragment-Host: org.gmodel.connector.database
Bundle-Version: 1.0.0
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ClassPath: lib/mysql-connector-java-5.1.13-bin.jar,
.

176
src/trunk/org.gmodel.connector.database.mysql/MySQL.sql

@ -0,0 +1,176 @@
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- Database: `repository`
--
-- --------------------------------------------------------
--
-- Table structure for table `artifact`
--
CREATE TABLE IF NOT EXISTS `artifact` (
`urr` varchar(36) COLLATE utf8_unicode_ci NOT NULL,
`uuid` varchar(36) COLLATE utf8_unicode_ci NOT NULL,
`category` varchar(36) COLLATE utf8_unicode_ci NOT NULL,
`container` varchar(36) COLLATE utf8_unicode_ci NOT NULL,
`isAbstractValue` varchar(36) COLLATE utf8_unicode_ci NOT NULL,
`flavor` enum('VER','END','EDG','VIS','SUP') COLLATE utf8_unicode_ci NOT NULL,
`contentAsXml` longtext COLLATE utf8_unicode_ci,
PRIMARY KEY (`urr`),
KEY `ARTIFACT_uuid_urr` (`uuid`,`urr`),
KEY `categoryFK` (`category`),
KEY `containerFK` (`container`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `edge`
--
CREATE TABLE IF NOT EXISTS `edge` (
`urr` varchar(36) COLLATE utf8_unicode_ci NOT NULL,
`minCardinalityValueFromEdgeEnd` varchar(36) COLLATE utf8_unicode_ci NOT NULL,
`minCardinalityValueToEdgeEnd` varchar(36) COLLATE utf8_unicode_ci NOT NULL,
`maxCardinalityValueFromEdgeEnd` varchar(36) COLLATE utf8_unicode_ci NOT NULL,
`maxCardinalityValueToEdgeEnd` varchar(36) COLLATE utf8_unicode_ci NOT NULL,
`isNavigableValueFromEdgeEnd` varchar(36) COLLATE utf8_unicode_ci NOT NULL,
`isNavigableValueToEdgeEnd` varchar(36) COLLATE utf8_unicode_ci NOT NULL,
`isContainerValueFromEdgeEnd` varchar(36) COLLATE utf8_unicode_ci NOT NULL,
`isContainerValueToEdgeEnd` varchar(36) COLLATE utf8_unicode_ci NOT NULL,
`fromEdgeEnd` varchar(36) COLLATE utf8_unicode_ci NOT NULL,
`toEdgeEnd` varchar(36) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`urr`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `identity`
--
CREATE TABLE IF NOT EXISTS `identity` (
`uuid` varchar(36) COLLATE utf8_unicode_ci NOT NULL,
`name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
`pluralName` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
`payLoad` text COLLATE utf8_unicode_ci,
PRIMARY KEY (`uuid`),
KEY `IDENTITY_name_uuid` (`name`,`uuid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `link`
--
CREATE TABLE IF NOT EXISTS `link` (
`urr` varchar(36) COLLATE utf8_unicode_ci NOT NULL,
`category` varchar(36) COLLATE utf8_unicode_ci NOT NULL,
`flavor` enum('EDG','VIS','SUP') COLLATE utf8_unicode_ci NOT NULL,
`fromArtifact` varchar(36) COLLATE utf8_unicode_ci NOT NULL,
`toArtifact` varchar(36) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`urr`),
KEY `ARTIFACT_from_to_flavor` (`fromArtifact`,`toArtifact`,`flavor`,`category`),
KEY `ARTIFACT_to_flavor` (`toArtifact`,`flavor`,`category`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `edge`
--
ALTER TABLE `edge`
ADD CONSTRAINT `edgeFK` FOREIGN KEY (`urr`) REFERENCES `link` (`urr`) ON DELETE NO ACTION ON UPDATE NO ACTION;
--
-- Constraints for table `link`
--
ALTER TABLE `link`
ADD CONSTRAINT `linkFK` FOREIGN KEY (`urr`) REFERENCES `artifact` (`urr`) ON DELETE NO ACTION ON UPDATE NO ACTION;
DELIMITER $$
--
-- Procedures
--
CREATE DEFINER=`gmodeldemo`@`localhost` PROCEDURE `getContainedInstances`(
IN uuid VARCHAR(36)
)
BEGIN
SELECT SQL_NO_CACHE root.urr as root, root.contentAsXml as rootxml, t1.urr as lev1, t1.contentAsXml as xml1, t2.urr as lev2, t2.contentAsXml as xml2, t3.urr as lev3, t3.contentAsXml as xml3, t4.urr as lev4, t4.contentAsXml as xml4,
t5.urr as lev5, t5.contentAsXml as xml5, t6.urr as lev6, t6.contentAsXml as xml6, t7.urr as lev7, t7.contentAsXml as xml7
FROM repository.artifact AS root
LEFT JOIN repository.artifact AS t1
ON t1.container =root.urr AND t1.flavor='VER'
LEFT JOIN repository.artifact AS t2
ON t2.container = t1.urr AND t2.flavor='VER'
LEFT JOIN repository.artifact AS t3
ON t3.container = t2.urr AND t3.flavor='VER'
LEFT JOIN repository.artifact AS t4
ON t4.container = t3.urr AND t4.flavor='VER'
LEFT JOIN repository.artifact AS t5
ON t5.container = t4.urr AND t5.flavor='VER'
LEFT JOIN repository.artifact AS t6
ON t6.container = t5.urr AND t6.flavor='VER'
LEFT JOIN repository.artifact AS t7
ON t7.container = t6.urr AND t7.flavor='VER'
WHERE root.urr=uuid AND root.flavor='VER';
END$$
CREATE DEFINER=`gmodeldemo`@`localhost` PROCEDURE `getContainedInstanceUUIDs`(
IN uuid VARCHAR(36)
)
BEGIN
SELECT SQL_NO_CACHE root.urr as root, t1.urr as lev1, t2.urr as lev2, t3.urr as lev3, t4.urr as lev4,
t5.urr as lev5, t6.urr as lev6, t7.urr as lev7
FROM repository.artifact AS root
LEFT JOIN repository.artifact AS t1
ON t1.container =root.urr AND t1.flavor='VER'
LEFT JOIN repository.artifact AS t2
ON t2.container = t1.urr AND t2.flavor='VER'
LEFT JOIN repository.artifact AS t3
ON t3.container = t2.urr AND t3.flavor='VER'
LEFT JOIN repository.artifact AS t4
ON t4.container = t3.urr AND t4.flavor='VER'
LEFT JOIN repository.artifact AS t5
ON t5.container = t4.urr AND t5.flavor='VER'
LEFT JOIN repository.artifact AS t6
ON t6.container = t5.urr AND t6.flavor='VER'
LEFT JOIN repository.artifact AS t7
ON t7.container = t6.urr AND t7.flavor='VER'
WHERE root.urr=uuid AND root.flavor='VER';
END$$
CREATE DEFINER=`gmodeldemo`@`localhost` PROCEDURE `getDependentInstanceUUIDs`(
IN uuid VARCHAR(36)
)
BEGIN
SELECT artifact.urr as urr
FROM repository.artifact as artifact
WHERE artifact.category = uuid
UNION ALL
SELECT link.urr as urr
FROM repository.link as link
WHERE link.fromArtifact = uuid OR link.toArtifact = uuid;
END$$
DELIMITER ;

5
src/trunk/org.gmodel.connector.database.mysql/build.properties

@ -0,0 +1,5 @@
source.. = src/
bin.includes = META-INF/,\
.,\
fragment.xml,\
lib/mysql-connector-java-5.1.13-bin.jar

7
src/trunk/org.gmodel.connector.database.mysql/fragment.xml

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<fragment>
<extension point="org.gmodel.connector.database.type">
<client class="org.gmodel.connector.database.mysql.MySQLConnector"/>
</extension>
</fragment>

BIN
src/trunk/org.gmodel.connector.database.mysql/lib/mysql-connector-java-5.1.13-bin.jar

Binary file not shown.

10
src/trunk/org.gmodel.connector.database.mysql/pom.xml

@ -0,0 +1,10 @@
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.gmodel</groupId>
<artifactId>org.gmodel.eclipse</artifactId>
<version>1.0.0</version>
</parent>
<artifactId>org.gmodel.connector.database.mysql</artifactId>
<packaging>eclipse-plugin</packaging>
</project>

42
src/trunk/org.gmodel.connector.database.mysql/src/org/gmodel/connector/database/mysql/MySQLConnector.java

@ -0,0 +1,42 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Gmodel.
*
* The Initial Developer of the Original Code is
* Sofismo AG (Sofismo).
* Portions created by the Initial Developer are
* Copyright (C) 2009-2011 Sofismo AG.
* All Rights Reserved.
*
* Contributor(s):
* Andrew Shewring
* ***** END LICENSE BLOCK ***** */
package org.gmodel.connector.database.mysql;
import org.gmodel.connector.database.AbstractDatabaseConnector;
public final class MySQLConnector extends AbstractDatabaseConnector {
private static final String DRIVER_CLASS = "com.mysql.jdbc.Driver";
private static final String DIALECT = "org.hibernate.dialect.MySQLDialect";
private static final int DEFAULT_PORT = 3306;
public MySQLConnector() {
super("MySQL", DRIVER_CLASS, DIALECT, DEFAULT_PORT);
}
}

8
src/trunk/org.gmodel.connector.database.postgresql/.classpath

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="lib" path="lib/postgresql-8.4-701.jdbc3.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

26
src/trunk/org.gmodel.connector.database.postgresql/.project

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.gmodel.connector.database.postgresql</name>
<comment></comment>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
</natures>
</projectDescription>

70
src/trunk/org.gmodel.connector.database.postgresql/.settings/org.eclipse.jdt.core.prefs

@ -0,0 +1,70 @@
#Wed May 13 15:07:03 CEST 2009
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.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
org.eclipse.jdt.core.compiler.problem.deprecation=warning
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
org.eclipse.jdt.core.compiler.problem.nullReference=warning
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
org.eclipse.jdt.core.compiler.problem.unusedImport=warning
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.source=1.5

54
src/trunk/org.gmodel.connector.database.postgresql/.settings/org.eclipse.jdt.ui.prefs

@ -0,0 +1,54 @@
#Mon Jun 01 15:10:28 CEST 2009
eclipse.preferences.version=1
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
sp_cleanup.add_default_serial_version_id=true
sp_cleanup.add_generated_serial_version_id=false
sp_cleanup.add_missing_annotations=true
sp_cleanup.add_missing_deprecated_annotations=true
sp_cleanup.add_missing_methods=false
sp_cleanup.add_missing_nls_tags=false
sp_cleanup.add_missing_override_annotations=true
sp_cleanup.add_serial_version_id=false
sp_cleanup.always_use_blocks=true
sp_cleanup.always_use_parentheses_in_expressions=false
sp_cleanup.always_use_this_for_non_static_field_access=false
sp_cleanup.always_use_this_for_non_static_method_access=false
sp_cleanup.convert_to_enhanced_for_loop=true
sp_cleanup.correct_indentation=false
sp_cleanup.format_source_code=false
sp_cleanup.format_source_code_changes_only=false
sp_cleanup.make_local_variable_final=true
sp_cleanup.make_parameters_final=true
sp_cleanup.make_private_fields_final=true
sp_cleanup.make_type_abstract_if_missing_method=false
sp_cleanup.make_variable_declarations_final=true
sp_cleanup.never_use_blocks=false
sp_cleanup.never_use_parentheses_in_expressions=true
sp_cleanup.on_save_use_additional_actions=true
sp_cleanup.organize_imports=true
sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
sp_cleanup.remove_private_constructors=true
sp_cleanup.remove_trailing_whitespaces=true
sp_cleanup.remove_trailing_whitespaces_all=true
sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
sp_cleanup.remove_unnecessary_casts=true
sp_cleanup.remove_unnecessary_nls_tags=false
sp_cleanup.remove_unused_imports=true
sp_cleanup.remove_unused_local_variables=false
sp_cleanup.remove_unused_private_fields=true
sp_cleanup.remove_unused_private_members=false
sp_cleanup.remove_unused_private_methods=true
sp_cleanup.remove_unused_private_types=true
sp_cleanup.sort_members=false
sp_cleanup.sort_members_all=false
sp_cleanup.use_blocks=true
sp_cleanup.use_blocks_only_for_return_and_throw=false
sp_cleanup.use_parentheses_in_expressions=false
sp_cleanup.use_this_for_non_static_field_access=false
sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
sp_cleanup.use_this_for_non_static_method_access=false
sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true

10
src/trunk/org.gmodel.connector.database.postgresql/META-INF/MANIFEST.MF

@ -0,0 +1,10 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: org.gmodel.connector.database.postgresql
Bundle-SymbolicName: org.gmodel.connector.database.postgresql;singleton:=true
Fragment-Host: org.gmodel.connector.database
Bundle-Version: 1.0.0
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Import-Package: org.hibernate.cfg
Bundle-ClassPath: lib/postgresql-8.4-701.jdbc3.jar,
.

48
src/trunk/org.gmodel.connector.database.postgresql/PostgreSQL.sql

@ -0,0 +1,48 @@
-- ---------------------------------- --
-- Gmodel setup script for PostgreSQL --
-- ---------------------------------- --
CREATE DATABASE gmodel WITH ENCODING = 'UTF8';
\connect gmodel
SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;
CREATE TABLE document (
id character varying(36) NOT NULL,
serialized_instance bytea NOT NULL
);
ALTER TABLE public.document OWNER TO postgres;
CREATE TABLE index (
uuid character varying(36) NOT NULL,
urr character varying(36) NOT NULL,
name text NOT NULL,
plural_name text NOT NULL,
type text NOT NULL,
identity character varying(36) NOT NULL,
meta_element_id character varying(36) NOT NULL,
content_id character varying(36) NOT NULL
);
ALTER TABLE public.index OWNER TO postgres;
ALTER TABLE ONLY document
ADD CONSTRAINT document_pkey PRIMARY KEY (id);
ALTER TABLE ONLY index
ADD CONSTRAINT index_pkey PRIMARY KEY (uuid);
ALTER TABLE ONLY index
ADD CONSTRAINT index_content_id_fkey FOREIGN KEY (content_id) REFERENCES document(id);

5
src/trunk/org.gmodel.connector.database.postgresql/build.properties

@ -0,0 +1,5 @@
source.. = src/
bin.includes = META-INF/,\
.,\
fragment.xml,\
lib/postgresql-8.4-701.jdbc3.jar

7
src/trunk/org.gmodel.connector.database.postgresql/fragment.xml

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<fragment>
<extension point="org.gmodel.connector.database.type">
<client class="org.gmodel.connector.database.postgresql.PostgreSQLConnector"/>
</extension>
</fragment>

BIN
src/trunk/org.gmodel.connector.database.postgresql/lib/postgresql-8.4-701.jdbc3.jar

Binary file not shown.

10
src/trunk/org.gmodel.connector.database.postgresql/pom.xml

@ -0,0 +1,10 @@
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.gmodel</groupId>
<artifactId>org.gmodel.eclipse</artifactId>
<version>1.0.0</version>
</parent>
<artifactId>org.gmodel.connector.database.postgresql</artifactId>
<packaging>eclipse-plugin</packaging>
</project>

42
src/trunk/org.gmodel.connector.database.postgresql/src/org/gmodel/connector/database/postgresql/PostgreSQLConnector.java

@ -0,0 +1,42 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Gmodel.
*
* The Initial Developer of the Original Code is
* Sofismo AG (Sofismo).
* Portions created by the Initial Developer are
* Copyright (C) 2009-2011 Sofismo AG.
* All Rights Reserved.
*
* Contributor(s):
* Andrew Shewring
* ***** END LICENSE BLOCK ***** */
package org.gmodel.connector.database.postgresql;
import org.gmodel.connector.database.AbstractDatabaseConnector;
public final class PostgreSQLConnector extends AbstractDatabaseConnector {
private static final String DRIVER_CLASS = "org.postgresql.Driver";
private static final String DIALECT = "org.hibernate.dialect.PostgreSQLDialect";
private static final int DEFAULT_PORT = 5432;
public PostgreSQLConnector() {
super("PostgreSQL", DRIVER_CLASS, DIALECT, DEFAULT_PORT);
}
}

7
src/trunk/org.gmodel.connector.database.ui/.classpath

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>

26
src/trunk/org.gmodel.connector.database.ui/.project

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.gmodel.connector.database.ui</name>
<comment></comment>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
</natures>
</projectDescription>

70
src/trunk/org.gmodel.connector.database.ui/.settings/org.eclipse.jdt.core.prefs

@ -0,0 +1,70 @@
#Wed May 13 15:07:03 CEST 2009
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.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
org.eclipse.jdt.core.compiler.problem.deprecation=warning
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
org.eclipse.jdt.core.compiler.problem.nullReference=warning
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
org.eclipse.jdt.core.compiler.problem.unusedImport=warning
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.source=1.5

54
src/trunk/org.gmodel.connector.database.ui/.settings/org.eclipse.jdt.ui.prefs

@ -0,0 +1,54 @@
#Mon Jun 01 15:10:28 CEST 2009
eclipse.preferences.version=1
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
sp_cleanup.add_default_serial_version_id=true
sp_cleanup.add_generated_serial_version_id=false
sp_cleanup.add_missing_annotations=true
sp_cleanup.add_missing_deprecated_annotations=true
sp_cleanup.add_missing_methods=false
sp_cleanup.add_missing_nls_tags=false
sp_cleanup.add_missing_override_annotations=true
sp_cleanup.add_serial_version_id=false
sp_cleanup.always_use_blocks=true
sp_cleanup.always_use_parentheses_in_expressions=false
sp_cleanup.always_use_this_for_non_static_field_access=false
sp_cleanup.always_use_this_for_non_static_method_access=false
sp_cleanup.convert_to_enhanced_for_loop=true
sp_cleanup.correct_indentation=false
sp_cleanup.format_source_code=false
sp_cleanup.format_source_code_changes_only=false
sp_cleanup.make_local_variable_final=true
sp_cleanup.make_parameters_final=true
sp_cleanup.make_private_fields_final=true
sp_cleanup.make_type_abstract_if_missing_method=false
sp_cleanup.make_variable_declarations_final=true
sp_cleanup.never_use_blocks=false
sp_cleanup.never_use_parentheses_in_expressions=true
sp_cleanup.on_save_use_additional_actions=true
sp_cleanup.organize_imports=true
sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
sp_cleanup.remove_private_constructors=true
sp_cleanup.remove_trailing_whitespaces=true
sp_cleanup.remove_trailing_whitespaces_all=true
sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
sp_cleanup.remove_unnecessary_casts=true
sp_cleanup.remove_unnecessary_nls_tags=false
sp_cleanup.remove_unused_imports=true
sp_cleanup.remove_unused_local_variables=false
sp_cleanup.remove_unused_private_fields=true
sp_cleanup.remove_unused_private_members=false
sp_cleanup.remove_unused_private_methods=true
sp_cleanup.remove_unused_private_types=true
sp_cleanup.sort_members=false
sp_cleanup.sort_members_all=false
sp_cleanup.use_blocks=true
sp_cleanup.use_blocks_only_for_return_and_throw=false
sp_cleanup.use_parentheses_in_expressions=false
sp_cleanup.use_this_for_non_static_field_access=false
sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
sp_cleanup.use_this_for_non_static_method_access=false
sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true

7
src/trunk/org.gmodel.connector.database.ui/META-INF/MANIFEST.MF

@ -0,0 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: org.gmodel.connector.database.ui
Bundle-SymbolicName: org.gmodel.connector.database.ui
Bundle-Version: 1.0.0
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Require-Bundle: org.gmodel.connector.database

3
src/trunk/org.gmodel.connector.database.ui/build.properties

@ -0,0 +1,3 @@
source.. = src/
bin.includes = META-INF/,\
.

10
src/trunk/org.gmodel.connector.database.ui/pom.xml

@ -0,0 +1,10 @@
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.gmodel</groupId>
<artifactId>org.gmodel.eclipse</artifactId>
<version>1.0.0</version>
</parent>
<artifactId>org.gmodel.connector.database.ui</artifactId>
<packaging>eclipse-plugin</packaging>
</project>

7
src/trunk/org.gmodel.connector.database/.classpath

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>

26
src/trunk/org.gmodel.connector.database/.project

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.gmodel.connector.database</name>
<comment></comment>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
</natures>
</projectDescription>

70
src/trunk/org.gmodel.connector.database/.settings/org.eclipse.jdt.core.prefs

@ -0,0 +1,70 @@
#Wed May 13 15:07:03 CEST 2009
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.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
org.eclipse.jdt.core.compiler.problem.deprecation=warning
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
org.eclipse.jdt.core.compiler.problem.nullReference=warning
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
org.eclipse.jdt.core.compiler.problem.unusedImport=warning
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.source=1.5

54
src/trunk/org.gmodel.connector.database/.settings/org.eclipse.jdt.ui.prefs

@ -0,0 +1,54 @@
#Mon Jun 01 15:10:28 CEST 2009
eclipse.preferences.version=1
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
sp_cleanup.add_default_serial_version_id=true
sp_cleanup.add_generated_serial_version_id=false
sp_cleanup.add_missing_annotations=true
sp_cleanup.add_missing_deprecated_annotations=true
sp_cleanup.add_missing_methods=false
sp_cleanup.add_missing_nls_tags=false
sp_cleanup.add_missing_override_annotations=true
sp_cleanup.add_serial_version_id=false
sp_cleanup.always_use_blocks=true
sp_cleanup.always_use_parentheses_in_expressions=false
sp_cleanup.always_use_this_for_non_static_field_access=false
sp_cleanup.always_use_this_for_non_static_method_access=false
sp_cleanup.convert_to_enhanced_for_loop=true
sp_cleanup.correct_indentation=false
sp_cleanup.format_source_code=false
sp_cleanup.format_source_code_changes_only=false
sp_cleanup.make_local_variable_final=true
sp_cleanup.make_parameters_final=true
sp_cleanup.make_private_fields_final=true
sp_cleanup.make_type_abstract_if_missing_method=false
sp_cleanup.make_variable_declarations_final=true
sp_cleanup.never_use_blocks=false
sp_cleanup.never_use_parentheses_in_expressions=true
sp_cleanup.on_save_use_additional_actions=true
sp_cleanup.organize_imports=true
sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
sp_cleanup.remove_private_constructors=true
sp_cleanup.remove_trailing_whitespaces=true
sp_cleanup.remove_trailing_whitespaces_all=true
sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
sp_cleanup.remove_unnecessary_casts=true
sp_cleanup.remove_unnecessary_nls_tags=false
sp_cleanup.remove_unused_imports=true
sp_cleanup.remove_unused_local_variables=false
sp_cleanup.remove_unused_private_fields=true
sp_cleanup.remove_unused_private_members=false
sp_cleanup.remove_unused_private_methods=true
sp_cleanup.remove_unused_private_types=true
sp_cleanup.sort_members=false
sp_cleanup.sort_members_all=false
sp_cleanup.use_blocks=true
sp_cleanup.use_blocks_only_for_return_and_throw=false
sp_cleanup.use_parentheses_in_expressions=false
sp_cleanup.use_this_for_non_static_field_access=false
sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
sp_cleanup.use_this_for_non_static_method_access=false
sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true

16
src/trunk/org.gmodel.connector.database/META-INF/MANIFEST.MF

@ -0,0 +1,16 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: org.gmodel.connector.database
Bundle-SymbolicName: org.gmodel.connector.database;singleton:=true
Bundle-Version: 1.0.0
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Require-Bundle: org.gmodel.hibernateosgi,
org.eclipse.osgi
Import-Package: org.eclipse.core.runtime,
org.eclipse.ui.plugin,
org.osgi.framework
Export-Package: org.gmodel.connector.database
Eclipse-RegisterBuddy: org.gmodel.hibernateosgi
Bundle-ClassPath: lib/db2jcc_license_cu.jar,
lib/db2jcc.jar,
.

7
src/trunk/org.gmodel.connector.database/build.properties

@ -0,0 +1,7 @@
source.. = src/
bin.includes = META-INF/,\
.,\
plugin.xml,\
lib/,\
lib/db2jcc_license_cu.jar,\
lib/db2jcc.jar

BIN
src/trunk/org.gmodel.connector.database/lib/db2jcc.jar

Binary file not shown.

BIN
src/trunk/org.gmodel.connector.database/lib/db2jcc_license_cu.jar

Binary file not shown.

7
src/trunk/org.gmodel.connector.database/plugin.xml

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension-point id="org.gmodel.connector.database.type"
name="Connector for a database type"
schema="schema/org.gmodel.connector.database.type.exsd"/>
</plugin>

10
src/trunk/org.gmodel.connector.database/pom.xml

@ -0,0 +1,10 @@
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.gmodel</groupId>
<artifactId>org.gmodel.eclipse</artifactId>
<version>1.0.0</version>
</parent>
<artifactId>org.gmodel.connector.database</artifactId>
<packaging>eclipse-plugin</packaging>
</project>

102
src/trunk/org.gmodel.connector.database/schema/org.gmodel.connector.database.type.exsd

@ -0,0 +1,102 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
<schema targetNamespace="org.gmodel.connector.database" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
<appinfo>
<meta.schema plugin="org.gmodel.connector.database" id="org.gmodel.connector.database.type" name="Connector for a database type"/>
</appinfo>
<documentation>
[Enter description of this extension point.]
</documentation>
</annotation>
<element name="extension">
<annotation>
<appinfo>
<meta.element />
</appinfo>
</annotation>
<complexType>
<choice minOccurs="1" maxOccurs="unbounded">
<element ref="client"/>
</choice>
<attribute name="point" type="string" use="required">
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
<attribute name="id" type="string">
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
<attribute name="name" type="string">
<annotation>
<documentation>
</documentation>
<appinfo>
<meta.attribute translatable="true"/>
</appinfo>
</annotation>
</attribute>
</complexType>
</element>
<element name="client">
<complexType>
<attribute name="class" type="string">
<annotation>
<documentation>
</documentation>
<appinfo>
<meta.attribute kind="java" basedOn=":org.gmodel.connector.database.DatabaseConfiguration"/>
</appinfo>
</annotation>
</attribute>
</complexType>
</element>
<annotation>
<appinfo>
<meta.section type="since"/>
</appinfo>
<documentation>
[Enter the first release in which this extension point appears.]
</documentation>
</annotation>
<annotation>
<appinfo>
<meta.section type="examples"/>
</appinfo>
<documentation>
[Enter extension point usage example here.]
</documentation>
</annotation>
<annotation>
<appinfo>
<meta.section type="apiinfo"/>
</appinfo>
<documentation>
[Enter API information here.]
</documentation>
</annotation>
<annotation>
<appinfo>
<meta.section type="implementation"/>
</appinfo>
<documentation>
[Enter information about supplied implementation of this extension point.]
</documentation>
</annotation>
</schema>

74
src/trunk/org.gmodel.connector.database/src/org/gmodel/connector/database/AbstractDatabaseConnector.java

@ -0,0 +1,74 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Gmodel.
*
* The Initial Developer of the Original Code is
* Sofismo AG (Sofismo).
* Portions created by the Initial Developer are
* Copyright (C) 2009-2011 Sofismo AG.
* All Rights Reserved.
*
* Contributor(s):
* Andrew Shewring
* ***** END LICENSE BLOCK ***** */
package org.gmodel.connector.database;
public abstract class AbstractDatabaseConnector implements DatabaseConnector {
private final String name;
private final String driverClass;
private final String dialect;
private final int defaultPort;
public AbstractDatabaseConnector(final String name,
final String driverClass,
final String dialect,
final int defaultPort) {
this.defaultPort = defaultPort;
this.dialect = dialect;
this.driverClass = driverClass;
this.name = name;
}
public final String getName() {
return name;
}
public final String getDriverClass() {
return driverClass;
}
public final String getDialect() {
return dialect;
}
public final int getDefaultPort() {
return defaultPort;
}
public String createConnectionUrl(final String hostname, final int port, final String databaseName) {
return "jdbc:" + name.toLowerCase() + "://" + hostname + ":" + port + "/" + databaseName;
}
public String getTestSqlStatement() {
return "SELECT 1";
}
@Override
public final String toString() {
return DatabaseConnector.class.getSimpleName() + ": " + getName();
}
}

42
src/trunk/org.gmodel.connector.database/src/org/gmodel/connector/database/ConnectionMetadata.java

@ -0,0 +1,42 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Gmodel.
*
* The Initial Developer of the Original Code is
* Sofismo AG (Sofismo).
* Portions created by the Initial Developer are
* Copyright (C) 2009-2011 Sofismo AG.
* All Rights Reserved.
*
* Contributor(s):
* Andrew Shewring
* ***** END LICENSE BLOCK ***** */
package org.gmodel.connector.database;
public interface ConnectionMetadata {
DatabaseConnector getConnector();
String getHostname();
int getPort();
String getDatabaseName();
String getUsername();
String getPassword();
}

48
src/trunk/org.gmodel.connector.database/src/org/gmodel/connector/database/DatabaseConnector.java

@ -0,0 +1,48 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Gmodel.
*
* The Initial Developer of the Original Code is
* Sofismo AG (Sofismo).
* Portions created by the Initial Developer are
* Copyright (C) 2009-2011 Sofismo AG.
* All Rights Reserved.
*
* Contributor(s):
* Andrew Shewring
* ***** END LICENSE BLOCK ***** */
package org.gmodel.connector.database;
/**
* Basic abstraction for a database driver
*/
public interface DatabaseConnector {
String getName();
String getDialect();
String getDriverClass();
int getDefaultPort();
/**
* SQL statement for testing the database connection
*/
String getTestSqlStatement();
String createConnectionUrl(String hostname, int port, String databaseName);
}

176
src/trunk/org.gmodel.connector.database/src/org/gmodel/connector/database/DatabaseConnectorSupport.java

@ -0,0 +1,176 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Gmodel.
*
* The Initial Developer of the Original Code is
* Sofismo AG (Sofismo).
* Portions created by the Initial Developer are
* Copyright (C) 2009-2011 Sofismo AG.
* All Rights Reserved.
*
* Contributor(s):
* Andrew Shewring
* ***** END LICENSE BLOCK ***** */
package org.gmodel.connector.database;
import java.sql.Connection;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.ISafeRunnable;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.SafeRunner;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;
// Change methods to instance methods, and inject this class into the RDBRepository
public class DatabaseConnectorSupport {
private static final String TYPE_EXTENSION_ID = "org.gmodel.connector.database.type";
private static final Comparator<DatabaseConnector> BY_NAME_COMPARATOR = new Comparator<DatabaseConnector>() {
public int compare(final DatabaseConnector lhs, final DatabaseConnector rhs) {
final String lhsName = lhs.getName();
final String rhsName = rhs.getName();
return lhsName.compareTo(rhsName);
}
};
public static List<DatabaseConnector> getAvailableConnectors() {
final List<DatabaseConnector> result = new ArrayList<DatabaseConnector>();
final IConfigurationElement[] config = Platform.getExtensionRegistry()
.getConfigurationElementsFor(TYPE_EXTENSION_ID);
try {
for (final IConfigurationElement e : config) {
final Object o = e.createExecutableExtension("class");
if (o instanceof DatabaseConnector) {
final ISafeRunnable runnable = new ISafeRunnable() {
public void handleException(final Throwable exception) {
System.out.println("Exception in client");
}
public void run() throws Exception {
final DatabaseConnector connector = (DatabaseConnector) o;
result.add(connector);
}
};
SafeRunner.run(runnable);
}
}
} catch (final CoreException ex) {
System.out.println(ex.getMessage());
}
Collections.sort(result, BY_NAME_COMPARATOR);
return result;
}
public static String testConnection(final DatabaseConnector connector,
final String hostname,
final int port,
final String databaseName,
final String username,
final String password) {
final Configuration configuration = buildConfiguration(connector, hostname, port, databaseName, username, password);
if (configuration == null) {
return "Could not make connection";
}
try {
final Connection connection = getConnection(configuration);
final Statement statement = connection.createStatement();
final String testSql = connector.getTestSqlStatement();
statement.execute(testSql);
return null;
} catch (final Exception e) {
return e.getCause().getMessage();
}
}
public static DatabaseConnector getConnectorByName(final String name) {
if (name == null) {
return null;
}
final List<DatabaseConnector> list = getAvailableConnectors();
for (final DatabaseConnector connector : list) {
if (name.equals(connector.getName())) {
return connector;
}
}
return null;
}
public static Configuration buildConfiguration(final DatabaseConnector connector,
final String hostname,
final int port,
final String databaseName,
final String username,
final String password) {
try {
final Configuration config = new Configuration();
config.setProperty("hibernate.dialect", connector.getDialect());
config.setProperty("hibernate.connection.driver_class", connector.getDriverClass());
config.setProperty("hibernate.connection.url", connector.createConnectionUrl(hostname, port, databaseName));
config.setProperty("hibernate.connection.username", username);
config.setProperty("hibernate.connection.password", password);
config.setProperty("hibernate.default_schema", databaseName);
config.setProperty("hibernate.jdbc.batch_size", "50");
config.setProperty("hibernate.show_sql", "false");
return config;
} catch (final Exception e) {
return null;
}
}
public static DatabaseConnector getDefaultConnector() {
return new DatabaseConnectorSupport().new GenericConnector() {
private static final String CONNECTION_URL_PREFIX = "jdbc:db2j:net://";
@Override
public String createConnectionUrl(final String hostname, final int port, final String databaseName) {
return CONNECTION_URL_PREFIX + hostname + ":" + port + "/" + databaseName;
}
};
}
@SuppressWarnings("deprecation")
private static Connection getConnection(final Configuration configuration) {
final SessionFactory factory = configuration.buildSessionFactory();
final Session session = factory.openSession();
return session.connection();
}
class GenericConnector extends AbstractDatabaseConnector {
private static final String DRIVER_CLASS = "com.ibm.db2.jcc.DB2Driver";
private static final String DIALECT = "org.hibernate.dialect.DB2Dialect";
private static final int DEFAULT_PORT = 50000;
public GenericConnector() {
super("DB2", DRIVER_CLASS, DIALECT, DEFAULT_PORT);
}
}
}

7
src/trunk/org.gmodel.connector/.classpath

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>

28
src/trunk/org.gmodel.connector/.project

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.gmodel.connector</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

8
src/trunk/org.gmodel.connector/.settings/org.eclipse.jdt.core.prefs

@ -0,0 +1,8 @@
#Thu Dec 09 15:46:04 CET 2010
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.source=1.5

9
src/trunk/org.gmodel.connector/META-INF/MANIFEST.MF

@ -0,0 +1,9 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: org.gmodel.connector
Bundle-SymbolicName: org.gmodel.connector;singleton:=true
Bundle-Version: 1.0.0
Require-Bundle: org.gmodel.serialization;bundle-version="1.0.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Export-Package: org.gmodel.connector

4
src/trunk/org.gmodel.connector/build.properties

@ -0,0 +1,4 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.

10
src/trunk/org.gmodel.connector/pom.xml

@ -0,0 +1,10 @@
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.gmodel</groupId>
<artifactId>org.gmodel.eclipse</artifactId>
<version>1.0.0</version>
</parent>
<artifactId>org.gmodel.connector</artifactId>
<packaging>eclipse-plugin</packaging>
</project>

34
src/trunk/org.gmodel.connector/src/org/gmodel/connector/Component.java

@ -0,0 +1,34 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: SMTL 1.0
*
* The contents of this file are subject to the Sofismo Model Technology License Version
* 1.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.sofismo.ch/SMTL/
*
* Software distributed under the License is distributed on an "AS IS" basis.
* See the License for the specific language governing rights and limitations
* under the License.
*
* The Original Code is Gmodel Semantic Extensions Edition.
*
* The Initial Developer of the Original Code is
* Sofismo AG (Sofismo).
* Portions created by the Initial Developer are
* Copyright (C) 2009-2010 Sofismo AG.
* All Rights Reserved.
*
* Contributor(s):
* Jorn Bettin
* Chul Kim
* ***** END LICENSE BLOCK ***** */
package org.gmodel.connector;
import org.gmodel.serialization.serializer.ProtocolType;
public interface Component {
ProtocolType getProtocolType();
}

9
src/trunk/org.gmodel.documentation/.project

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.gmodel.documentation</name>
<comment></comment>
<buildSpec>
</buildSpec>
<natures>
</natures>
</projectDescription>

1
src/trunk/org.gmodel.documentation/README.txt

@ -0,0 +1 @@
This is a placeholder for a LaTeX project

BIN
src/trunk/org.gmodel.documentation/articles/0.1/Changing Repository.docx

Binary file not shown.

BIN
src/trunk/org.gmodel.documentation/articles/0.1/Introduction_to_the_gmodel_metalanguage/advanced_modelling_made_simple.synctex.gz

Binary file not shown.

BIN
src/trunk/org.gmodel.documentation/articles/0.1/Introduction_to_the_gmodel_metalanguage/emf_supersetreferences.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

40
src/trunk/org.gmodel.documentation/articles/0.1/Introduction_to_the_gmodel_metalanguage/introduction_to_the_gmodel_metalanguage.aux

@ -0,0 +1,40 @@
\relax
\@writefile{toc}{\contentsline {section}{\tocsection {}{1}{Introduction}}{1}}
\@writefile{toc}{\contentsline {section}{\tocsection {}{2}{Terminology}}{2}}
\@writefile{toc}{\contentsline {subsection}{\tocsubsection {}{2.1}{Model Theory}}{2}}
\@writefile{toc}{\contentsline {subsection}{\tocsubsection {}{2.2}{Denotational Semantics}}{3}}
\@writefile{toc}{\contentsline {subsection}{\tocsubsection {}{2.3}{Natural Language and Exchange of Artefacts}}{3}}
\@writefile{toc}{\contentsline {section}{\tocsection {}{3}{the Gmodel kernel}}{4}}
\@writefile{toc}{\contentsline {subsection}{\tocsubsection {}{3.1}{Instantiation}}{5}}
\@writefile{toc}{\contentsline {subsection}{\tocsubsection {}{3.2}{Surface notation}}{6}}
\@writefile{toc}{\contentsline {subsection}{\tocsubsection {}{3.3}{Model artefact storage}}{6}}
\@writefile{toc}{\contentsline {subsection}{\tocsubsection {}{3.4}{Interoperability with other modelling technologies}}{6}}
\@writefile{toc}{\contentsline {section}{\tocsection {}{4}{Emulating EMF Ecore in Gmodel}}{6}}
\@writefile{toc}{\contentsline {subsection}{\tocsubsection {}{4.1}{Representing the EMF Ecore metamodel in Gmodel artefacts}}{6}}
\@writefile{toc}{\contentsline {subsubsection}{\tocsubsubsection {}{4.1.1}{Defining the Ecore semantic domain}}{7}}
\@writefile{toc}{\contentsline {subsubsection}{\tocsubsubsection {}{4.1.2}{Representing the representation of Ecore in itself in Gmodel}}{7}}
\@writefile{toc}{\contentsline {subsection}{\tocsubsection {}{4.2}{Representing EMF Ecore models in Gmodel}}{7}}
\@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces Representation of super set references between EMF Ecore concepts}}{8}}
\newlabel{default}{{1}{8}}
\@writefile{toc}{\contentsline {subsection}{\tocsubsection {}{4.3}{Representing instances of EMF Ecore models in Gmodel}}{9}}
\@writefile{toc}{\contentsline {subsection}{\tocsubsection {}{4.4}{Representing instances of instances of EMF Ecore models in Gmodel}}{9}}
\@writefile{toc}{\contentsline {section}{\tocsection {}{5}{Interoperability between EMF Ecore and Gmodel}}{9}}
\@writefile{toc}{\contentsline {section}{\tocsection {}{6}{Advanced applications of multi-level instantiation}}{9}}
\@writefile{toc}{\contentsline {subsection}{\tocsubsection {}{6.1}{The bottomless pit of abstractions}}{9}}
\@writefile{toc}{\contentsline {subsection}{\tocsubsection {}{6.2}{Modelling of value chains in the context of mass customisation}}{10}}
\@writefile{toc}{\contentsline {section}{\tocsection {}{7}{Practical application of denotational semantics}}{10}}
\@writefile{toc}{\contentsline {section}{\tocsection {}{8}{scope management via visibilities}}{11}}
\@writefile{toc}{\contentsline {section}{\tocsection {}{9}{Gmodel compared to other technologies}}{11}}
\@writefile{toc}{\contentsline {subsection}{\tocsubsection {}{9.1}{Modelling technologies}}{11}}
\@writefile{toc}{\contentsline {subsubsection}{\tocsubsubsection {}{9.1.1}{Eclipse Modeling Framework Ecore}}{12}}
\@writefile{toc}{\contentsline {subsubsection}{\tocsubsubsection {}{9.1.2}{MetaEdit+}}{12}}
\@writefile{toc}{\contentsline {subsubsection}{\tocsubsubsection {}{9.1.3}{Research prototypes}}{12}}
\@writefile{toc}{\contentsline {subsubsection}{\tocsubsubsection {}{9.1.4}{Unified Modelling Language tools}}{12}}
\@writefile{toc}{\contentsline {subsection}{\tocsubsection {}{9.2}{Programming languages}}{12}}
\newlabel{tocindent-1}{0pt}
\newlabel{tocindent0}{0pt}
\newlabel{tocindent1}{24.94171pt}
\newlabel{tocindent2}{32.18062pt}
\newlabel{tocindent3}{0pt}
\@writefile{toc}{\contentsline {section}{\tocsection {}{10}{Overall contribution of Gmodel to Model Driven Interoperability}}{13}}
\@writefile{toc}{\contentsline {section}{\tocsection {}{11}{Conclusions}}{13}}

323
src/trunk/org.gmodel.documentation/articles/0.1/Introduction_to_the_gmodel_metalanguage/introduction_to_the_gmodel_metalanguage.log

@ -0,0 +1,323 @@
This is pdfTeXk, Version 3.1415926-1.40.9 (Web2C 7.5.7) (format=pdflatex 2009.1.5) 29 JUL 2010 10:28
entering extended mode
\write18 enabled.
%&-line parsing enabled.
**introduction_to_the_gmodel_metalanguage.tex
(./introduction_to_the_gmodel_metalanguage.tex
LaTeX2e <2005/12/01>
Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, german-x-2008-06-18, ngerman-x-2008-06-18, ancientgreek, ibycus, ar
abic, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danish, dutc
h, esperanto, estonian, farsi, finnish, french, galician, german, ngerman, mono
greek, greek, hungarian, icelandic, indonesian, interlingua, irish, italian, la
tin, lithuanian, mongolian, mongolian2a, bokmal, nynorsk, polish, portuguese, r
omanian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, turki
sh, ukenglish, ukrainian, uppersorbian, welsh, loaded.
(/usr/local/texlive/2008/texmf-dist/tex/latex/amscls/amsart.cls
Document Class: amsart 2004/08/06 v2.20
\linespacing=\dimen102
\normalparindent=\dimen103
\normaltopskip=\skip41
(/usr/local/texlive/2008/texmf-dist/tex/latex/amsmath/amsmath.sty
Package: amsmath 2000/07/18 v2.13 AMS math features
\@mathmargin=\skip42
For additional information on amsmath, use the `?' option.
(/usr/local/texlive/2008/texmf-dist/tex/latex/amsmath/amstext.sty
Package: amstext 2000/06/29 v2.01
(/usr/local/texlive/2008/texmf-dist/tex/latex/amsmath/amsgen.sty
File: amsgen.sty 1999/11/30 v2.0
\@emptytoks=\toks14
\ex@=\dimen104
))
(/usr/local/texlive/2008/texmf-dist/tex/latex/amsmath/amsbsy.sty
Package: amsbsy 1999/11/29 v1.2d
\pmbraise@=\dimen105
)
(/usr/local/texlive/2008/texmf-dist/tex/latex/amsmath/amsopn.sty
Package: amsopn 1999/12/14 v2.01 operator names
)
\inf@bad=\count79
LaTeX Info: Redefining \frac on input line 211.
\uproot@=\count80
\leftroot@=\count81
LaTeX Info: Redefining \overline on input line 307.
\classnum@=\count82
\DOTSCASE@=\count83
LaTeX Info: Redefining \ldots on input line 379.
LaTeX Info: Redefining \dots on input line 382.
LaTeX Info: Redefining \cdots on input line 467.
\Mathstrutbox@=\box26
\strutbox@=\box27
\big@size=\dimen106
LaTeX Font Info: Redeclaring font encoding OML on input line 567.
LaTeX Font Info: Redeclaring font encoding OMS on input line 568.
\macc@depth=\count84
\c@MaxMatrixCols=\count85
\dotsspace@=\muskip10
\c@parentequation=\count86
\dspbrk@lvl=\count87
\tag@help=\toks15
\row@=\count88
\column@=\count89
\maxfields@=\count90
\andhelp@=\toks16
\eqnshift@=\dimen107
\alignsep@=\dimen108
\tagshift@=\dimen109
\tagwidth@=\dimen110
\totwidth@=\dimen111
\lineht@=\dimen112
\@envbody=\toks17
\multlinegap=\skip43
\multlinetaggap=\skip44
\mathdisplay@stack=\toks18
LaTeX Info: Redefining \[ on input line 2666.
LaTeX Info: Redefining \] on input line 2667.
)
LaTeX Font Info: Try loading font information for U+msa on input line 407.
(/usr/local/texlive/2008/texmf-dist/tex/latex/amsfonts/umsa.fd
File: umsa.fd 2002/01/19 v2.2g AMS font definitions
)
(/usr/local/texlive/2008/texmf-dist/tex/latex/amsfonts/amsfonts.sty
Package: amsfonts 2001/10/25 v2.2f
\symAMSa=\mathgroup4
\symAMSb=\mathgroup5
LaTeX Font Info: Overwriting math alphabet `\mathfrak' in version `bold'
(Font) U/euf/m/n --> U/euf/b/n on input line 132.
)
\copyins=\insert233
\abstractbox=\box28
\listisep=\skip45
\c@part=\count91
\c@section=\count92
\c@subsection=\count93
\c@subsubsection=\count94
\c@paragraph=\count95
\c@subparagraph=\count96
\c@figure=\count97
\c@table=\count98
\abovecaptionskip=\skip46
\belowcaptionskip=\skip47
\captionindent=\dimen113
\thm@style=\toks19
\thm@bodyfont=\toks20
\thm@headfont=\toks21
\thm@notefont=\toks22
\thm@headpunct=\toks23
\thm@preskip=\skip48
\thm@postskip=\skip49
\thm@headsep=\skip50
\dth@everypar=\toks24
)
(/usr/local/texlive/2008/texmf-dist/tex/latex/geometry/geometry.sty
Package: geometry 2008/12/21 v4.2 Page Geometry
(/usr/local/texlive/2008/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 1999/03/16 v1.13 key=value parser (DPC)
\KV@toks@=\toks25
)
(/usr/local/texlive/2008/texmf-dist/tex/generic/oberdiek/ifpdf.sty
Package: ifpdf 2007/12/12 v1.6 Provides the ifpdf switch (HO)
Package ifpdf Info: pdfTeX in pdf mode detected.
)
(/usr/local/texlive/2008/texmf-dist/tex/generic/oberdiek/ifvtex.sty
Package: ifvtex 2008/11/04 v1.4 Switches for detecting VTeX and its modes (HO)
Package ifvtex Info: VTeX not detected.
)
\Gm@cnth=\count99
\Gm@cntv=\count100
\c@Gm@tempcnt=\count101
\Gm@bindingoffset=\dimen114
\Gm@wd@mp=\dimen115
\Gm@odd@mp=\dimen116
\Gm@even@mp=\dimen117
\Gm@dimlist=\toks26
(/usr/local/texlive/2008/texmf-dist/tex/xelatex/xetexconfig/geometry.cfg))
(/usr/local/texlive/2008/texmf-dist/tex/latex/ltxmisc/parskip.sty
Package: parskip 2001/04/09 non-zero parskip adjustments
LaTeX Warning: Command \@starttoc has changed.
Check if current package is valid.
) (/usr/local/texlive/2008/texmf-dist/tex/latex/graphics/graphicx.sty
Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
(/usr/local/texlive/2008/texmf-dist/tex/latex/graphics/graphics.sty
Package: graphics 2006/02/20 v1.0o Standard LaTeX Graphics (DPC,SPQR)
(/usr/local/texlive/2008/texmf-dist/tex/latex/graphics/trig.sty
Package: trig 1999/03/16 v1.09 sin cos tan (DPC)
)
(/usr/local/texlive/2008/texmf/tex/latex/config/graphics.cfg
File: graphics.cfg 2007/01/18 v1.5 graphics configuration of teTeX/TeXLive
)
Package graphics Info: Driver file: pdftex.def on input line 90.
(/usr/local/texlive/2008/texmf-dist/tex/latex/pdftex-def/pdftex.def
File: pdftex.def 2008/09/08 v0.04l Graphics/color for pdfTeX
\Gread@gobject=\count102
))
\Gin@req@height=\dimen118
\Gin@req@width=\dimen119
)
(/usr/local/texlive/2008/texmf-dist/tex/latex/amsfonts/amssymb.sty
Package: amssymb 2002/01/22 v2.2d
)
(/usr/local/texlive/2008/texmf-dist/tex/latex/oberdiek/epstopdf.sty
Package: epstopdf 2008/05/06 v1.7 Conversion with epstopdf on the fly (HO)
(/usr/local/texlive/2008/texmf-dist/tex/generic/oberdiek/infwarerr.sty
Package: infwarerr 2007/09/09 v1.2 Providing info/warning/message (HO)
)
(/usr/local/texlive/2008/texmf-dist/tex/latex/oberdiek/grfext.sty
Package: grfext 2007/09/30 v1.0 Managing graphics extensions (HO)
)
(/usr/local/texlive/2008/texmf-dist/tex/latex/oberdiek/kvoptions.sty
Package: kvoptions 2007/10/18 v3.0 Keyval support for LaTeX options (HO)
)
(/usr/local/texlive/2008/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
Package: pdftexcmds 2007/12/12 v0.3 LuaTeX support for pdfTeX utility functions
(HO)
Package pdftexcmds Info: LuaTeX not detected on input line 139.
)
Package grfext Info: Graphics extension search list:
(grfext) [.png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,.PNG,.PDF,.JPG,.JPE
G,.JBIG2,.JB2,.eps]
(grfext) \AppendGraphicsExtensions on input line 323.
)
(/usr/local/texlive/2008/texmf-dist/tex/latex/base/ifthen.sty
Package: ifthen 2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)
)
(./introduction_to_the_gmodel_metalanguage.aux)
\openout1 = `introduction_to_the_gmodel_metalanguage.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 32.
LaTeX Font Info: ... okay on input line 32.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 32.
LaTeX Font Info: ... okay on input line 32.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 32.
LaTeX Font Info: ... okay on input line 32.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 32.
LaTeX Font Info: ... okay on input line 32.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 32.
LaTeX Font Info: ... okay on input line 32.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 32.
LaTeX Font Info: ... okay on input line 32.
LaTeX Font Info: Try loading font information for U+msa on input line 32.
(/usr/local/texlive/2008/texmf-dist/tex/latex/amsfonts/umsa.fd
File: umsa.fd 2002/01/19 v2.2g AMS font definitions
)
LaTeX Font Info: Try loading font information for U+msb on input line 32.
(/usr/local/texlive/2008/texmf-dist/tex/latex/amsfonts/umsb.fd
File: umsb.fd 2002/01/19 v2.2g AMS font definitions
)
*geometry auto-detecting driver*
*geometry detected driver: pdftex*
-------------------- Geometry parameters
paper: a4paper
landscape: --
twocolumn: --
twoside: true
asymmetric: --
h-parts: 71.70166pt, 0.7\paperwidth , 107.55254pt (default)
v-parts: 101.40665pt, 0.7\paperheight , 152.11pt (default)
hmarginratio: 2:3
vmarginratio: 2:3
lines: --
heightrounded: --
bindingoffset: 0.0pt
truedimen: --
includehead: --
includefoot: --
includemp: --
driver: pdftex
-------------------- Page layout dimensions and switches
\paperwidth 597.50787pt
\paperheight 845.04684pt
\textwidth 418.25368pt
\textheight 591.5302pt
\oddsidemargin -0.56833pt
\evensidemargin 35.28255pt
\topmargin 7.13666pt
\headheight 8.0pt
\headsep 14.0pt
\footskip 12.0pt
\marginparwidth 90.0pt
\marginparsep 11.0pt
\columnsep 10.0pt
\skip\footins 7.0pt plus 11.0pt
\hoffset 0.0pt
\voffset 0.0pt
\mag 1000
\@twosidetrue \@mparswitchtrue
(1in=72.27pt, 1cm=28.45pt)
-----------------------
(/usr/local/texlive/2008/texmf-dist/tex/context/base/supp-pdf.tex
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count103
\scratchdimen=\dimen120
\scratchbox=\box29
\nofMPsegments=\count104
\nofMParguments=\count105
\everyMPshowfont=\toks27
\MPscratchCnt=\count106
\MPscratchDim=\dimen121
\MPnumerator=\count107
\everyMPtoPDFconversion=\toks28
) [1{/usr/local/texlive/2008/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
[2] [3]
LaTeX Font Warning: Font shape `OT1/cmss/m/it' in size <10> not available
(Font) Font shape `OT1/cmss/m/sl' tried instead on input line 154.
[4] [5] [6] <emf_supersetreferences.png, id=29, 600.2425pt x 423.5825pt>
File: emf_supersetreferences.png Graphic file (type png)
<use emf_supersetreferences.png>
Overfull \hbox (8.53766pt too wide) in paragraph at lines 208--209
[]
[]
[7]
Underfull \vbox (badness 4341) has occurred while \output is active []
[8 <./emf_supersetreferences.png>]
Overfull \hbox (2.72874pt too wide) in paragraph at lines 242--243
[]\OT1/cmr/m/n/10.95 With the na-tive en-cod-ing of Ecore em-u-lated by Gmodel
arte-facts, build-ing a bi-directional
[]
[9] [10] [11] [12] [13] (./introduction_to_the_gmodel_metalanguage.aux) )
Here is how much of TeX's memory you used:
2887 strings out of 493876
36758 string characters out of 1150569
94824 words of memory out of 3000000
5970 multiletter control sequences out of 10000+50000
11421 words of font info for 44 fonts, out of 3000000 for 5000
875 hyphenation exceptions out of 8191
34i,6n,31p,973b,293s stack positions out of 5000i,500n,10000p,200000b,50000s
</usr/
local/texlive/2008/texmf-dist/fonts/type1/bluesky/cm/cmbx10.pfb></usr/local/tex
live/2008/texmf-dist/fonts/type1/bluesky/cm/cmcsc10.pfb></usr/local/texlive/200
8/texmf-dist/fonts/type1/bluesky/cm/cmr10.pfb></usr/local/texlive/2008/texmf-di
st/fonts/type1/bluesky/cm/cmr8.pfb></usr/local/texlive/2008/texmf-dist/fonts/ty
pe1/bluesky/cm/cmr9.pfb></usr/local/texlive/2008/texmf-dist/fonts/type1/bluesky
/cm/cmssbx10.pfb></usr/local/texlive/2008/texmf-dist/fonts/type1/bluesky/cm/cms
si10.pfb></usr/local/texlive/2008/texmf-dist/fonts/type1/bluesky/cm/cmti10.pfb>
</usr/local/texlive/2008/texmf-dist/fonts/type1/bluesky/cm/cmtt10.pfb></usr/loc
al/texlive/2008/texmf-dist/fonts/type1/bluesky/ams/msam10.pfb>
Output written on introduction_to_the_gmodel_metalanguage.pdf (13 pages, 139544
bytes).
PDF statistics:
88 PDF objects out of 1000 (max. 8388607)
0 named destinations out of 1000 (max. 131072)
6 words of extra memory for PDF output out of 10000 (max. 10000000)

BIN
src/trunk/org.gmodel.documentation/articles/0.1/Introduction_to_the_gmodel_metalanguage/introduction_to_the_gmodel_metalanguage.pdf

Binary file not shown.

BIN
src/trunk/org.gmodel.documentation/articles/0.1/Introduction_to_the_gmodel_metalanguage/introduction_to_the_gmodel_metalanguage.synctex.gz

Binary file not shown.

339
src/trunk/org.gmodel.documentation/articles/0.1/Introduction_to_the_gmodel_metalanguage/introduction_to_the_gmodel_metalanguage.tex

@ -0,0 +1,339 @@
\documentclass[11pt]{amsart}
%\documentclass[11pt]{article}
\usepackage{geometry} % See geometry.pdf to learn the layout options. There are lots.
\geometry{a4paper} % ... or letterpaper or a5paper or ...
%\geometry{landscape} % Activate for for rotated page geometry
\usepackage[parfill]{parskip} % Activate to begin paragraphs with an empty line rather than an indent
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{epstopdf}
\DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}
\usepackage{ifthen}
\newboolean{showcomments}
\setboolean{showcomments}{true}
\ifthenelse{\boolean{showcomments}}
{\newcommand{\mynote}[2]{
\fbox{\bfseries\sffamily\scriptsize#1}
{\small$\blacktriangleright$\textsf{\emph{#2}}$\blacktriangleleft$}
}
}
{\newcommand{\mynote}[2]{}
}
\newcommand\tony[1]{\mynote{Tony}{#1}}
\newcommand\jorn[1]{\mynote{Jorn}{#1}}
\newcommand\todo[1]{\mynote{ToDo}{#1}}
\title{Introduction the Gmodel Meta-Language}
\author{Jorn Bettin, Tony Clark}
%\date{} % Activate to display a given date or no date
\begin{document}
\maketitle
\textit{Gmodel is a meta-language that has been designed from the ground up to enable specification and instantiation of modelling languages. Although a number of meta-languages can be used for this purpose, most provide no or only limited support for modular specifications of sets of complementary modelling languages. Gmodel addresses modularity and extensibility as primary concerns, and is based on a small number of language elements that have their origin in model theory and denotational semantics.}
\section{Introduction}
\textit {In order to increase awareness about the role that domain specific modeling languages can play in capturing, preserving, and exploiting knowledge in virtually all industries, it is necessary to establish a strong consensus on the fundamental values and principles that underpin the use of domain specific modeling languages.}
\begin{enumerate}
\item \textit{Reaching a strong consensus on fundamental values and principles for designing and using domain specific languages}
\item \textit{Progress towards interoperability between tools}
\end{enumerate}
-- KISS Initiative, 2009
The development of Gmodel relates to the second objective of the KISS initiative, and builds on the KISS results that have been achieved in 2009. In particular, Gmodel represents an attempt to provide explicit tool support for the full set of KISS principles:
\begin{enumerate}
\item \textit{The DSL must be meaningful to users}
\item \textit{The DSL should be cognitively efficient}
\item \textit{The DSL should have multiple notations where necessary}
\item \textit{DSLs should offer mechanisms for modularizing and integrating models}
\item \textit{The DSL should be supported by appropriate tooling}
\item \textit{There must be an economic imperative for the development of a DSL}
\item \textit{The DSL must not be polluted with implementation features}
\item \textit{Model processing must always be based on a formal DSL definition}
\item \textit{DSLs should be kept small through modularization and integration}
\end{enumerate}
Since the design of Gmodel rests on mathematical concepts from model theory and from the theory of denotational semantics, Gmodel can tap into established mathematical terminology, and the target audience for Gmodel includes modellers in all disciplines. Consistent with denotational semantics and with the third KISS principle, Gmodel completely separates the concern of representation from the concern of naming. This means that in contrast to most programming language specifications, the specification of Gmodel does not include a text-based concrete syntax.
The authors of Gmodel believe that modelling has the greatest value when performed by domain experts, and if modelling language design takes into account established domain notations. The challenge consists in providing a meta-language that enables the most experienced domain experts to define the notation for modelling in their field, whilst at the same time providing tool support for enforcing (and ideally guaranteeing) the adherence to KISS modelling language design principles.
\section{Terminology}
Modellers are not in the business of inventing new terminology, they are in the business of identifying concepts and links between concepts that are useful for a particular community of people -- usually scientists or professionals in a particular field. This approach to modelling is consistent with the Oxford American dictionary definition of modelling:
\begin{description}
\item [to model] devise a representation, especially a mathematical one of (a phenomenon or system)
\end{description}
The mathematical definitions in model theory make use of the concepts of sets and graphs.
\begin{description}
\item [set] definition to be inserted
\item [ordered pair] definition to be inserted
\item [ordered set] definition to be inserted
\item [graph] definition to be inserted (edge, vertex)
\end{description}
\subsection{Model Theory}
Model theory provides a mathematical basis for the field of modelling, and it defines precise terminology for reasoning about models:
\begin{description}
\item [structure] definition to be inserted (domain, constant elements, relation symbols, function symbols)
\item [signature] definition to be inserted
\item [substructure] definition to be inserted
\item [term] definition to be inserted
\item [formula] definition to be inserted
\item [variable] definition to be inserted
\item [language] definition to be inserted
\item [cardinality] definition to be inserted
\item [sentence] definition to be inserted
\item [theory] definition to be inserted
\item [model] definition to be inserted
\end{description}
This terminology and the associated mathematical theory has heavily influenced the design of Gmodel.
\subsection{Denotational Semantics}
The second source of influence on Gmodel is denotational semantics, in particular the following terminology is used in the specification of Gmodel:
\begin{description}
\item [semantic domain] definition to be inserted
\item [semantic identity] definition to be inserted
\end{description}
One advantage of using established mathematical terminology to describe Gmodel is a low risk of terminological confusion with concepts from the Meta Object Facility (MOF), a popular meta-language that is steeped in object orientation, and with concepts from related implementations such as the Eclipse Modeling Framework Ecore language. This benefit immediately becomes apparent when discussing the representation of Ecore in Gmodel. A second advantage of using the above terminology is the ability to reason about Gmodel in mathematical terms, without the need for any linguistic gymnastics.
\subsection{Natural Language and Exchange of Artefacts}
In addition to mathematics, Gmodel terminology draws on concepts that have shaped the development of natural language, and the way in which humans perform work and exchange artefacts -- including abstract ideas. In relation to the latter, and in accordance with the second KISS principle, the design of Gmodel takes into account human cognitive abilities and limitations.
\begin{description}
\item [language artefact] A \emph{container of information} that:
\begin{enumerate}
\item{is \emph{created by a specific actor} (human or a system)}
\item{is \emph{consumed by at least one actor} (human or system)}
\item{represents a \emph{natural unit of work} (for the creating and consuming actors)}
\item{\emph{may contain links to other language artefacts}}
\item{\emph{has a state and a lifecycle}}
\end{enumerate}
\item [model artefact] A language artefact that meets the following criteria:
\begin{enumerate}
\item{It is \emph{created with the help of a software program} that enforces specific instantiation semantics (quality related constraints)}
\item{The information contained in a model artefact \emph{can be easily processed by software programs} (in particular transformation languages)}
\item{\emph{Referential integrity between model artefacts is preserved at all times} with the help of a software program (otherwise the necessary level of completeness and consistency is neither adequate for automated processing nor for domain experts making business decisions based on artefact content)}
\item{\emph{No circular links between model artefacts are allowed at any time} (a prerequisite for true modularity and maintainability of artefacts)}
\item{The \emph{lifecycle of a model artefact is described in a state machine} (allowing artefact completeness and quality assurance steps to be incorporated into the artefact definition)}
\end{enumerate}
\item [instance] A set that \emph{seems to contain} one and only one element at any given point in time from the \emph{view point} of a specific \emph{actor}
\item [instantiation function] A function that returns an \emph{instance} -- sometimes instantiation functions are also called \emph{concretisation functions}
\item [visibility] Visibilities are links between model artefacts that set the \emph{architectural context} for artefact \emph{producers} by declaring the model artefacts that can be used as inputs for the creation of specific kinds of model artefacts
\item [producer] An \emph{actor} that creates \emph{language artefacts}
\item [consumer] An \emph{actor} that consumes \emph{language artefacts}
\item [value chain] definition to be inserted (system, actors, derivation)
\end{description}
\section{the Gmodel kernel}
The Gmodel kernel is a semantic domain consisting of a set of semantic identities that reify the concepts of ordered pair, ordered set, and graph -- the latter consisting of a set of vertices and a set of edges. To facilitate extensibility and multi-level instantiation, the encoding of the Gmodel kernel is entirely expressed in Gmodel semantic identities, and each semantic identity in the kernel is defined as an instance of itself, and as a sub set of the next simpler semantic identity in the kernel.
\mynote{ToDo}{This section would benefit from a simple model (diagram) of the kernel. It would also benefit from an example of the application of the kernel for a simple language (or perhaps just a ground model). In general, the descriptions in the paper are clear, but are at an abstract level. The paper would benefit from concrete examples of the key points. I don't think these need to be very extensive, but they need to be consistent with each other.}
The generic term to refer to any semantic identity that is expressed in Gmodel is the \emph{set}. The simplest semantic identity is the \emph{ordered pair}. Ordered pairs are used to define \emph{ordered sets} and \emph{graphs}. Much of the power and simplicity of Gmodel has its origin the specific encoding chosen for graphs. Instead of consisting of a set of vertices and a set of edges, a Gmodel graph is encoded as a set of vertices and several complementary ordered sets of \emph{links}:
\begin{description}
\item [edges] links between two \emph{sets} with a dedicated \emph{edge end} for each connected set
\item [super set references] directed links from a \emph{sub set} to a \emph{super set}
\item [visibilities] directed links from one \emph{sub graph} to another \emph{sub graph}
\item [edge traces] directed links from one \emph{edge} to another \emph{edge}
\end{description}
The Gmodel \emph{vertex} and all four types of \emph{links} are encoded as \emph{sub sets} of \emph{graph}. In order to serve as a meta-language, edge ends are decorated with variables for \emph{minimum cardinality} and \emph{maximum cardinality}, as well as variables that represent the direction of \emph{navigability} of edges and a notion of \emph{containment} relating to the connected set.
\subsection{Instantiation}
A modeller may use the \emph{instantiation} function of Gmodel kernel to create representations of vertices and links. Since vertices are encoded as a sub set of graph -- and hence enable the representation of nested abstractions, vertices are well positioned to serve as the unit of modularity in Gmodel. Using the terminology introduced above, vertices play the role of \emph{model artefacts}, and in the context of Gmodel (modelling), are simply referred to as \emph{artefacts}.
Links between artefacts are also encoded as a sub set of graph, and therefore are also capable of representing nested abstractions by containing sets of vertices and sets of links. Links between two artefacts are always contained in the artefact that contains the first of the two artefacts connected by the link, which is one of the constraints that allows Gmodel to fulfil the fourth criteria of the definition of model artefact -- effectively enforcing much stronger rules regarding modularity than the minimum expectations set by KISS principles (4) and (9).
The most powerful feature of Gmodel instantiation is the ability to decorate any Gmodel artefact with \emph{instantiation semantics} (or \emph{concretisation} semantics) relating to representations of less abstract (or more \emph{concrete}) sets, such that the artefact becomes \emph{instantiable}. The instantiation semantics available in the Gmodel kernel boil down to the variables for \emph{cardinalities}, \emph{navigability}, and \emph{containment} that are part of all \emph{edge ends} of Gmodel edges. Thus, on the one hand, by excluding any circular links between artefacts, Gmodel imposes heavy constrains on the models that can be created, but on the other hand, Gmodel allows an unlimited degree of freedom with respect to the number of instantiation levels.
Gmodel does not mandate a layered metamodel architecture. Our modelling experience in software intensive industries has taught us that the model pattern known as the \emph{power type pattern} in object orientation occurs pervasively in highly configurable systems. The power type pattern is a technical kludge that forces the fragmentation of semantic identities, and it clearly demonstrates the limits of the object oriented paradigm -- which is currently still treated as dogma by many software engineers. By allowing multi-level instantiation, the need for the power type pattern is eliminated, and the fragmentation of semantic identities can be avoided.
\subsection{Surface notation} The name Gmodel is motivated by the \emph{graph} concept, and all notations for visualising graphs are good candidates for a concrete syntax for Gmodel artefacts. In contrast, purely text-based representations are only practical for representing Gmodel artefacts with certain characteristics, such as artefacts with a low ratio of edges to vertices. Additionally, given that the main target audience for Gmodel consists of modellers in general -- as opposed to software engineers with a strong preference for working with formal text-based languages, there is no urgent need for developing a human readable purely text-based syntax.
The Gmodel open source project has no intention of reinventing XML or burdening the world with yet another XML-based but not-quite-human-readable syntax. The Gmodel API can easily be used to build graphical editors for Gmodel artefacts that are complemented with appropriate form-based representations of variables and their values. At this point in time Gmodel provides two complementary graphical surface notations for visualising model artefacts. A generic graphical editor that allows artefacts to be created and modified is currently under development.
\subsection{Model artefact storage} Gmodel internally uses a serialisation format that is not intended for human consumption, and it provides a binding of this serialisation format to relational database technologies. In particular Gmodel fulfils criteria (3) of the definition of model artefacts, and provides explicit support for the semantics of \emph{unkown} and the semantics of \emph{not applicable}. As needed, the serialisation format can be bound to alternative persistence mechanisms such as file systems, object databases or cloud database technologies.
In order to work with model artefacts, Gmodel includes a repository API that currently offers basic artefact search functionality, which will be significantly enhanced in future releases.
\subsection{Interoperability with other modelling technologies} There are two main ways of achieving interoperability between Gmodel and other modelling technologies. This article focuses on the level of profound semantic interoperability with other meta-languages that can be achieved by making use of multi-level instantiation to emulate "foreign" technologies. Gmodel also offers an alternative for partial and superficial interoperability via file based information exchange. Out of the box Gmodel includes integration with the Eclipse integrated development environment, and with the openArchitectureWare xPand template/transformation engine, putting text or code generation at the user's fingertips.
\section{Emulating EMF Ecore in Gmodel}
\subsection{Representing the EMF Ecore metamodel in Gmodel artefacts}
Gmodel clearly distinguishes between \emph{semantic domains} and \emph{models}. The former simply contain sets of \emph{semantic identities}, whereas the latter contain \emph{representations of semantic identities} from the view point of a particular \emph{actor}. In Gmodel no model can be constructed without referencing elements in the relevant underlying semantic domains.
\subsubsection{Defining the Ecore semantic domain} In Ecore the most generalised element is the EObject, and all other elements are part of a generalisation/specialisation hierarchy that starts with EObject. To respresent Ecore in Gmodel, the first step consists of instantiating the semantic domain \texttt{EcoreDomain}, which contains all the semantic identities that appear in Ecore. This step will be perceived as somewhat unusual by all those who are only familiar with the definition of text-based languages using EBNF-style grammars; as the concern of representation and the concern of naming are one and the same in such specifications.
The number of semantic identities required to represent Ecore is significantly larger than the number of elements that appear in the Ecore generalisation/specialisation hierarchy. Every instance of an EDataType, every instance of an EReference, every instance of an EAttribute, etc. that occurs in the encoding of Ecore in itself requires a corresponding semantic identity. Loosely speaking, everything that has a name in the encoding of Ecore in itself corresponds to a semantic identity.
\subsubsection{Representing the representation of Ecore in itself in Gmodel}
To prepare for the representation of Ecore in itself (the metametamodel level in the classical four layered metamodel architecture) in Gmodel, we instantiate a \emph{model artefact} (with meta element \emph{vertex}) based on the semantic identity \texttt{Ecore} that has been defined as part of the EcoreDomain in the previous step. Loosely speaking we now have an empty model artefact called "\texttt{Ecore}".
We can then proceed to add \emph{contained artefacts} (with meta element \emph{vertex}) to the \texttt{Ecore} artefact that correspond to the Ecore generalisation/specialisation hierarchy that starts with EObject. Once this is done we can represent the entire Ecore generalisation/specialisation hierarchy in the \texttt{Ecore} artefact using \emph{super set references}, and we can represent all instances of EReferences in the \texttt{Ecore} artefact within Gmodel.
Lastly we add all relevant \emph{variables} to the elements of the \texttt{Ecore} artefact, making use of appropriate \emph{semantic identities} from the \texttt{EcoreDomain}.
The whole process of representing Ecore in Gmodel is straightforward modelling in Gmodel, and requires no coding in a programming language.
\begin{figure}
\begin{center}
\includegraphics[width=150mm]{emf_supersetreferences}
\caption{Representation of super set references between EMF Ecore concepts}
\label{default}
\end{center}
\end{figure}
\subsection{Representing EMF Ecore models in Gmodel}
The representation of Ecore models (the metamodel level in the classical four layered metamodel architecture) in Gmodel follows the same pattern as the representation of Ecore in itself in Gmodel. First, appropriate semantic identities must be defined, and then the \texttt{Ecore} model artefact can be instantiated to obtain an empty model artefact. Note that above we instantiated a vertex to obtain a model artefact with the \texttt{Ecore} semantic identity, and now we are instantiating this model artefact.
Just as above, the next step consists of adding contained artefacts to the model artefact, this time however the meta elements of the contained artefacts correspond to Ecore concepts. Up to this point there is nothing special about using Gmodel. We could turn the table and proceed with very similar steps in EMF Ecore to obtain a reasonable representation of Gmodel -- "reasonable", because EMF actually lacks one instantiation level to provide a precise representation of Gmodel \emph{edges}. But instead of delving into the encoding details of Gmodel edges, the following step in encoding Ecore models is straightforward to follow, and clearly illustrates where multi-level instantiation plays a critical role.
\mynote{ToDo}{relevant Gmodel artefact visualisation(s).}
In Gmodel we can proceed to represent all instances of EReferences as demanded by the Ecore model we are emulating, and we can use the edges that Gmodel uses to connect EReference instances to the source and target instances of Eclass to record the cardinalities pertaining to the \emph{instantiability} of the model artefact. In a meta-language without multi-level instantiation we would already have hit rock-bottom at this point. We would have been able to express links between elements (which, depending on the meta-language, may be called "references", "associations", "relationships", "connections", "edges" or similar -- the name is immaterial), but we would not have been able to decorate these links with cardinalities etc., which constitute essential instantiation semantics for the next level of instantiation or concretisation.
\subsection{Representing instances of EMF Ecore models in Gmodel}
Given the explanations above, it is obvious how to proceed to instantiate Ecore models
(the model level in the classical four layered metamodel architecture) in Gmodel.
\mynote{ToDo}{relevant Gmodel artefact visualisation(s).}
\subsection{Representing instances of instances of EMF Ecore models in Gmodel}
In Gmodel there is no reason to stop modelling at the "model" level. If the modeller has invested in decorating a model artefact with instantiation semantics, Gmodel is capable of applying these semantics -- regardless of the level of instantiaton or concretisation.
In practical terms multi-level instantiation allows the modeller to instantiate operational data right down to the \emph{concrete} level (the instance level
in the classical four layered metamodel architecture) -- where Joe Bloggs owns life insurance policy number 123456. Given that industrial-strength relational database technology is the default storage format used by the Gmodel repository, navigating and maintaining large and databases or data warehouses is simply a matter using the Gmodel repository for naviation, and of using Gmodel's instantiation function.
\mynote{ToDo}{relevant Gmodel artefact visualisation(s).}
\section{Interoperability between EMF Ecore and Gmodel}
With the native encoding of Ecore emulated by Gmodel artefacts, building a bi-directional bridge between the two technologies has become a trivial task. The Ecore API can be used to systematically read EMF models (at the metamodel level and the model level in the classical four layered metamodel architecture), and the retrieved in-memory representations can be mechanically mapped to corresponding in-memory representations in the Ecore emulation within Gmodel.
Gmodel is a technology that allows the construction of model driven systems on a new scale, whereas EMF Ecore is a technology with an established user base and a vast array of useful transformation and generator components that facilitate the binding to popular Java implementation technologies. A bridge between Ecore and Gmodel can be driven by an event-based mechanism to create dynamic interoperability between the two technologies, opening up interesting avenues for model driven systems that exploit the strengths of both technologies.
\mynote{ToDo}{Having set up EMF in Gmodel, I'd suggest having a concrete example (however small) of an EMF model transformed to Gmodel and back again.}
\section{Advanced applications of multi-level instantiation}
\subsection{The bottomless pit of abstractions}
Gmodel incorporates the insight from experienced modellers that there is no absolute rock-bottom \emph{concrete} level of models. Life insurance policy number 123456 only looks like an instance from the view point of the average policy holder. From the view point of the insurer a specific version of the policy that is active for a certain interval is a more appropriate perception of \emph{instance}. And, in case in 2020 Joe Bloggs decides to shift his entire life into n virtual worlds (given the track record of software technology, who would want to put all eggs in one basket ;-), his view point will shift. Life insurance policy number 123456 in Second Life may be considered to be one instance, and the corresponding policy representation in Third Life may be considered to be a different instance -- perhaps the currency in which premiums are being paid is different in each of the virtual worlds.
\subsection{Modelling of value chains in the context of mass customisation}
If the above sounds far fetched, analysing the typical evolution of technology products over a period of several years provides further motivation for multi-level instantiation. Since the 1970s software has been used as a tool to not only automate industrial production, but also to extend the degree to which technology products can be configured and customised without having to resort to manual manufacturing techniques. Mass customisation has become commonplace in many industries.
The evolution of a product over longer stretches of time can be modelled as a series of instantiation levels. Adding a new set of configuration options equates to adding additional \emph{variables} to an artefact that used to be perceived as an instance. What used to be called a product morphs into a \emph{product line}, and the new products are the instances of the product line, where each of the variables take on concrete \emph{values}. The view point of the customer usually remains unaffected, she still buys instances of a product.
Within a non-trivial value chain, the variables associated with a product line tend to be replaced by concrete values in a series of stages, so called \emph{binding times}. Each binding time is associated with a specific actor that is responsible for making \emph{decisions} regarding the values relating to a specific set of variables. In our experience multi-level instantiation is by far the simplest modelling technique for representing non-trivial value chains.
The alternative of using a purely object oriented design, in combination with the classical power type pattern, leads to system designs that are much more complex and much less maintainable than they could be. In particular the traditional distinction between design-time and run-time is a dangerous over-simplification that distracts from the need of proper \emph{value chain analysis} (also known as \emph{domain analysis} in the discipline of software product line engineering).
\section{Practical application of denotational semantics}
Since all model artefacts in Gmodel are constructed from semantic identities, and since semantic identities are the only Gmodel elements that have names, semantic identities offer a one-stop-shop for dealing with all aspects of naming. This greatly facilitates any required translation between different terminologies, and it even enables users to replace the names of the semantic identities in the Gmodel kernel. If a user prefers to call a vertex a node, or if she prefers to rename TRUE to FALSE and FALSE to TRUE, so be it. The role of modelling is representation and not naming.
Separating the concern of \emph{modelling} from the concern of \emph{naming} adds value precisely because good terminology \emph{is} so important. Each pair of collaborating actors in a value chain tends to have a preferred terminology or \emph{jargon} for their specific interactions, and such jargon is often a valuable tool for \emph{disambiguation}.
Without the systematic use of semantic identities, establishing interoperability across an entire value chain is significantly complicated. Names end up being used in the definition of protocols and artefacts, and the reliability of links between the participants in the value chain and communication across the links suffers accordingly.
It is worthwhile to note that semantic identities are not only applicable at the atomic level to define identities such as \emph{TRUE} and \emph{FALSE}, but are just as applicable to statements such as \emph{minimum cardinality = 1} or to aggregates such as the entire \texttt{Ecore} model artefact.
\section{scope management via visibilities}
Modularity and scope management go hand in hand. One without the other is of very little value. Gmodel requires users to be explicit about scope. A model artefact may not reference any element in other model artefacts unless these artfacts have been declared to be \emph{visible} from the first artefact. In contrast to most programming languages, declarations of visibility are not part of an artefact, but they are part of the \emph{parent artefact} in the so called \emph{artefact containment tree}.
The parent artefact has the responsibility of providing the \emph{architectural context} for all the artefacts that it contains. The authors of Gmodel consider it to be good modelling practice to associate every artefact with a producer, and to identify and name the binding time that is associated with the instantiation of an artefact. Experience from many large-scale software system development initiatives has consistently confirmed the usefulness of this approach to system analysis and modularisation.
The encoding of Ecore in Gmodel required the declaration of a small number of visibilities, but there are much better practical examples that can be used to demonstrate the value of scope management via visibilities -- a topic that goes beyond the scope of this paper.
Visibilities offer significant value to intensive users of EMF, as Ecore lacks a corresponding facility. By switching from the native implementation of Ecore to the Gmodel \texttt{Ecore} emulation, EMF users gain access to the use of visibilities, and hence obtain a powerful tool for actively managing/restricting the dependencies in large-scale Java component architectures.
\section{Gmodel compared to other technologies}
\subsection{Modelling technologies}
The level of interoperability between current domain specific modelling tools is comparable to the level of interoperability between CASE tools in the 90s. To increase the popularity of model based approaches, this needs to change. The assumption that all parties in a global software supply chain will use identical tooling is simply not realistic.
\subsubsection{Eclipse Modeling Framework Ecore}
In this paper we have illustrated how Gmodel can be used to emulate the Ecore technology, and conversely we have highlighted some of the limits of Ecore, in particular the lack of support for multi-level instantiation.
\subsubsection{MetaEdit+}
MetaEdit+ is mature metamodelling and modelling environment that compares favourably with the Eclipse Modelling Framework. In particular the metametamodel of MetaEdit+ is simpler than the metametamodel used by EMF, without any sacrifice in expressive power. But just as EMF, MetaEdit+ follows the four layered metamodel architecture dogma and does not offer multi-level instantiation. As a result MetaEdit+ runs into the same limitation that EMF runs into when attempting to emulate "foreign" modelling technologies.
Similar to Gmodel, MetaEdit+ relies on database technology rather than a file system for the storage of model artefacts, enabling modellers to build large-scale model driven systems, but without explicit scope management facilities.
\subsubsection{Research prototypes}
We are aware of at least three modelling technology prototypes with some form of multi-level instantiation capablity. It would be extremely interesting to compare the design of Gmodel with the design of these prototype technologies.
\subsubsection{Unified Modelling Language tools}
The main target audience of UML consists of software professionals who have an interest in visualising code, especially object oriented code. Most UML tools only offer very limited -- if any -- functionality for instantiating models that users have created. Since UML is based on the Meta Object Facility (and on Ecore or similar implementations), UML tools are affected by the kinds of limitations discussed in this paper in relation to Ecore.
\subsection{Programming languages}
There are several programming languages that offer multi-level instantiation, and there are also a number of programming languages that are based on denonational semantics, such as LISP or REBOL. Whilst these language have expressive power that is comparable to Gmodel, they don't offer the limitations and constraints that have consciously been built into Gmodel.
Programming language designers approach language design from a view point that differs significantly from the view point of a modeller.
\begin{enumerate}
\item{A programming language is designed to be executable on a specific platform, and the imlementations of programming languages are optimised with respect to using the resources offered by the platform}
\item{is \emph{consumed by at least one actor} (human or system)}
\item{represents a \emph{natural unit of work} (for the creating and consuming actors)}
\item{\emph{may contain links to other language artefacts}}
\item{\emph{has a state and a lifecycle}}
\end{enumerate}
\section{Overall contribution of Gmodel to Model Driven Interoperability}
\mynote{ToDo}{a clear statement of contribution. This is missing and should be at least a para by itself (if not a short section). I think that the contribution follows from the problem analysis and the ways in which Gmodel can solve the problems where other technologies cannot (or can do so in limited ways). Therefore, I'd suggest that the contribution includes: simplicity; using established abstractions; multiple meta-levels; modularity.}
In contrast to many other modelling technologies Gmodel makes no assumption about the implementation and legacy technologies that modellers are going to drive from their model artefacts. The Gmodel kernel is highly portable. It is articulated using the concepts presented in this paper, and makes use of the Java programming language to bootstrap the nine kernel concepts of \emph{ordered pair, ordered set, graph, vertex, edge, edge end, super set reference, visibility}, and \emph{edge trace} -- but without exposing the Java type system in the core API, whilst restricting internal use of Java types to a handful: \texttt{boolean}, \texttt{int}, \texttt{List}, \texttt{Iterator}, \texttt{UUID}, and \texttt{String}.
Furthermore, Gmodel is not limited to the four layered metamodel architecture. This opens up new approaches with respect to interoperability, since types -- and therefore interoperability patterns, can be encoded in Gmodel to any level of complexity.
\mynote{ToDo}{Perhaps a comparison of Gmodel with other modelling technologies? Particularly UML - again material can be plundered from the original KISS paper. A current state and further work para?}
\section{Conclusions}
\mynote{ToDo}{closing statements}
\end{document}

BIN
src/trunk/org.gmodel.documentation/articles/0.1/advanced_modelling_made_simple.zip

Binary file not shown.

1670
src/trunk/org.gmodel.documentation/articles/0.1/advanced_modelling_made_simple/acm/acm_proc_article-sp.cls

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save