aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ApplicationPlugins/Rest/rest.xsd
blob: 4dc0ae4d4ea1c176971a6a77b2355793835609b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">

	<xsd:annotation>
		<xsd:documentation xml:lang="en">
		Open Simulator Export/Import XML schema
		August 2008
		</xsd:documentation>
	</xsd:annotation>

    <!-- WARNING!!!
		 This is currently a draft, it does not reflect
		 what is exported, nor what will be understood
		 on import. It is included as a working document
		 and this comment will be removed at such time as
		 the schema corresponds to reality.
	 -->

	<!--
		REST-related information
		Inventory data is always framed by an 
		inventory element. Consists of zero or
		more elements representing either folders
		or items within those folders. The inventory
		element represents the "real" root folder.
	 -->

	<xsd:element name="inventory" type="inventory_ct" />

    <!--
         The inventory complex type is just an arbitrary
         sequence of folders and items. In reality it is
         typically just folders. Both item and folder 
         have corresponding complex types. It is distinct
         from folders insofar as it has no other defining
         attributes.
     -->

	<xsd:complexType name="inventory_ct">
		<xsd:element name="folder" type="folder_ct" maxOccurs="unbounded"/>
		<xsd:element name="item"   type="item_ct" maxOccurs="unbounded" />
	</xsd:complexType>
 
	<xsd:complexType name="folder_ct">
		<xsd:attribute name="UUID"         type="uuid_st" />
		<xsd:attribute name="name"         type="name_st" />
		<xsd:attribute name="type"         type="folder_type_st" />
		<xsd:attribute name="description"  type="xsd:string" />	<!-- added -->
		<xsd:attribute name="version" 	   type="unsignedShort" />
		<xsd:attribute name="owner"        type="uuid_st" />

		<xsd:attribute name="creator" 	   type="uuid_st" /> <!-- added -->
		<xsd:attribute name="creationdate" type="date_st" /> <!-- added -->

		<xsd:attribute name="parent"  	   type="uuid_st" />

		<xsd:element   name="permissions"  type="permissions_ct" maxOccurs="unbounded" />	<!-- added -->
		<xsd:element   name="folder"       type="folder_ct"      maxOccurs="unbounded" />
		<xsd:element   name="item"         type="item_ct"        maxOccurs="unbounded" />
	</xsd:complexType>

	<xsd:complexType name="item_ct">
		<xsd:attribute name="UUID"         type="uuid_st" />
		<xsd:attribute name="name"         type="name_st" />
		<xsd:attribute name="type"         type="inventory_type_st" />
		<xsd:attribute name="description"  type="xsd:string" />
		<xsd:attribute name="version" 	   type="unsignedShort" />	<!-- added -->
		<xsd:attribute name="owner"        type="uuid_st" />

		<xsd:attribute name="creator" 	   type="uuid_st" />
		<xsd:attribute name="creationdate" type="date_st" />

		<xsd:attribute name="folder"  	   type="uuid_st" />
		<xsd:attribute name="groupid" 	   type="uuid_st" />
		<xsd:attribute name="groupowned"   type="xsd:boolean" />
		<xsd:attribute name="saletype"     type="sale_st" />
		<xsd:attribute name="saleprice"    type="xsd:decimal" />

		<xsd:element   name="permissions"  type="permissions_ct" maxOccurs="unbounded" />
	</xsd:complexType>

	<xsd:complexType name="asset_ct">
		<xsd:attribute name="UUID"         type="uuid_st" />
		<xsd:attribute name="name"         type="name_st" />
		<xsd:attribute name="type"         type="asset_type_st" />
		<xsd:attribute name="description"  type="xsd:string" />
		<xsd:attribute name="version" 	   type="unsignedShort" />	<!-- added -->
		<xsd:attribute name="owner"        type="uuid_st" />

		<xsd:attribute name="creator" 	   type="uuid_st" />
		<xsd:attribute name="creationdate" type="date_st" />

		<xsd:attribute name="temporary"    type="xsd:boolean" />
		<xsd:attribute name="local"        type="xsd:boolean" />
		<xsd:attribute name="inline"       type="xsd:boolean" />
	</xsd:complexType>

	<!-- Constrained Simple Data types -->

    <!--
         We need to specify name as a simple type because on
         some platforms it is constrained by a certain length
         limitation. For completeness we indicate that whitespace
         should be preserved exactly as specified.
     -->

	<xsd:simpleType name="name_st">
		<xsd:restriction base="xsd:string">
		    <whiteSpace value="preserve" />
            <minLength value="0" />
            <maxLength value="64" />
		</xsd:restriction>
	</xsd:simpleType>

    <!--
         Type information in the folder is meant to indicate
         the preferred asset type for this folder. As such, that
         currently corresponds to the type values allowed for
         assets, however that is not mandated, so for
         now at least I'll represent this as a distinct 
         enumeration.
         This seems inappropriate; it seems like the folder's
         content should reflect the InventoryType classifications
         rather than the asset types.
     -->

	<xsd:simpleType name="folder_type_st">
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="Texture" />
			<xsd:enumeration value="Sound" />
			<xsd:enumeration value="CallingCard" />
			<xsd:enumeration value="Landmark" />
			<xsd:enumeration value="Script" />
			<xsd:enumeration value="Clothing" />
			<xsd:enumeration value="Object" />
			<xsd:enumeration value="Notecard" />
			<xsd:enumeration value="LSLText" />
			<xsd:enumeration value="LSLByteCode" />
			<xsd:enumeration value="TextureTGA" />
			<xsd:enumeration value="BodyPart" />
			<xsd:enumeration value="SoundWAV" />
			<xsd:enumeration value="ImageTGA" />
			<xsd:enumeration value="ImageJPEG" />
			<xsd:enumeration value="Animation" />
			<xsd:enumeration value="Gesture" />
			<xsd:enumeration value="Simstate" />
			<xsd:enumeration value="Unknown" />
			<xsd:enumeration value="LostAndFoundFolder" />
			<xsd:enumeration value="SnapshotFolder" />
			<xsd:enumeration value="TrashFolder" />
			<xsd:enumeration value="Folder" />
			<xsd:enumeration value="RootFolder" />
		</xsd:restriction>
	</xsd:simpleType>

    <!--
         Inventory item type designates an asset class, rather
         than a specific asset type. For example, "SnapShot"
         might include a number of asset types such as JPEG, 
         TGA, etc.. This is not a consistent interpretation,
         classifications such as LostAndFound are meta-types
         relative to asset classes. 

         These types should be abstract and not be tied to a 
         specific platform. A world's import facility should be
         responsible for mapping these to meaningful internal
         representations.

         These types were based on information in:
             libsecondlife/InventoryManager.cs
     -->

	<xsd:simpleType name="inventory_type_st">
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="Texture" />
			<xsd:enumeration value="Sound" />
			<xsd:enumeration value="CallingCard" />
			<xsd:enumeration value="Landmark" />
			<xsd:enumeration value="Script" />
			<xsd:enumeration value="Clothing" />
			<xsd:enumeration value="Object" />
			<xsd:enumeration value="Notecard" />
			<xsd:enumeration value="LSL" />
			<xsd:enumeration value="LSLBytecode" />
			<xsd:enumeration value="TextureTGA" />
			<xsd:enumeration value="BodyPart" />
			<xsd:enumeration value="Snapshot" />
			<xsd:enumeration value="Attachment" />
			<xsd:enumeration value="Wearable" />
			<xsd:enumeration value="Animation" />
			<xsd:enumeration value="Gesture" />
			<xsd:enumeration value="Folder" />
			<xsd:enumeration value="Unknown" />
			<xsd:enumeration value="LostAndFound" />
			<xsd:enumeration value="Trash" />
			<xsd:enumeration value="Root" />
		</xsd:restriction>
	</xsd:simpleType>

    <!--
         The asset types seem to be even more disarrayed than
         the inventory types. It seems to be little more than
         a reiteration of the inventory type information,
         which adds little or nothing to the overall data
         model.

         Of course, given that these are drawn from the
         libsecondlife definitions, we aren't at liberty to
         simply redefine them in place. But the XML definitions
         here could be made more useful.

         These types were based on information in:
             libsecondlife/AssetManager.cs
     -->

	<xsd:simpleType name="asset_type_st">
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="Texture" />
			<xsd:enumeration value="Sound" />
			<xsd:enumeration value="CallingCard" />
			<xsd:enumeration value="Landmark" />
			<xsd:enumeration value="Script" />
			<xsd:enumeration value="Clothing" />
			<xsd:enumeration value="Object" />
			<xsd:enumeration value="Notecard" />
			<xsd:enumeration value="LSLText" />
			<xsd:enumeration value="LSLByteCode" />
			<xsd:enumeration value="TextureTGA" />
			<xsd:enumeration value="BodyPart" />
			<xsd:enumeration value="SoundWAV" />
			<xsd:enumeration value="ImageTGA" />
			<xsd:enumeration value="ImageJPEG" />
			<xsd:enumeration value="Animation" />
			<xsd:enumeration value="Gesture" />
			<xsd:enumeration value="Simstate" />
			<xsd:enumeration value="Unknown" />
			<xsd:enumeration value="LostAndFoundFolder" />
			<xsd:enumeration value="SnapshotFolder" />
			<xsd:enumeration value="TrashFolder" />
			<xsd:enumeration value="Folder" />
			<xsd:enumeration value="RootFolder" />
		</xsd:restriction>
	</xsd:simpleType>

    <!-- This is describing the apparent form of a UUID. If
         we ever want a more metaphysical definition we'll 
         need to add to it.
     -->

	<xsd:simpleType name="uuid_st">
		<xsd:restriction base="xsd:string">
		    <xsd:pattern value="[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}"/>
		</xsd:restriction>
	</xsd:simpleType>

    <!-- This constrains the date representation. Currently
         it is simply an integer representing the elapsed
		 ?? since ??.
     -->

	<xsd:simpleType name="date_st">
		<xsd:restriction base="xsd:positiveInteger">
		</xsd:restriction>
	</xsd:simpleType>

    <!-- This constrains the representation of sale price.
		 Currently it is a simple decimal with no unit
		 specified. 
         Issues: interoperability.
     -->

	<xsd:simpleType name="sale_st">
		<xsd:restriction base="xsd:decimal">
		</xsd:restriction>
	</xsd:simpleType>

</xsd:schema>