1 <?xml version="1.0" encoding="UTF-8"?>
3 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
4 * Copyright (C) $$Year-Rel$$ The Jalview Authors
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/>.
18 * The Jalview Authors are detailed in the 'AUTHORS' file.
20 <!--DOCTYPE schema PUBLIC "-//W3C/DTD XML Schema Version 1.0//EN"
21 "http://www.w3.org/TR/2000/WD-xmlschema-1-20000225/structures.dtd"-->
23 Castor Object Mapping XML Schema
25 Namespace: http://castor.exolab.org/
26 System: http://castor.exolab.org/mapping.xsd
27 Public: -//EXOLAB/Castor Object Mapping Schema Version 1.0//EN
29 *Note*: This schema is under evolution and subject to change.
32 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
33 targetNamespace="http://castor.exolab.org/"
34 xmlns="http://castor.exolab.org/"
37 <xsd:element name="mapping">
40 <xsd:element name="description" type="xsd:string" minOccurs="0" maxOccurs="1" />
41 <xsd:element ref="include" minOccurs="0" maxOccurs="unbounded" />
42 <xsd:element ref="class" minOccurs="0" maxOccurs="unbounded" />
43 <xsd:element ref="key-generator" minOccurs="0" maxOccurs="unbounded" />
48 <xsd:element name="include">
50 <xsd:attribute name="href" type="xsd:string" use="required"/>
54 <xsd:element name="class">
57 <xsd:element name="description" type="xsd:string" minOccurs="0" maxOccurs="1" />
58 <xsd:element ref="cache-type" minOccurs="0" maxOccurs="1" />
59 <xsd:element ref="map-to" minOccurs="0" maxOccurs="1" />
60 <xsd:choice minOccurs="1">
61 <xsd:element ref="field" minOccurs="0" maxOccurs="unbounded"/>
62 <xsd:element ref="container" minOccurs="0" maxOccurs="unbounded"/>
65 <xsd:attribute name="name" type="xsd:ID" use="required"/>
66 <xsd:attribute name="extends" type="xsd:IDREF" use="optional"/>
67 <xsd:attribute name="depends" type="xsd:IDREF" use="optional"/>
68 <xsd:attribute name="identity" type="xsd:NMTOKENS" use="optional"/>
69 <xsd:attribute name="access" default="shared" use="optional">
71 <xsd:restriction base="xsd:string">
72 <xsd:enumeration value="read-only"/>
73 <xsd:enumeration value="shared"/>
74 <xsd:enumeration value="exclusive"/>
75 <xsd:enumeration value="db-locked"/>
79 <xsd:attribute name="key-generator" type="xsd:string" use="optional"/>
80 <xsd:attribute name="auto-complete" type="xsd:boolean" use="optional" default="false"/>
81 <xsd:attribute name="verify-constructable" type="xsd:boolean" use="optional" default="true"/>
85 <xsd:element name="map-to">
87 <xsd:attribute name="table" type="xsd:NMTOKEN" use="optional"/>
88 <xsd:attribute name="xml" type="xsd:string" use="optional"/>
89 <xsd:attribute name="ns-uri" type="xsd:string" use="optional"/>
90 <xsd:attribute name="ns-prefix" type="xsd:NMTOKEN" use="optional"/>
91 <xsd:attribute name="ldap-dn" type="xsd:string" use="optional"/>
92 <xsd:attribute name="ldap-oc" type="xsd:string" use="optional"/>
96 <xsd:element name="field">
99 <xsd:element name="description" type="xsd:string" minOccurs="0" maxOccurs="1" />
100 <xsd:element ref="sql" minOccurs="0" maxOccurs="1"/>
101 <xsd:element ref="bind-xml" minOccurs="0" maxOccurs="1"/>
102 <xsd:element ref="ldap" minOccurs="0" maxOccurs="1"/>
105 <xsd:attribute name="name" type="xsd:string" use="required"/>
106 <xsd:attribute name="type" type="xsd:string" use="optional"/>
107 <xsd:attribute name="required" type="xsd:boolean" use="optional" default="false"/>
108 <xsd:attribute name="transient" type="xsd:boolean" use="optional" default="false"/>
109 <xsd:attribute name="direct" type="xsd:boolean" use="optional" default="false"/>
110 <xsd:attribute name="lazy" type="xsd:boolean" use="optional" default="false"/>
111 <xsd:attribute name="container" type="xsd:boolean" use="optional"/>
112 <xsd:attribute name="get-method" type="xsd:string" use="optional"/>
113 <xsd:attribute name="has-method" type="xsd:string" use="optional"/>
114 <xsd:attribute name="set-method" type="xsd:string" use="optional"/>
115 <xsd:attribute name="create-method" type="xsd:string" use="optional"/>
116 <xsd:attribute name="handler" type="xsd:string" use="optional"/>
117 <xsd:attribute name="collection" use="optional">
119 <xsd:restriction base="xsd:string">
120 <xsd:enumeration value="array"/>
121 <xsd:enumeration value="vector"/>
122 <xsd:enumeration value="arraylist"/>
123 <xsd:enumeration value="hashtable"/>
124 <xsd:enumeration value="collection"/>
125 <xsd:enumeration value="set"/>
126 <xsd:enumeration value="map"/>
127 <xsd:enumeration value="enumerate"/>
134 <xsd:element name="container">
137 <xsd:element name="description" type="xsd:string" minOccurs="0" maxOccurs="1" />
138 <xsd:element ref="field" minOccurs="1"/>
140 <xsd:attribute name="name" type="xsd:NMTOKEN" use="required"/>
141 <xsd:attribute name="type" type="xsd:NMTOKEN" use="optional"/>
142 <xsd:attribute name="required" type="xsd:boolean" use="optional" default="false"/>
143 <xsd:attribute name="direct" type="xsd:boolean" use="optional" default="false"/>
144 <xsd:attribute name="get-method" type="xsd:NMTOKEN" use="optional"/>
145 <xsd:attribute name="set-method" type="xsd:NMTOKEN" use="optional"/>
146 <xsd:attribute name="create-method" type="xsd:NMTOKEN" use="optional"/>
150 <xsd:element name="sql">
152 <xsd:attribute name="name" type="xsd:NMTOKENS" use="optional"/>
153 <xsd:attribute name="type" type="xsd:string" use="optional"/>
154 <xsd:attribute name="many-table" type="xsd:NMTOKEN" use="optional"/>
155 <xsd:attribute name="many-key" type="xsd:NMTOKENS" use="optional"/>
156 <xsd:attribute name="read-only" type="xsd:boolean" use="optional" default="false"/>
158 <!-- signals that this field is transient for database mapping (ie should be ignored) -->
159 <xsd:attribute name="transient" type="xsd:boolean" use="optional"/>
162 <xsd:attribute name="dirty" default="check" use="optional">
164 <xsd:restriction base="xsd:string">
165 <xsd:enumeration value="check"/>
166 <xsd:enumeration value="ignore"/>
174 The 'bind-xml' element is used for specifying XML specific databinding
175 properties and behavior for a specific field. 'bind-xml' may only appear
176 as a child of a 'field' element.
178 <xsd:element name="bind-xml">
181 The 'bind-xml' element is used for specifying XML specific databinding
182 properties and behavior for a specific field. 'bind-xml' may only appear
183 as a child of a 'field' element.
189 <xsd:element ref="class" minOccurs="0" maxOccurs="1"/>
190 <xsd:element name="property" type="propertyType" minOccurs="0" maxOccurs="unbounded"/>
194 An optional attribute used for specifying the XML name for the
195 field associated with the 'bind-xml' element.
197 <xsd:attribute name="name" type="xsd:QName" use="optional">
200 An optional attribute used for specifying the XML name for the
201 field associated with the 'bind-xml' element.
206 <xsd:attribute name="type" type="xsd:NMTOKEN" use="optional"/>
209 Allows specifying how Castor should automatically determines
210 the XML name of this field when no name has been specified.
212 <xsd:attribute name="auto-naming" use="optional">
215 Allows specifying how Castor should automatically determines
216 the XML name of this field when no name has been specified.
217 In most cases the XML name is determined by using the field name,
218 but in some cases the user may want to use the Class name of
219 the field type. This attribute allows choosing between the
220 two approaches. If this attribute is not specified, the field
221 name is used as the XML name.
225 <xsd:restriction base="xsd:string">
226 <xsd:enumeration value="deriveByClass"/>
227 <xsd:enumeration value="deriveByField"/>
233 Allows specifying a nested location path for this field,
234 the value should just be a simplified XPath like value
235 where names are separated by "/".
237 <xsd:attribute name="location" type="xsd:string" use="optional">
240 Allows specifying a nested location path for this field,
241 the value should just be a simplified XPath like value
242 where names are separated by "/".
247 <!-- Allows overriding the matching rule -->
248 <xsd:attribute name="matches" type="xsd:string" use="optional"/>
251 <!-- Signal that this field should be marshalled as a reference -->
252 <xsd:attribute name="reference" type="xsd:boolean" use="optional"/>
254 <!-- NodeType for the XML node -->
255 <xsd:attribute name="node" use="optional">
257 <xsd:restriction base="xsd:string">
258 <xsd:enumeration value="attribute"/>
259 <xsd:enumeration value="element"/>
260 <xsd:enumeration value="namespace"/>
261 <xsd:enumeration value="text"/>
266 <xsd:attribute name="QName-prefix" type="xsd:NMTOKEN" use="optional"/>
268 <!-- Signal that this field is transient for XML (ie should be ignored) -->
269 <xsd:attribute name="transient" type="xsd:boolean" use="optional"/>
276 <xsd:element name="ldap">
278 <xsd:attribute name="name" type="xsd:NMTOKEN" use="optional"/>
282 <xsd:element name="key-generator">
285 <xsd:element ref="param" minOccurs="0" maxOccurs="unbounded" />
287 <xsd:attribute name="name" type="xsd:ID" use="required"/>
288 <xsd:attribute name="alias" type="xsd:string" use="optional"/>
292 <xsd:element name="cache-type">
294 <xsd:attribute name="type" type="xsd:string" use="optional" default="count-limited" />
295 <xsd:attribute name="capacity" type="xsd:integer" use="optional"/>
299 <xsd:element name="param">
301 <xsd:attribute name="name" type="xsd:string" use="required"/>
302 <xsd:attribute name="value" type="xsd:string" use="required"/>
307 <xsd:complexType name="propertyType">
309 <xsd:element name="name" type="xsd:string"/>
310 <xsd:element name="value" type="xsd:string"/>