You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by am...@apache.org on 2009/04/19 05:28:50 UTC
svn commit: r766416 -
/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/resources/org/apache/cayenne/schema/3.0/modelMap.xsd
Author: amaniatis
Date: Sun Apr 19 03:28:49 2009
New Revision: 766416
URL: http://svn.apache.org/viewvc?rev=766416&view=rev
Log:
CAY-1167
Numerous improvements to the schema so that it validates all the test XML maps in the test/resources folder.
Modified:
cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/resources/org/apache/cayenne/schema/3.0/modelMap.xsd
Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/resources/org/apache/cayenne/schema/3.0/modelMap.xsd
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/resources/org/apache/cayenne/schema/3.0/modelMap.xsd?rev=766416&r1=766415&r2=766416&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/resources/org/apache/cayenne/schema/3.0/modelMap.xsd (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/resources/org/apache/cayenne/schema/3.0/modelMap.xsd Sun Apr 19 03:28:49 2009
@@ -19,11 +19,13 @@
-->
<!-- Cayenne entity map schema -->
-<xs:schema targetNamespace="http://cayenne.apache.org/schema/3.0/modelMap" xmlns:cay="http://cayenne.apache.org/schema/3.0/modelMap" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" version="1.0">
+<xs:schema targetNamespace="http://cayenne.apache.org/schema/3.0/modelMap" xmlns:cay="http://cayenne.apache.org/schema/3.0/modelMap" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" version="2">
<xs:element name="data-map">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="cay:property"/>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="cay:embeddable"/>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="cay:procedure"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="cay:db-entity"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="cay:obj-entity"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="cay:db-relationship"/>
@@ -45,55 +47,77 @@
</xs:element>
<xs:element name="db-attribute">
<xs:complexType>
- <xs:attribute name="isMandatory" type="xs:boolean">
- <xs:annotation>
- <xs:documentation>If true, the value of this attribute cannot be null.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
+ <xs:attribute name="isMandatory" type="xs:boolean"/>
<xs:attribute name="isPrimaryKey" type="xs:boolean">
<xs:annotation>
<xs:documentation>If true, the value of attribute is unique and used as a primary key identifier.</xs:documentation>
</xs:annotation>
</xs:attribute>
+ <xs:attribute name="isGenerated" use="optional" type="xs:boolean"/>
<xs:attribute name="length" type="xs:integer"/>
<xs:attribute name="name" use="required" type="xs:string"/>
<xs:attribute name="scale" type="xs:integer"/>
<xs:attribute name="type" use="required" type="xs:string"/>
</xs:complexType>
</xs:element>
+
<xs:element name="obj-entity">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" ref="cay:qualifier"/>
- <xs:element maxOccurs="unbounded" ref="cay:obj-attribute"/>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="cay:embedded-attribute"/>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="cay:obj-attribute"/>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="cay:attribute-override"/>
<xs:sequence minOccurs="0">
<xs:element ref="cay:entity-listener"/>
<xs:element ref="cay:pre-persist"/>
+ <xs:element ref="cay:post-persist"/>
+ <xs:element ref="cay:pre-update"/>
<xs:element ref="cay:post-update"/>
+ <xs:element ref="cay:pre-remove"/>
+ <xs:element ref="cay:post-remove"/>
+ <xs:element ref="cay:post-load"/>
</xs:sequence>
</xs:sequence>
- <xs:attribute name="className" use="required" type="xs:string"/>
- <xs:attribute name="clientClassName" use="required" type="xs:string"/>
- <xs:attribute name="clientSuperClassName" use="required" type="xs:string"/>
- <xs:attribute name="dbEntityName" use="required" type="xs:string"/>
+ <xs:attribute name="className" use="optional" type="xs:string"/>
+ <xs:attribute name="abstract" use="optional" type="xs:string"/>
+ <xs:attribute name="readOnly" use="optional" type="xs:boolean"/>
+ <xs:attribute name="clientClassName" use="optional" type="xs:string"/>
+ <xs:attribute name="clientSuperClassName" use="optional" type="xs:string"/>
+ <xs:attribute name="dbEntityName" use="optional" type="xs:string"/>
<xs:attribute name="lock-type" type="xs:string"/>
<xs:attribute name="name" use="required" type="xs:string"/>
- <xs:attribute name="superClassName" use="required"/>
+ <xs:attribute name="superClassName" use="optional" type="xs:string"/>
+ <xs:attribute name="superEntityName" use="optional" type="xs:string"/>
+ <xs:attribute name="exclude-superclass-listeners" use="optional" type="xs:boolean"/>
+ <xs:attribute name="exclude-default-listeners" use="optional" type="xs:boolean"/>
</xs:complexType>
</xs:element>
+
<xs:element name="qualifier" type="xs:string"/>
+
<xs:element name="obj-attribute">
<xs:complexType>
- <xs:attribute name="db-attribute-path" use="required" type="xs:string"/>
- <xs:attribute name="lock" type="xs:boolean"/>
+ <xs:attribute name="db-attribute-path" use="optional" type="xs:string"/>
+ <xs:attribute name="lock" use="optional" type="xs:boolean"/>
<xs:attribute name="name" use="required" type="xs:string"/>
- <xs:attribute name="type" use="required"/>
+ <xs:attribute name="type" use="required" type="xs:string"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="attribute-override">
+ <xs:complexType>
+ <xs:attribute name="db-attribute-path" use="optional" type="xs:string"/>
+ <xs:attribute name="lock" use="optional" type="xs:boolean"/>
+ <xs:attribute name="name" use="optional" type="xs:string"/>
+ <xs:attribute name="type" use="optional" type="xs:string"/>
</xs:complexType>
</xs:element>
+
<xs:element name="db-relationship">
<xs:complexType>
<xs:sequence>
- <xs:element ref="cay:db-attribute-pair"/>
+ <xs:element minOccurs="1" maxOccurs="unbounded" ref="cay:db-attribute-pair"/>
</xs:sequence>
<xs:attribute name="name" use="required" type="xs:string"/>
<xs:attribute name="source" use="required" type="xs:string"/>
@@ -116,27 +140,105 @@
<xs:attribute name="name" use="required" type="xs:string"/>
<xs:attribute name="source" use="required" type="xs:string"/>
<xs:attribute name="target" use="required" type="xs:string"/>
+ <xs:attribute name="collection-type" use="optional" type="xs:string"/>
+ <xs:attribute name="map-key" use="optional" type="xs:string"/>
</xs:complexType>
</xs:element>
+
<xs:element name="query">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="cay:property"/>
- <xs:element ref="cay:sql"/>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="cay:sql"/>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="cay:ejbql"/>
+ <xs:element name="qualifier" minOccurs="0" maxOccurs="unbounded" type="xs:string"/>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="cay:ordering"/>
+ <xs:element name="prefetch" minOccurs="0" maxOccurs="unbounded" type="xs:string"/>
</xs:sequence>
<xs:attribute name="factory" use="required"/>
<xs:attribute name="name" use="required" type="xs:string"/>
- <xs:attribute name="root" use="required" type="xs:string"/>
- <xs:attribute name="root-name" use="required" type="xs:string"/>
- </xs:complexType>
- </xs:element>
- <xs:element name="sql" type="xs:string"/>
+ <xs:attribute name="root" use="optional" type="xs:string"/>
+ <xs:attribute name="root-name" use="optional" type="xs:string"/>
+ <xs:attribute name="result-entity" use="optional" type="xs:string"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="ordering">
+ <xs:complexType>
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute name="descending" type="xs:boolean"/>
+ <xs:attribute name="ignore-case" type="xs:boolean"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="sql">
+ <xs:complexType>
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute name="adapter-class" type="xs:string"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="ejbql" type="xs:string"/>
+
<xs:element name="property">
<xs:complexType>
<xs:attribute name="name" use="required" type="xs:string"/>
<xs:attribute name="value" use="required" type="xs:string"/>
</xs:complexType>
</xs:element>
+ <xs:element name="embeddable">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="embeddable-attribute" minOccurs="0" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:attribute name="name" use="required" type="xs:string"/>
+ <xs:attribute name="type" use="required" type="xs:string"/>
+ <xs:attribute name="db-attribute-name" use="required" type="xs:string"/>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ <xs:attribute name="className" use="required" type="xs:string"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="embedded-attribute">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="cay:embeddable-attribute-override"/>
+ </xs:sequence>
+ <xs:attribute name="type" use="required" type="xs:string"/>
+ <xs:attribute name="name" use="required" type="xs:string"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="embeddable-attribute-override">
+ <xs:complexType>
+ <xs:attribute name="db-attribute-path" use="required" type="xs:string"/>
+ <xs:attribute name="name" use="required" type="xs:string"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="procedure">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="unbounded" name="procedure-parameter">
+ <xs:complexType>
+ <xs:attribute name="name" use="required" type="xs:string"/>
+ <xs:attribute name="type" use="required" type="xs:string"/>
+ <xs:attribute name="length" use="optional" type="xs:integer"/>
+ <xs:attribute name="direction" use="required" type="xs:string"/>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ <xs:attribute name="name" use="required" type="xs:string"/>
+ </xs:complexType>
+ </xs:element>
<xs:element name="entity-listener">
<xs:complexType>
<xs:sequence>