-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApi.inc.php
More file actions
3021 lines (2847 loc) · 120 KB
/
Copy pathApi.inc.php
File metadata and controls
3021 lines (2847 loc) · 120 KB
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
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?php
/*=======================================================================================
* *
* Api.inc.php *
* *
*======================================================================================*/
/**
* Service application interface.
*
* This file contains the definitions for the service application interface,
*
* @author Milko A. Škofič <m.skofic@cgiar.org>
* @version 1.00 04/05/2014
*/
/*=======================================================================================
* REQUEST *
*======================================================================================*/
/**
* Operation.
*
* This tag identifies the service operation.
*/
define( "kAPI_REQUEST_OPERATION", 'op' );
/**
* Language.
*
* This tag identifies the service default language.
*/
define( "kAPI_REQUEST_LANGUAGE", 'ln' );
/**
* User.
*
* This tag identifies the user who requested the service, the value must correspond to the
* user's fingerprint.
*/
define( "kAPI_REQUEST_USER", 'us' );
/**
* Parameters.
*
* This tag identifies the service request parameters.
*/
define( "kAPI_REQUEST_PARAMETERS", 'pr' );
/*=======================================================================================
* RESPONSE *
*======================================================================================*/
/**
* Status.
*
* This tag identifies the status section which provides information on the outcome of the
* operation, which includes the eventual error message if the operation failed.
*
* This block may contain the following elements:
*
* <ul>
* <li><tt>{@link kAPI_STATUS_STATE}</tt>: This element indicates the operation state.
* <li><tt>{@link kAPI_STATUS_CODE}</tt>: This element will hold the eventual status code.
* <li><tt>{@link kAPI_STATUS_CODE}</tt>: This element will hold the eventual status
* message.
* <li><tt>{@link kAPI_STATUS_FILE}</tt>: This element will hold the eventual exception
* source file path.
* <li><tt>{@link kAPI_STATUS_FILE}</tt>: This element will hold the eventual exception
* file line.
* <li><tt>{@link kAPI_STATUS_TRACE}</tt>: This element will hold the eventual exception
* trace.
* </ul>
*/
define( "kAPI_RESPONSE_STATUS", 'status' );
/**
* Paging.
*
* This tag identifies the paging section which provides information on the number of
* affected records, skipped records, the maximum number of returned records and the actual
* number of returned records.
*
* This block may contain the following elements:
*
* <ul>
* <li><tt>{@link kAPI_PAGING_SKIP}</tt>: Paging start.
* <li><tt>{@link kAPI_PAGING_LIMIT}</tt>: Paging limit.
* <li><tt>{@link kAPI_PAGING_ACTUAL}</tt>: Number of actual returned records.
* <li><tt>{@link kAPI_PAGING_AFFECTED}</tt>: Number of affected records.
* </ul>
*/
define( "kAPI_RESPONSE_PAGING", 'paging' );
/**
* Request.
*
* This tag identifies the results section which holds the eventual service request.
*/
define( "kAPI_RESPONSE_REQUEST", 'request' );
/**
* Results.
*
* This tag identifies the results section which holds the operation result.
*/
define( "kAPI_RESPONSE_RESULTS", 'results' );
/**
* Dictionary.
*
* This tag indicates the results dictionary.
*
* This block may contain the following elements:
*
* <ul>
* <li><tt>{@link kAPI_DICTIONARY_COLLECTION}</tt>: The working collection name.
* <li><tt>{@link kAPI_DICTIONARY_TAGS}</tt>: Tags cross reference indexed by sequence
* number, having the tag identifier as value.
* <li><tt>{@link kAPI_DICTIONARY_IDS}</tt>: List of returned identifiers.
* <li><tt>{@link kAPI_DICTIONARY_LIST_COLS}</tt>: List of table column header tags.
* <li><tt>{@link kAPI_DICTIONARY_CLUSTER}</tt>: List of clustered identifiers: an array
* indexed by cluster identifier (a term identifier), with as values the tag
* identifiers, featured in the {@link kAPI_DICTIONARY_IDS} list, belonging to that
* cluster.
* </ul>
*/
define( "kAPI_RESULTS_DICTIONARY", 'dictionary' );
/*=======================================================================================
* STATUS *
*======================================================================================*/
/**
* State.
*
* This tag provides a general indication on the outcome of the operation, it can take two
* values:
*
* <ul>
* <li><tt>{@link kAPI_STATE_IDLE}</tt>: This indicates that the operation has not yet
* started.
* <li><tt>{@link kAPI_STATE_OK}</tt>: This indicates that the operation was successful.
* <li><tt>{@link kAPI_STATE_ERROR}</tt>: This indicates that the operation failed.
* </ul>
*/
define( "kAPI_STATUS_STATE", 'state' );
/**
* Encrypted.
*
* This tag indicates whether the data in the {@link kAPI_RESPONSE_RESULTS} is encrypted or
* not: the value is boolean.
*/
define( "kAPI_STATUS_CRYPTED", 'crypt' );
/**
* Code.
*
* This tag indicates a status code.
*/
define( "kAPI_STATUS_CODE", 'code' );
/**
* File.
*
* This tag indicates the source filename.
*/
define( "kAPI_STATUS_FILE", 'file' );
/**
* Line.
*
* This tag indicates the source file line.
*/
define( "kAPI_STATUS_LINE", 'line' );
/**
* Message.
*
* This tag indicates a status message.
*/
define( "kAPI_STATUS_MESSAGE", 'message' );
/**
* Trace.
*
* This tag indicates the exception trace.
*/
define( "kAPI_STATUS_TRACE", 'trace' );
/*=======================================================================================
* PAGING *
*======================================================================================*/
/**
* Skip.
*
* This tag indicates the number of skipped records.
*/
define( "kAPI_PAGING_SKIP", 'skipped' );
/**
* Limit.
*
* This tag indicates the maximum number of returned records.
*/
define( "kAPI_PAGING_LIMIT", 'limit' );
/**
* Actual.
*
* This tag indicates the actual number of returned records.
*/
define( "kAPI_PAGING_ACTUAL", 'actual' );
/**
* Affected.
*
* This tag indicates the total number of affected records.
*/
define( "kAPI_PAGING_AFFECTED", 'affected' );
/*=======================================================================================
* STATE *
*======================================================================================*/
/**
* Idle.
*
* Idle state.
*
* The service has not yet parsed the request.
*/
define( "kAPI_STATE_IDLE", 'idle' );
/**
* OK.
*
* Success state.
*
* The service has no errors.
*/
define( "kAPI_STATE_OK", 'ok' );
/**
* Error.
*
* Error state.
*
* The service encountered an error.
*/
define( "kAPI_STATE_ERROR", 'error' );
/*=======================================================================================
* DICTIONARY *
*======================================================================================*/
/**
* Collection.
*
* This tag indicates the dictionary collection name.
*/
define( "kAPI_DICTIONARY_COLLECTION", 'collection' );
/**
* Reference count offset.
*
* This tag indicates the collection reference count offset.
*/
define( "kAPI_DICTIONARY_REF_COUNT", 'count-offset' );
/**
* Tags cross reference.
*
* This tag indicates the dictionary tags cross references.
*/
define( "kAPI_DICTIONARY_TAGS", 'tags-xref' );
/**
* IDs list.
*
* This tag indicates the dictionary list of identifiers.
*/
define( "kAPI_DICTIONARY_IDS", 'ids' );
/**
* Table column offsets.
*
* This tag indicates the list of table column tag references.
*/
define( "kAPI_DICTIONARY_LIST_COLS", 'cols' );
/**
* Cluster.
*
* This tag indicates the dictionary cluster.
*/
define( "kAPI_DICTIONARY_CLUSTER", 'cluster' );
/*=======================================================================================
* OPERATIONS *
*======================================================================================*/
/**
* Ping.
*
* This tag defines the ping operation.
*
* This operation requires no parameters, it will return the string "pong" in the status
* message field.
*/
define( "kAPI_OP_PING", 'ping' );
/**
* List parameter constants.
*
* This tag defines the list parameter constants operation.
*
* This operation requires no parameters, it will return the key/value list of all parameter
* constants.
*/
define( "kAPI_OP_LIST_CONSTANTS", 'listConstants' );
/**
* List operator parameters.
*
* This tag defines the list operator parameters operation.
*
* This operation requires no parameters, it will return the list of all operator parameters
* including the followig information:
*
* <ul>
* <li><i>index</i>: The key holds the operator key.
* <li><i>value</i>: The value is an array structured as follows:
* <ul>
* <li><tt>key</tt>: The operator key.
* <li><tt>label</tt>: The operator label in the language provided to the service.
* <li><tt>title</tt>: The operator display title, in which the <tt>@pattern@</tt>
* token should be replaced by the search pattern.
* <li><tt>type</tt>: The operator type:
* <ul>
* <li><tt>string</tt>: Operators applying to string values.
* <li><tt>range</tt>: Operators applying to range values.
* </ul>
* <li><tt>main</tt>: A boolean flag which if <tt>TRUE</tt> indicates that the operator
* is one of the main choices, meaning that only one of those holding the same type
* may be used; if <tt>FALSE</tt> the operator is a flag modifier, meaning that any
* number of these may be included in the parameter.
* <li><tt>selected</tt>: A boolean flag indicating the default choice.
* </ul>
* </ul>
*/
define( "kAPI_OP_LIST_OPERATORS", 'listOperators' );
/**
* List reference count parameters.
*
* This tag defines the list reference count parameters operation.
*
* This operation requires no parameters, it will return the key/value list of all
* parameters governing reference count selection. The key represents the paramater flag
* used to select only those items having a reference count in a specific collection, the
* value holds the related tag holding the reference count, this value is the tag sequence
* number.
*/
define( "kAPI_OP_LIST_REF_COUNTS", 'listRefCounts' );
/**
* List statistics.
*
* This tag defines the list statistics operation.
*
* This operation will return the list of statistics associated to the provided domain, the
* service expects the following parameters:
*
* <ul>
* <li><tt>{@link kAPI_REQUEST_LANGUAGE}</tt>: <em>Language</em>. If the parameter is
* omitted, the {@link kSTANDARDS_LANGUAGE} constant will be used. The value represents
* a language code.
* <li><tt>{@link kAPI_PARAM_DOMAIN}</tt>: <em>Statistics domain</em>. This required
* parameter indicates the statistics domain, only one element is expected.
* </ul>
*
* The response format is an array organised as follows:
*
* <ul>
* <li><tt>{@link kAPI_PARAM_STAT}</tt>: The statistics code which can be set in the
* same parameter of the {@link kAPI_OP_MATCH_UNITS} service.
* <li><tt>{@link kAPI_PARAM_RESPONSE_FRMT_NAME}</tt>: The statistics name or label.
* <li><tt>{@link kAPI_PARAM_RESPONSE_FRMT_INFO}</tt>: The statistics description.
* </ul>
*/
define( "kAPI_OP_LIST_STATS", 'listStats' );
/**
* List domains.
*
* This tag defines the list domains operation.
*
* This operation will return the list of featured domains with their relative units count,
* the service expects the following parameters:
*
* <ul>
* <li><tt>{@link kAPI_REQUEST_LANGUAGE}</tt>: <em>Language</em>. If the parameter is
* omitted, the {@link kSTANDARDS_LANGUAGE} constant will be used. The value represents
* a language code.
* </ul>
*
* The response format is an array organised as follows:
*
* <ul>
* <li><tt>key</tt>: The domain code.
* <li><tt>value</tt>: The domain details:
* <ul>
* <li><tt>{@link kAPI_PARAM_RESPONSE_FRMT_NAME}</tt>: The statistics name or label.
* <li><tt>{@link kAPI_PARAM_RESPONSE_FRMT_INFO}</tt>: The statistics description.
* <li><tt>{@link kAPI_PARAM_RESPONSE_COUNT}</tt>: The number or unit records.
* </ul>
* </ul>
*/
define( "kAPI_OP_LIST_DOMAINS", 'listDomains' );
/**
* Match tag labels.
*
* This tag defines the match tag labels operation.
*
* The service will return a list of tag label strings corresponding to the provided
* pattern, language, operator and limit.
*
* This operation expects the following parameters:
*
* <ul>
* <li><tt>{@link kAPI_PARAM_PATTERN}</tt>: <em>Pattern</em>. This required parameter
* contains the match pattern.
* <li><tt>{@link kAPI_REQUEST_LANGUAGE}</tt>: <em>Language</em>. If the parameter is
* omitted, the {@link kSTANDARDS_LANGUAGE} constant will be used. The value represents
* a language code.
* <li><tt>{@link kAPI_PARAM_OPERATOR}</tt>: <em>Operator</em>. This required parameter
* indicates what kind of match should be applied to the searched strings, it is an
* array that must contain one of the following:
* <ul>
* <li><tt>{@link kOPERATOR_EQUAL}</tt>: <em>Equality</em>. The two match terms must be
* equal.
* <li><tt>{@link kOPERATOR_EQUAL_NOT}</tt>: <em>Inequality</em>. The two match terms
* must be different.
* <li><tt>{@link kOPERATOR_PREFIX}</tt>: <em>Prefix</em>. The target string must start
* with the query pattern.
* <li><tt>{@link kOPERATOR_CONTAINS}</tt>: <em>Contains</em>. The target string must
* contain the query pattern.
* <li><tt>{@link kOPERATOR_SUFFIX}</tt>: <em>Suffix</em>. The target string must end
* with the query pattern.
* <li><tt>{@link kOPERATOR_REGEX}</tt>: <em>Regular expression</em>. The parameter is
* expected to contain a regular expression string.
* </ul>
* and any of the following:
* <ul>
* <li><tt>{@link kOPERATOR_NOCASE}</tt>: <em>Case insensitive</em>. If provided, it
* means that the matching operation is case and accent insensitive.
* </ul>
* <li><tt>{@link kAPI_PARAM_REF_COUNT}</tt>: <em>Reference count</em>. This optional
* parameter may be provided as a string or an array, it will add a filter selecting
* only those tags which have values in the provided collection(s):
* <ul>
* <li><tt>{@link kAPI_PARAM_COLLECTION_TAG}</tt>: <em>Tag references</em>. Select only
* those tags which have their {@link kTAG_TAG_COUNT} greater than zero.
* <li><tt>{@link kAPI_PARAM_COLLECTION_TERM}</tt>: <em>Term references</em>. Select
* only those tags which have their {@link kTAG_TERM_COUNT} greater than zero.
* <li><tt>{@link kAPI_PARAM_COLLECTION_NODE}</tt>: <em>Node references</em>. Select
* only those tags which have their {@link kTAG_NODE_COUNT} greater than zero.
* <li><tt>{@link kAPI_PARAM_COLLECTION_EDGE}</tt>: <em>Edge references</em>. Select
* only those tags which have their {@link kTAG_EDGE_COUNT} greater than zero.
* <li><tt>{@link kAPI_PARAM_COLLECTION_USER}</tt>: <em>User references</em>.
* Select only those tags which have their {@link kTAG_USER_COUNT} greater than
* <li><tt>{@link kAPI_PARAM_COLLECTION_UNIT}</tt>: <em>Unit references</em>. Select
* only those tags which have their {@link kTAG_UNIT_COUNT} greater than zero.
* zero.
* </ul>
* The filter will be chained in <tt>AND</tt>.
* <li><tt>{@link kAPI_PARAM_EXCLUDED_TAGS}</tt>: <em>Tags to skip</em>. This optional
* parameter can be used to provide a list of tags that should be excluded from the
* search.
* <li><tt>{@link kAPI_PAGING_LIMIT}</tt>: <em>Limit</em>. This required parameter
* indicates the maximum number of elements to be returned. If omitted, it will be
* set to the default constant {@link kSTANDARDS_STRINGS_LIMIT}.
* </ul>
*/
define( "kAPI_OP_MATCH_TAG_LABELS", 'matchTagLabels' );
/**
* Match tag summary labels.
*
* This tag defines the match tag summary labels operation.
*
* The service will return a list of tag label strings corresponding to the provided
* pattern, language, operator and limit, these labels will only come from tags which can be
* included in summaries.
*
* This service expects the same parameters as the {@link kAPI_OP_MATCH_TAG_LABELS} service,
* except that the result will filter only labels from summary tags.
*/
define( "kAPI_OP_MATCH_TAG_SUMMARY_LABELS", 'matchTagSummaryLabels' );
/**
* Match term labels.
*
* This tag defines the match term labels operation.
*
* The service will return a list of term label strings corresponding to the provided
* pattern, language, operator and limit.
*
* This operation expects the following parameters:
*
* <ul>
* <li><tt>{@link kAPI_PARAM_PATTERN}</tt>: <em>Pattern</em>. This required parameter
* contains the match pattern.
* <li><tt>{@link kAPI_REQUEST_LANGUAGE}</tt>: <em>Language</em>. If the parameter is
* omitted, the {@link kSTANDARDS_LANGUAGE} constant will be used. The value represents
* a language code.
* <li><tt>{@link kAPI_PARAM_OPERATOR}</tt>: <em>Operator</em>. This required parameter
* indicates what kind of match should be applied to the searched strings, it is an
* array that must contain one of the following:
* <ul>
* <li><tt>{@link kOPERATOR_EQUAL}</tt>: <em>Equality</em>. The two match terms must be
* equal.
* <li><tt>{@link kOPERATOR_EQUAL_NOT}</tt>: <em>Inequality</em>. The two match terms
* must be different.
* <li><tt>{@link kOPERATOR_PREFIX}</tt>: <em>Prefix</em>. The target string must start
* with the query pattern.
* <li><tt>{@link kOPERATOR_CONTAINS}</tt>: <em>Contains</em>. The target string must
* contain the query pattern.
* <li><tt>{@link kOPERATOR_SUFFIX}</tt>: <em>Suffix</em>. The target string must end
* with the query pattern.
* <li><tt>{@link kOPERATOR_REGEX}</tt>: <em>Regular expression</em>. The parameter is
* expected to contain a regular expression string.
* </ul>
* and any of the following:
* <ul>
* <li><tt>{@link kOPERATOR_NOCASE}</tt>: <em>Case insensitive</em>. If provided, it
* means that the matching operation is case and accent insensitive.
* </ul>
* <li><tt>{@link kAPI_PARAM_REF_COUNT}</tt>: <em>Reference count</em>. This optional
* parameter may be provided as a string or an array, it will add a filter selecting
* only those tags which have values in the provided collection(s):
* <ul>
* <li><tt>{@link kAPI_PARAM_COLLECTION_TAG}</tt>: <em>Tag references</em>. Select only
* those tags which have their {@link kTAG_TAG_COUNT} greater than zero.
* <li><tt>{@link kAPI_PARAM_COLLECTION_TERM}</tt>: <em>Term references</em>. Select
* only those tags which have their {@link kTAG_TERM_COUNT} greater than zero.
* <li><tt>{@link kAPI_PARAM_COLLECTION_NODE}</tt>: <em>Node references</em>. Select
* only those tags which have their {@link kTAG_NODE_COUNT} greater than zero.
* <li><tt>{@link kAPI_PARAM_COLLECTION_EDGE}</tt>: <em>Edge references</em>. Select
* only those tags which have their {@link kTAG_EDGE_COUNT} greater than zero.
* <li><tt>{@link kAPI_PARAM_COLLECTION_USER}</tt>: <em>User references</em>.
* Select only those tags which have their {@link kTAG_USER_COUNT} greater than
* <li><tt>{@link kAPI_PARAM_COLLECTION_UNIT}</tt>: <em>Unit references</em>. Select
* only those tags which have their {@link kTAG_UNIT_COUNT} greater than zero.
* </ul>
* The filter will be chained in <tt>AND</tt>.
* <li><tt>{@link kAPI_PAGING_LIMIT}</tt>: <em>Limit</em>. This required parameter
* indicates the maximum number of elements to be returned. If omitted, it will be
* set to the default constant {@link kSTANDARDS_STRINGS_LIMIT}.
* </ul>
*/
define( "kAPI_OP_MATCH_TERM_LABELS", 'matchTermLabels' );
/**
* Match tag by label.
*
* This tag defines the match summary tags by label operation.
*
* The service will return a list of tag objects whose label matches the provided pattern,
* language, operator and limit.
*
* This operation expects the following parameters:
*
* <ul>
* <li><tt>{@link kAPI_PARAM_PATTERN}</tt>: <em>Pattern</em>. This required parameter
* contains the match pattern.
* <li><tt>{@link kAPI_REQUEST_LANGUAGE}</tt>: <em>Language</em>. If the parameter is
* omitted, the {@link kSTANDARDS_LANGUAGE} constant will be used. The value represents
* a language code.
* <li><tt>{@link kAPI_PARAM_OPERATOR}</tt>: <em>Operator</em>. This required parameter
* indicates what kind of match should be applied to the searched strings, it is an
* array that must contain one of the following:
* <ul>
* <li><tt>{@link kOPERATOR_EQUAL}</tt>: <em>Equality</em>. The two match terms must be
* equal.
* <li><tt>{@link kOPERATOR_EQUAL_NOT}</tt>: <em>Inequality</em>. The two match terms
* must be different.
* <li><tt>{@link kOPERATOR_PREFIX}</tt>: <em>Prefix</em>. The target string must start
* with the query pattern.
* <li><tt>{@link kOPERATOR_CONTAINS}</tt>: <em>Contains</em>. The target string must
* contain the query pattern.
* <li><tt>{@link kOPERATOR_SUFFIX}</tt>: <em>Suffix</em>. The target string must end
* with the query pattern.
* <li><tt>{@link kOPERATOR_REGEX}</tt>: <em>Regular expression</em>. The parameter is
* expected to contain a regular expression string.
* </ul>
* and any of the following:
* <ul>
* <li><tt>{@link kOPERATOR_NOCASE}</tt>: <em>Case insensitive</em>. If provided, it
* means that the matching operation is case and accent insensitive.
* </ul>
* <li><tt>{@link kAPI_PARAM_REF_COUNT}</tt>: <em>Reference count</em>. This optional
* parameter may be provided as a string or an array, it will add a filter selecting
* only those tags which have values in the provided collection(s):
* <ul>
* <li><tt>{@link kAPI_PARAM_COLLECTION_TAG}</tt>: <em>Tag references</em>. Select only
* those tags which have their {@link kTAG_TAG_COUNT} greater than zero.
* <li><tt>{@link kAPI_PARAM_COLLECTION_TERM}</tt>: <em>Term references</em>. Select
* only those tags which have their {@link kTAG_TERM_COUNT} greater than zero.
* <li><tt>{@link kAPI_PARAM_COLLECTION_NODE}</tt>: <em>Node references</em>. Select
* only those tags which have their {@link kTAG_NODE_COUNT} greater than zero.
* <li><tt>{@link kAPI_PARAM_COLLECTION_EDGE}</tt>: <em>Edge references</em>. Select
* only those tags which have their {@link kTAG_EDGE_COUNT} greater than zero.
* <li><tt>{@link kAPI_PARAM_COLLECTION_USER}</tt>: <em>User references</em>.
* Select only those tags which have their {@link kTAG_USER_COUNT} greater than
* <li><tt>{@link kAPI_PARAM_COLLECTION_UNIT}</tt>: <em>Unit references</em>. Select
* only those tags which have their {@link kTAG_UNIT_COUNT} greater than zero.
* </ul>
* The filter will be chained in <tt>AND</tt>.
* <li><tt>{@link kAPI_PARAM_EXCLUDED_TAGS}</tt>: <em>Tags to skip</em>. This optional
* parameter can be used to provide a list of tags that should be excluded from the
* search.
* <li><tt>{@link kAPI_PAGING_LIMIT}</tt>: <em>Limit</em>. This required parameter
* indicates the maximum number of elements to be returned. If omitted, it will be
* set to the default constant {@link kSTANDARDS_STRINGS_LIMIT}.
* </ul>
*/
define( "kAPI_OP_MATCH_TAG_BY_LABEL", 'matchTagsByLabel' );
/**
* Match tag by identifier.
*
* This tag defines the match tag by identifier operation.
*
* The service will return the tag whose native identifier or serial number matches the
* provided parameter.
*
* <ul>
* <li><tt>{@link kAPI_PARAM_TAG}</tt>: This element holds the tag identifier(s).
* <li><tt>{@link kAPI_REQUEST_LANGUAGE}</tt>: <em>Language</em>. If the parameter is
* omitted, the {@link kSTANDARDS_LANGUAGE} constant will be used. The value represents
* a language code.
* </ul>
*/
define( "kAPI_OP_MATCH_TAG_BY_IDENTIFIER", 'matchTagByIdentifier' );
/**
* Match summary tags by label.
*
* This tag defines the match tag by label operation.
*
* The service will return a list of tag objects whose label matches the provided pattern,
* language, operator and limit; these labels will only come from tags which can be included
* in summaries.
*
* This service expects the same parameters as the {@link kAPI_OP_MATCH_TAG_BY_LABEL}
* service, except that the result will include only summary tags.
*
* The result is an array of elements representing the disting offsets of the tags selected
* by the label:
*
* <ul>
* <li><em>key</em>: The offset.
* <li><em>value</em>: An array structured as follows:
* <ul>
* <li><tt>{@link kAPI_PARAM_TAG}</tt>: This element holds that tag sequence number of
* the offset's tag.
* <li><em>Other elements</em>: The other elements of the array represent in order the
* tags that comprise the offset, starting from the root structure and ending with
* the leaf tag:
* <ul>
* <li><em>key</em>: The tag sequence number.
* <li><em>value</em>: An array holding the following elements:
* <ul>
* <li><tt>{@link kAPI_PARAM_RESPONSE_FRMT_NAME}</tt>: The tag label.
* <li><tt>{@link kAPI_PARAM_RESPONSE_FRMT_INFO}</tt>: The tag description.
* </ul>
* </ul>
* </ul>
* </ul>
*/
define( "kAPI_OP_MATCH_SUMMARY_TAG_BY_LABEL", 'matchSummaryTagsByLabel' );
/**
* Match term by label.
*
* This tag defines the match term by label operation.
*
* The service will return a list of term objects whose label matches the provided pattern,
* language, operator and limit.
*
* This operation expects the following parameters:
*
* <ul>
* <li><tt>{@link kAPI_PARAM_PATTERN}</tt>: <em>Pattern</em>. This required parameter
* contains the match pattern.
* <li><tt>{@link kAPI_REQUEST_LANGUAGE}</tt>: <em>Language</em>. If the parameter is
* omitted, the {@link kSTANDARDS_LANGUAGE} constant will be used. The value represents
* a language code.
* <li><tt>{@link kAPI_PARAM_OPERATOR}</tt>: <em>Operator</em>. This required parameter
* indicates what kind of match should be applied to the searched strings, it is an
* array that must contain one of the following:
* <ul>
* <li><tt>{@link kOPERATOR_EQUAL}</tt>: <em>Equality</em>. The two match terms must be
* equal.
* <li><tt>{@link kOPERATOR_EQUAL_NOT}</tt>: <em>Inequality</em>. The two match terms
* must be different.
* <li><tt>{@link kOPERATOR_PREFIX}</tt>: <em>Prefix</em>. The target string must start
* with the query pattern.
* <li><tt>{@link kOPERATOR_CONTAINS}</tt>: <em>Contains</em>. The target string must
* contain the query pattern.
* <li><tt>{@link kOPERATOR_SUFFIX}</tt>: <em>Suffix</em>. The target string must end
* with the query pattern.
* <li><tt>{@link kOPERATOR_REGEX}</tt>: <em>Regular expression</em>. The parameter is
* expected to contain a regular expression string.
* </ul>
* and any of the following:
* <ul>
* <li><tt>{@link kOPERATOR_NOCASE}</tt>: <em>Case insensitive</em>. If provided, it
* means that the matching operation is case and accent insensitive.
* </ul>
* <li><tt>{@link kAPI_PARAM_REF_COUNT}</tt>: <em>Reference count</em>. This optional
* parameter may be provided as a string or an array, it will add a filter selecting
* only those tags which have values in the provided collection(s):
* <ul>
* <li><tt>{@link kAPI_PARAM_COLLECTION_TAG}</tt>: <em>Tag references</em>. Select only
* those tags which have their {@link kTAG_TAG_COUNT} greater than zero.
* <li><tt>{@link kAPI_PARAM_COLLECTION_TERM}</tt>: <em>Term references</em>. Select
* only those tags which have their {@link kTAG_TERM_COUNT} greater than zero.
* <li><tt>{@link kAPI_PARAM_COLLECTION_NODE}</tt>: <em>Node references</em>. Select
* only those tags which have their {@link kTAG_NODE_COUNT} greater than zero.
* <li><tt>{@link kAPI_PARAM_COLLECTION_EDGE}</tt>: <em>Edge references</em>. Select
* only those tags which have their {@link kTAG_EDGE_COUNT} greater than zero.
* <li><tt>{@link kAPI_PARAM_COLLECTION_USER}</tt>: <em>User references</em>.
* Select only those tags which have their {@link kTAG_USER_COUNT} greater than
* <li><tt>{@link kAPI_PARAM_COLLECTION_UNIT}</tt>: <em>Unit references</em>. Select
* only those tags which have their {@link kTAG_UNIT_COUNT} greater than zero.
* </ul>
* The filter will be chained in <tt>AND</tt>.
* <li><tt>{@link kAPI_PAGING_LIMIT}</tt>: <em>Limit</em>. This required parameter
* indicates the maximum number of elements to be returned. If omitted, it will be
* set to the default constant {@link kSTANDARDS_STRINGS_LIMIT}.
* </ul>
*/
define( "kAPI_OP_MATCH_TERM_BY_LABEL", 'matchTermsByLabel' );
/**
* Get tag enumerations.
*
* This tag defines the get tag enumerations operation.
*
* The service will return the enumerated set related to the provided tag.
*
* This operation expects the following parameters:
*
* <ul>
* <li><tt>{@link kAPI_PARAM_TAG}</tt>: <em>Tag</em>. This required parameter can either be
* an integer referencing the tag sequence number or a string referencing the tag
* native identifier.
* <li><tt>{@link kAPI_PARAM_RECURSE}</tt>: <em>Recurse nested enumerations</em>. This
* flag parameter indicates that the response should contain all nested levels of the
* enumerated set, if this parameter is <tt>TRUE</tt>, the {@link kAPI_PAGING_LIMIT}
* parameter will be ignored.
* <li><tt>{@link kAPI_PARAM_REF_COUNT}</tt>: <em>Reference count</em>. This optional
* parameter determines what value the result parameter {@link kAPI_RESULT_ENUM_VALUE}
* will hold: if provided, the parameter will hold the record count for that specific
* enumeration in the collection referenced by the value of
* {@link kAPI_PARAM_REF_COUNT}; if not provided, the {@link kAPI_RESULT_ENUM_VALUE}
* hold <tt>TRUE</tt> if the enumeration is selectable. The value of this parameter
* is a reference to the collection in which nthe enumeration is featured:
* <ul>
* <li><tt>{@link kAPI_PARAM_COLLECTION_TAG}</tt>: <em>Tag references</em>. Select only
* those tags which have their {@link kTAG_TAG_COUNT} greater than zero.
* <li><tt>{@link kAPI_PARAM_COLLECTION_TERM}</tt>: <em>Term references</em>. Select
* only those tags which have their {@link kTAG_TERM_COUNT} greater than zero.
* <li><tt>{@link kAPI_PARAM_COLLECTION_NODE}</tt>: <em>Node references</em>. Select
* only those tags which have their {@link kTAG_NODE_COUNT} greater than zero.
* <li><tt>{@link kAPI_PARAM_COLLECTION_EDGE}</tt>: <em>Edge references</em>. Select
* only those tags which have their {@link kTAG_EDGE_COUNT} greater than zero.
* <li><tt>{@link kAPI_PARAM_COLLECTION_USER}</tt>: <em>User references</em>.
* Select only those tags which have their {@link kTAG_USER_COUNT} greater than
* <li><tt>{@link kAPI_PARAM_COLLECTION_UNIT}</tt>: <em>Unit references</em>. Select
* only those tags which have their {@link kTAG_UNIT_COUNT} greater than zero.
* </ul>
* <li><tt>{@link kAPI_PAGING_LIMIT}</tt>: <em>Limit</em>. This parameter is required and
* considered only if the {@link kAPI_PARAM_RECURSE} parameter is not provided: it
* indicates the maximum number of elements to be returned; if omitted, it will be
* set to the default constant {@link kSTANDARDS_ENUMS_LIMIT}.
* </ul>
*
* The result will be returned in the {@link kAPI_RESPONSE_RESULTS} section of the response,
* it will be an array whose elements are structured as follows:
*
* <ul>
* <li><tt>{@link kAPI_RESULT_ENUM_TERM}</tt>: The enumerated value identifier.
* <li><tt>{@link kAPI_RESULT_ENUM_NODE}</tt>: The enumerated value node identifier.
* <li><tt>{@link kAPI_RESULT_ENUM_CODE}</tt>: The enumerated value local code.
* <li><tt>{@link kAPI_RESULT_ENUM_VALUE}</tt>: The selection flag or values count.
* <li><tt>{@link kAPI_PARAM_RESPONSE_COUNT}</tt>: The enumeration reference count.
* <li><tt>{@link kAPI_RESULT_ENUM_LABEL}</tt>: The enumerated value label.
* <li><tt>{@link kAPI_RESULT_ENUM_DESCR}</tt>: The enumerated value description.
* <li><tt>{@link kAPI_RESULT_ENUM_KIND}</tt>: The enumerated value kind.
* <li><tt>{@link kAPI_PARAM_RESPONSE_CHILDREN}</tt>: If the current enumeration has
* sub-elements, this item will contain the elements array.
* </ul>
*/
define( "kAPI_OP_GET_TAG_ENUMERATIONS", 'getTagEnumerations' );
/**
* Get node enumerations.
*
* This tag defines the get node enumerations operation.
*
* The service will return the enumerated set related to the provided node.
*
* This operation expects the following parameters:
*
* <ul>
* <li><tt>{@link kAPI_PARAM_NODE}</tt>: <em>Node</em>. This required parameter is an
* integer referencing the node native identifier.
* <li><tt>{@link kAPI_PARAM_RECURSE}</tt>: <em>Recurse nested enumerations</em>. This
* flag parameter indicates that the response should contain all nested levels of the
* enumerated set, if this parameter is <tt>TRUE</tt>, the {@link kAPI_PAGING_LIMIT}
* parameter will be ignored.
* <li><tt>{@link kAPI_PAGING_LIMIT}</tt>: <em>Limit</em>. This parameter is required and
* considered only if the {@link kAPI_PARAM_RECURSE} parameter is not provided: it
* indicates the maximum number of elements to be returned; if omitted, it will be
* set to the default constant {@link kSTANDARDS_ENUMS_LIMIT}.
* <li><tt>{@link kAPI_PARAM_REF_COUNT}</tt>: <em>Reference count</em>. This optional
* parameter detewrmines what value the result parameter {@link kAPI_RESULT_ENUM_VALUE}
* will hold: if provided, the parameter will hold the record count for that specific
* enumeration in the collection referenced by the value of
* {@link kAPI_PARAM_REF_COUNT}; if not provided, the {@link kAPI_RESULT_ENUM_VALUE}
* hold <tt>TRUE</tt> if the enumeration is selectable. The value of this parameter
* is a reference to the collection in which nthe enumeration is featured:
* <ul>
* <li><tt>{@link kAPI_PARAM_COLLECTION_TAG}</tt>: <em>Tag references</em>. Select only
* those tags which have their {@link kTAG_TAG_COUNT} greater than zero.
* <li><tt>{@link kAPI_PARAM_COLLECTION_TERM}</tt>: <em>Term references</em>. Select
* only those tags which have their {@link kTAG_TERM_COUNT} greater than zero.
* <li><tt>{@link kAPI_PARAM_COLLECTION_NODE}</tt>: <em>Node references</em>. Select
* only those tags which have their {@link kTAG_NODE_COUNT} greater than zero.
* <li><tt>{@link kAPI_PARAM_COLLECTION_EDGE}</tt>: <em>Edge references</em>. Select
* only those tags which have their {@link kTAG_EDGE_COUNT} greater than zero.
* <li><tt>{@link kAPI_PARAM_COLLECTION_USER}</tt>: <em>User references</em>.
* Select only those tags which have their {@link kTAG_USER_COUNT} greater than
* <li><tt>{@link kAPI_PARAM_COLLECTION_UNIT}</tt>: <em>Unit references</em>. Select
* only those tags which have their {@link kTAG_UNIT_COUNT} greater than zero.
* </ul>
* </ul>
*
* The result will be returned in the {@link kAPI_RESPONSE_RESULTS} section of the response,
* it will be an array whose elements are structured as follows:
*
* <ul>
* <li><tt>{@link kAPI_RESULT_ENUM_TERM}</tt>: The enumerated value identifier.
* <li><tt>{@link kAPI_RESULT_ENUM_NODE}</tt>: The enumerated value node identifier.
* <li><tt>{@link kAPI_RESULT_ENUM_CODE}</tt>: The enumerated value local code.
* <li><tt>{@link kAPI_RESULT_ENUM_LABEL}</tt>: The enumerated value label.
* <li><tt>{@link kAPI_RESULT_ENUM_DESCR}</tt>: The enumerated value description.
* <li><tt>{@link kAPI_RESULT_ENUM_KIND}</tt>: The enumerated value kind.
* <li><tt>{@link kAPI_PARAM_RESPONSE_CHILDREN}</tt>: If the current enumeration has
* sub-elements, this item will contain the elements array.
* </ul>
*/
define( "kAPI_OP_GET_NODE_ENUMERATIONS", 'getNodeEnumerations' );
/**
* Get node form.
*
* This tag defines the get node form operation.
*
* The service will return the structure related to the provided form node, if the provided
* node is not a form, the method will raise an exception.
*
* This operation expects the following parameters:
*
* <ul>
* <li><tt>{@link kAPI_PARAM_NODE}</tt>: <em>Node</em>. This required parameter is an
* integer referencing the node native identifier.
* <li><tt>{@link kAPI_PARAM_REF_COUNT}</tt>: <em>Reference count</em>. This optional
* parameter detewrmines what value the result parameter {@link kAPI_RESULT_ENUM_VALUE}
* will hold: if provided, the parameter will hold the record count for that specific
* enumeration in the collection referenced by the value of
* {@link kAPI_PARAM_REF_COUNT}; if not provided, the {@link kAPI_RESULT_ENUM_VALUE}
* hold <tt>TRUE</tt> if the enumeration is selectable. The value of this parameter
* is a reference to the collection in which nthe enumeration is featured:
* <ul>
* <li><tt>{@link kAPI_PARAM_COLLECTION_TAG}</tt>: <em>Tag references</em>. Select only
* those tags which have their {@link kTAG_TAG_COUNT} greater than zero.
* <li><tt>{@link kAPI_PARAM_COLLECTION_TERM}</tt>: <em>Term references</em>. Select
* only those tags which have their {@link kTAG_TERM_COUNT} greater than zero.
* <li><tt>{@link kAPI_PARAM_COLLECTION_NODE}</tt>: <em>Node references</em>. Select
* only those tags which have their {@link kTAG_NODE_COUNT} greater than zero.
* <li><tt>{@link kAPI_PARAM_COLLECTION_EDGE}</tt>: <em>Edge references</em>. Select
* only those tags which have their {@link kTAG_EDGE_COUNT} greater than zero.
* <li><tt>{@link kAPI_PARAM_COLLECTION_USER}</tt>: <em>User references</em>.
* Select only those tags which have their {@link kTAG_USER_COUNT} greater than
* <li><tt>{@link kAPI_PARAM_COLLECTION_UNIT}</tt>: <em>Unit references</em>. Select
* only those tags which have their {@link kTAG_UNIT_COUNT} greater than zero.
* </ul>
* <li><tt>{@link kAPI_PARAM_RECURSE}</tt>: <em>Recurse flag</em>. This optional flag, if
* set, will allow traversing root form nodes; if not set, root form nodes will not be
* recursed.
* </ul>
*
* The result will be returned in the {@link kAPI_RESPONSE_RESULTS} section of the response,
* it will be an array whose elements are structured as follows:
*
* <ul>
* <li><tt>{@link kAPI_PARAM_ID}</tt>: This item will be set with the native identifier of
* a tag, if the element references a tag, or it will be missing if the element
* references a term.
* <li><tt>{@link kAPI_RESULT_ENUM_LABEL}</tt>: The tag ot term label.
* <li><tt>{@link kAPI_RESULT_ENUM_DESCR}</tt>: The tag or term description.
* <li><tt>{@link kAPI_PARAM_RESPONSE_COUNT}</tt>: The reference count, if a tag and the
* {@link kAPI_PARAM_REF_COUNT} parameter was provided.
* <li><tt>{@link kAPI_PARAM_RESPONSE_CHILDREN}</tt>: The children of the element in the
* same format as here.
* </ul>
*/
define( "kAPI_OP_GET_NODE_FORM", 'getNodeForm' );
/**
* Get node structure.
*
* This tag defines the get node structure operation.
*
* The service will return the structure related to the provided struct node, if the
* provided node is not a structure, the method will raise an exception.
*
* This operation expects the following parameters:
*
* <ul>
* <li><tt>{@link kAPI_PARAM_NODE}</tt>: <em>Node</em>. This required parameter is an
* integer referencing the node native identifier.
* </ul>
*
* The result will be returned in the {@link kAPI_RESPONSE_RESULTS} section of the response,
* it will be an array whose elements are structured as follows:
*
* <ul>
* <li><tt>{@link kAPI_PARAM_ID}</tt>: This item will be set with the native identifier of
* a tag, if the element references a tag, or it will be missing if the element
* references a term.
* <li><tt>{@link kAPI_RESULT_ENUM_LABEL}</tt>: The tag or term label.
* <li><tt>{@link kAPI_RESULT_ENUM_DESCR}</tt>: The tag or term description.
* <li><tt>{@link kAPI_PARAM_RESPONSE_COUNT}</tt>: The reference count, if a tag and the
* {@link kAPI_PARAM_REF_COUNT} parameter was provided.
* <li><tt>{@link kAPI_PARAM_RESPONSE_CHILDREN}</tt>: The children of the element in the
* same format as here.
* </ul>
*/
define( "kAPI_OP_GET_NODE_STRUCT", 'getNodeStruct' );
/**
* Match units.
*
* This tag defines the match units operation.
*
* The service will use the provided criteria to apply a filter to the units collection and
* return information based on the provided parameters.
*
* This operation expects the following parameters:
*
* <ul>
* <li><tt>{@link kAPI_REQUEST_LANGUAGE}</tt>: <em>Language</em>. If the parameter is
* omitted, the {@link kSTANDARDS_LANGUAGE} constant will be used. The value represents
* a language code.
* <li><tt>{@link kAPI_PARAM_CRITERIA}</tt>: <em>Criteria</em>. This required parameter
* holds the search criteria, it is an array of elements structured as follows:
* <ul>
* <li><em>index</em>: The index of the item must contain the tag's native identifier.
* <li><em>value</em>: The value of the item will contain the search criteria for the
* tag provided in the index, the following parameters are expected:
* <ul>
* <li><tt>{@link kAPI_PARAM_INPUT_TYPE}</tt>: <em>Input type</em>. This string
* identifies the kind of form input control, the value is taken from an
* enumerated set and it determines which other items are to be expected:
* <ul>
* <li><tt>{@link kAPI_PARAM_INPUT_TEXT}</tt>: Full-text search:
* <ul>
* <li><tt>{@link kAPI_PARAM_PATTERN}</tt>: The search pattern.
* </ul>
* Note that in this case the index cannot hold the tag reference, you must
* set this element's index to {@link kAPI_PARAM_FULL_TEXT_OFFSET}.
* <li><tt>{@link kAPI_PARAM_INPUT_STRING}</tt>: String search:
* <ul>
* <li><tt>{@link kAPI_PARAM_PATTERN}</tt>: The search pattern.
* <li><tt>{@link kAPI_PARAM_OPERATOR}</tt>: <em>Operator</em>. This
* required parameter indicates what kind of match should be applied to
* the matched strings, it is an array that must contain one of the
* following:
* <ul>
* <li><tt>{@link kOPERATOR_EQUAL}</tt>: <em>Equality</em>. The two