1 <?xml version="1.0" encoding="UTF-8"?>
\r
2 <!--DOCTYPE schema PUBLIC "-//W3C/DTD XML Schema Version 1.0//EN"
\r
3 "http://www.w3.org/TR/2000/WD-xmlschema-1-20000225/structures.dtd"-->
\r
5 Castor Object Mapping XML Schema
\r
7 Namespace: http://castor.exolab.org/
\r
8 System: http://castor.exolab.org/mapping.xsd
\r
9 Public: -//EXOLAB/Castor Object Mapping Schema Version 1.0//EN
\r
11 *Note*: This schema is under evolution and subject to change.
\r
14 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
\r
15 targetNamespace="http://castor.exolab.org/"
\r
16 xmlns="http://castor.exolab.org/"
\r
19 <xsd:element name="mapping">
\r
22 <xsd:element name="description" type="xsd:string" minOccurs="0" maxOccurs="1" />
\r
23 <xsd:element ref="include" minOccurs="0" maxOccurs="unbounded" />
\r
24 <xsd:element ref="class" minOccurs="0" maxOccurs="unbounded" />
\r
25 <xsd:element ref="key-generator" minOccurs="0" maxOccurs="unbounded" />
\r
30 <xsd:element name="include">
\r
32 <xsd:attribute name="href" type="xsd:string" use="required"/>
\r
36 <xsd:element name="class">
\r
39 <xsd:element name="description" type="xsd:string" minOccurs="0" maxOccurs="1" />
\r
40 <xsd:element ref="cache-type" minOccurs="0" maxOccurs="1" />
\r
41 <xsd:element ref="map-to" minOccurs="0" maxOccurs="1" />
\r
42 <xsd:choice minOccurs="1">
\r
43 <xsd:element ref="field" minOccurs="0" maxOccurs="unbounded"/>
\r
44 <xsd:element ref="container" minOccurs="0" maxOccurs="unbounded"/>
\r
47 <xsd:attribute name="name" type="xsd:ID" use="required"/>
\r
48 <xsd:attribute name="extends" type="xsd:IDREF" use="optional"/>
\r
49 <xsd:attribute name="depends" type="xsd:IDREF" use="optional"/>
\r
50 <xsd:attribute name="identity" type="xsd:NMTOKENS" use="optional"/>
\r
51 <xsd:attribute name="access" default="shared" use="optional">
\r
53 <xsd:restriction base="xsd:string">
\r
54 <xsd:enumeration value="read-only"/>
\r
55 <xsd:enumeration value="shared"/>
\r
56 <xsd:enumeration value="exclusive"/>
\r
57 <xsd:enumeration value="db-locked"/>
\r
61 <xsd:attribute name="key-generator" type="xsd:string" use="optional"/>
\r
62 <xsd:attribute name="auto-complete" type="xsd:boolean" use="optional" default="false"/>
\r
63 <xsd:attribute name="verify-constructable" type="xsd:boolean" use="optional" default="true"/>
\r
67 <xsd:element name="map-to">
\r
69 <xsd:attribute name="table" type="xsd:NMTOKEN" use="optional"/>
\r
70 <xsd:attribute name="xml" type="xsd:string" use="optional"/>
\r
71 <xsd:attribute name="ns-uri" type="xsd:string" use="optional"/>
\r
72 <xsd:attribute name="ns-prefix" type="xsd:NMTOKEN" use="optional"/>
\r
73 <xsd:attribute name="ldap-dn" type="xsd:string" use="optional"/>
\r
74 <xsd:attribute name="ldap-oc" type="xsd:string" use="optional"/>
\r
78 <xsd:element name="field">
\r
81 <xsd:element name="description" type="xsd:string" minOccurs="0" maxOccurs="1" />
\r
82 <xsd:element ref="sql" minOccurs="0" maxOccurs="1"/>
\r
83 <xsd:element ref="bind-xml" minOccurs="0" maxOccurs="1"/>
\r
84 <xsd:element ref="ldap" minOccurs="0" maxOccurs="1"/>
\r
87 <xsd:attribute name="name" type="xsd:string" use="required"/>
\r
88 <xsd:attribute name="type" type="xsd:string" use="optional"/>
\r
89 <xsd:attribute name="required" type="xsd:boolean" use="optional" default="false"/>
\r
90 <xsd:attribute name="transient" type="xsd:boolean" use="optional" default="false"/>
\r
91 <xsd:attribute name="direct" type="xsd:boolean" use="optional" default="false"/>
\r
92 <xsd:attribute name="lazy" type="xsd:boolean" use="optional" default="false"/>
\r
93 <xsd:attribute name="container" type="xsd:boolean" use="optional"/>
\r
94 <xsd:attribute name="get-method" type="xsd:string" use="optional"/>
\r
95 <xsd:attribute name="has-method" type="xsd:string" use="optional"/>
\r
96 <xsd:attribute name="set-method" type="xsd:string" use="optional"/>
\r
97 <xsd:attribute name="create-method" type="xsd:string" use="optional"/>
\r
98 <xsd:attribute name="handler" type="xsd:string" use="optional"/>
\r
99 <xsd:attribute name="collection" use="optional">
\r
101 <xsd:restriction base="xsd:string">
\r
102 <xsd:enumeration value="array"/>
\r
103 <xsd:enumeration value="vector"/>
\r
104 <xsd:enumeration value="arraylist"/>
\r
105 <xsd:enumeration value="hashtable"/>
\r
106 <xsd:enumeration value="collection"/>
\r
107 <xsd:enumeration value="set"/>
\r
108 <xsd:enumeration value="map"/>
\r
109 <xsd:enumeration value="enumerate"/>
\r
116 <xsd:element name="container">
\r
119 <xsd:element name="description" type="xsd:string" minOccurs="0" maxOccurs="1" />
\r
120 <xsd:element ref="field" minOccurs="1"/>
\r
122 <xsd:attribute name="name" type="xsd:NMTOKEN" use="required"/>
\r
123 <xsd:attribute name="type" type="xsd:NMTOKEN" use="optional"/>
\r
124 <xsd:attribute name="required" type="xsd:boolean" use="optional" default="false"/>
\r
125 <xsd:attribute name="direct" type="xsd:boolean" use="optional" default="false"/>
\r
126 <xsd:attribute name="get-method" type="xsd:NMTOKEN" use="optional"/>
\r
127 <xsd:attribute name="set-method" type="xsd:NMTOKEN" use="optional"/>
\r
128 <xsd:attribute name="create-method" type="xsd:NMTOKEN" use="optional"/>
\r
132 <xsd:element name="sql">
\r
134 <xsd:attribute name="name" type="xsd:NMTOKENS" use="optional"/>
\r
135 <xsd:attribute name="type" type="xsd:string" use="optional"/>
\r
136 <xsd:attribute name="many-table" type="xsd:NMTOKEN" use="optional"/>
\r
137 <xsd:attribute name="many-key" type="xsd:NMTOKENS" use="optional"/>
\r
138 <xsd:attribute name="read-only" type="xsd:boolean" use="optional" default="false"/>
\r
140 <!-- signals that this field is transient for database mapping (ie should be ignored) -->
\r
141 <xsd:attribute name="transient" type="xsd:boolean" use="optional"/>
\r
144 <xsd:attribute name="dirty" default="check" use="optional">
\r
146 <xsd:restriction base="xsd:string">
\r
147 <xsd:enumeration value="check"/>
\r
148 <xsd:enumeration value="ignore"/>
\r
156 The 'bind-xml' element is used for specifying XML specific databinding
\r
157 properties and behavior for a specific field. 'bind-xml' may only appear
\r
158 as a child of a 'field' element.
\r
160 <xsd:element name="bind-xml">
\r
162 <xsd:documentation>
\r
163 The 'bind-xml' element is used for specifying XML specific databinding
\r
164 properties and behavior for a specific field. 'bind-xml' may only appear
\r
165 as a child of a 'field' element.
\r
166 </xsd:documentation>
\r
171 <xsd:element ref="class" minOccurs="0" maxOccurs="1"/>
\r
172 <xsd:element name="property" type="propertyType" minOccurs="0" maxOccurs="unbounded"/>
\r
176 An optional attribute used for specifying the XML name for the
\r
177 field associated with the 'bind-xml' element.
\r
179 <xsd:attribute name="name" type="xsd:QName" use="optional">
\r
181 <xsd:documentation>
\r
182 An optional attribute used for specifying the XML name for the
\r
183 field associated with the 'bind-xml' element.
\r
184 </xsd:documentation>
\r
188 <xsd:attribute name="type" type="xsd:NMTOKEN" use="optional"/>
\r
191 Allows specifying how Castor should automatically determines
\r
192 the XML name of this field when no name has been specified.
\r
194 <xsd:attribute name="auto-naming" use="optional">
\r
196 <xsd:documentation>
\r
197 Allows specifying how Castor should automatically determines
\r
198 the XML name of this field when no name has been specified.
\r
199 In most cases the XML name is determined by using the field name,
\r
200 but in some cases the user may want to use the Class name of
\r
201 the field type. This attribute allows choosing between the
\r
202 two approaches. If this attribute is not specified, the field
\r
203 name is used as the XML name.
\r
204 </xsd:documentation>
\r
207 <xsd:restriction base="xsd:string">
\r
208 <xsd:enumeration value="deriveByClass"/>
\r
209 <xsd:enumeration value="deriveByField"/>
\r
215 Allows specifying a nested location path for this field,
\r
216 the value should just be a simplified XPath like value
\r
217 where names are separated by "/".
\r
219 <xsd:attribute name="location" type="xsd:string" use="optional">
\r
221 <xsd:documentation>
\r
222 Allows specifying a nested location path for this field,
\r
223 the value should just be a simplified XPath like value
\r
224 where names are separated by "/".
\r
225 </xsd:documentation>
\r
229 <!-- Allows overriding the matching rule -->
\r
230 <xsd:attribute name="matches" type="xsd:string" use="optional"/>
\r
233 <!-- Signal that this field should be marshalled as a reference -->
\r
234 <xsd:attribute name="reference" type="xsd:boolean" use="optional"/>
\r
236 <!-- NodeType for the XML node -->
\r
237 <xsd:attribute name="node" use="optional">
\r
239 <xsd:restriction base="xsd:string">
\r
240 <xsd:enumeration value="attribute"/>
\r
241 <xsd:enumeration value="element"/>
\r
242 <xsd:enumeration value="namespace"/>
\r
243 <xsd:enumeration value="text"/>
\r
248 <xsd:attribute name="QName-prefix" type="xsd:NMTOKEN" use="optional"/>
\r
250 <!-- Signal that this field is transient for XML (ie should be ignored) -->
\r
251 <xsd:attribute name="transient" type="xsd:boolean" use="optional"/>
\r
258 <xsd:element name="ldap">
\r
260 <xsd:attribute name="name" type="xsd:NMTOKEN" use="optional"/>
\r
264 <xsd:element name="key-generator">
\r
267 <xsd:element ref="param" minOccurs="0" maxOccurs="unbounded" />
\r
269 <xsd:attribute name="name" type="xsd:ID" use="required"/>
\r
270 <xsd:attribute name="alias" type="xsd:string" use="optional"/>
\r
274 <xsd:element name="cache-type">
\r
276 <xsd:attribute name="type" type="xsd:string" use="optional" default="count-limited" />
\r
277 <xsd:attribute name="capacity" type="xsd:integer" use="optional"/>
\r
281 <xsd:element name="param">
\r
283 <xsd:attribute name="name" type="xsd:string" use="required"/>
\r
284 <xsd:attribute name="value" type="xsd:string" use="required"/>
\r
289 <xsd:complexType name="propertyType">
\r
291 <xsd:element name="name" type="xsd:string"/>
\r
292 <xsd:element name="value" type="xsd:string"/>
\r