[Jiemamy-notify] commit [2069] xml schema書きかけ。まだボロボロ。

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2008年 11月 3日 (月) 22:54:10 JST


Revision: 2069
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=jiemamy&view=rev&rev=2069
Author:   daisuke_m
Date:     2008-11-03 22:54:09 +0900 (Mon, 03 Nov 2008)

Log Message:
-----------
xml schema書きかけ。まだボロボロ。

Added Paths:
-----------
    zeus/trunk/org.jiemamy.spec.core/src/main/resources/jiemamy-core.xsd
    zeus/trunk/org.jiemamy.spec.core/src/main/resources/sample-validation-target.xml


-------------- next part --------------
Added: zeus/trunk/org.jiemamy.spec.core/src/main/resources/jiemamy-core.xsd
===================================================================
--- zeus/trunk/org.jiemamy.spec.core/src/main/resources/jiemamy-core.xsd	                        (rev 0)
+++ zeus/trunk/org.jiemamy.spec.core/src/main/resources/jiemamy-core.xsd	2008-11-03 13:54:09 UTC (rev 2069)
@@ -0,0 +1,144 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema
+		targetNamespace="http://jiemamy.org/xml/ns/core"
+		xmlns:j="http://jiemamy.org/xml/ns/core"
+		xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+		elementFormDefault="qualified"
+		attributeFormDefault="unqualified"
+		version="0.2.0">
+
+	<xsd:annotation>
+		<xsd:documentation>Jiemamy model schema.</xsd:documentation> 
+	</xsd:annotation>
+	
+	<xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
+	
+	<xsd:element name="rootModel" type="j:rootModel"/>
+	<xsd:attribute name="id" type="j:uuid"/>
+	
+	<xsd:complexType name="rootModel">
+		<xsd:sequence maxOccurs="1" minOccurs="1">
+			<xsd:element name="dialect" type="j:fqcn"/>
+			<xsd:element name="schemaName" type="xsd:string" minOccurs="0"/>
+			<xsd:element name="beginScript" type="xsd:string" minOccurs="0"/>
+			<xsd:element name="endScript" type="xsd:string" minOccurs="0"/>
+			<xsd:element name="description" type="xsd:string" minOccurs="0"/>
+			<xsd:element name="domains" type="j:domains"/>
+			<xsd:element name="nodes" type="j:nodes"/>
+			<xsd:element name="connections" type="j:connections"/>
+			<xsd:element name="insertDataSetModels" type="j:insertDataSetModels"/>
+		</xsd:sequence>
+		<xsd:attribute ref="j:id" use="required"/>
+	</xsd:complexType>
+	<xsd:complexType name="domains">
+		<xsd:sequence>
+			<xsd:element name="domain" type="j:domain" minOccurs="0" maxOccurs="unbounded"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:complexType name="nodes">
+		<xsd:choice minOccurs="0" maxOccurs="unbounded">
+			<xsd:element name="table" type="j:table"/>
+			<xsd:element name="view" type="j:view"/>
+			<xsd:element name="sticky" type="j:sticky"/>
+		</xsd:choice>
+	</xsd:complexType>
+	<xsd:complexType name="connections">
+		<xsd:sequence>
+			<xsd:element name="foreignKey" type="j:foreignKey" minOccurs="0" maxOccurs="unbounded"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:complexType name="insertDataSetModels">
+	</xsd:complexType>
+
+	<xsd:complexType name="domain">
+		<xsd:sequence>
+			<xsd:element name="name" type="xsd:string"/>
+			<xsd:element name="logicalName" type="xsd:string"/>
+			<xsd:element name="dataType" type="j:dataType"/>
+			<xsd:element name="defaultValue" type="xsd:string"/>
+			<xsd:element name="constraints" type="j:constraints"/>
+			<xsd:element name="simpleIndex" type="xsd:boolean"/>
+			<xsd:element name="freeString" type="xsd:string" minOccurs="0"/>
+			<xsd:element name="description" type="xsd:string" minOccurs="0"/>
+			<xsd:element name="options" type="j:options" minOccurs="0"/>
+		</xsd:sequence>
+		<xsd:attribute ref="j:id" use="required"/>
+	</xsd:complexType>
+
+	<xsd:complexType name="table">
+		<xsd:sequence>
+			<xsd:element name="name" type="xsd:string"/>
+			<xsd:element name="logicalName" type="xsd:string"/>
+			<xsd:element name="dataType" type="j:dataType"/>
+			<xsd:element name="defaultValue" type="xsd:string"/>
+			<xsd:element name="constraints" type="j:constraints"/>
+			<xsd:element name="simpleIndex" type="xsd:boolean"/>
+			<xsd:element name="freeString" type="xsd:string" minOccurs="0"/>
+			<xsd:element name="description" type="xsd:string" minOccurs="0"/>
+			<xsd:element name="options" type="j:options" minOccurs="0"/>
+		</xsd:sequence>
+		<xsd:attribute ref="j:id" use="required"/>
+	</xsd:complexType>
+
+	<xsd:complexType name="view">
+		<xsd:sequence>
+			<xsd:element name="name" type="xsd:string"/>
+			<xsd:element name="logicalName" type="xsd:string"/>
+			<xsd:element name="definition" type="xsd:string"/>
+		</xsd:sequence>
+		<xsd:attribute ref="j:id" use="required"/>
+	</xsd:complexType>
+
+	<xsd:complexType name="sticky">
+		<xsd:sequence>
+			<xsd:element name="contents" type="xsd:string"/>
+		</xsd:sequence>
+		<xsd:attribute ref="j:id" use="required"/>
+	</xsd:complexType>
+
+	<xsd:complexType name="foreignKey">
+		<xsd:sequence>
+			<xsd:element name="name" type="xsd:string"/>
+			<xsd:element name="logicalName" type="xsd:string"/>
+		</xsd:sequence>
+		<xsd:attribute ref="j:id" use="required"/>
+		<xsd:attribute name="ref"/>
+	</xsd:complexType>
+
+	<xsd:complexType name="dataType">
+		<xsd:sequence>
+			<xsd:any minOccurs="0"/><!-- FIXME -->
+		</xsd:sequence>
+		<xsd:attribute ref="j:id" use="required"/>
+	</xsd:complexType>
+	
+	<xsd:complexType name="constraints">
+		<xsd:sequence>
+			<xsd:element name="constraint" type="j:constraint" minOccurs="0" maxOccurs="unbounded"/><!-- FIXME -->
+		</xsd:sequence>
+	</xsd:complexType>
+	
+	<xsd:complexType name="constraint">
+		<xsd:sequence>
+			<xsd:any minOccurs="0"/><!-- FIXME -->
+		</xsd:sequence>
+		<xsd:attribute ref="j:id" use="required"/>
+	</xsd:complexType>
+	
+	<xsd:complexType name="options">
+		<xsd:sequence>
+			<xsd:any minOccurs="0"/><!-- FIXME -->
+		</xsd:sequence>
+	</xsd:complexType>
+	
+	<xsd:simpleType name="uuid">
+		<xsd:restriction base="xsd:string">
+			<xsd:pattern value="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"/>
+		</xsd:restriction>
+	</xsd:simpleType>
+	<xsd:simpleType name="fqcn">
+		<xsd:restriction base="xsd:string">
+			<xsd:pattern value="([A-Za-z]+\.)*[A-Za-z][A-Za-z0-9]*"/>
+		</xsd:restriction>
+	</xsd:simpleType>
+</xsd:schema>
\ No newline at end of file


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

Added: zeus/trunk/org.jiemamy.spec.core/src/main/resources/sample-validation-target.xml
===================================================================
--- zeus/trunk/org.jiemamy.spec.core/src/main/resources/sample-validation-target.xml	                        (rev 0)
+++ zeus/trunk/org.jiemamy.spec.core/src/main/resources/sample-validation-target.xml	2008-11-03 13:54:09 UTC (rev 2069)
@@ -0,0 +1,301 @@
+<?xml version="1.0" standalone="yes"?>
+<rootModel j:id="d5a96af3-b1e9-4285-a8ef-c491ce5ae308"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xsi:schemaLocation="http://jiemamy.org/xml/ns/core jiemamy-core.xsd"
+xmlns="http://jiemamy.org/xml/ns/core"
+xmlns:j="http://jiemamy.org/xml/ns/core">
+  <dialect>org.jiemamy.dialect.mysql.MySqlDialect</dialect>
+  <schemaName>FOO</schemaName>
+  <beginScript>BEGIN;</beginScript>
+  <endScript>COMMIT;</endScript>
+  <description>シリアライゼーションイメージ</description>
+  <domains>
+    <domain id="fb585cd1-9dd3-4f85-824d-2bdeee05dba8">
+      <name>ID</name>
+      <logicalName/>
+      <dataType>org.jiemamy.core.model.typedef.datatype.impl.IntegerDataTypeMock</dataType>
+      <defaultValue/>
+      <constraints>
+        <UniqueConstraintModelImpl id="259a9430-27ee-4c7f-9a0d-ded2b8a64044">
+          <name/>
+        </UniqueConstraintModelImpl>
+        <NotNullConstraintModelImpl id="8e0fa3a0-313d-4ae7-8977-704a45932218">
+          <name/>
+        </NotNullConstraintModelImpl>
+      </constraints>
+      <simpleIndex>false</simpleIndex>
+      <freeString/>
+      <description/>
+      <options/>
+    </domain>
+    <domain id="d2e49b5a-2ca7-4538-ba83-e01fe287f24a">
+      <name>NAME</name>
+      <logicalName/>
+      <dataType id="21aef8fc-a0c5-49f0-b328-b7b5eb13d37e">
+        <size>32</size>
+      </dataType>
+      <defaultValue/>
+      <constraints/>
+      <simpleIndex>false</simpleIndex>
+      <freeString/>
+      <description>人名用の型です。</description>
+      <options/>
+    </domain>
+  </domains>
+  <nodes>
+    <table id="06154c50-aede-48b4-a636-097df53bc66c">
+      <name>T_DEPT</name>
+      <logicalName/>
+      <sourceConnections/>
+      <targetConnections>
+        <foreignKey ref="e68b9b37-aef1-41d0-9e44-6bcf0d295316"/>
+      </targetConnections>
+      <beginScript>/* test begin script */</beginScript>
+      <endScript/>
+      <description>部署マスタです。</description>
+      <columns>
+        <column id="f167fee8-fcc2-46a0-aedb-5a5b70a00f4d">
+          <name>ID</name>
+          <logicalName>部署ID</logicalName>
+          <dataType>org.jiemamy.core.model.typedef.datatype.impl.IntegerDataTypeMock</dataType>
+          <defaultValue/>
+          <constraints>
+            <UniqueConstraintModelImpl id="259a9430-27ee-4c7f-9a0d-ded2b8a64044">
+              <name/>
+            </UniqueConstraintModelImpl>
+            <NotNullConstraintModelImpl id="8e0fa3a0-313d-4ae7-8977-704a45932218">
+              <name/>
+            </NotNullConstraintModelImpl>
+            <PrimaryKeyConstraintModelImpl id="11458682-38bd-4c57-945d-373309c9db5a">
+              <name/>
+            </PrimaryKeyConstraintModelImpl>
+          </constraints>
+          <simpleIndex>false</simpleIndex>
+          <freeString/>
+          <description/>
+          <options/>
+          <representation>false</representation>
+        </column>
+        <column id="98539692-0a22-4596-b5c1-43c412d23e6b">
+          <name>DEPT_NO</name>
+          <logicalName>部署番号</logicalName>
+          <dataType>org.jiemamy.core.model.typedef.datatype.impl.IntegerDataTypeMock</dataType>
+          <defaultValue/>
+          <constraints/>
+          <simpleIndex>false</simpleIndex>
+          <freeString/>
+          <description/>
+          <options/>
+          <representation>false</representation>
+        </column>
+        <column id="b4b9776c-9729-4b45-a60f-c3d8268deef4">
+          <name>DEPT_NAME</name>
+          <logicalName>部署名</logicalName>
+          <dataType id="3b2c8029-7e93-4672-8ccc-ab1b0789fb3b">
+            <size>20</size>
+          </dataType>
+          <defaultValue/>
+          <constraints/>
+          <simpleIndex>false</simpleIndex>
+          <freeString/>
+          <description/>
+          <options/>
+          <representation>true</representation>
+        </column>
+        <column id="5cf8d249-2cc0-496a-ba23-d2efd7280fa4">
+          <name>LOC</name>
+          <logicalName>ロケーション</logicalName>
+          <dataType id="4040f3b9-4972-4155-bf9e-10e1e076ac8a">
+            <size>20</size>
+          </dataType>
+          <defaultValue>secret</defaultValue>
+          <constraints/>
+          <simpleIndex>false</simpleIndex>
+          <freeString/>
+          <description/>
+          <options/>
+          <representation>false</representation>
+        </column>
+      </columns>
+    </table>
+    <table id="e231fefa-71c1-4455-92ac-3c778e58f5c9">
+      <name>T_EMP</name>
+      <logicalName>従業員</logicalName>
+      <sourceConnections>
+        <foreignKey ref="3142bbc5-d52a-406a-aa05-a402ba5c88fa"/>
+        <foreignKey ref="e68b9b37-aef1-41d0-9e44-6bcf0d295316"/>
+      </sourceConnections>
+      <targetConnections>
+        <foreignKey ref="3142bbc5-d52a-406a-aa05-a402ba5c88fa"/>
+      </targetConnections>
+      <beginScript>/* test end script */</beginScript>
+      <endScript/>
+      <description>従業員マスタです。</description>
+      <columns>
+        <column id="cc2aa896-3e3e-44c6-b097-84caa785062a">
+          <name>ID</name>
+          <logicalName>従業員ID</logicalName>
+          <dataType>org.jiemamy.core.model.typedef.datatype.impl.IntegerDataTypeMock</dataType>
+          <defaultValue/>
+          <constraints>
+            <UniqueConstraintModelImpl id="259a9430-27ee-4c7f-9a0d-ded2b8a64044">
+              <name/>
+            </UniqueConstraintModelImpl>
+            <NotNullConstraintModelImpl id="8e0fa3a0-313d-4ae7-8977-704a45932218">
+              <name/>
+            </NotNullConstraintModelImpl>
+            <PrimaryKeyConstraintModelImpl id="ec8d4e32-8341-4b99-8eaf-919833c7aefd">
+              <name/>
+            </PrimaryKeyConstraintModelImpl>
+          </constraints>
+          <simpleIndex>false</simpleIndex>
+          <freeString/>
+          <description/>
+          <options/>
+          <representation>false</representation>
+        </column>
+        <column id="b846d5a6-f4f3-4232-a223-85e70a7073df">
+          <name>EMP_NO</name>
+          <logicalName>従業員番号</logicalName>
+          <dataType>org.jiemamy.core.model.typedef.datatype.impl.IntegerDataTypeMock</dataType>
+          <defaultValue/>
+          <constraints>
+            <NotNullConstraintModelImpl id="7495e6f5-0250-4a46-83a5-b39bad117de2">
+              <name/>
+            </NotNullConstraintModelImpl>
+          </constraints>
+          <simpleIndex>false</simpleIndex>
+          <freeString/>
+          <description/>
+          <options/>
+          <representation>false</representation>
+        </column>
+        <column id="c1b8a604-7edc-4bed-a769-4568b510642a">
+          <name>EMP_NAME</name>
+          <logicalName>上司ID</logicalName>
+          <dataType id="d2e49b5a-2ca7-4538-ba83-e01fe287f24a">
+            <size>32</size>
+          </dataType>
+          <defaultValue>no name</defaultValue>
+          <constraints>
+            <NotNullConstraintModelImpl id="8a022376-b68b-4a6d-a927-03b69d553681">
+              <name/>
+            </NotNullConstraintModelImpl>
+          </constraints>
+          <simpleIndex>true</simpleIndex>
+          <freeString/>
+          <description/>
+          <options/>
+          <representation>true</representation>
+        </column>
+        <column id="8d52fcff-6017-4a28-b42b-0d8db6404bfb">
+          <name>MGR_ID</name>
+          <logicalName/>
+          <dataType>org.jiemamy.core.model.typedef.datatype.impl.IntegerDataTypeMock</dataType>
+          <defaultValue/>
+          <constraints/>
+          <simpleIndex>false</simpleIndex>
+          <freeString/>
+          <description/>
+          <options/>
+          <representation>false</representation>
+        </column>
+        <column id="10781446-e71c-45f3-b53e-ae2cd13ba161">
+          <name>HIREDATE</name>
+          <logicalName/>
+          <dataType id="bbca7a85-62ae-4f12-bc63-35f2a75a582a">
+            <timezone>false</timezone>
+          </dataType>
+          <defaultValue/>
+          <constraints>
+            <NotNullConstraintModelImpl id="3be1eca7-8758-40f4-9238-f43f0b6da19a">
+              <name/>
+            </NotNullConstraintModelImpl>
+          </constraints>
+          <simpleIndex>false</simpleIndex>
+          <freeString/>
+          <description/>
+          <options/>
+          <representation>false</representation>
+        </column>
+        <column id="b19cb5cc-a158-4ff9-bed6-ef1d284a5a8f">
+          <name>SAL</name>
+          <logicalName/>
+          <dataType id="a61d5d41-4d9e-4c7c-b306-731d8fd3dcf8">
+            <precision>7</precision>
+            <scale>2</scale>
+          </dataType>
+          <defaultValue/>
+          <constraints>
+            <NotNullConstraintModelImpl id="914b4b89-9933-4d39-a29e-99d5e87b70a3">
+              <name/>
+            </NotNullConstraintModelImpl>
+          </constraints>
+          <simpleIndex>false</simpleIndex>
+          <freeString/>
+          <description/>
+          <options/>
+          <representation>false</representation>
+        </column>
+        <column id="16811755-05bc-4546-bdb7-da8491f583a4">
+          <name>DEPT_ID</name>
+          <logicalName/>
+          <dataType>org.jiemamy.core.model.typedef.datatype.impl.IntegerDataTypeMock</dataType>
+          <defaultValue/>
+          <constraints>
+            <NotNullConstraintModelImpl id="88363f1e-33aa-4267-9228-b87f6d352ad9">
+              <name/>
+            </NotNullConstraintModelImpl>
+          </constraints>
+          <simpleIndex>false</simpleIndex>
+          <freeString/>
+          <description/>
+          <options/>
+          <representation>false</representation>
+        </column>
+      </columns>
+    </table>
+    <ViewModelImpl>org.jiemamy.core.model.node.ViewModelImpl @ d6b3fa6</ViewModelImpl>
+    <StickyModelImpl>org.jiemamy.core.model.node.StickyModelImpl @ 370d1bba</StickyModelImpl>
+  </nodes>
+  <connections>
+    <foreignKey id="3142bbc5-d52a-406a-aa05-a402ba5c88fa">
+      <name>fkey_T_EMP_T_EMP_1225478296532</name>
+      <logicalName/>
+      <source ref="e231fefa-71c1-4455-92ac-3c778e58f5c9"/>
+      <target ref="e231fefa-71c1-4455-92ac-3c778e58f5c9"/>
+      <mappings>
+        <mapping id="236153a0-53b7-40c6-a234-e90681cd7f3d">
+          <constraintColumn ref="8d52fcff-6017-4a28-b42b-0d8db6404bfb"/>
+          <referenceColumn ref="cc2aa896-3e3e-44c6-b097-84caa785062a"/>
+        </mapping>
+      </mappings>
+      <matchType/>
+      <onDelete>SET_NULL</onDelete>
+      <onUpdate/>
+      <deferrable>true</deferrable>
+      <initiallyCheckTime>DEFERRED</initiallyCheckTime>
+      <description/>
+    </foreignKey>
+    <foreignKey id="e68b9b37-aef1-41d0-9e44-6bcf0d295316">
+      <name>fkey_T_EMP_T_DEPT_1225478296532</name>
+      <logicalName/>
+      <source ref="e231fefa-71c1-4455-92ac-3c778e58f5c9"/>
+      <target ref="06154c50-aede-48b4-a636-097df53bc66c"/>
+      <mappings>
+        <mapping id="a6f8e3b3-cd54-4742-ab6e-3673f6079374">
+          <constraintColumn ref="16811755-05bc-4546-bdb7-da8491f583a4"/>
+          <referenceColumn ref="f167fee8-fcc2-46a0-aedb-5a5b70a00f4d"/>
+        </mapping>
+      </mappings>
+      <matchType/>
+      <onDelete/>
+      <onUpdate/>
+      <deferrable>false</deferrable>
+      <initiallyCheckTime/>
+      <description/>
+    </foreignKey>
+  </connections>
+  <insertDataSetModels/>
+  <diagramPresentations/>
+</rootModel>


Property changes on: zeus/trunk/org.jiemamy.spec.core/src/main/resources/sample-validation-target.xml
___________________________________________________________________
Name: svn:mime-type
   + text/plain


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