218
|
1 <?xml version="1.0" encoding="UTF-8"?>
|
221
|
2 <schema targetNamespace="http://implab.org/schemas/resources"
|
|
3 elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema"
|
|
4 xmlns:tns="http://implab.org/schemas/resources">
|
|
5 <element name="resources">
|
|
6 <complexType>
|
|
7 <sequence>
|
223
|
8 <element name="root" type="tns:ResourceContract" />
|
|
9 <element name="contracts" minOccurs="0">
|
221
|
10 <complexType>
|
|
11 <sequence>
|
222
|
12 <element name="contract" maxOccurs="unbounded">
|
221
|
13 <complexType>
|
|
14 <complexContent>
|
223
|
15 <extension base="tns:ResourceContract">
|
|
16 <attribute name="id" type="string" />
|
226
|
17 <attribute name="modelType" type="tns:ClassName" />
|
221
|
18 </extension>
|
|
19 </complexContent>
|
|
20 </complexType>
|
|
21 </element>
|
|
22 </sequence>
|
|
23 </complexType>
|
|
24 </element>
|
|
25 </sequence>
|
|
26 </complexType>
|
|
27 </element>
|
|
28
|
|
29 <!-- abstract types -->
|
223
|
30 <complexType name="AbstractBinding" abstract="true" />
|
|
31 <complexType name="AbstractTransformation" abstract="true" />
|
|
32 <complexType name="AbstractResult" abstract="true" />
|
221
|
33
|
223
|
34 <complexType name="ResourceContract">
|
221
|
35 <sequence>
|
223
|
36 <group ref="tns:RestOperations" />
|
|
37 <element name="resource" maxOccurs="unbounded" minOccurs="0"
|
|
38 type="tns:ChildResourceContract" />
|
221
|
39 </sequence>
|
|
40 </complexType>
|
|
41
|
223
|
42 <complexType name="ChildResourceContract">
|
222
|
43 <sequence>
|
223
|
44 <choice>
|
|
45 <element name="name" type="string" />
|
226
|
46 <element name="match">
|
|
47 <complexType>
|
|
48 <simpleContent>
|
|
49 <extension base="string">
|
|
50 <attribute name="vars" type="tns:VarList"/>
|
|
51 </extension>
|
|
52 </simpleContent>
|
|
53 </complexType>
|
|
54
|
|
55 </element>
|
223
|
56 </choice>
|
226
|
57 <group ref="tns:BindingExpressions"/>
|
223
|
58 <choice>
|
|
59 <element name="contract">
|
|
60 <complexType>
|
|
61 <attribute name="ref" type="string" use="required" />
|
|
62 </complexType>
|
|
63 </element>
|
|
64 <sequence>
|
|
65 <group ref="tns:RestOperations" />
|
|
66 <element name="resource" type="tns:ChildResourceContract"
|
|
67 minOccurs="0" maxOccurs="unbounded" />
|
|
68 </sequence>
|
|
69 </choice>
|
|
70 </sequence>
|
|
71
|
|
72 </complexType>
|
|
73
|
|
74 <group name="RestOperations">
|
|
75 <sequence>
|
|
76 <element name="get" type="tns:OperationContract" minOccurs="0" />
|
|
77 <element name="post" type="tns:OperationContract" minOccurs="0" />
|
|
78 <element name="put" type="tns:OperationContract" minOccurs="0" />
|
|
79 <element name="delete" type="tns:OperationContract"
|
222
|
80 minOccurs="0" />
|
|
81 </sequence>
|
|
82 </group>
|
226
|
83
|
|
84 <group name="BindingExpressions">
|
|
85 <choice>
|
|
86 <element name="bind" type="tns:Binding"/>
|
|
87 <element name="transform" type="tns:Transformation"/>
|
|
88 <element name="value" type="string" />
|
|
89 </choice>
|
|
90 </group>
|
222
|
91
|
223
|
92 <complexType name="OperationContract">
|
226
|
93
|
|
94 <sequence>
|
|
95 <element name="bind" type="tns:Binding" />
|
|
96 <element name="response" minOccurs="0">
|
|
97 <complexType>
|
|
98 <choice>
|
|
99 <element name="redirect" type="tns:RedirectResponse" />
|
|
100 <element name="transform" type="tns:Transformation" />
|
|
101 </choice>
|
|
102 </complexType>
|
|
103 </element>
|
|
104 </sequence>
|
|
105
|
221
|
106 </complexType>
|
|
107
|
226
|
108 <complexType name="Binding">
|
221
|
109 <sequence>
|
223
|
110 <element name="var" type="tns:BindingVariable" minOccurs="0"
|
221
|
111 maxOccurs="unbounded" />
|
|
112 </sequence>
|
223
|
113 <attribute name="expr" type="string" use="required" />
|
|
114 <attribute name="handler" type="string" />
|
221
|
115 </complexType>
|
|
116
|
223
|
117 <complexType name="BindingVariable">
|
224
|
118 <choice>
|
226
|
119 <element name="bind" type="tns:Binding" />
|
224
|
120 <element name="transform" type="tns:Transformation" />
|
226
|
121 <element name="value" type="string" />
|
224
|
122 </choice>
|
|
123 <attribute name="name" type="tns:IdentifierName" use="required" />
|
221
|
124 </complexType>
|
|
125
|
|
126
|
224
|
127 <complexType name="Transformation">
|
226
|
128 <sequence>
|
|
129 <element name="target" type="tns:Binding" minOccurs="0" />
|
|
130 <element name="transform" type="tns:Transformation"
|
|
131 minOccurs="0" />
|
|
132 </sequence>
|
224
|
133 <attribute name="class" type="tns:ClassName" use="required" />
|
221
|
134 </complexType>
|
|
135
|
223
|
136 <complexType name="ResourceLocator">
|
224
|
137 <attribute name="locator" type="string" use="required" />
|
221
|
138 </complexType>
|
|
139
|
223
|
140 <simpleType name="RedirectCodes">
|
221
|
141 <restriction base="string">
|
|
142 <enumeration value="moved-permanently" />
|
|
143 <enumeration value="temporary-redirect" />
|
|
144 <enumeration value="see-other" />
|
|
145 </restriction>
|
|
146 </simpleType>
|
|
147
|
223
|
148 <complexType name="RedirectResponse">
|
221
|
149 <complexContent>
|
223
|
150 <extension base="tns:AbstractResult">
|
224
|
151 <sequence>
|
|
152 <element name="location" type="tns:ResourceLocator" />
|
223
|
153 <element name="status" type="tns:RedirectCodes" minOccurs="0" />
|
224
|
154 </sequence>
|
221
|
155 </extension>
|
|
156 </complexContent>
|
|
157 </complexType>
|
219
|
158
|
223
|
159 <simpleType name="ClassName">
|
|
160 <restriction base="string">
|
|
161 <pattern value="\w+(::\w+)*" />
|
|
162 </restriction>
|
|
163 </simpleType>
|
|
164
|
224
|
165 <simpleType name="IdentifierName">
|
|
166 <restriction base="string">
|
|
167 <pattern value="\w+" />
|
|
168 </restriction>
|
|
169 </simpleType>
|
226
|
170
|
|
171 <simpleType name="VarList">
|
|
172 <restriction base="string">
|
|
173 <pattern value="(\w+)(\s*,\s*(\w+))*" />
|
|
174 </restriction>
|
|
175 </simpleType>
|
224
|
176
|
218
|
177 </schema> |