svnno****@sourc*****
svnno****@sourc*****
2008年 11月 5日 (水) 01:07:01 JST
Revision: 2076 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=jiemamy&view=rev&rev=2076 Author: daisuke_m Date: 2008-11-05 01:07:01 +0900 (Wed, 05 Nov 2008) Log Message: ----------- xsdのTODOをまたいくつか解決。 Modified 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 -------------- Modified: zeus/trunk/org.jiemamy.spec.core/src/main/resources/jiemamy-core.xsd =================================================================== --- zeus/trunk/org.jiemamy.spec.core/src/main/resources/jiemamy-core.xsd 2008-11-04 15:52:41 UTC (rev 2075) +++ zeus/trunk/org.jiemamy.spec.core/src/main/resources/jiemamy-core.xsd 2008-11-04 16:07:01 UTC (rev 2076) @@ -233,12 +233,17 @@ <xsd:element name="dataType"> <xsd:complexType> - <xsd:sequence> - <xsd:element ref="size" minOccurs="0" /> - <xsd:element ref="precision" minOccurs="0" /> - <xsd:element ref="scale" minOccurs="0" /> - <xsd:element ref="timezone" minOccurs="0" /> - </xsd:sequence> + <xsd:choice minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="adapter"> + <xsd:complexType> + <xsd:sequence> + <xsd:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/> + </xsd:sequence> + <xsd:attribute name="class" type="fqcnType" use="required" /> + <xsd:attribute name="id" type="uuidType" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> <!-- TODO idの時はclass必須、refん時はclass不要、idとrefどちらもナシは禁止したい。 --> <xsd:attribute name="id" type="uuidType" use="optional" /> <xsd:attribute name="class" type="fqcnType" use="optional" /> @@ -282,12 +287,6 @@ </xsd:complexType> </xsd:element> - <!-- TODO これ自体を自由形にしないとなぁ --> - <xsd:element name="size" type="xsd:positiveInteger" /> - <xsd:element name="precision" type="xsd:positiveInteger" /> - <xsd:element name="scale" type="xsd:positiveInteger" /> - <xsd:element name="timezone" type="xsd:boolean" /> - <!-- 単純型 --> Modified: 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 2008-11-04 15:52:41 UTC (rev 2075) +++ zeus/trunk/org.jiemamy.spec.core/src/main/resources/sample-validation-target.xml 2008-11-04 16:07:01 UTC (rev 2076) @@ -32,7 +32,9 @@ <name>NAME</name> <logicalName/> <dataType class="org.jiemamy.core.model.typedef.datatype.impl.VarcharDataTypeMock" id="69970763-1fc5-49e3-9307-2f74aa2b8b08"> - <size>32</size> + <adapter id="62f1e6ec-e6aa-4d52-a6c3-27dac086f2d6" class="org.jiemamy.core.model.datatype.adapter.SizedDataTypeAdapter"> + <size>32</size> + </adapter> </dataType> <defaultValue/> <constraints/> @@ -92,7 +94,9 @@ <name>DEPT_NAME</name> <logicalName>部署名</logicalName> <dataType class="org.jiemamy.core.model.typedef.datatype.impl.VarcharDataTypeMock" id="03b26401-aa91-4d81-9213-89076e475dba"> - <size>20</size> + <adapter id="32f1e6ec-e6aa-4d52-a6c3-27dac086f2d6" class="org.jiemamy.core.model.datatype.adapter.SizedDataTypeAdapter"> + <size>20</size> + </adapter> </dataType> <defaultValue/> <constraints/> @@ -106,7 +110,9 @@ <name>LOC</name> <logicalName>ロケーション</logicalName> <dataType class="org.jiemamy.core.model.typedef.datatype.impl.VarcharDataTypeMock" id="e475eef8-13d5-4c67-a5ed-310659a4378e"> - <size>20</size> + <adapter id="62a1e6ec-e6aa-4d52-a6c3-27dac086f206" class="org.jiemamy.core.model.datatype.adapter.SizedDataTypeAdapter"> + <size>20</size> + </adapter> </dataType> <defaultValue>secret</defaultValue> <constraints/> @@ -202,8 +208,10 @@ <name>HIREDATE</name> <logicalName/> <dataType class="org.jiemamy.core.model.typedef.datatype.impl.TimestampDataTypeMock" id="31aa6e66-0a05-4661-9036-ce160ed3d7e9"> - <timezone>false</timezone> - </dataType> + <adapter id="62f1e6fc-e6aa-4d52-a6b3-27dac086f2d5" class="org.jiemamy.core.model.datatype.adapter.TimezonedDataTypeAdapter"> + <timezone>false</timezone> + </adapter> + </dataType> <defaultValue/> <constraints> <constraint class="org.jiemamy.core.model.constraint.NotNullConstraintModelImpl" id="0bc607a2-ed60-4e34-9855-b858a94cd23f"> @@ -220,8 +228,10 @@ <name>SAL</name> <logicalName/> <dataType class="org.jiemamy.core.model.typedef.datatype.impl.NumericDataTypeMock" id="830eba2d-a53e-4dd6-81bb-74cc193a1fca"> - <precision>7</precision> - <scale>2</scale> + <adapter id="62f1e6ec-e63a-4d52-a6b3-27dac086f2d5" class="org.jiemamy.core.model.datatype.adapter.PrecisionedDataTypeAdapter"> + <precision>7</precision> + <scale>2</scale> + </adapter> </dataType> <defaultValue/> <constraints>