forked from oasis-tcs/odata-json-schema
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmiscellaneous.xml
1483 lines (1339 loc) · 62.3 KB
/
miscellaneous.xml
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
<?xml version="1.0" encoding="utf-8"?>
<!-- 4 CSDL XML Document, -->
<!--Example 2 -->
<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" xmlns="http://docs.oasis-open.org/odata/ns/edm"
Version="4.01"
>
<edmx:Reference Uri="http://tinyurl.com/Org-OData-Measures-V1">
<edmx:Include Alias="Measures" Namespace="Org.OData.Measures.V1" />
<Annotation Term="Some.Term" />
</edmx:Reference>
<edmx:Reference Uri="http://docs.oasis-open.org/odata/odata/v4.0/errata02/os/complete/vocabularies/Org.OData.Validation.V1.xml">
<edmx:Include Alias="Validation" Namespace="Org.OData.Validation.V1" />
</edmx:Reference>
<edmx:Reference Uri="http://somewhere/Vocabulary/V1">
<edmx:IncludeAnnotations TermNamespace="Name.Space" TargetNamespace="Target.Space" />
<edmx:IncludeAnnotations TermNamespace="Name.Space" TargetNamespace="Target.Space" Qualifier="SomeName" />
<edmx:IncludeAnnotations TermNamespace="Name.Space" Qualifier="SomeName" />
<edmx:IncludeAnnotations TermNamespace="Name.Space" />
</edmx:Reference>
<edmx:Reference Uri="/dev/null">
<edmx:Include Namespace="Dummy.Namespace1" Alias="Some" />
<edmx:Include Namespace="Dummy.Namespace2" Alias="custom" />
<edmx:Include Namespace="Dummy.Namespace3" Alias="A" />
<edmx:Include Namespace="Dummy.Namespace4" Alias="An" />
<edmx:Include Namespace="Dummy.Namespace5" Alias="Is" />
<edmx:Include Namespace="Dummy.Namespace6" Alias="SomeModel" />
<edmx:Include Namespace="Dummy.Namespace7" Alias="SearchVocabulary" />
<edmx:Include Namespace="Org.OData.Communication.V1" Alias="Communication" />
<edmx:Include Namespace="org.example.seo" Alias="seo" />
<edmx:Include Namespace="org.example.person" Alias="person" />
</edmx:Reference>
<!-- 4.1 Reference -->
<!-- Example 3 -->
<!-- 4.2 Included Schema -->
<!-- Example 4 -->
<edmx:Reference Uri="http://vocabs.odata.org/capabilities/v1">
<edmx:Include Namespace="Org.OData.Capabilities.V1" Alias="Capabilities" />
</edmx:Reference>
<edmx:Reference Uri="http://vocabs.odata.org/core/v1">
<edmx:Include Namespace="Org.OData.Core.V1" Alias="Core">
<Annotation Term="Core.DefaultNamespace" />
</edmx:Include>
</edmx:Reference>
<edmx:Reference Uri="http://example.org/display/v1">
<edmx:Include Alias="UI" Namespace="org.example.display" />
<edmx:Include Alias="task" Namespace="org.example.task" />
<edmx:Include Alias="vCard" Namespace="org.example.vCard" />
<edmx:Include Namespace="anotherOne" />
</edmx:Reference>
<!-- 4.3 Included Annotations -->
<!-- Example 5 -->
<edmx:Reference Uri="http://odata.org/ann/b">
<edmx:IncludeAnnotations TermNamespace="org.example.validation" />
<edmx:IncludeAnnotations TermNamespace="org.example.display" Qualifier="Tablet" />
<edmx:IncludeAnnotations TermNamespace="org.example.hcm" TargetNamespace="com.example.Sales" />
<edmx:IncludeAnnotations TermNamespace="org.example.hcm" Qualifier="Tablet" TargetNamespace="com.example.Person" />
</edmx:Reference>
<edmx:DataServices>
<Schema Namespace="First" />
<!-- 5 Schema -->
<!-- 5.1 Alias -->
<!-- Example 6 -->
<Schema Namespace="org.example" Alias="self">
<Annotation Term="Core.Description" String="Example schema" />
<!-- 5.2 Annotations with External Targeting -->
<!-- Example 7 -->
<Annotations Target="org.example.Person" Qualifier="Tablet">
<Annotation Term="Core.Description" String="Dummy" />
</Annotations>
<!-- 6 Entity Type, Example 8: a simple entity type -->
<EntityType Name="Employee">
<Key>
<PropertyRef Name="ID" />
</Key>
<Property Name="ID" Type="Edm.String" Nullable="false" />
<Property Name="FirstName" Type="Edm.String" Nullable="false" />
<Property Name="LastName" Type="Edm.String" Nullable="false" />
<NavigationProperty Name="Manager" Type="org.example.Manager" />
</EntityType>
<!-- Example 9: a derived entity type based on the previous example -->
<EntityType Name="Manager" BaseType="self.Employee">
<Property Name="AnnualBudget" Type="Edm.Decimal" />
<NavigationProperty Name="Employees" Type="Collection(self.Employee)" />
</EntityType>
<!-- no examples yet -->
<EntityType Name="Nothing" Abstract="true" OpenType="false" HasStream="false" />
<EntityType Name="NotMuch" Abstract="false" OpenType="true" HasStream="true" />
<!-- Example 10: entity type with a simple key -->
<EntityType Name="Category10">
<Key>
<PropertyRef Name="ID" />
</Key>
<Property Name="ID" Type="Edm.Int32" Nullable="false" />
<Property Name="Name" Type="Edm.String">
<Annotation Term="Core.IsLanguageDependent" />
</Property>
</EntityType>
<!-- Example 11: entity type with a simple key referencing a property of a complex type -->
<EntityType Name="Category11">
<Key>
<PropertyRef Name="Info/ID" Alias="EntityInfoID" />
</Key>
<Property Name="Info" Type="self.EntityInfo" Nullable="false" />
<Property Name="Name" Type="Edm.String" />
</EntityType>
<ComplexType Name="EntityInfo">
<Property Name="ID" Type="Edm.Int32" Nullable="false" />
<Property Name="Created" Type="Edm.DateTimeOffset" />
</ComplexType>
<!-- Example 12: entity type with a composite key -->
<EntityType Name="OrderLine">
<Key>
<PropertyRef Name="OrderID" />
<PropertyRef Name="LineNumber" />
</Key>
<Property Name="OrderID" Type="Edm.Int32" Nullable="false" />
<Property Name="LineNumber" Type="Edm.Int32" Nullable="false" />
</EntityType>
<!-- Example 13-14: URLs, not relevant here -->
<!-- 7 Structural Property -->
<!-- Example 15 -->
<ComplexType Name="Measurement">
<Property Name="Dimension" Type="Edm.String" Nullable="false" MaxLength="50" DefaultValue="Unspecified" />
<Property Name="Length" Type="Edm.Decimal" Nullable="false" Precision="18" Scale="2" />
</ComplexType>
<ComplexType Name="Example16to21">
<!-- Example 16 -->
<Property Name="Units" Type="Collection(Edm.String)" />
<!-- Example 17 -->
<Property Name="SuggestedTimes" Type="Collection(Edm.DateTimeOffset)" Precision="6" />
<!-- Example 18 -->
<Property Name="Amount32" Type="Edm.Decimal" Precision="3" Scale="2" />
<!-- Example 19 -->
<Property Name="Amount22" Type="Edm.Decimal" Precision="2" Scale="2" />
<!-- Example 20 -->
<Property Name="Amount3v" Type="Edm.Decimal" Precision="3" Scale="variable" />
<!-- Example 21 -->
<Property Name="Amount7f" Type="Edm.Decimal" Precision="7" Scale="floating" />
</ComplexType>
<!-- 8 Navigation Property -->
<!-- Example 22-24 -->
<EntityType Name="Product">
<Key>
<PropertyRef Name="ID" />
</Key>
<Property Type="Edm.String" Name="ID" Nullable="false" />
<Property Name="CategoryID" Type="Edm.String" Nullable="false" />
<Property Name="CategoryKind" Type="Edm.String" Nullable="true" />
<NavigationProperty Name="Category" Type="self.Category" Nullable="false" ContainsTarget="false"
Partner="Products"
>
<ReferentialConstraint Property="CategoryID" ReferencedProperty="ID" />
<ReferentialConstraint Property="CategoryKind" ReferencedProperty="Kind">
<Annotation Term="Core.Description" String="Referential Constraint to non-key property" />
</ReferentialConstraint>
</NavigationProperty>
<NavigationProperty Name="Supplier" Type="self.Supplier" />
</EntityType>
<EntityType Name="Supplier" OpenType="false">
<Key>
<PropertyRef Name="ID" />
</Key>
<Property Type="Edm.String" Name="ID" Nullable="false" Unicode="true" />
</EntityType>
<EntityType Name="Customer">
<Key>
<PropertyRef Name="ID" />
</Key>
<Property Type="Edm.String" Name="ID" Nullable="false" Unicode="false" />
</EntityType>
<EntityType Name="Order">
<Key>
<PropertyRef Name="ID" />
</Key>
<Property Type="Edm.Int64" Name="ID" Nullable="false" />
</EntityType>
<EntityType Name="Category">
<Key>
<PropertyRef Name="ID" />
</Key>
<Property Type="Edm.String" Name="ID" Nullable="false" />
<Property Type="Edm.String" Name="Kind" Nullable="true" />
<NavigationProperty Name="Products" Type="Collection(self.Product)" Partner="Category">
<OnDelete Action="Cascade">
<Annotation Term="Core.Description" String="Delete all products in this category" />
</OnDelete>
</NavigationProperty>
</EntityType>
<!-- 9 Complex Type -->
<!-- Example 25: a complex type used by two entity types -->
<ComplexType Name="Dimensions">
<Property Name="Height" Nullable="false" Type="Edm.Decimal" />
<Property Name="Weight" Nullable="false" Type="Edm.Decimal" />
<Property Name="Length" Nullable="false" Type="Edm.Decimal" />
</ComplexType>
<EntityType Name="Product25">
<Key>
<PropertyRef Name="ID" />
</Key>
<Property Name="ID" Type="Edm.String" Nullable="false" />
<Property Name="ProductDimensions" Type="self.Dimensions" />
<Property Name="ShippingDimensions" Type="self.Dimensions" />
</EntityType>
<EntityType Name="ShipmentBox">
<Key>
<PropertyRef Name="ID" />
</Key>
<Property Name="ID" Type="Edm.String" Nullable="false" />
<Property Name="Dimensions" Type="self.Dimensions" />
</EntityType>
<!-- no examples yet -->
<ComplexType Name="NothingC" Abstract="true" OpenType="false" />
<ComplexType Name="NotMuchC" Abstract="false" OpenType="true" BaseType="self.NothingC" />
<!-- 10 Enumeration Type -->
<!-- Example 26: a simple flags-enabled enumeration -->
<EnumType Name="FileAccess" UnderlyingType="Edm.Int32" IsFlags="true">
<Member Name="Read" Value="1" />
<Member Name="Write" Value="2" />
<Member Name="Create" Value="4" />
<Member Name="Delete" Value="8" />
</EnumType>
<!-- Example 27: pattern values can be combined, and some combined values have explicit names -->
<EnumType Name="Pattern" UnderlyingType="Edm.Int32" IsFlags="true">
<Member Name="Plain" Value="0" />
<Member Name="Red" Value="1" />
<Member Name="Blue" Value="2" />
<Member Name="Yellow" Value="4" />
<Member Name="Solid" Value="8" />
<Member Name="Striped" Value="16" />
<Member Name="SolidRed" Value="9" />
<Member Name="SolidBlue" Value="10" />
<Member Name="SolidYellow" Value="12" />
<Member Name="RedBlueStriped" Value="19" />
<Member Name="BlueRedStriped" Value="19" />
<Member Name="RedYellowStriped" Value="21" />
<Member Name="BlueYellowStriped" Value="22" />
</EnumType>
<!--
Example 28: FirstClass has a value of 0, TwoDay a value of 1, and Overnight a value of 2 -->
<EnumType Name="ShippingMethod">
<Annotation Term="Core.Description" String="Method of shipping" />
<Member Name="FirstClass">
<Annotation Term="Core.Description" String="Shipped with highest priority" />
</Member>
<Member Name="TwoDay">
<Annotation Term="Core.Description" String="Shipped within two days" />
</Member>
<Member Name="Overnight">
<Annotation Term="Core.Description" String="Shipped overnight" />
</Member>
</EnumType>
<!-- 11 Type Definition -->
<!-- Example 29 -->
<TypeDefinition Name="Length" UnderlyingType="Edm.Int32">
<Annotation Term="Org.OData.Measures.V1.Unit" String="Centimeters" />
</TypeDefinition>
<TypeDefinition Name="Weight" UnderlyingType="Edm.Int32">
<Annotation Term="Org.OData.Measures.V1.Unit" String="Kilograms" />
</TypeDefinition>
<ComplexType Name="Size">
<Property Name="Height" Type="self.Length" />
<Property Name="Weight" Type="self.Weight" />
</ComplexType>
<!-- 12 Action and Function -->
<!-- no examples yet -->
<Action Name="Approval" IsBound="true">
<Parameter Name="binding" Type="self.Order" />
</Action>
<Action Name="Logout" IsBound="false" />
<Function Name="ProductsByRating" IsBound="false" IsComposable="false">
<Parameter Name="Rating" Type="Edm.Decimal" Precision="4" Scale="0" Nullable="false" />
<ReturnType Type="Collection(self.Product)" />
</Function>
<!-- Example 30: a function returning the top-selling products for a given year. In this case the year must be specified
as a parameter of the function with the edm:Parameter element. -->
<Function Name="TopSellingProducts">
<Parameter Name="Year" Type="Edm.Decimal" Precision="4" Scale="0" />
<ReturnType Type="Collection(self.Product)" />
</Function>
<!-- no example yet: overload without parameters -->
<Function Name="TopSellingProducts">
<ReturnType Type="Collection(self.Product)" />
</Function>
<!-- 13 Entity Container -->
<EntityContainer Name="DemoService">
<!-- Example 31: one entity set per entity type - covered by example 32 -->
<!-- Example 32: three entity sets referring to the two entity types -->
<EntitySet Name="StandardCustomers" EntityType="self.Customer" IncludeInServiceDocument="true">
<NavigationPropertyBinding Path="Orders" Target="Orders" />
</EntitySet>
<EntitySet Name="PreferredCustomers" EntityType="self.Customer">
<NavigationPropertyBinding Path="Orders" Target="Orders" />
</EntitySet>
<EntitySet Name="Orders" EntityType="self.Order" />
<!-- Example 33: An entity container aggregates entity sets, singletons, action imports, and function imports. -->
<EntitySet Name="Products" EntityType="self.Product">
<Annotation Term="org.example.display.DisplayName" String="Product Catalog" />
<NavigationPropertyBinding Path="Category" Target="self.DemoService/Categories" />
<NavigationPropertyBinding Path="Supplier" Target="self.DemoService/Suppliers" />
</EntitySet>
<EntitySet Name="Categories" EntityType="self.Category">
<NavigationPropertyBinding Path="Products" Target="org.example.DemoService/Products" />
</EntitySet>
<EntitySet Name="Suppliers" EntityType="self.Supplier">
<Annotation Term="org.example.display.DisplayName">
<String>Supplier Directory</String>
</Annotation>
<NavigationPropertyBinding Path="Products" Target="self.DemoService/Products" />
</EntitySet>
<Singleton Name="MainSupplier" Type="self.Supplier" />
<ActionImport Name="LeaveRequestApproval" Action="self.Approval" />
<FunctionImport Name="ProductsByRating" Function="self.ProductsByRating" EntitySet="Products" />
<!-- Example 34: see miscellaneous2.xml -->
<!-- Example 35: for an entity set in the same container as the enclosing entity set -->
<EntitySet Name="Categories34" EntityType="org.example.Category">
<NavigationPropertyBinding Path="Products" Target="SomeSet" />
</EntitySet>
<!-- Example 36: for an entity set in any container in scope -->
<EntitySet Name="Categories35" EntityType="org.example.Category">
<NavigationPropertyBinding Path="Products" Target="SomeModel.SomeContainer/SomeSet" />
</EntitySet>
<!-- Example 37: binding Suppliers on Products contained within Categories -->
<EntitySet Name="Categories37" EntityType="self.Category">
<NavigationPropertyBinding Path="Products/Supplier" Target="Suppliers" />
</EntitySet>
</EntityContainer>
<!-- 14 Vocabulary and Annotation -->
<!--
Example 38: the Product entity type is extended with a DisplayName by a metadata annotation that binds the term
DisplayName to the value of the property Name. The Product entity type also includes an annotation that allows its
instances
to be viewed as instances of the type specified by the term SearchResult
-->
<EntityType Name="Product2">
<Key>
<PropertyRef Name="ID" />
</Key>
<Property Name="ID" Nullable="false" Type="Edm.Int32" />
<Property Name="Name" Type="Edm.String" />
<Property Name="Description" Type="Edm.String" />
<Annotation Term="UI.DisplayName" Path="Name" />
<Annotation Term="SearchVocabulary.SearchResult">
<Record>
<PropertyValue Property="Title" Path="Name" />
<PropertyValue Property="Abstract" Path="Description" />
<PropertyValue Property="Url">
<Apply Function="odata.concat">
<String>Products(</String>
<Path>ID</Path>
<String>)</String>
</Apply>
</PropertyValue>
</Record>
</Annotation>
</EntityType>
<!--
Example 39: the IsURL term can be applied to properties and terms that are of type Edm.String (the Core.Tag type
and the two Core terms are defined in [OData-VocCore])
-->
<Term Name="IsURL" Type="Core.Tag" DefaultValue="true" AppliesTo="Property">
<Annotation Term="Core.Description">
<String>Properties and terms annotated with this term MUST contain a valid URL</String>
</Annotation>
<Annotation Term="Core.RequiresType" String="Edm.String" />
</Term>
<!-- Example 40: term Measures.ISOCurrency, once annotated with constant value, once with path value -->
<ComplexType Name="Example40">
<Property Name="AmountInReportingCurrency" Type="Edm.Decimal">
<Annotation Term="Measures.ISOCurrency" String="USD">
<Annotation Term="Core.Description" String="The parent company’s currency" />
</Annotation>
</Property>
<Property Name="AmountInTransactionCurrency" Type="Edm.Decimal">
<Annotation Term="Measures.ISOCurrency" Path="Currency" />
</Property>
<Property Name="Currency" Type="Edm.String" MaxLength="3" />
</ComplexType>
<Annotations Target="self.Person">
<!--Example 41: annotation should only be applied to tablet devices -->
<Annotation Term="org.example.display.DisplayName" Path="FirstName" />
</Annotations>
<!-- Example 42: Target expressions -->
<Annotations Target="self.MyEntityType">
<Annotation Term="self.Dummy" />
</Annotations>
<Annotations Target="org.example.MyEntityType/MyProperty">
<Annotation Term="self.Dummy" />
</Annotations>
<Annotations Target="self.MyEntityType/MyNavigationProperty">
<Annotation Term="self.Dummy" />
</Annotations>
<Annotations Target="self.MyComplexType">
<Annotation Term="self.Dummy" />
</Annotations>
<Annotations Target="self.MyComplexType/MyProperty">
<Annotation Term="self.Dummy" />
</Annotations>
<Annotations Target="self.MyComplexType/MyNavigationPropert">
<Annotation Term="self.Dummy" />
</Annotations>
<Annotations Target="self.MyEnumType">
<Annotation Term="self.Dummy" />
</Annotations>
<Annotations Target="self.MyEnumType/MyMember">
<Annotation Term="self.Dummy" />
</Annotations>
<Annotations Target="self.MyTypeDefinition">
<Annotation Term="self.Dummy" />
</Annotations>
<Annotations Target="self.MyTerm">
<Annotation Term="self.Dummy" />
</Annotations>
<Annotations Target="self.MyEntityContainer">
<Annotation Term="self.Dummy" />
</Annotations>
<Annotations Target="self.MyEntityContainer/MyEntitySet">
<Annotation Term="self.Dummy" />
</Annotations>
<Annotations Target="self.MyEntityContainer/MySingleton">
<Annotation Term="self.Dummy" />
</Annotations>
<Annotations Target="self.MyEntityContainer/MyActionImport">
<Annotation Term="self.Dummy" />
</Annotations>
<Annotations Target="self.MyEntityContainer/MyFunctionImport">
<Annotation Term="self.Dummy" />
</Annotations>
<Annotations Target="self.MyAction">
<Annotation Term="self.Dummy" />
</Annotations>
<Annotations Target="self.MyFunction">
<Annotation Term="self.Dummy" />
</Annotations>
<Annotations Target="self.MyFunction/MyParameter">
<Annotation Term="self.Dummy" />
</Annotations>
<Annotations Target="self.MyEntityContainer/MyEntitySet/MyProperty">
<Annotation Term="self.Dummy" />
</Annotations>
<Annotations Target="self.MyEntityContainer/MyEntitySet/MyNavigationProperty">
<Annotation Term="self.Dummy" />
</Annotations>
<Annotations Target="self.MyEntityContainer/MyEntitySet/self.MyEntityType/MyProperty">
<Annotation Term="self.Dummy" />
</Annotations>
<Annotations Target="self.MyEntityContainer/MyEntitySet/self.MyEntityType/MyNavProperty">
<Annotation Term="self.Dummy" />
</Annotations>
<Annotations Target="self.MyEntityContainer/MyEntitySet/MyComplexProperty/MyProperty">
<Annotation Term="self.Dummy" />
</Annotations>
<Annotations Target="self.MyEntityContainer/MyEntitySet/MyComplexProperty/MyNavigationProperty">
<Annotation Term="self.Dummy" />
</Annotations>
<Annotations Target="self.MyEntityContainer/MySingleton/MyComplexProperty/MyNavigationProperty">
<Annotation Term="self.Dummy" />
</Annotations>
<Annotations Target="self.ConstantExpressions">
<!-- Example 43: base64url-encoded binary value (OData) -->
<Annotation Term="org.example.display.Thumbnail" Binary="T0RhdGE" />
<Annotation Term="org.example.display.Thumbnail" Qualifier="element">
<Binary>T0RhdGE</Binary>
</Annotation>
<!-- Example 44 -->
<Annotation Term="org.example.display.ReadOnly" Bool="true" />
<Annotation Term="org.example.display.ReadOnly" Qualifier="element">
<Bool>true</Bool>
</Annotation>
<!-- Example 45 -->
<Annotation Term="org.example.vCard.birthDay" Date="2000-01-01" />
<Annotation Term="org.example.vCard.birthDay" Qualifier="element">
<Date>2000-01-01</Date>
</Annotation>
<!-- Example 46 -->
<Annotation Term="org.example.display.LastUpdated" DateTimeOffset="2000-01-01T16:00:00.000Z" />
<Annotation Term="org.example.display.LastUpdated" Qualifier="element">
<DateTimeOffset>2000-01-01T16:00:00.000-09:00</DateTimeOffset>
</Annotation>
<!-- Example 47 -->
<Annotation Term="org.example.display.Width" Decimal="3.14" />
<!-- Example 48 -->
<Annotation Term="org.example.display.Width" Qualifier="element">
<Decimal>3.14</Decimal>
</Annotation>
<!-- Example 49 -->
<Annotation Term="org.example.task.duration" Duration="P7D" />
<Annotation Term="org.example.task.duration" Qualifier="element">
<Duration>P11DT23H59M59.999999999999S</Duration>
</Annotation>
<!-- Example 50: single value -->
<Annotation Term="org.example.HasPattern" EnumMember="org.example.Pattern/Red" />
<Annotation Term="org.example.HasPattern" Qualifier="element">
<EnumMember>org.example.Pattern/Red</EnumMember>
</Annotation>
<!-- Example 51: combined value for IsFlags enumeration type -->
<Annotation Term="org.example.HasPattern" Qualifier="list" EnumMember="org.example.Pattern/Red org.example.Pattern/Striped" />
<Annotation Term="org.example.HasPattern" Qualifier="listelement">
<EnumMember>org.example.Pattern/Red org.example.Pattern/Striped</EnumMember>
</Annotation>
<!-- Example 52 -->
<Annotation Term="org.example.display.FloatWidth" Float="3.14" />
<Annotation Term="org.example.display.FloatWidth" Qualifier="element">
<Float>3.14</Float>
</Annotation>
<!-- Example 53 -->
<Annotation Term="org.example.display.Id" Guid="21EC2020-3AEA-1069-A2DD-08002B30309D" />
<Annotation Term="org.example.display.Id" Qualifier="element">
<Guid>21EC2020-3AEA-1069-A2DD-08002B30309D</Guid>
</Annotation>
<!-- Example 54 -->
<Annotation Term="org.example.display.IntWidth" Int="42" />
<!-- Example 55 -->
<Annotation Term="org.example.display.IntWidth" Qualifier="element">
<Int>42</Int>
</Annotation>
<!-- Example 56 -->
<Annotation Term="org.example.display.DisplayName" String="Product Catalog" />
<Annotation Term="org.example.display.DisplayName" Qualifier="element">
<String>Product Catalog</String>
</Annotation>
<!-- Example 57 -->
<Annotation Term="org.example.display.EndTime" TimeOfDay="21:45:00" />
<Annotation Term="org.example.display.EndTime" Qualifier="element">
<TimeOfDay>21:45:00</TimeOfDay>
</Annotation>
</Annotations>
<Annotations Target="self.DynamicExpression">
<!-- Path Expressions -->
<Annotation Term="self.Dummy">
<Collection>
<!-- Example 58 -->
<PropertyPath>/self.MyEntityContainer/MyEntitySet/MyProperty</PropertyPath>
<!-- Example 59 -->
<PropertyPath>Address/City</PropertyPath>
<!-- Example 60 -->
<PropertyPath>DirectReports/self.Manager/DirectReports</PropertyPath>
<!-- Example 61 -->
<PropertyPath>Address/City/@Capabilities.SortRestrictions/Sortable</PropertyPath>
<!-- Example 61 -->
<PropertyPath>Orders/Items/Product</PropertyPath>
<!-- Example 63 -->
<PropertyPath>Addresses/Street</PropertyPath>
<PropertyPath>Addresses/$count</PropertyPath>
<!-- Example 64 -->
<PropertyPath>Orders/[email protected]/Insertable</PropertyPath>
<!-- Example 65 -->
<Path>/self.container/SettingsCollection('FeatureXxx')/IsAvailable</Path>
<Path>/self.container/Products(ID=ProductID)/Name</Path>
</Collection>
</Annotation>
<!-- Example 66 -->
<Annotation Term="UI.ReferenceFacet" AnnotationPath="Product/Supplier/@UI.LineItem" />
<Annotation Term="UI.CollectionFacet" Qualifier="Contacts">
<Collection>
<AnnotationPath>Supplier/@Communication.Contact</AnnotationPath>
<AnnotationPath>Customer/@Communication.Contact</AnnotationPath>
</Collection>
</Annotation>
<!-- Example 67 -->
<Annotation Term="org.example.MyFavoriteModelElement" ModelElementPath="/org.example.someAction" />
<Annotation Term="org.example.MyFavoriteModelElement" Qualifier="element">
<ModelElementPath>/org.example.someAction</ModelElementPath>
</Annotation>
<!-- Example 68 -->
<Annotation Term="UI.HyperLink" NavigationPropertyPath="Supplier" />
<Annotation Term="Capabilities.UpdateRestrictions" Qualifier="element">
<Record>
<PropertyValue Property="NonUpdatableNavigationProperties">
<Collection>
<NavigationPropertyPath>Supplier</NavigationPropertyPath>
<NavigationPropertyPath>Category</NavigationPropertyPath>
</Collection>
</PropertyValue>
</Record>
</Annotation>
<!-- Example 69 -->
<Annotation Term="UI.RefreshOnChangeOf" PropertyPath="ChangedAt" />
<Annotation Term="Capabilities.UpdateRestrictions" Qualifier="element2">
<Record>
<PropertyValue Property="NonUpdatableProperties">
<Collection>
<PropertyPath>CreatedAt</PropertyPath>
<PropertyPath>ChangedAt</PropertyPath>
</Collection>
</PropertyValue>
</Record>
</Annotation>
<!-- Example 70 -->
<Annotation Term="org.example.display.DisplayName" Path="FirstName" />
<Annotation Term="org.example.display.DisplayName" Qualifier="element">
<Path>@vCard.Address#work/FullName</Path>
</Annotation>
<!-- Example 71 -->
<Annotation Term="A.ComparisonAndLogicalOperators">
<Collection>
<And>
<Path>IsMale</Path>
<Path>IsMarried</Path>
</And>
<Or>
<Path>IsMale</Path>
<Path>IsMarried</Path>
<Annotation Term="A.B" />
</Or>
<Not>
<Annotation Term="A.B" />
<Path>IsMale</Path>
</Not>
<Eq>
<Null />
<Path>IsMale</Path>
<Annotation Term="A.B" />
</Eq>
<Ne>
<Null />
<Path>IsMale</Path>
</Ne>
<Gt>
<Path>Price</Path>
<Int>20</Int>
</Gt>
<Ge>
<Path>Price</Path>
<Int>10</Int>
</Ge>
<Lt>
<Path>Price</Path>
<Int>20</Int>
</Lt>
<Le>
<Path>Price</Path>
<Int>100</Int>
</Le>
<Has>
<Path>Fabric</Path>
<EnumMember>org.example.Pattern/Red</EnumMember>
</Has>
<In>
<Path>Size</Path>
<Collection>
<String>XS</String>
<String>S</String>
</Collection>
</In>
</Collection>
</Annotation>
<!-- Example 72 -->
<Annotation Term="A.ArithmeticOperators">
<Collection>
<Add>
<Path>StartDate</Path>
<Path>Duration</Path>
</Add>
<Sub>
<Path>Revenue</Path>
<Path>Cost</Path>
</Sub>
<Neg>
<Path>Height</Path>
</Neg>
<Mul>
<Path>NetPrice</Path>
<Path>TaxRate</Path>
</Mul>
<Div>
<Path>Quantity</Path>
<Path>QuantityPerParcel</Path>
</Div>
<DivBy>
<Path>Quantity</Path>
<Path>QuantityPerParcel</Path>
</DivBy>
<Mod>
<Path>Quantity</Path>
<Path>QuantityPerParcel</Path>
</Mod>
</Collection>
</Annotation>
<!-- TODO: Renumber examples from here: +3 -->
<!-- Example 73 -->
<Annotation Term="org.example.display.DisplayName" Qualifier="apply">
<Apply Function="odata.concat">
<String>Product: </String>
<Path>ProductName</Path>
<String> (</String>
<Path>Available/Quantity</Path>
<String>
</String>
<Path>Available/Unit</Path>
<String> available)</String>
</Apply>
</Annotation>
<!-- Example 74: assuming there are no special characters in values of the NameOfMovieGenre property -->
<Annotation Term="Some.Term" Qualifier="Example71">
<Apply Function="odata.fillUriTemplate">
<String>http://host/someAPI/Actors/{actorName}/CV</String>
<LabeledElement Name="actorName" Path="Actor/Name" />
</Apply>
</Annotation>
<!-- Example 75: all FirstName values not containing one of the letters b, c, or d evaluate to true -->
<Annotation Term="Some.Term" Qualifier="Example72">
<Apply Function="odata.matchesPattern">
<Path>FirstName</Path>
<String>[^b-d]</String>
</Apply>
</Annotation>
<!-- Example 76 -->
<Annotation Term="Some.Term" Qualifier="Example73">
<Apply Function="odata.fillUriTemplate">
<String>http://host/service/Genres({genreName})</String>
<LabeledElement Name="genreName">
<Apply Function="odata.uriEncode">
<Path>NameOfMovieGenre</Path>
</Apply>
</LabeledElement>
</Apply>
</Annotation>
<!-- Example 77 -->
<Annotation Term="org.example.display.Threshold">
<Cast Type="Edm.Decimal">
<Path>Average</Path>
</Cast>
</Annotation>
<!-- Example 78 -->
<Annotation Term="org.example.seo.SeoTerms">
<Collection>
<String>Product</String>
<String>Supplier</String>
<String>Customer</String>
</Collection>
</Annotation>
<!-- Example 79 -->
<Annotation Term="org.example.person.Gender">
<If>
<Path>IsFemale</Path>
<String>Female</String>
<String>Male</String>
</If>
</Annotation>
<!-- Example 80 -->
<Annotation Term="self.IsPreferredCustomer">
<IsOf Type="self.PreferredCustomer">
<Path>Customer</Path>
</IsOf>
</Annotation>
<!-- Example 81 -->
<Annotation Term="org.example.display.DisplayName" Qualifier="LE">
<LabeledElement Name="CustomerFirstName" Path="FirstName" />
</Annotation>
<Annotation Term="org.example.display.DisplayName" Qualifier="LEelement">
<LabeledElement Name="CustomerFirstName">
<Path>FirstName</Path>
</LabeledElement>
</Annotation>
<!-- Example 82 -->
<Annotation Term="org.example.display.DisplayName" Qualifier="LEref">
<LabeledElementReference>self.CustomerFirstName</LabeledElementReference>
</Annotation>
<!-- Example 83 -->
<Annotation Term="org.example.display.DisplayName" Qualifier="null">
<Null />
</Annotation>
<!-- Example 84 -->
<Annotation Term="org.example.display.DisplayName" Qualifier="nullWithAnnotation">
<Null>
<Annotation Term="org.example.Reason" String="Private">
</Annotation>
</Null>
</Annotation>
<!-- Example 85: record with two structural and two navigation properties -->
<Annotation Term="org.example.person.Employee">
<Record>
<Annotation Term="Core.Description" String="Annotation on record" />
<PropertyValue Property="GivenName" Path="FirstName">
<Annotation Term="Core.Description" String="Annotation on record member" />
</PropertyValue>
<PropertyValue Property="Surname" Path="LastName" />
<PropertyValue Property="Manager" Path="DirectSupervisor" />
<PropertyValue Property="CostCenter">
<UrlRef>
<Apply Function="odata.fillUriTemplate">
<String>http://host/anotherservice/CostCenters('{ccid}')</String>
<LabeledElement Name="ccid" Path="CostCenterID" />
</Apply>
</UrlRef>
</PropertyValue>
</Record>
</Annotation>
<!-- Example 86 -->
<Annotation Term="org.example.person.Supplier">
<UrlRef>
<Apply Function="odata.fillUriTemplate">
<String>http://host/service/Suppliers({suppID})</String>
<LabeledElement Name="suppID">
<Apply Function="odata.uriEncode">
<Path>SupplierId</Path>
</Apply>
</LabeledElement>
</Apply>
</UrlRef>
</Annotation>
<Annotation Term="Core.LongDescription" Qualifier="element">
<UrlRef>
<String>http://host/wiki/HowToUse</String>
</UrlRef>
</Annotation>
<Annotation Term="Core.LongDescription" UrlRef="http://host/wiki/HowToUse" />
</Annotations>
</Schema>
<Schema Namespace="Model1" Alias="M1">
<ComplexType Name="NullablePrimitiveTypes">
<Property Name="NullValue" Type="Edm.Boolean" DefaultValue="null" />
<Property Name="TrueValue" Type="Edm.Boolean" DefaultValue="true" />
<Property Name="FalseValue" Type="Edm.Boolean" DefaultValue="false" />
<Property Name="BinaryValue" Type="Edm.Binary" MaxLength="31" DefaultValue="T0RhdGE" />
<Property Name="IntegerValue" Type="Edm.Int32" DefaultValue="-128" />
<Property Name="DoubleValue" Type="Edm.Double" DefaultValue="3.1415926535897931" />
<Property Name="SingleValue" Type="Edm.Single" />
<Property Name="DecimalValue" Type="Edm.Decimal" Scale="variable" DefaultValue="34.95" />
<Property Name="StringValue" Type="Edm.String" DefaultValue="Say "Hello",
then go" />
<Property Name="DateValue" Type="Edm.Date" DefaultValue="2012-12-03" />
<Property Name="DateTimeOffsetValue" Type="Edm.DateTimeOffset" DefaultValue="2012-12-03T07:16:23Z" />
<Property Name="DurationValue" Type="Edm.Duration" Precision="12" DefaultValue="P12DT23H59M59.999999999999S" />
<Property Name="TimeOfDayValue" Type="Edm.TimeOfDay" Precision="6" DefaultValue="07:59:59.999" />
<Property Name="GuidValue" Type="Edm.Guid" DefaultValue="1234567-89ab-cdef-0123-456789abcdef" />
<Property Name="Int64Value" Type="Edm.Int64" DefaultValue="0" />
<Property Name="ColorEnumValue" Type="M1.Color" DefaultValue="yellow" />
<Property Name="GeographyPoint" Type="Edm.GeographyPoint" DefaultValue="SRID=0;Point(142.1 64.1)" />
<Property Name="StreamValue" Type="Edm.Stream" />
<Property Name="TypeDefValue" Type="M1.IntegerDecimal" Precision="20" DefaultValue="42" />
<Property Name="PrimitiveValue" Type="Edm.PrimitiveType" />
</ComplexType>
<ComplexType Name="NonNullablePrimitiveTypes">
<Property Name="NullValue" Type="Edm.Boolean" DefaultValue="null" Nullable="false" />
<Property Name="TrueValue" Type="Edm.Boolean" DefaultValue="true" Nullable="false" />
<Property Name="FalseValue" Type="Edm.Boolean" DefaultValue="false" Nullable="false" />
<Property Name="BinaryValue" Type="Edm.Binary" MaxLength="31" DefaultValue="T0RhdGE" Nullable="false" />
<Property Name="IntegerValue" Type="Edm.Int32" DefaultValue="-128" Nullable="false" />
<Property Name="DoubleValue" Type="Edm.Double" DefaultValue="3.1415926535897931" Nullable="false" />
<Property Name="SingleValue" Type="Edm.Single" DefaultValue="-INF" Nullable="false" />
<Property Name="DecimalValue" Type="Edm.Decimal" Scale="variable" DefaultValue="34.95" Nullable="false" />
<Property Name="StringValue" Type="Edm.String" DefaultValue="Say "Hello",
then go" Nullable="false" />
<Property Name="DateValue" Type="Edm.Date" DefaultValue="2012-12-03" Nullable="false" />
<Property Name="DateTimeOffsetValue" Type="Edm.DateTimeOffset" DefaultValue="2012-12-03T07:16:23Z" Nullable="false" />
<Property Name="DurationValue" Type="Edm.Duration" Precision="12" DefaultValue="P12DT23H59M59.999999999999S"
Nullable="false" />
<Property Name="TimeOfDayValue" Type="Edm.TimeOfDay" Precision="6" DefaultValue="07:59:59.999" Nullable="false" />
<Property Name="GuidValue" Type="Edm.Guid" DefaultValue="1234567-89ab-cdef-0123-456789abcdef" Nullable="false" />
<Property Name="Int64Value" Type="Edm.Int64" DefaultValue="0" Nullable="false" />
<Property Name="ColorEnumValue" Type="M1.Color" DefaultValue="yellow" Nullable="false" />
<Property Name="GeographyPoint" Type="Edm.GeographyPoint" DefaultValue="SRID=0;Point(142.1 64.1)" Nullable="false" />
<Property Name="StreamValue" Type="Edm.Stream" Nullable="false" />
<Property Name="TypeDefValue" Type="M1.IntegerDecimal" Precision="20" DefaultValue="42" Nullable="false" />
<Property Name="TextValue" Type="M1.Text" MaxLength="60" DefaultValue="42" Nullable="false" />
<Property Name="PrimitiveValue" Type="Edm.PrimitiveType" Nullable="false" />
</ComplexType>
<Function Name="CreatedEntities">
<Parameter Name="before" Type="Edm.DateTimeOffset" Nullable="true" />
<Parameter Name="after" Type="Edm.DateTimeOffset" Nullable="true" />
<ReturnType Type="Collection(Edm.EntityType)" Nullable="true" />
</Function>
<Function Name="TopSellingProducts">
<Parameter Name="Year" Type="Edm.Decimal" Precision="4" Scale="0" Nullable="true" />
<ReturnType Type="Collection(self.Product)">
<Annotation Term="A.B" String="Works" />
</ReturnType>
</Function>
<Annotation Term="UI.ReferenceFacet" AnnotationPath="@UI.LineItem" />
<Annotation Term="UI.ReferenceFacet" AnnotationPath="Product/Supplier/@UI.LineItem" Qualifier="OnNavPropTarget" />
<Annotation Term="UI.ReferenceFacet" AnnotationPath="Product/Supplier/@UI.LineItem" Qualifier="OnNavProp" />
<Annotation Term="UI.ReferenceFacet" AnnotationPath="Product/Supplier/@UI.LineItem#Tablet" Qualifier="OnNavPropQualified" />
<Annotation Term="UI.ReferenceFacet" UrlRef="http://LineItem" Qualifier="ViaUrl" />
<Annotation Term="UI.ReferenceFacet" AnnotationPath="@X.Supplier#X/Contacts/@Y.ViewVariants" Qualifier="complicated" />
<Annotation Term="UI.HyperLink" NavigationPropertyPath="Supplier" />
<Annotation Term="Is.Null">
<Annotation Term="Is.NextToNull" />
<Null>
<Annotation Term="Is.WithinNull" />
</Null>
</Annotation>
<Annotation Term="UI.SubTitle">
<Annotation Term="A.Constant" />
<Int>1234</Int>
</Annotation>
<Annotation Term="A.Bool" Bool="true">
<Annotation Term="A.AnnotatedBool" />
</Annotation>
<Annotation Term="A.Decimal" Decimal="12.34" />
<Annotation Term="A.Decimal" Decimal="INF" Qualifier="inf" />
<Annotation Term="A.Decimal" Decimal="-INF" Qualifier="minusInf" />
<Annotation Term="A.Decimal" Decimal="NaN" Qualifier="nan" />
<Annotation Term="A.Float" Float="1.23456789e4" />
<Annotation Term="A.Float" Float="INF" Qualifier="inf" />
<Annotation Term="A.Float" Float="-INF" Qualifier="minusInf" />
<Annotation Term="A.Float" Float="NaN" Qualifier="nan" />
<Annotation Term="A.NumericValues" Qualifier="Element">
<Collection>
<Float>1.23456789e4</Float>
<Float>-2E80</Float>
<Float>-INF</Float>
<Float>INF</Float>
<Float>NaN</Float>