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 <all>
|
|
17 <element name="modelType" type="tns:ClassName" />
|
|
18 </all>
|
|
19 <attribute name="id" type="string" />
|
221
|
20 </extension>
|
|
21 </complexContent>
|
|
22 </complexType>
|
|
23 </element>
|
|
24 </sequence>
|
|
25 </complexType>
|
|
26 </element>
|
|
27 <element name="locators" minOccurs="0">
|
|
28 <complexType>
|
|
29 <sequence>
|
|
30 <element name="locator" maxOccurs="unbounded">
|
|
31 <complexType>
|
|
32 <complexContent>
|
223
|
33 <extension base="tns:ResourceLocator">
|
222
|
34 <attribute name="name" type="string" />
|
221
|
35 </extension>
|
|
36 </complexContent>
|
|
37 </complexType>
|
|
38 </element>
|
|
39 </sequence>
|
|
40 </complexType>
|
|
41 </element>
|
|
42 </sequence>
|
|
43 </complexType>
|
|
44 <keyref name="locator-key-ref" refer="tns:locator-key">
|
|
45 <selector xpath=".//tns:response/tns:locatorRef" />
|
|
46 <field xpath="@ref" />
|
|
47 </keyref>
|
|
48 <key name="locator-key">
|
222
|
49 <selector xpath="tns:locators/tns:locator" />
|
|
50 <field xpath="@name" />
|
|
51 </key>
|
221
|
52 </element>
|
|
53
|
|
54 <!-- abstract types -->
|
223
|
55 <complexType name="AbstractBinding" abstract="true" />
|
|
56 <complexType name="AbstractTransformation" abstract="true" />
|
|
57 <complexType name="AbstractResult" abstract="true" />
|
221
|
58
|
223
|
59 <complexType name="ResourceContract">
|
221
|
60 <sequence>
|
223
|
61 <group ref="tns:RestOperations" />
|
|
62 <element name="resource" maxOccurs="unbounded" minOccurs="0"
|
|
63 type="tns:ChildResourceContract" />
|
221
|
64 </sequence>
|
|
65 </complexType>
|
|
66
|
223
|
67 <complexType name="ChildResourceContract">
|
222
|
68 <sequence>
|
223
|
69 <choice>
|
|
70 <element name="name" type="string" />
|
|
71 <element name="match" type="string" />
|
|
72 </choice>
|
|
73 <element name="model" minOccurs="0" type="tns:MethodBinding" />
|
|
74 <choice>
|
|
75 <element name="contract">
|
|
76 <complexType>
|
|
77 <attribute name="ref" type="string" use="required" />
|
|
78 </complexType>
|
|
79 </element>
|
|
80 <sequence>
|
|
81 <group ref="tns:RestOperations" />
|
|
82 <element name="resource" type="tns:ChildResourceContract"
|
|
83 minOccurs="0" maxOccurs="unbounded" />
|
|
84 </sequence>
|
|
85 </choice>
|
|
86 </sequence>
|
|
87
|
|
88 </complexType>
|
|
89
|
|
90 <group name="RestOperations">
|
|
91 <sequence>
|
|
92 <element name="get" type="tns:OperationContract" minOccurs="0" />
|
|
93 <element name="post" type="tns:OperationContract" minOccurs="0" />
|
|
94 <element name="put" type="tns:OperationContract" minOccurs="0" />
|
|
95 <element name="delete" type="tns:OperationContract"
|
222
|
96 minOccurs="0" />
|
|
97 </sequence>
|
|
98 </group>
|
|
99
|
223
|
100 <complexType name="OperationContract">
|
|
101 <complexContent>
|
|
102 <extension base="tns:MethodBinding">
|
|
103 <sequence>
|
|
104 <element name="response" type="tns:AbstractResult"
|
|
105 minOccurs="0" />
|
|
106 </sequence>
|
|
107 </extension>
|
|
108 </complexContent>
|
221
|
109 </complexType>
|
|
110
|
223
|
111 <complexType name="MethodBinding">
|
221
|
112 <sequence>
|
223
|
113 <element name="var" type="tns:BindingVariable" minOccurs="0"
|
221
|
114 maxOccurs="unbounded" />
|
|
115 </sequence>
|
223
|
116 <attribute name="expr" type="string" use="required" />
|
|
117 <attribute name="handler" type="string" />
|
221
|
118 </complexType>
|
|
119
|
223
|
120 <complexType name="BindingVariable">
|
221
|
121 <complexContent>
|
223
|
122 <extension base="tns:MethodBinding">
|
221
|
123 <attribute name="name" type="string" />
|
|
124 </extension>
|
|
125 </complexContent>
|
|
126 </complexType>
|
|
127
|
|
128
|
|
129 <complexType name="transformation">
|
|
130 <attribute name="class" type="string" />
|
|
131 </complexType>
|
|
132
|
223
|
133 <complexType name="ResourceLocator">
|
221
|
134 <sequence>
|
223
|
135 <element name="var" type="tns:BindingVariable" minOccurs="0"
|
221
|
136 maxOccurs="unbounded" />
|
|
137 <element name="template" type="string" />
|
|
138 </sequence>
|
|
139 </complexType>
|
|
140
|
223
|
141 <simpleType name="RedirectCodes">
|
221
|
142 <restriction base="string">
|
|
143 <enumeration value="moved-permanently" />
|
|
144 <enumeration value="temporary-redirect" />
|
|
145 <enumeration value="see-other" />
|
|
146 </restriction>
|
|
147 </simpleType>
|
|
148
|
223
|
149 <complexType name="RedirectResponse">
|
221
|
150 <complexContent>
|
223
|
151 <extension base="tns:AbstractResult">
|
221
|
152 <choice>
|
223
|
153 <element name="locator" type="tns:ResourceLocator" />
|
221
|
154 <element name="locatorRef">
|
|
155 <complexType>
|
|
156 <attribute name="ref" type="string" />
|
|
157 </complexType>
|
|
158 </element>
|
223
|
159 <element name="status" type="tns:RedirectCodes" minOccurs="0" />
|
221
|
160 </choice>
|
|
161 </extension>
|
|
162 </complexContent>
|
|
163 </complexType>
|
219
|
164
|
223
|
165 <simpleType name="ClassName">
|
|
166 <restriction base="string">
|
|
167 <pattern value="\w+(::\w+)*" />
|
|
168 </restriction>
|
|
169 </simpleType>
|
|
170
|
218
|
171 </schema> |