[Jiemamy-notify] commit [1968] 依存関係の整理。 /

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2008年 9月 28日 (日) 19:24:28 JST


Revision: 1968
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=jiemamy&view=rev&rev=1968
Author:   daisuke_m
Date:     2008-09-28 19:24:28 +0900 (Sun, 28 Sep 2008)

Log Message:
-----------
依存関係の整理。 /
FactoryStrategyの導入。

Modified Paths:
--------------
    artemis/trunk/org.jiemamy.composer/META-INF/MANIFEST.MF
    artemis/trunk/org.jiemamy.composer/pom.xml
    artemis/trunk/org.jiemamy.composer/src/test/java/org/jiemamy/composer/importer/DatabaseImporterTest.java
    artemis/trunk/org.jiemamy.core/META-INF/MANIFEST.MF
    artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/model/JiemamyModelFactory.java
    artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/model/RootModelImpl.java
    artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/model/node/TableModelImpl.java
    artemis/trunk/org.jiemamy.core/src/main/resources/jiemamy-core.dicon
    artemis/trunk/org.jiemamy.core/src/test/resources/test.dicon
    artemis/trunk/org.jiemamy.dialect/META-INF/MANIFEST.MF
    artemis/trunk/org.jiemamy.dialect.mysql/META-INF/MANIFEST.MF
    artemis/trunk/org.jiemamy.dialect.postgresql/META-INF/MANIFEST.MF
    artemis/trunk/org.jiemamy.dialect.sql99/META-INF/MANIFEST.MF
    artemis/trunk/org.jiemamy.event/META-INF/MANIFEST.MF
    artemis/trunk/org.jiemamy.event/pom.xml
    artemis/trunk/org.jiemamy.event/src/test/java/org/jiemamy/core/event/SetterInterceptorTest.java
    artemis/trunk/org.jiemamy.event/src/test/java/org/jiemamy/core/model/node/TableModelTest.java
    artemis/trunk/org.jiemamy.serializer/META-INF/MANIFEST.MF
    artemis/trunk/org.jiemamy.view/META-INF/MANIFEST.MF
    artemis/trunk/org.jiemamy.view/pom.xml
    artemis/trunk/org.jiemamy.view/src/test/java/org/jiemamy/core/utils/processor/root/presentation/ResetBendpointProcessorTest.java
    artemis/trunk/org.jiemamy.view/src/test/java/org/jiemamy/core/utils/processor/root/presentation/SetColorProcessorTest.java
    artemis/trunk/org.jiemamy.view/src/test/java/org/jiemamy/core/utils/processor/root/presentation/SetConstraintProcessorTest.java
    vesta/trunk/org.jiemamy.eclipse/META-INF/MANIFEST.MF
    vesta/trunk/org.jiemamy.eclipse/pom.xml
    zeus/trunk/org.jiemamy.spec.core/src/main/java/org/jiemamy/spec/RootModelFactory.java
    zeus/trunk/org.jiemamy.spec.core/src/main/java/org/jiemamy/spec/model/node/TableModel.java

Added Paths:
-----------
    artemis/trunk/org.jiemamy.composer/src/main/java/org/jiemamy/core/
    artemis/trunk/org.jiemamy.composer/src/main/java/org/jiemamy/core/extension/
    artemis/trunk/org.jiemamy.composer/src/main/java/org/jiemamy/core/extension/composer/
    artemis/trunk/org.jiemamy.composer/src/main/java/org/jiemamy/core/extension/composer/ExportContextImpl.java
    artemis/trunk/org.jiemamy.composer/src/main/java/org/jiemamy/core/extension/composer/ImportContextImpl.java
    artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/S2FactoryStrategy.java
    artemis/trunk/org.jiemamy.event/src/main/resources/jiemamy-event.dicon
    zeus/trunk/org.jiemamy.spec.core/src/main/java/org/jiemamy/spec/DefaultFactoryStrategy.java
    zeus/trunk/org.jiemamy.spec.core/src/main/java/org/jiemamy/spec/FactoryStrategy.java

Removed Paths:
-------------
    artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/composer/
    artemis/trunk/org.jiemamy.event/src/main/resources/jiemamy-core-aop.dicon
    artemis/trunk/org.jiemamy.event/src/test/java/org/jiemamy/core/model/typedef/datatype/impl/


-------------- next part --------------
Modified: artemis/trunk/org.jiemamy.composer/META-INF/MANIFEST.MF
===================================================================
--- artemis/trunk/org.jiemamy.composer/META-INF/MANIFEST.MF	2008-09-28 07:20:06 UTC (rev 1967)
+++ artemis/trunk/org.jiemamy.composer/META-INF/MANIFEST.MF	2008-09-28 10:24:28 UTC (rev 1968)
@@ -6,7 +6,8 @@
 Bundle-ClassPath: .,
  lib/freemarker-2.3.11.jar
 Bundle-Vendor: Jiemamy Project
-Export-Package: org.jiemamy.composer.exporter
+Export-Package: org.jiemamy.composer.exporter,
+ org.jiemamy.core.extension.composer
 Require-Bundle: org.jiemamy.serializer,
  org.jiemamy.dialect,
  org.jiemamy.spec.core,

Modified: artemis/trunk/org.jiemamy.composer/pom.xml
===================================================================
--- artemis/trunk/org.jiemamy.composer/pom.xml	2008-09-28 07:20:06 UTC (rev 1967)
+++ artemis/trunk/org.jiemamy.composer/pom.xml	2008-09-28 10:24:28 UTC (rev 1968)
@@ -157,6 +157,11 @@
     </dependency>
     <dependency>
       <groupId>${project.groupId}</groupId>
+      <artifactId>org.jiemamy.spec.core</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
       <artifactId>org.jiemamy.core</artifactId>
       <version>${project.version}</version>
     </dependency>

Added: artemis/trunk/org.jiemamy.composer/src/main/java/org/jiemamy/core/extension/composer/ExportContextImpl.java
===================================================================
--- artemis/trunk/org.jiemamy.composer/src/main/java/org/jiemamy/core/extension/composer/ExportContextImpl.java	                        (rev 0)
+++ artemis/trunk/org.jiemamy.composer/src/main/java/org/jiemamy/core/extension/composer/ExportContextImpl.java	2008-09-28 10:24:28 UTC (rev 1968)
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others.
+ * Created on 2008/07/12
+ *
+ * This file is part of Jiemamy.
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific language
+ * governing permissions and limitations under the License.
+ */
+package org.jiemamy.core.extension.composer;
+
+import org.jiemamy.core.interpreter.AbstractContext;
+import org.jiemamy.spec.extension.composer.ExportContext;
+
+/**
+ * エクスポートを行う際のコンテキスト情報。
+ * 
+ * @author daisuke
+ */
+public class ExportContextImpl extends AbstractContext implements ExportContext {
+	
+	/**
+	 * {@inheritDoc}
+	 */
+	public <T>T getAdapter(Class<T> adapter) {
+		return null;
+	}
+	
+	/**
+	 * {@inheritDoc}
+	 */
+	public boolean hasAdapter(Class<?> adapter) {
+		return false;
+	}
+	
+}

Added: artemis/trunk/org.jiemamy.composer/src/main/java/org/jiemamy/core/extension/composer/ImportContextImpl.java
===================================================================
--- artemis/trunk/org.jiemamy.composer/src/main/java/org/jiemamy/core/extension/composer/ImportContextImpl.java	                        (rev 0)
+++ artemis/trunk/org.jiemamy.composer/src/main/java/org/jiemamy/core/extension/composer/ImportContextImpl.java	2008-09-28 10:24:28 UTC (rev 1968)
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others.
+ * Created on 2008/07/12
+ *
+ * This file is part of Jiemamy.
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific language
+ * governing permissions and limitations under the License.
+ */
+package org.jiemamy.core.extension.composer;
+
+import org.jiemamy.core.extension.dialect.DatabaseReadingContext;
+import org.jiemamy.core.interpreter.AbstractContext;
+import org.jiemamy.spec.extension.composer.ImportContext;
+
+/**
+ * インポートを行う際のコンテキスト情報。
+ * 
+ * @author daisuke
+ */
+public class ImportContextImpl extends AbstractContext implements ImportContext {
+	
+	/**
+	 * {@inheritDoc}
+	 */
+	@SuppressWarnings("unchecked")
+	public <T>T getAdapter(Class<T> adapter) {
+		if (adapter == DatabaseReadingContext.class) {
+			DatabaseReadingContext instance = null;
+			try {
+				instance = (DatabaseReadingContext) adapter.newInstance();
+				instance.setProperties(getProperties());
+			} catch (InstantiationException ignore) {
+				// ignore: return null
+			} catch (IllegalAccessException ignore) {
+				// ignore: return null
+			}
+			return (T) instance;
+		}
+		return null;
+	}
+	
+	/**
+	 * {@inheritDoc}
+	 */
+	public boolean hasAdapter(Class<?> adapter) {
+		if (adapter.isAssignableFrom(DatabaseReadingContext.class)) {
+			return true;
+		}
+		return false;
+	}
+	
+}

Modified: artemis/trunk/org.jiemamy.composer/src/test/java/org/jiemamy/composer/importer/DatabaseImporterTest.java
===================================================================
--- artemis/trunk/org.jiemamy.composer/src/test/java/org/jiemamy/composer/importer/DatabaseImporterTest.java	2008-09-28 07:20:06 UTC (rev 1967)
+++ artemis/trunk/org.jiemamy.composer/src/test/java/org/jiemamy/composer/importer/DatabaseImporterTest.java	2008-09-28 10:24:28 UTC (rev 1968)
@@ -32,9 +32,10 @@
 import org.junit.runner.RunWith;
 import org.seasar.framework.unit.Seasar2;
 
+import org.jiemamy.core.S2FactoryStrategy;
 import org.jiemamy.core.extension.composer.ImportContextImpl;
-import org.jiemamy.core.model.RootModelImpl;
 import org.jiemamy.core.utils.processor.root.GetTableProcessor;
+import org.jiemamy.spec.RootModelFactory;
 import org.jiemamy.spec.extension.composer.ImportContext;
 import org.jiemamy.spec.extension.composer.Importer;
 import org.jiemamy.spec.extension.dialect.Dialect;
@@ -91,7 +92,8 @@
 	 */
 	@Test
 	public void test01_DBからのインポートテスト() throws Exception {
-		RootModel rootModel = new RootModelImpl();
+		RootModel rootModel =
+				RootModelFactory.getInstance(new S2FactoryStrategy("jiemamy-core.dicon")).createInstance();
 		ImportContext ctx = new ImportContextImpl();
 		ctx.setValue(DatabaseImporter.DIALECT, dialect);
 		ctx.setValue(DatabaseImporter.DATABASE_NAME, "jpoll");

Modified: artemis/trunk/org.jiemamy.core/META-INF/MANIFEST.MF
===================================================================
--- artemis/trunk/org.jiemamy.core/META-INF/MANIFEST.MF	2008-09-28 07:20:06 UTC (rev 1967)
+++ artemis/trunk/org.jiemamy.core/META-INF/MANIFEST.MF	2008-09-28 10:24:28 UTC (rev 1968)
@@ -246,7 +246,6 @@
  org.hamcrest.core,
  org.hamcrest.internal,
  org.jiemamy.core,
- org.jiemamy.core.extension.composer,
  org.jiemamy.core.extension.dialect,
  org.jiemamy.core.extension.dialect.mapping,
  org.jiemamy.core.extension.dialect.parser,
@@ -260,6 +259,7 @@
  org.jiemamy.core.model.datatype,
  org.jiemamy.core.model.datatype.adapter,
  org.jiemamy.core.model.index,
+ org.jiemamy.core.model.node,
  org.jiemamy.core.model.typedef.constraint,
  org.jiemamy.core.model.typedef.datatype.impl,
  org.jiemamy.core.utils,

Added: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/S2FactoryStrategy.java
===================================================================
--- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/S2FactoryStrategy.java	                        (rev 0)
+++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/S2FactoryStrategy.java	2008-09-28 10:24:28 UTC (rev 1968)
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others.
+ * Created on 2008/09/26
+ *
+ * This file is part of Jiemamy.
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific language
+ * governing permissions and limitations under the License.
+ */
+package org.jiemamy.core;
+
+import org.seasar.framework.container.S2Container;
+import org.seasar.framework.container.factory.SingletonS2ContainerFactory;
+
+import org.jiemamy.spec.FactoryStrategy;
+import org.jiemamy.spec.exception.JiemamyRuntimeException;
+import org.jiemamy.spec.model.RootModel;
+
+/**
+ * TODO for daisuke
+ * @author daisuke
+ */
+public class S2FactoryStrategy implements FactoryStrategy {
+	
+	protected S2Container container;
+	
+
+	/**
+	 * コンストラクタ。
+	 * @param path 
+	 * @category instance creation
+	 */
+	public S2FactoryStrategy(String path) {
+		SingletonS2ContainerFactory.setConfigPath(path);
+		SingletonS2ContainerFactory.init();
+		container = SingletonS2ContainerFactory.getContainer();
+	}
+	
+	/**
+	 * {@inheritDoc}
+	 */
+	public RootModel createInstance() {
+		try {
+			return (RootModel) container.getComponent(RootModel.class);
+		} catch (Exception e) {
+			throw new JiemamyRuntimeException(e);
+		}
+	}
+}


Property changes on: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/S2FactoryStrategy.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Modified: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/model/JiemamyModelFactory.java
===================================================================
--- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/model/JiemamyModelFactory.java	2008-09-28 07:20:06 UTC (rev 1967)
+++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/model/JiemamyModelFactory.java	2008-09-28 10:24:28 UTC (rev 1968)
@@ -18,6 +18,9 @@
  */
 package org.jiemamy.core.model;
 
+import org.seasar.framework.container.S2Container;
+import org.seasar.framework.container.factory.SingletonS2ContainerFactory;
+
 import org.jiemamy.spec.exception.JiemamyRuntimeException;
 import org.jiemamy.spec.model.JiemamyModel;
 import org.jiemamy.spec.model.RootModel;
@@ -28,9 +31,26 @@
  */
 public class JiemamyModelFactory {
 	
+	static S2Container container;
+	
+	private static String diconPath = "jiemamy-core.dicon";
+	
+
+	public static void init() {
+		SingletonS2ContainerFactory.setConfigPath(diconPath);
+		SingletonS2ContainerFactory.init();
+		container = SingletonS2ContainerFactory.getContainer();
+	}
+	
+	public static void setConfigPath(String path) {
+		diconPath = path;
+		init();
+	}
+	
+	@SuppressWarnings("unchecked")
 	static <T extends JiemamyModel>T createNewInstance(RootModel rootModel, Class<T> clazz) {
 		try {
-			return clazz.newInstance();
+			return (T) container.getComponent(clazz);
 		} catch (Exception e) {
 			throw new JiemamyRuntimeException(e);
 		}

Modified: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/model/RootModelImpl.java
===================================================================
--- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/model/RootModelImpl.java	2008-09-28 07:20:06 UTC (rev 1967)
+++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/model/RootModelImpl.java	2008-09-28 10:24:28 UTC (rev 1968)
@@ -77,6 +77,14 @@
 	
 
 	/**
+	 * コンストラクタ。
+	 * @category instance creation
+	 */
+	public RootModelImpl() {
+		JiemamyModelFactory.init();
+	}
+	
+	/**
 	 * {@inheritDoc}
 	 */
 	public void appendModel(JiemamyModel jiemamyModel) {

Modified: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/model/node/TableModelImpl.java
===================================================================
--- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/model/node/TableModelImpl.java	2008-09-28 07:20:06 UTC (rev 1967)
+++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/model/node/TableModelImpl.java	2008-09-28 10:24:28 UTC (rev 1968)
@@ -110,6 +110,14 @@
 //	}
 	
 	/**
+	 * {@inheritDoc}
+	 */
+	public TableModel init(String tableName) {
+		setName(tableName);
+		return this;
+	}
+	
+	/**
 	 * テーブルCHECK制約のリストを設定する。
 	 * @param checks テーブルCHECK制約のリスト
 	 */

Modified: artemis/trunk/org.jiemamy.core/src/main/resources/jiemamy-core.dicon
===================================================================
--- artemis/trunk/org.jiemamy.core/src/main/resources/jiemamy-core.dicon	2008-09-28 07:20:06 UTC (rev 1967)
+++ artemis/trunk/org.jiemamy.core/src/main/resources/jiemamy-core.dicon	2008-09-28 10:24:28 UTC (rev 1968)
@@ -9,6 +9,8 @@
 	<component class="org.jiemamy.core.model.connection.ForeignKeyModelImpl" instance="prototype" autoBinding="none"/>
 	<component class="org.jiemamy.core.model.DomainModelImpl" instance="prototype" autoBinding="none"/>
 	<component class="org.jiemamy.core.model.dataset.InsertDataSetModelImpl" instance="prototype"/>
+	<component class="org.jiemamy.core.model.node.TableModelImpl" instance="prototype"/>
+	<component class="org.jiemamy.core.model.ColumnModelImpl" instance="prototype"/>
 
 	<!-- Modelの自動登録 -->
 	<!--

Modified: artemis/trunk/org.jiemamy.core/src/test/resources/test.dicon
===================================================================
--- artemis/trunk/org.jiemamy.core/src/test/resources/test.dicon	2008-09-28 07:20:06 UTC (rev 1967)
+++ artemis/trunk/org.jiemamy.core/src/test/resources/test.dicon	2008-09-28 10:24:28 UTC (rev 1968)
@@ -4,5 +4,4 @@
 <components>
 	<include path="aop.dicon"/>
 	<include path="jiemamy-core.dicon"/>
-	<component class="org.jiemamy.core.model.ApplicationModelCreator"/>
 </components>

Modified: artemis/trunk/org.jiemamy.dialect/META-INF/MANIFEST.MF
===================================================================
--- artemis/trunk/org.jiemamy.dialect/META-INF/MANIFEST.MF	2008-09-28 07:20:06 UTC (rev 1967)
+++ artemis/trunk/org.jiemamy.dialect/META-INF/MANIFEST.MF	2008-09-28 10:24:28 UTC (rev 1968)
@@ -6,8 +6,8 @@
 Bundle-ClassPath: .,
  lib/geronimo-jta_1.1_spec-1.0.jar
 Bundle-Vendor: Jiemamy Project
-Require-Bundle: org.jiemamy.core,
- org.jiemamy.spec.core
+Require-Bundle: org.jiemamy.spec.core,
+ org.jiemamy.core
 Eclipse-BuddyPolicy: registered
 Eclipse-RegisterBuddy: org.jiemamy.core
 Export-Package: org.jiemamy.dialect,

Modified: artemis/trunk/org.jiemamy.dialect.mysql/META-INF/MANIFEST.MF
===================================================================
--- artemis/trunk/org.jiemamy.dialect.mysql/META-INF/MANIFEST.MF	2008-09-28 07:20:06 UTC (rev 1967)
+++ artemis/trunk/org.jiemamy.dialect.mysql/META-INF/MANIFEST.MF	2008-09-28 10:24:28 UTC (rev 1968)
@@ -10,8 +10,8 @@
  lib/junit-4.4.jar
 Bundle-Vendor: Jiemamy Project
 Export-Package: org.jiemamy.dialect.mysql,org.jiemamy.dialect.mysql.parser,org.jiemamy.dialect.mysql.parser.expression
-Require-Bundle: org.jiemamy.core,
- org.jiemamy.dialect,
- org.jiemamy.spec.core
+Require-Bundle: org.jiemamy.spec.core,
+ org.jiemamy.core,
+ org.jiemamy.dialect
 Eclipse-BuddyPolicy: registered
 Eclipse-RegisterBuddy: org.jiemamy.core,org.jiemamy.dialect

Modified: artemis/trunk/org.jiemamy.dialect.postgresql/META-INF/MANIFEST.MF
===================================================================
--- artemis/trunk/org.jiemamy.dialect.postgresql/META-INF/MANIFEST.MF	2008-09-28 07:20:06 UTC (rev 1967)
+++ artemis/trunk/org.jiemamy.dialect.postgresql/META-INF/MANIFEST.MF	2008-09-28 10:24:28 UTC (rev 1968)
@@ -10,8 +10,8 @@
  lib/junit-4.4.jar
 Bundle-Vendor: Jiemamy Project
 Export-Package: org.jiemamy.dialect.postgresql
-Require-Bundle: org.jiemamy.core,
- org.jiemamy.dialect,
- org.jiemamy.spec.core
+Require-Bundle: org.jiemamy.spec.core,
+ org.jiemamy.core,
+ org.jiemamy.dialect
 Eclipse-BuddyPolicy: registered
 Eclipse-RegisterBuddy: org.jiemamy.core,org.jiemamy.dialect

Modified: artemis/trunk/org.jiemamy.dialect.sql99/META-INF/MANIFEST.MF
===================================================================
--- artemis/trunk/org.jiemamy.dialect.sql99/META-INF/MANIFEST.MF	2008-09-28 07:20:06 UTC (rev 1967)
+++ artemis/trunk/org.jiemamy.dialect.sql99/META-INF/MANIFEST.MF	2008-09-28 10:24:28 UTC (rev 1968)
@@ -10,8 +10,8 @@
  lib/junit-4.4.jar
 Bundle-Vendor: Jiemamy Project
 Export-Package: org.jiemamy.dialect.sql99,org.jiemamy.dialect.sql99.parser
-Require-Bundle: org.jiemamy.core,
- org.jiemamy.dialect,
- org.jiemamy.spec.core
+Require-Bundle: org.jiemamy.spec.core,
+ org.jiemamy.core,
+ org.jiemamy.dialect
 Eclipse-BuddyPolicy: registered
 Eclipse-RegisterBuddy: org.jiemamy.core,org.jiemamy.dialect

Modified: artemis/trunk/org.jiemamy.event/META-INF/MANIFEST.MF
===================================================================
--- artemis/trunk/org.jiemamy.event/META-INF/MANIFEST.MF	2008-09-28 07:20:06 UTC (rev 1967)
+++ artemis/trunk/org.jiemamy.event/META-INF/MANIFEST.MF	2008-09-28 10:24:28 UTC (rev 1968)
@@ -30,6 +30,7 @@
 Eclipse-BuddyPolicy: registered
 Eclipse-LazyStart: false
 Require-Bundle: org.jiemamy.spec.core,
- org.jiemamy.spec.event
+ org.jiemamy.spec.event,
+ org.jiemamy.core
 Export-Package: org.jiemamy.core.event,
  org.jiemamy.core.model.node

Modified: artemis/trunk/org.jiemamy.event/pom.xml
===================================================================
--- artemis/trunk/org.jiemamy.event/pom.xml	2008-09-28 07:20:06 UTC (rev 1967)
+++ artemis/trunk/org.jiemamy.event/pom.xml	2008-09-28 10:24:28 UTC (rev 1968)
@@ -215,11 +215,16 @@
       <artifactId>dom4j</artifactId>
       <version>1.6.1</version>
     </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>org.jiemamy.spec.core</artifactId>
-      <version>${project.version}</version>
-    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>org.jiemamy.spec.core</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>org.jiemamy.spec.event</artifactId>
+      <version>${project.version}</version>
+    </dependency>
   </dependencies>
   <reporting>
     <plugins>

Deleted: artemis/trunk/org.jiemamy.event/src/main/resources/jiemamy-core-aop.dicon
===================================================================
--- artemis/trunk/org.jiemamy.event/src/main/resources/jiemamy-core-aop.dicon	2008-09-28 07:20:06 UTC (rev 1967)
+++ artemis/trunk/org.jiemamy.event/src/main/resources/jiemamy-core-aop.dicon	2008-09-28 10:24:28 UTC (rev 1968)
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//SEASAR//DTD S2Container 2.4//EN"
-	"http://www.seasar.org/dtd/components24.dtd">
-<components>
-	<!-- ChangeEventを自動的に発火させるためのsetterInterceptor -->
-	<component name="setterInterceptor" class="org.jiemamy.core.event.SetterInterceptor"/>
-	<component class="org.jiemamy.core.model.node.TableModelImpl" instance="prototype">
-		<aspect pointcut="set.*">setterInterceptor</aspect> 
-	</component>
-	<component class="org.jiemamy.core.model.ColumnModelImpl" instance="prototype" autoBinding="none">
-		<aspect pointcut="set.*">setterInterceptor</aspect> 
-	</component>
-	<component class="org.jiemamy.core.model.index.IndexModelImpl" instance="prototype">
-		<aspect pointcut="set.*">setterInterceptor</aspect> 
-	</component>
-	<component class="org.jiemamy.core.model.constraint.CheckConstraintModelImpl" instance="prototype">
-		<aspect pointcut="set.*">setterInterceptor</aspect> 
-	</component>
-	
-	<!-- 自動登録されたModelへのsetterInterceptorの自動登録 -->
-	<!--
-	<component class="org.seasar.framework.container.autoregister.AspectAutoRegister">
-		<property name="interceptor">setterInterceptor</property>
-		<property name="pointcut">"set.*"</property>
-		<initMethod name="addClassPattern">
-			<arg>"org.jiemamy.core.model"</arg>
-			<arg>".*ModelImpl"</arg>
-		</initMethod>
-		<initMethod name="addIgnoreClassPattern">
-			<arg>"org.jiemamy.core.model"</arg>
-			<arg>"InheritanceColumnModel"</arg>
-		</initMethod>
-	</component>
-	-->
-</components>

Copied: artemis/trunk/org.jiemamy.event/src/main/resources/jiemamy-event.dicon (from rev 1963, artemis/trunk/org.jiemamy.event/src/main/resources/jiemamy-core-aop.dicon)
===================================================================
--- artemis/trunk/org.jiemamy.event/src/main/resources/jiemamy-event.dicon	                        (rev 0)
+++ artemis/trunk/org.jiemamy.event/src/main/resources/jiemamy-event.dicon	2008-09-28 10:24:28 UTC (rev 1968)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE components PUBLIC "-//SEASAR//DTD S2Container 2.4//EN"
+	"http://www.seasar.org/dtd/components24.dtd">
+<components>
+	<include path="jiemamy-core.dicon"/>
+	<!-- ChangeEventを自動的に発火させるためのsetterInterceptor -->
+	<component name="setterInterceptor" class="org.jiemamy.core.event.SetterInterceptor"/>
+	<component class="org.jiemamy.core.model.node.TableModelImpl" instance="prototype">
+		<aspect pointcut="set.*">setterInterceptor</aspect> 
+	</component>
+	<component class="org.jiemamy.core.model.ColumnModelImpl" instance="prototype" autoBinding="none">
+		<aspect pointcut="set.*">setterInterceptor</aspect> 
+	</component>
+	<component class="org.jiemamy.core.model.index.IndexModelImpl" instance="prototype">
+		<aspect pointcut="set.*">setterInterceptor</aspect> 
+	</component>
+	<component class="org.jiemamy.core.model.constraint.CheckConstraintModelImpl" instance="prototype">
+		<aspect pointcut="set.*">setterInterceptor</aspect> 
+	</component>
+	
+	<!-- 自動登録されたModelへのsetterInterceptorの自動登録 -->
+	<!--
+	<component class="org.seasar.framework.container.autoregister.AspectAutoRegister">
+		<property name="interceptor">setterInterceptor</property>
+		<property name="pointcut">"set.*"</property>
+		<initMethod name="addClassPattern">
+			<arg>"org.jiemamy.core.model"</arg>
+			<arg>".*ModelImpl"</arg>
+		</initMethod>
+		<initMethod name="addIgnoreClassPattern">
+			<arg>"org.jiemamy.core.model"</arg>
+			<arg>"InheritanceColumnModel"</arg>
+		</initMethod>
+	</component>
+	-->
+</components>

Modified: artemis/trunk/org.jiemamy.event/src/test/java/org/jiemamy/core/event/SetterInterceptorTest.java
===================================================================
--- artemis/trunk/org.jiemamy.event/src/test/java/org/jiemamy/core/event/SetterInterceptorTest.java	2008-09-28 07:20:06 UTC (rev 1967)
+++ artemis/trunk/org.jiemamy.event/src/test/java/org/jiemamy/core/event/SetterInterceptorTest.java	2008-09-28 10:24:28 UTC (rev 1968)
@@ -30,6 +30,9 @@
 import org.seasar.framework.container.factory.S2ContainerFactory;
 import org.seasar.framework.util.tiger.CollectionsUtil;
 
+import org.jiemamy.spec.DefaultFactoryStrategy;
+import org.jiemamy.spec.RootModelFactory;
+import org.jiemamy.spec.model.RootModel;
 import org.jiemamy.spec.model.node.TableModel;
 import org.jiemamy.spec.util.ModelChangeEvent;
 import org.jiemamy.spec.util.ModelChangeListener;
@@ -97,7 +100,8 @@
 	 */
 	@Test
 	public void test_S2管理下ではないインスタンスには反応しない() {
-		TableModel tableModel2 = new TableModelImpl();
+		RootModel rootModel = RootModelFactory.getInstance(new DefaultFactoryStrategy()).createInstance();
+		TableModel tableModel2 = rootModel.createJiemamyModel(TableModel.class).init("T_USER");
 		tableModel2.getAdapter(Observable.class).addModelChangeListener(listener);
 		tableModel2.setBeginScript("abc");
 		assertEquals(0, listener.eventHistory.size());

Modified: artemis/trunk/org.jiemamy.event/src/test/java/org/jiemamy/core/model/node/TableModelTest.java
===================================================================
--- artemis/trunk/org.jiemamy.event/src/test/java/org/jiemamy/core/model/node/TableModelTest.java	2008-09-28 07:20:06 UTC (rev 1967)
+++ artemis/trunk/org.jiemamy.event/src/test/java/org/jiemamy/core/model/node/TableModelTest.java	2008-09-28 10:24:28 UTC (rev 1968)
@@ -14,33 +14,27 @@
  */
 package org.jiemamy.core.model.node;
 
-import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 
-import java.util.ArrayList;
-import java.util.List;
-
 import org.junit.After;
 import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Test;
+import org.junit.runner.RunWith;
 import org.seasar.framework.container.S2Container;
 import org.seasar.framework.container.factory.S2ContainerFactory;
+import org.seasar.framework.unit.Seasar2;
 
 import org.jiemamy.core.event.SetterInterceptor;
-import org.jiemamy.core.event.collectionimpl.ObservableListTest;
-import org.jiemamy.spec.event.ObservableCollectionChangeEvent;
 import org.jiemamy.spec.model.ColumnModel;
 import org.jiemamy.spec.model.RootModel;
-import org.jiemamy.spec.model.constraint.CheckConstraintModel;
-import org.jiemamy.spec.model.index.IndexModel;
 import org.jiemamy.spec.model.node.TableModel;
-import org.jiemamy.spec.util.ModelChangeEvent;
 
 /**
  * {@link TableModelImpl}のテストクラス。
  * @author shin1ogawa
  */
+ @ RunWith(Seasar2.class)
 public class TableModelTest {
 	
 	static S2Container s2container;
@@ -56,16 +50,14 @@
 //		System.out.println(S2ContainerUtil.inspect(s2container));
 	}
 	
-
-	TableModelChangeListenerImpl listener;
+//	TableModelChangeListenerImpl listener;
 	
-
 	/**
 	 * Test用のListenerを作成する。
 	 */
 	@Before
 	public void setUp() {
-		listener = (new TableModelChangeListenerImpl());
+//		listener = (new TableModelChangeListenerImpl());
 	}
 	
 	/**
@@ -73,7 +65,7 @@
 	 */
 	@After
 	public void tearDown() {
-		listener = null;
+//		listener = null;
 	}
 	
 	/**
@@ -92,122 +84,121 @@
 	 */
 	@Test
 	public void test01() {
-		TableModel tableModel01 = (TableModel) s2container.getComponent(TableModel.class);
-		List<ColumnModel> columns = tableModel01.getColumns();
-		List<CheckConstraintModel> checks = tableModel01.getChecks();
-		List<IndexModel> indexes = tableModel01.getIndexes();
-		tableModel01.getAdapter(TableModelChangeSupport.class).addTableModelChangeListener(listener);
-		ColumnModel[] columnModels = ObservableListTest.newTestColumnModels(s2container);
-		// TableModelより取得したColumnModel用のCollectionに要素の追加を行う。
-		listener.clear();
-		columns.add(columnModels[0]);
-		columns.add(columnModels[1]);
-		columns.add(columnModels[2]);
-		assertEquals(6, listener.columnsEvents.size()); // 3*2(before/after)=6
-		assertEquals(0, listener.checksEvents.size());
-		assertEquals(0, listener.indexesEvents.size());
-		assertEquals(0, listener.tableEvents.size());
-		// TableModelの属性を変更する。
-		listener.clear();
-		tableModel01.setBeginScript("begin script");
-		assertEquals(0, listener.columnsEvents.size());
-		assertEquals(0, listener.checksEvents.size());
-		assertEquals(0, listener.indexesEvents.size());
-		assertEquals(1, listener.tableEvents.size()); // TableModelの属性変更イベント
-		// TableModelが保持するColumnModel用Collectionの中の要素に対して変更操作
-		listener.clear();
-		columnModels[1].setName("changedName");
-		assertEquals(1, listener.columnsEvents.size()); // CollectionChangeEventとして発火される。
-		assertEquals(0, listener.checksEvents.size());
-		assertEquals(0, listener.indexesEvents.size());
-		assertEquals(0, listener.tableEvents.size());
-		
-		// 上記ColumnModel用Collectionに対する操作を他のCollectionに対しても行う。
-		listener.clear();
-		CheckConstraintModel check01 = (CheckConstraintModel) s2container.getComponent(CheckConstraintModel.class);
-		checks.add(check01);
-		check01.setName("check_changedName");
-		check01.setExpression("check_expression");
-		IndexModel index01 = (IndexModel) s2container.getComponent(IndexModel.class);
-		indexes.add(index01);
-		index01.setName("index01");
-		assertEquals(0, listener.columnsEvents.size());
-		assertEquals(4, listener.checksEvents.size()); // checkの追加(before,after)+属性変更*2
-		assertEquals(3, listener.indexesEvents.size()); // indexの追加(before,after)+属性変更*1
-		assertEquals(0, listener.tableEvents.size());
+//		TableModel tableModel01 = (TableModel) s2container.getComponent(TableModel.class);
+//		List<ColumnModel> columns = tableModel01.getColumns();
+//		List<CheckConstraintModel> checks = tableModel01.getChecks();
+//		List<IndexModel> indexes = tableModel01.getIndexes();
+//		tableModel01.getAdapter(TableModelChangeSupport.class).addTableModelChangeListener(listener);
+//		ColumnModel[] columnModels = ObservableListTest.newTestColumnModels(s2container);
+//		// TableModelより取得したColumnModel用のCollectionに要素の追加を行う。
+//		listener.clear();
+//		columns.add(columnModels[0]);
+//		columns.add(columnModels[1]);
+//		columns.add(columnModels[2]);
+//		assertEquals(6, listener.columnsEvents.size()); // 3*2(before/after)=6
+//		assertEquals(0, listener.checksEvents.size());
+//		assertEquals(0, listener.indexesEvents.size());
+//		assertEquals(0, listener.tableEvents.size());
+//		// TableModelの属性を変更する。
+//		listener.clear();
+//		tableModel01.setBeginScript("begin script");
+//		assertEquals(0, listener.columnsEvents.size());
+//		assertEquals(0, listener.checksEvents.size());
+//		assertEquals(0, listener.indexesEvents.size());
+//		assertEquals(1, listener.tableEvents.size()); // TableModelの属性変更イベント
+//		// TableModelが保持するColumnModel用Collectionの中の要素に対して変更操作
+//		listener.clear();
+//		columnModels[1].setName("changedName");
+//		assertEquals(1, listener.columnsEvents.size()); // CollectionChangeEventとして発火される。
+//		assertEquals(0, listener.checksEvents.size());
+//		assertEquals(0, listener.indexesEvents.size());
+//		assertEquals(0, listener.tableEvents.size());
+//		
+//		// 上記ColumnModel用Collectionに対する操作を他のCollectionに対しても行う。
+//		listener.clear();
+//		CheckConstraintModel check01 = (CheckConstraintModel) s2container.getComponent(CheckConstraintModel.class);
+//		checks.add(check01);
+//		check01.setName("check_changedName");
+//		check01.setExpression("check_expression");
+//		IndexModel index01 = (IndexModel) s2container.getComponent(IndexModel.class);
+//		indexes.add(index01);
+//		index01.setName("index01");
+//		assertEquals(0, listener.columnsEvents.size());
+//		assertEquals(4, listener.checksEvents.size()); // checkの追加(before,after)+属性変更*2
+//		assertEquals(3, listener.indexesEvents.size()); // indexの追加(before,after)+属性変更*1
+//		assertEquals(0, listener.tableEvents.size());
 	}
 	
-
-	class TableModelChangeListenerImpl implements TableModelChangeListener {
-		
-		List<ModelChangeEvent> tableEvents = new ArrayList<ModelChangeEvent>();
-		
-		List<ObservableCollectionChangeEvent<List<CheckConstraintModel>, CheckConstraintModel>> checksEvents =
-				new ArrayList<ObservableCollectionChangeEvent<List<CheckConstraintModel>, CheckConstraintModel>>();
-		
-		List<ObservableCollectionChangeEvent<List<IndexModel>, IndexModel>> indexesEvents =
-				new ArrayList<ObservableCollectionChangeEvent<List<IndexModel>, IndexModel>>();
-		
-		List<ObservableCollectionChangeEvent<List<ColumnModel>, ColumnModel>> columnsEvents =
-				new ArrayList<ObservableCollectionChangeEvent<List<ColumnModel>, ColumnModel>>();
-		
-
-		/**
-		 * {@inheritDoc}
-		 */
-		public void checkCollectionChange(
-				ObservableCollectionChangeEvent<List<CheckConstraintModel>, CheckConstraintModel> event) {
-			System.out.println(String.format("checksへの変更Event:timing=%s,index=%d,checkName=%s", new Object[] {
-				event.getTiming().toString(),
-				event.getIndex(),
-				event.getModel().getName()
-			}));
-			checksEvents.add(event);
-		}
-		
-		/**
-		 * Eventの履歴を全て削除する。
-		 */
-		public void clear() {
-			columnsEvents.clear();
-			indexesEvents.clear();
-			tableEvents.clear();
-			checksEvents.clear();
-		}
-		
-		/**
-		 * {@inheritDoc}
-		 */
-		public void columnCollectionChange(ObservableCollectionChangeEvent<List<ColumnModel>, ColumnModel> event) {
-			System.out.println(String.format("columnsへの変更Event:timing=%s,index=%d,columnName=%s", new Object[] {
-				event.getTiming().toString(),
-				event.getIndex(),
-				event.getModel().getName()
-			}));
-			columnsEvents.add(event);
-		}
-		
-		/**
-		 * {@inheritDoc}
-		 */
-		public void indexCollectionChange(ObservableCollectionChangeEvent<List<IndexModel>, IndexModel> event) {
-			System.out.println(String.format("indexesへの変更Event:timing=%s,index=%d,indexName=%s", new Object[] {
-				event.getTiming().toString(),
-				event.getIndex(),
-				event.getModel().getName()
-			}));
-			indexesEvents.add(event);
-		}
-		
-		/**
-		 * {@inheritDoc}
-		 */
-		public void modelChanged(ModelChangeEvent event) {
-			System.out.println(String.format("TableModel自身への変更Event:hash=%s,field=%s", new Object[] {
-				Integer.toHexString(event.getSource().hashCode()),
-				event.getField().toString()
-			}));
-			tableEvents.add(event);
-		}
-	}
+//	class TableModelChangeListenerImpl implements TableModelChangeListener {
+//		
+//		List<ModelChangeEvent> tableEvents = new ArrayList<ModelChangeEvent>();
+//		
+//		List<ObservableCollectionChangeEvent<List<CheckConstraintModel>, CheckConstraintModel>> checksEvents =
+//				new ArrayList<ObservableCollectionChangeEvent<List<CheckConstraintModel>, CheckConstraintModel>>();
+//		
+//		List<ObservableCollectionChangeEvent<List<IndexModel>, IndexModel>> indexesEvents =
+//				new ArrayList<ObservableCollectionChangeEvent<List<IndexModel>, IndexModel>>();
+//		
+//		List<ObservableCollectionChangeEvent<List<ColumnModel>, ColumnModel>> columnsEvents =
+//				new ArrayList<ObservableCollectionChangeEvent<List<ColumnModel>, ColumnModel>>();
+//		
+//
+//		/**
+//		 * {@inheritDoc}
+//		 */
+//		public void checkCollectionChange(
+//				ObservableCollectionChangeEvent<List<CheckConstraintModel>, CheckConstraintModel> event) {
+//			System.out.println(String.format("checksへの変更Event:timing=%s,index=%d,checkName=%s", new Object[] {
+//				event.getTiming().toString(),
+//				event.getIndex(),
+//				event.getModel().getName()
+//			}));
+//			checksEvents.add(event);
+//		}
+//		
+//		/**
+//		 * Eventの履歴を全て削除する。
+//		 */
+//		public void clear() {
+//			columnsEvents.clear();
+//			indexesEvents.clear();
+//			tableEvents.clear();
+//			checksEvents.clear();
+//		}
+//		
+//		/**
+//		 * {@inheritDoc}
+//		 */
+//		public void columnCollectionChange(ObservableCollectionChangeEvent<List<ColumnModel>, ColumnModel> event) {
+//			System.out.println(String.format("columnsへの変更Event:timing=%s,index=%d,columnName=%s", new Object[] {
+//				event.getTiming().toString(),
+//				event.getIndex(),
+//				event.getModel().getName()
+//			}));
+//			columnsEvents.add(event);
+//		}
+//		
+//		/**
+//		 * {@inheritDoc}
+//		 */
+//		public void indexCollectionChange(ObservableCollectionChangeEvent<List<IndexModel>, IndexModel> event) {
+//			System.out.println(String.format("indexesへの変更Event:timing=%s,index=%d,indexName=%s", new Object[] {
+//				event.getTiming().toString(),
+//				event.getIndex(),
+//				event.getModel().getName()
+//			}));
+//			indexesEvents.add(event);
+//		}
+//		
+//		/**
+//		 * {@inheritDoc}
+//		 */
+//		public void modelChanged(ModelChangeEvent event) {
+//			System.out.println(String.format("TableModel自身への変更Event:hash=%s,field=%s", new Object[] {
+//				Integer.toHexString(event.getSource().hashCode()),
+//				event.getField().toString()
+//			}));
+//			tableEvents.add(event);
+//		}
+//	}
 }

Modified: artemis/trunk/org.jiemamy.serializer/META-INF/MANIFEST.MF
===================================================================
--- artemis/trunk/org.jiemamy.serializer/META-INF/MANIFEST.MF	2008-09-28 07:20:06 UTC (rev 1967)
+++ artemis/trunk/org.jiemamy.serializer/META-INF/MANIFEST.MF	2008-09-28 10:24:28 UTC (rev 1968)
@@ -21,9 +21,9 @@
  org.jiemamy.serializer.model.presentation,
  org.jiemamy.serializer.model.typedef,
  org.jiemamy.serializer.model.typedef.constraint
-Require-Bundle: org.jiemamy.core,
- org.jiemamy.spec.core,
+Require-Bundle: org.jiemamy.spec.core,
  org.jiemamy.spec.view,
+ org.jiemamy.core,
  org.jiemamy.view
 Eclipse-BuddyPolicy: registered
 Eclipse-RegisterBuddy: org.jiemamy.core

Modified: artemis/trunk/org.jiemamy.view/META-INF/MANIFEST.MF
===================================================================
--- artemis/trunk/org.jiemamy.view/META-INF/MANIFEST.MF	2008-09-28 07:20:06 UTC (rev 1967)
+++ artemis/trunk/org.jiemamy.view/META-INF/MANIFEST.MF	2008-09-28 10:24:28 UTC (rev 1968)
@@ -30,7 +30,8 @@
 Eclipse-BuddyPolicy: registered
 Eclipse-LazyStart: false
 Require-Bundle: org.jiemamy.spec.core,
- org.jiemamy.spec.view
+ org.jiemamy.spec.view,
+ org.jiemamy.core
 Export-Package: org.jiemamy.core.model.presentation,
  org.jiemamy.core.utils,
  org.jiemamy.core.utils.processor.root.presentation

Modified: artemis/trunk/org.jiemamy.view/pom.xml
===================================================================
--- artemis/trunk/org.jiemamy.view/pom.xml	2008-09-28 07:20:06 UTC (rev 1967)
+++ artemis/trunk/org.jiemamy.view/pom.xml	2008-09-28 10:24:28 UTC (rev 1968)
@@ -215,11 +215,21 @@
       <artifactId>dom4j</artifactId>
       <version>1.6.1</version>
     </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>org.jiemamy.spec.core</artifactId>
-      <version>${project.version}</version>
-    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>org.jiemamy.spec.core</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>org.jiemamy.spec.view</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>org.jiemamy.core</artifactId>
+      <version>${project.version}</version>
+    </dependency>
   </dependencies>
   <reporting>
     <plugins>

Modified: artemis/trunk/org.jiemamy.view/src/test/java/org/jiemamy/core/utils/processor/root/presentation/ResetBendpointProcessorTest.java
===================================================================
--- artemis/trunk/org.jiemamy.view/src/test/java/org/jiemamy/core/utils/processor/root/presentation/ResetBendpointProcessorTest.java	2008-09-28 07:20:06 UTC (rev 1967)
+++ artemis/trunk/org.jiemamy.view/src/test/java/org/jiemamy/core/utils/processor/root/presentation/ResetBendpointProcessorTest.java	2008-09-28 10:24:28 UTC (rev 1968)
@@ -28,6 +28,7 @@
 import org.junit.Ignore;
 import org.junit.Test;
 
+import org.jiemamy.spec.FactoryStrategy;
 import org.jiemamy.spec.RootModelFactory;
 import org.jiemamy.spec.geometory.JmPoint;
 import org.jiemamy.spec.model.RootModel;
@@ -58,7 +59,13 @@
 	 */
 	@Before
 	public void setUp() throws Exception {
-		rootModel = RootModelFactory.createInstance();
+		rootModel = RootModelFactory.getInstance(new FactoryStrategy() {
+			
+			public RootModel createInstance() {
+				return null;
+			}
+			
+		}).createInstance();
 		
 		empTableModel = rootModel.createJiemamyModel(TableModel.class);
 		empTableModel.setName("T_EMP");

Modified: artemis/trunk/org.jiemamy.view/src/test/java/org/jiemamy/core/utils/processor/root/presentation/SetColorProcessorTest.java
===================================================================
--- artemis/trunk/org.jiemamy.view/src/test/java/org/jiemamy/core/utils/processor/root/presentation/SetColorProcessorTest.java	2008-09-28 07:20:06 UTC (rev 1967)
+++ artemis/trunk/org.jiemamy.view/src/test/java/org/jiemamy/core/utils/processor/root/presentation/SetColorProcessorTest.java	2008-09-28 10:24:28 UTC (rev 1968)
@@ -28,6 +28,7 @@
 import org.junit.runner.RunWith;
 import org.seasar.framework.unit.Seasar2;
 
+import org.jiemamy.core.S2FactoryStrategy;
 import org.jiemamy.spec.RootModelFactory;
 import org.jiemamy.spec.geometory.JmColor;
 import org.jiemamy.spec.model.RootModel;
@@ -53,7 +54,7 @@
 	 */
 	@Before
 	public void setUp() throws Exception {
-		rootModel = RootModelFactory.createInstance();
+		rootModel = RootModelFactory.getInstance(new S2FactoryStrategy("jiemamy-view.dicon")).createInstance();
 		DiagramPresentationModel presentation = rootModel.createJiemamyModel(DiagramPresentationModel.class);
 		presentation.setName("テスト");
 		rootModel.appendModel(presentation);

Modified: artemis/trunk/org.jiemamy.view/src/test/java/org/jiemamy/core/utils/processor/root/presentation/SetConstraintProcessorTest.java
===================================================================
--- artemis/trunk/org.jiemamy.view/src/test/java/org/jiemamy/core/utils/processor/root/presentation/SetConstraintProcessorTest.java	2008-09-28 07:20:06 UTC (rev 1967)
+++ artemis/trunk/org.jiemamy.view/src/test/java/org/jiemamy/core/utils/processor/root/presentation/SetConstraintProcessorTest.java	2008-09-28 10:24:28 UTC (rev 1968)
@@ -28,6 +28,7 @@
 import org.junit.runner.RunWith;
 import org.seasar.framework.unit.Seasar2;
 
+import org.jiemamy.core.S2FactoryStrategy;
 import org.jiemamy.spec.RootModelFactory;
 import org.jiemamy.spec.geometory.JmRectangle;
 import org.jiemamy.spec.model.RootModel;
@@ -53,7 +54,7 @@
 	 */
 	@Before
 	public void setUp() throws Exception {
-		rootModel = RootModelFactory.createInstance();
+		rootModel = RootModelFactory.getInstance(new S2FactoryStrategy("jiemamy-view.dicon")).createInstance();
 		DiagramPresentationModel presentation = rootModel.createJiemamyModel(DiagramPresentationModel.class);
 		presentation.setName("テスト");
 		rootModel.appendModel(presentation);

Modified: vesta/trunk/org.jiemamy.eclipse/META-INF/MANIFEST.MF
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/META-INF/MANIFEST.MF	2008-09-28 07:20:06 UTC (rev 1967)
+++ vesta/trunk/org.jiemamy.eclipse/META-INF/MANIFEST.MF	2008-09-28 10:24:28 UTC (rev 1968)
@@ -24,19 +24,19 @@
  org.eclipse.gef,
  org.eclipse.update.core,
  org.eclipse.debug.core,
+ org.jiemamy.spec.core,
+ org.jiemamy.spec.event,
+ org.jiemamy.spec.view,
+ org.jiemamy.spec.diff,
  org.jiemamy.core,
+ org.jiemamy.event,
+ org.jiemamy.view,
  org.jiemamy.serializer,
  org.jiemamy.dialect,
- org.jiemamy.spec.core,
- org.jiemamy.composer,
  org.jiemamy.dialect.mysql,
  org.jiemamy.dialect.postgresql,
  org.jiemamy.dialect.sql99,
- org.jiemamy.event,
- org.jiemamy.spec.diff,
- org.jiemamy.spec.event,
- org.jiemamy.spec.view,
- org.jiemamy.view
+ org.jiemamy.composer
 Eclipse-BuddyPolicy: registered
 Eclipse-RegisterBuddy: org.jiemamy.core,
  org.jiemamy.serializer,

Modified: vesta/trunk/org.jiemamy.eclipse/pom.xml
===================================================================
--- vesta/trunk/org.jiemamy.eclipse/pom.xml	2008-09-28 07:20:06 UTC (rev 1967)
+++ vesta/trunk/org.jiemamy.eclipse/pom.xml	2008-09-28 10:24:28 UTC (rev 1968)
@@ -193,6 +193,21 @@
       <exclusions>
       </exclusions>
     </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>org.jiemamy.core</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>org.jiemamy.event</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>org.jiemamy.view</artifactId>
+      <version>${project.version}</version>
+    </dependency>
     <dependency>
       <groupId>${project.groupId}</groupId>
       <artifactId>org.jiemamy.serializer</artifactId>

Added: zeus/trunk/org.jiemamy.spec.core/src/main/java/org/jiemamy/spec/DefaultFactoryStrategy.java
===================================================================
--- zeus/trunk/org.jiemamy.spec.core/src/main/java/org/jiemamy/spec/DefaultFactoryStrategy.java	                        (rev 0)
+++ zeus/trunk/org.jiemamy.spec.core/src/main/java/org/jiemamy/spec/DefaultFactoryStrategy.java	2008-09-28 10:24:28 UTC (rev 1968)
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others.
+ * Created on 2008/09/26
+ *
+ * This file is part of Jiemamy.
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific language
+ * governing permissions and limitations under the License.
+ */
+package org.jiemamy.spec;
+
+import org.jiemamy.spec.exception.JiemamyRuntimeException;
+import org.jiemamy.spec.model.RootModel;
+
+/**
+ * TODO for daisuke
+ * @author daisuke
+ */
+public class DefaultFactoryStrategy implements FactoryStrategy {
+	
+	/**
+	 * {@inheritDoc}
+	 */
+	public RootModel createInstance() {
+		try {
+			Class<?> clazz = Class.forName("org.jiemamy.core.model.RootModelImpl");
+			return (RootModel) clazz.newInstance();
+		} catch (Exception e) {
+			throw new JiemamyRuntimeException(e);
+		}
+	}
+	
+}


Property changes on: zeus/trunk/org.jiemamy.spec.core/src/main/java/org/jiemamy/spec/DefaultFactoryStrategy.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: zeus/trunk/org.jiemamy.spec.core/src/main/java/org/jiemamy/spec/FactoryStrategy.java
===================================================================
--- zeus/trunk/org.jiemamy.spec.core/src/main/java/org/jiemamy/spec/FactoryStrategy.java	                        (rev 0)
+++ zeus/trunk/org.jiemamy.spec.core/src/main/java/org/jiemamy/spec/FactoryStrategy.java	2008-09-28 10:24:28 UTC (rev 1968)
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others.
+ * Created on 2008/09/26
+ *
+ * This file is part of Jiemamy.
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific language
+ * governing permissions and limitations under the License.
+ */
+package org.jiemamy.spec;
+
+import org.jiemamy.spec.model.RootModel;
+
+/**
+ * TODO for daisuke
+ * @author daisuke
+ */
+public interface FactoryStrategy {
+	
+	/**
+	 * TODO for daisuke
+	 * @return
+	 */
+	RootModel createInstance();
+	
+}


Property changes on: zeus/trunk/org.jiemamy.spec.core/src/main/java/org/jiemamy/spec/FactoryStrategy.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Modified: zeus/trunk/org.jiemamy.spec.core/src/main/java/org/jiemamy/spec/RootModelFactory.java
===================================================================
--- zeus/trunk/org.jiemamy.spec.core/src/main/java/org/jiemamy/spec/RootModelFactory.java	2008-09-28 07:20:06 UTC (rev 1967)
+++ zeus/trunk/org.jiemamy.spec.core/src/main/java/org/jiemamy/spec/RootModelFactory.java	2008-09-28 10:24:28 UTC (rev 1968)
@@ -18,7 +18,6 @@
  */
 package org.jiemamy.spec;
 
-import org.jiemamy.spec.exception.JiemamyRuntimeException;
 import org.jiemamy.spec.model.RootModel;
 
 /**
@@ -27,23 +26,41 @@
  */
 public class RootModelFactory {
 	
-	/**
-	 * 新しい {@link RootModel} のインスタンスを取得する。
-	 * @return {@link RootModel}のインスタンス。
-	 */
-	public static RootModel createInstance() {
-		try {
-			Class<?> clazz = Class.forName("org.jiemamy.core.model.RootModelImpl");
-			return (RootModel) clazz.newInstance();
-		} catch (Exception e) {
-			throw new JiemamyRuntimeException(e);
+	private static RootModelFactory singleton;
+	
+
+	public static RootModelFactory getInstance() {
+		return singleton;
+	}
+	
+	public static RootModelFactory getInstance(FactoryStrategy strategy) {
+		if (singleton == null) {
+			singleton = (new RootModelFactory(strategy));
 		}
+		return getInstance();
 	}
 	
+
+	private FactoryStrategy strategy;
+	
+
+	private RootModelFactory() {
+		strategy = (new DefaultFactoryStrategy());
+	}
+	
 	/**
 	 * privateコンストラクタ。
 	 * @category instance creation
 	 */
-	private RootModelFactory() {
+	private RootModelFactory(FactoryStrategy strategy) {
+		this.strategy = strategy;
 	}
+	
+	/**
+	 * 新しい {@link RootModel} のインスタンスを取得する。
+	 * @return {@link RootModel}のインスタンス。
+	 */
+	public RootModel createInstance() {
+		return strategy.createInstance();
+	}
 }

Modified: zeus/trunk/org.jiemamy.spec.core/src/main/java/org/jiemamy/spec/model/node/TableModel.java
===================================================================
--- zeus/trunk/org.jiemamy.spec.core/src/main/java/org/jiemamy/spec/model/node/TableModel.java	2008-09-28 07:20:06 UTC (rev 1967)
+++ zeus/trunk/org.jiemamy.spec.core/src/main/java/org/jiemamy/spec/model/node/TableModel.java	2008-09-28 10:24:28 UTC (rev 1968)
@@ -57,6 +57,13 @@
 	 */
 	List<IndexModel> getIndexes();
 	
+	/**
+	 * TODO for daisuke
+	 * @param tableName
+	 * @return
+	 */
+	TableModel init(String tableName);
+	
 //	/**
 //	 * 主キーカラムの {@link Set} を取得する。
 //	 * @return 主キーカラムの {@link Set}


Jiemamy-notify メーリングリストの案内
Back to archive index