/
Graphs.ice
431 lines (368 loc) · 14.5 KB
/
Graphs.ice
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
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
/*
* Copyright 2011 Glencoe Software, Inc. All rights reserved.
* Use is subject to license terms supplied in LICENSE.txt
*/
#ifndef OMERO_CMD_GRAPHS_ICE
#define OMERO_CMD_GRAPHS_ICE
#include <omero/cmd/API.ice>
#include <omero/Collections.ice>
module omero {
module cmd {
/**
* Options that modify GraphModify2 request execution.
* By default, a user's related ""orphaned"" objects are typically
* included in a request's operation. These options override that
* behavior, allowing the client to specify whether to always or
* never include given kinds of child object regardless of if they
* are orphans.
* For annotations, each override is limited to specific annotation
* namespaces. (If no namespaces are specified, defaults apply
* according to the configuration of the graph request factory.)
*/
module graphs {
/**
* How GraphModify2 requests should deal with kinds of children,
* related to the target objects.
* By default, it is usual for only orphans to be operated on.
* At least one of includeType or excludeType must be used;
* if a type matches both, then it is included.
* No more than one of includeNs and excludeNs may be used.
*/
class ChildOption {
/**
* Include in the operation all children of these types.
*/
omero::api::StringSet includeType;
/**
* Include in the operation no children of these types.
*/
omero::api::StringSet excludeType;
/**
* For annotations, limit the applicability of this option
* to only those in these namespaces.
*/
omero::api::StringSet includeNs;
/**
* For annotations, limit the applicability of this option
* to only those not in these namespaces.
*/
omero::api::StringSet excludeNs;
};
/**
* A list of if GraphModify2 requests should operate on
* specific kinds of children.
* Only the first applicable option takes effect.
*/
["java:type:java.util.ArrayList<omero.cmd.graphs.ChildOption>:java.util.List<omero.cmd.graphs.ChildOption>"]
sequence<ChildOption> ChildOptions;
};
/**
* Base class for new requests for reading the model object graph.
*/
class GraphQuery extends Request {
/**
* The model objects upon which to operate.
* Related model objects may also be targeted.
*/
omero::api::StringLongListMap targetObjects;
};
/**
* Base class for new requests for modifying the model object graph.
*/
class GraphModify2 extends GraphQuery {
/**
* If the request should operate on specific kinds of children.
* Only the first applicable option takes effect.
*/
graphs::ChildOptions childOptions;
/**
* If this request should skip the actual model object updates.
* The response is still as if the operation actually occurred,
* indicating what would have been done to which objects.
*/
bool dryRun;
};
/**
* Move model objects into a different experimenter group.
* The user must be either an administrator with the
* {@code Chgrp} {@link omero.model.AdminPrivilege},
* or the owner of the objects and a member of the target group.
*/
class Chgrp2 extends GraphModify2 {
/**
* The ID of the experimenter group into which to move the model
* objects.
*/
long groupId;
};
/**
* Result of moving model objects into a different experimenter
* group.
*/
class Chgrp2Response extends OK {
/**
* The model objects that were moved.
*/
omero::api::StringLongListMap includedObjects;
/**
* The model objects that were deleted.
*/
omero::api::StringLongListMap deletedObjects;
};
/**
* Change the permissions on model objects.
* The user must be an administrator with the {@code ModifyGroup}
* {@link omero.model.AdminPrivilege}, the owner of the objects,
* or an owner of the objects' group.
* The only permitted target object type is
* {@link omero.model.ExperimenterGroup}.
*/
class Chmod2 extends GraphModify2 {
/**
* The permissions to set on the model objects.
*/
string permissions;
};
/**
* Result of changing the permissions on model objects.
*/
class Chmod2Response extends OK {
/**
* The model objects with changed permissions.
*/
omero::api::StringLongListMap includedObjects;
/**
* The model objects that were deleted.
*/
omero::api::StringLongListMap deletedObjects;
};
/**
* Change the ownership of model objects.
* The user must be an administrator with the {@code Chown}
* {@link omero.model.AdminPrivilege}, or they
* must be an owner of the objects' group, with
* the target user a member of the objects' group.
*/
class Chown2 extends GraphModify2 {
/**
* The ID of the experimenter to which to give the model
* objects.
**/
long userId;
/**
* The users who should have all their data targeted.
**/
omero::api::LongList targetUsers;
};
/**
* Result of changing the ownership of model objects.
*/
class Chown2Response extends OK {
/**
* The model objects that were given.
**/
omero::api::StringLongListMap includedObjects;
/**
* The model objects that were deleted.
**/
omero::api::StringLongListMap deletedObjects;
};
/**
* Delete model objects.
*/
class Delete2 extends GraphModify2 {
/**
* Ignore in the operation all objects of these types.
*/
["deprecate:experimental: may be wholly removed in next major version"]
omero::api::StringSet typesToIgnore;
};
/**
* Result of deleting model objects.
*/
class Delete2Response extends OK {
/**
* The model objects that were deleted.
*/
omero::api::StringLongListMap deletedObjects;
};
/**
* Perform a request skipping the top-most model objects in the
* graph. This permits operating upon the (possibly indirect)
* children of given objects. The arguments of this SkipHead
* request override those of the given request only until the
* targeted children are reached, except that if this SkipHead
* request's dryRun is set to true then the dryRun override
* persists throughout the operation. The response from SkipHead
* is as from the given request.
*/
class SkipHead extends GraphModify2 {
/**
* Classes of model objects from which to actually start the
* operation. These are children, directly or indirectly, of
* the target objects. These children become the true target
* objects of the underlying request.
*/
omero::api::StringSet startFrom;
/**
* The operation to perform on the targeted model objects.
* The given request's targetObjects property is ignored: it
* is the SkipHead request that specifies the parent objects.
* Only specific request types are supported
* (those implementing WrappableRequest).
*/
GraphModify2 request;
};
/**
* Request to determine the disk usage of the given objects
* and their contents. File-system paths used by multiple objects
* are de-duplicated in the total count. Specifying a class is
* equivalent to specifying all its instances as objects.
*
* Permissible classes include:
* ExperimenterGroup, Experimenter, Project, Dataset,
* Folder, Screen, Plate, Well, WellSample,
* Image, Pixels, Annotation, Job, Fileset, OriginalFile.
*/
class DiskUsage2 extends GraphQuery {
omero::api::StringSet targetClasses;
};
/**
* Disk usage report: bytes used and non-empty file counts on the
* repository file-system for specific objects. The counts from the
* maps may sum to more than the total if different types of object
* refer to the same file. Common referers include:
* Annotation for file annotations
* FilesetEntry for OMERO 5 image files (OMERO.fs)
* Job for import logs
* Pixels for pyramids and OMERO 4 images and archived files
* Thumbnail for the image thumbnails
* The above map values are broken down by owner-group keys.
*/
class DiskUsage2Response extends OK {
omero::api::LongPairToStringIntMap fileCountByReferer;
omero::api::LongPairToStringLongMap bytesUsedByReferer;
omero::api::LongPairIntMap totalFileCount;
omero::api::LongPairLongMap totalBytesUsed;
};
/**
* Duplicate model objects with some selection of their subgraph.
* All target model objects must be in the current group context.
* The extra three data members allow adjustment of the related
* subgraph. The same type must not be listed in more than one of
* those data members. Use of a more specific sub-type in a data
* member always overrides the more general type in another.
*/
class Duplicate extends GraphModify2 {
/**
* The types of the model objects to actually duplicate.
*/
omero::api::StringSet typesToDuplicate;
/**
* The types of the model objects that should not be duplicated
* but that may participate in references involving duplicates.
*/
omero::api::StringSet typesToReference;
/**
* The types of the model objects that should not be duplicated
* and that may not participate in references involving duplicates.
*/
omero::api::StringSet typesToIgnore;
};
/**
* Result of duplicating model objects.
*/
class DuplicateResponse extends OK {
/**
* The duplicate model objects created by the request.
* Note: If dryRun is set to true then this instead lists the model
* objects that would have been duplicated.
*/
omero::api::StringLongListMap duplicates;
};
/**
* Identify the parents or containers of model objects.
* Traverses the model graph to identify indirect relationships.
*/
class FindParents extends GraphQuery {
/**
* The types of parents being sought.
*/
omero::api::StringSet typesOfParents;
/**
* Classes of model objects to exclude from the recursive
* search. Search does not include or pass such objects.
* For efficiency the server automatically excludes various
* classes depending on the other arguments of the request.
*/
omero::api::StringSet stopBefore;
};
/**
* Result of identifying the parents or containers of model objects.
*/
class FoundParents extends OK {
/**
* The parents that were identified.
*/
omero::api::StringLongListMap parents;
};
/**
* Identify the children or contents of model objects.
* Traverses the model graph to identify indirect relationships.
*/
class FindChildren extends GraphQuery {
/**
* The types of children being sought.
*/
omero::api::StringSet typesOfChildren;
/**
* Classes of model objects to exclude from the recursive
* search. Search does not include or pass such objects.
* For efficiency the server automatically excludes various
* classes depending on the other arguments of the request.
*/
omero::api::StringSet stopBefore;
};
/**
* Result of identifying the children or contents of model objects.
*/
class FoundChildren extends OK {
/**
* The children that were identified.
*/
omero::api::StringLongListMap children;
};
/**
* Graph requests typically allow only specific model object classes
* to be targeted. This request lists the legal targets for a given
* request. The request's fields are ignored, only its class matters.
*/
class LegalGraphTargets extends Request {
/**
* A request of the type being queried.
*/
GraphQuery request;
};
/**
* A list of the legal targets for a graph request.
*/
class LegalGraphTargetsResponse extends OK {
/**
* The legal targets for the given request's type.
*/
omero::api::StringSet targets;
};
/**
* Returned when specifically a ome.services.graphs.GraphException
* is thrown. The contents of that internal exception are passed in
* this instance.
*/
class GraphException extends ERR {
/**
* The message of the GraphException.
*/
string message;
};
};
};
#endif