1 <?xml version="1.0" encoding="UTF-8"?>
3 Jalview - A Sequence Alignment Editor and Viewer (Version 2.8)
4 Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle
6 This file is part of Jalview.
8 Jalview is free software: you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
12 Jalview is distributed in the hope that it will be useful, but
13 WITHOUT ANY WARRANTY; without even the implied warranty
14 of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 PURPOSE. See the GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 <!--DOCTYPE schema PUBLIC "-//W3C/DTD XML Schema Version 1.0//EN"
20 "http://www.w3.org/TR/2000/WD-xmlschema-1-20000225/structures.dtd"-->
22 Castor Object Mapping XML Schema
24 Namespace: http://castor.exolab.org/
25 System: http://castor.exolab.org/mapping.xsd
26 Public: -//EXOLAB/Castor Object Mapping Schema Version 1.0//EN
28 *Note*: This schema is under evolution and subject to change.
31 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
32 targetNamespace="http://castor.exolab.org/"
33 xmlns="http://castor.exolab.org/"
36 <xsd:element name="mapping">
39 <xsd:element name="description" type="xsd:string" minOccurs="0" maxOccurs="1" />
40 <xsd:element ref="include" minOccurs="0" maxOccurs="unbounded" />
41 <xsd:element ref="class" minOccurs="0" maxOccurs="unbounded" />
42 <xsd:element ref="key-generator" minOccurs="0" maxOccurs="unbounded" />
47 <xsd:element name="include">
49 <xsd:attribute name="href" type="xsd:string" use="required"/>
53 <xsd:element name="class">
56 <xsd:element name="description" type="xsd:string" minOccurs="0" maxOccurs="1" />
57 <xsd:element ref="cache-type" minOccurs="0" maxOccurs="1" />
58 <xsd:element ref="map-to" minOccurs="0" maxOccurs="1" />
59 <xsd:choice minOccurs="1">
60 <xsd:element ref="field" minOccurs="0" maxOccurs="unbounded"/>
61 <xsd:element ref="container" minOccurs="0" maxOccurs="unbounded"/>
64 <xsd:attribute name="name" type="xsd:ID" use="required"/>
65 <xsd:attribute name="extends" type="xsd:IDREF" use="optional"/>
66 <xsd:attribute name="depends" type="xsd:IDREF" use="optional"/>
67 <xsd:attribute name="identity" type="xsd:NMTOKENS" use="optional"/>
68 <xsd:attribute name="access" default="shared" use="optional">
70 <xsd:restriction base="xsd:string">
71 <xsd:enumeration value="read-only"/>
72 <xsd:enumeration value="shared"/>
73 <xsd:enumeration value="exclusive"/>
74 <xsd:enumeration value="db-locked"/>
78 <xsd:attribute name="key-generator" type="xsd:string" use="optional"/>
79 <xsd:attribute name="auto-complete" type="xsd:boolean" use="optional" default="false"/>
80 <xsd:attribute name="verify-constructable" type="xsd:boolean" use="optional" default="true"/>
84 <xsd:element name="map-to">
86 <xsd:attribute name="table" type="xsd:NMTOKEN" use="optional"/>
87 <xsd:attribute name="xml" type="xsd:string" use="optional"/>
88 <xsd:attribute name="ns-uri" type="xsd:string" use="optional"/>
89 <xsd:attribute name="ns-prefix" type="xsd:NMTOKEN" use="optional"/>
90 <xsd:attribute name="ldap-dn" type="xsd:string" use="optional"/>
91 <xsd:attribute name="ldap-oc" type="xsd:string" use="optional"/>
95 <xsd:element name="field">
98 <xsd:element name="description" type="xsd:string" minOccurs="0" maxOccurs="1" />
99 <xsd:element ref="sql" minOccurs="0" maxOccurs="1"/>
100 <xsd:element ref="bind-xml" minOccurs="0" maxOccurs="1"/>
101 <xsd:element ref="ldap" minOccurs="0" maxOccurs="1"/>
104 <xsd:attribute name="name" type="xsd:string" use="required"/>
105 <xsd:attribute name="type" type="xsd:string" use="optional"/>
106 <xsd:attribute name="required" type="xsd:boolean" use="optional" default="false"/>
107 <xsd:attribute name="transient" type="xsd:boolean" use="optional" default="false"/>
108 <xsd:attribute name="direct" type="xsd:boolean" use="optional" default="false"/>
109 <xsd:attribute name="lazy" type="xsd:boolean" use="optional" default="false"/>
110 <xsd:attribute name="container" type="xsd:boolean" use="optional"/>
111 <xsd:attribute name="get-method" type="xsd:string" use="optional"/>
112 <xsd:attribute name="has-method" type="xsd:string" use="optional"/>
113 <xsd:attribute name="set-method" type="xsd:string" use="optional"/>
114 <xsd:attribute name="create-method" type="xsd:string" use="optional"/>
115 <xsd:attribute name="handler" type="xsd:string" use="optional"/>
116 <xsd:attribute name="collection" use="optional">
118 <xsd:restriction base="xsd:string">
119 <xsd:enumeration value="array"/>
120 <xsd:enumeration value="vector"/>
121 <xsd:enumeration value="arraylist"/>
122 <xsd:enumeration value="hashtable"/>
123 <xsd:enumeration value="collection"/>
124 <xsd:enumeration value="set"/>
125 <xsd:enumeration value="map"/>
126 <xsd:enumeration value="enumerate"/>
133 <xsd:element name="container">
136 <xsd:element name="description" type="xsd:string" minOccurs="0" maxOccurs="1" />
137 <xsd:element ref="field" minOccurs="1"/>
139 <xsd:attribute name="name" type="xsd:NMTOKEN" use="required"/>
140 <xsd:attribute name="type" type="xsd:NMTOKEN" use="optional"/>
141 <xsd:attribute name="required" type="xsd:boolean" use="optional" default="false"/>
142 <xsd:attribute name="direct" type="xsd:boolean" use="optional" default="false"/>
143 <xsd:attribute name="get-method" type="xsd:NMTOKEN" use="optional"/>
144 <xsd:attribute name="set-method" type="xsd:NMTOKEN" use="optional"/>
145 <xsd:attribute name="create-method" type="xsd:NMTOKEN" use="optional"/>
149 <xsd:element name="sql">
151 <xsd:attribute name="name" type="xsd:NMTOKENS" use="optional"/>
152 <xsd:attribute name="type" type="xsd:string" use="optional"/>
153 <xsd:attribute name="many-table" type="xsd:NMTOKEN" use="optional"/>
154 <xsd:attribute name="many-key" type="xsd:NMTOKENS" use="optional"/>
155 <xsd:attribute name="read-only" type="xsd:boolean" use="optional" default="false"/>
157 <!-- signals that this field is transient for database mapping (ie should be ignored) -->
158 <xsd:attribute name="transient" type="xsd:boolean" use="optional"/>
161 <xsd:attribute name="dirty" default="check" use="optional">
163 <xsd:restriction base="xsd:string">
164 <xsd:enumeration value="check"/>
165 <xsd:enumeration value="ignore"/>
173 The 'bind-xml' element is used for specifying XML specific databinding
174 properties and behavior for a specific field. 'bind-xml' may only appear
175 as a child of a 'field' element.
177 <xsd:element name="bind-xml">
180 The 'bind-xml' element is used for specifying XML specific databinding
181 properties and behavior for a specific field. 'bind-xml' may only appear
182 as a child of a 'field' element.
188 <xsd:element ref="class" minOccurs="0" maxOccurs="1"/>
189 <xsd:element name="property" type="propertyType" minOccurs="0" maxOccurs="unbounded"/>
193 An optional attribute used for specifying the XML name for the
194 field associated with the 'bind-xml' element.
196 <xsd:attribute name="name" type="xsd:QName" use="optional">
199 An optional attribute used for specifying the XML name for the
200 field associated with the 'bind-xml' element.
205 <xsd:attribute name="type" type="xsd:NMTOKEN" use="optional"/>
208 Allows specifying how Castor should automatically determines
209 the XML name of this field when no name has been specified.
211 <xsd:attribute name="auto-naming" use="optional">
214 Allows specifying how Castor should automatically determines
215 the XML name of this field when no name has been specified.
216 In most cases the XML name is determined by using the field name,
217 but in some cases the user may want to use the Class name of
218 the field type. This attribute allows choosing between the
219 two approaches. If this attribute is not specified, the field
220 name is used as the XML name.
224 <xsd:restriction base="xsd:string">
225 <xsd:enumeration value="deriveByClass"/>
226 <xsd:enumeration value="deriveByField"/>
232 Allows specifying a nested location path for this field,
233 the value should just be a simplified XPath like value
234 where names are separated by "/".
236 <xsd:attribute name="location" type="xsd:string" use="optional">
239 Allows specifying a nested location path for this field,
240 the value should just be a simplified XPath like value
241 where names are separated by "/".
246 <!-- Allows overriding the matching rule -->
247 <xsd:attribute name="matches" type="xsd:string" use="optional"/>
250 <!-- Signal that this field should be marshalled as a reference -->
251 <xsd:attribute name="reference" type="xsd:boolean" use="optional"/>
253 <!-- NodeType for the XML node -->
254 <xsd:attribute name="node" use="optional">
256 <xsd:restriction base="xsd:string">
257 <xsd:enumeration value="attribute"/>
258 <xsd:enumeration value="element"/>
259 <xsd:enumeration value="namespace"/>
260 <xsd:enumeration value="text"/>
265 <xsd:attribute name="QName-prefix" type="xsd:NMTOKEN" use="optional"/>
267 <!-- Signal that this field is transient for XML (ie should be ignored) -->
268 <xsd:attribute name="transient" type="xsd:boolean" use="optional"/>
275 <xsd:element name="ldap">
277 <xsd:attribute name="name" type="xsd:NMTOKEN" use="optional"/>
281 <xsd:element name="key-generator">
284 <xsd:element ref="param" minOccurs="0" maxOccurs="unbounded" />
286 <xsd:attribute name="name" type="xsd:ID" use="required"/>
287 <xsd:attribute name="alias" type="xsd:string" use="optional"/>
291 <xsd:element name="cache-type">
293 <xsd:attribute name="type" type="xsd:string" use="optional" default="count-limited" />
294 <xsd:attribute name="capacity" type="xsd:integer" use="optional"/>
298 <xsd:element name="param">
300 <xsd:attribute name="name" type="xsd:string" use="required"/>
301 <xsd:attribute name="value" type="xsd:string" use="required"/>
306 <xsd:complexType name="propertyType">
308 <xsd:element name="name" type="xsd:string"/>
309 <xsd:element name="value" type="xsd:string"/>