v4sample.xml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" Version="4.0">
  3. <edmx:DataServices>
  4. <Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="Microsoft.OData.SampleService.Models.TripPin">
  5. <EnumType Name="PersonGender">
  6. <Member Name="Male" Value="0"/>
  7. <Member Name="Female" Value="1"/>
  8. <Member Name="Unknown" Value="2"/>
  9. </EnumType>
  10. <ComplexType Name="City">
  11. <Property Name="CountryRegion" Type="Edm.String" Nullable="false"/>
  12. <Property Name="Name" Type="Edm.String" Nullable="false"/>
  13. <Property Name="Region" Type="Edm.String" Nullable="false"/>
  14. </ComplexType>
  15. <ComplexType Name="Location" OpenType="true">
  16. <Property Name="Address" Type="Edm.String" Nullable="false"/>
  17. <Property Name="City" Type="Microsoft.OData.SampleService.Models.TripPin.City" Nullable="false"/>
  18. </ComplexType>
  19. <ComplexType Name="EventLocation" BaseType="Microsoft.OData.SampleService.Models.TripPin.Location" OpenType="true">
  20. <Property Name="BuildingInfo" Type="Edm.String"/>
  21. </ComplexType>
  22. <ComplexType Name="AirportLocation" BaseType="Microsoft.OData.SampleService.Models.TripPin.Location" OpenType="true">
  23. <Property Name="Loc" Type="Edm.GeographyPoint" Nullable="false" SRID="4326"/>
  24. </ComplexType>
  25. <EntityType Name="Photo" HasStream="true">
  26. <Key>
  27. <PropertyRef Name="Id"/>
  28. </Key>
  29. <Property Name="Id" Type="Edm.Int64" Nullable="false">
  30. <Annotation Term="Org.OData.Core.V1.Permissions">
  31. <EnumMember>Org.OData.Core.V1.Permission/Read</EnumMember>
  32. </Annotation>
  33. </Property>
  34. <Property Name="Name" Type="Edm.String"/>
  35. <Annotation Term="Org.OData.Core.V1.AcceptableMediaTypes">
  36. <Collection>
  37. <String>image/jpeg</String>
  38. </Collection>
  39. </Annotation>
  40. </EntityType>
  41. <EntityType Name="Person" OpenType="true">
  42. <Key>
  43. <PropertyRef Name="UserName"/>
  44. </Key>
  45. <Property Name="UserName" Type="Edm.String" Nullable="false">
  46. <Annotation Term="Org.OData.Core.V1.Permissions">
  47. <EnumMember>Org.OData.Core.V1.Permission/Read</EnumMember>
  48. </Annotation>
  49. </Property>
  50. <Property Name="FirstName" Type="Edm.String" Nullable="false"/>
  51. <Property Name="LastName" Type="Edm.String" Nullable="false"/>
  52. <Property Name="Emails" Type="Collection(Edm.String)"/>
  53. <Property Name="AddressInfo" Type="Collection(Microsoft.OData.SampleService.Models.TripPin.Location)"/>
  54. <Property Name="Gender" Type="Microsoft.OData.SampleService.Models.TripPin.PersonGender"/>
  55. <Property Name="Concurrency" Type="Edm.Int64" Nullable="false">
  56. <Annotation Term="Org.OData.Core.V1.Computed" Bool="true"/>
  57. </Property>
  58. <NavigationProperty Name="Friends" Type="Collection(Microsoft.OData.SampleService.Models.TripPin.Person)"/>
  59. <NavigationProperty Name="Trips" Type="Collection(Microsoft.OData.SampleService.Models.TripPin.Trip)" ContainsTarget="true"/>
  60. <NavigationProperty Name="Photo" Type="Microsoft.OData.SampleService.Models.TripPin.Photo"/>
  61. </EntityType>
  62. <EntityType Name="Airline">
  63. <Key>
  64. <PropertyRef Name="AirlineCode"/>
  65. </Key>
  66. <Property Name="AirlineCode" Type="Edm.String" Nullable="false">
  67. <Annotation Term="Org.OData.Core.V1.Permissions">
  68. <EnumMember>Org.OData.Core.V1.Permission/Read</EnumMember>
  69. </Annotation>
  70. </Property>
  71. <Property Name="Name" Type="Edm.String" Nullable="false"/>
  72. </EntityType>
  73. <EntityType Name="Airport">
  74. <Key>
  75. <PropertyRef Name="IcaoCode"/>
  76. </Key>
  77. <Property Name="IcaoCode" Type="Edm.String" Nullable="false">
  78. <Annotation Term="Org.OData.Core.V1.Permissions">
  79. <EnumMember>Org.OData.Core.V1.Permission/Read</EnumMember>
  80. </Annotation>
  81. </Property>
  82. <Property Name="Name" Type="Edm.String" Nullable="false"/>
  83. <Property Name="IataCode" Type="Edm.String" Nullable="false">
  84. <Annotation Term="Org.OData.Core.V1.Immutable" Bool="true"/>
  85. </Property>
  86. <Property Name="Location" Type="Microsoft.OData.SampleService.Models.TripPin.AirportLocation" Nullable="false"/>
  87. </EntityType>
  88. <EntityType Name="PlanItem">
  89. <Key>
  90. <PropertyRef Name="PlanItemId"/>
  91. </Key>
  92. <Property Name="PlanItemId" Type="Edm.Int32" Nullable="false">
  93. <Annotation Term="Org.OData.Core.V1.Permissions">
  94. <EnumMember>Org.OData.Core.V1.Permission/Read</EnumMember>
  95. </Annotation>
  96. </Property>
  97. <Property Name="ConfirmationCode" Type="Edm.String"/>
  98. <Property Name="StartsAt" Type="Edm.DateTimeOffset"/>
  99. <Property Name="EndsAt" Type="Edm.DateTimeOffset"/>
  100. <Property Name="Duration" Type="Edm.Duration"/>
  101. </EntityType>
  102. <EntityType Name="PublicTransportation" BaseType="Microsoft.OData.SampleService.Models.TripPin.PlanItem">
  103. <Property Name="SeatNumber" Type="Edm.String"/>
  104. </EntityType>
  105. <EntityType Name="Flight" BaseType="Microsoft.OData.SampleService.Models.TripPin.PublicTransportation">
  106. <Property Name="FlightNumber" Type="Edm.String" Nullable="false"/>
  107. <NavigationProperty Name="From" Type="Microsoft.OData.SampleService.Models.TripPin.Airport" Nullable="false"/>
  108. <NavigationProperty Name="To" Type="Microsoft.OData.SampleService.Models.TripPin.Airport" Nullable="false"/>
  109. <NavigationProperty Name="Airline" Type="Microsoft.OData.SampleService.Models.TripPin.Airline" Nullable="false"/>
  110. </EntityType>
  111. <EntityType Name="Event" BaseType="Microsoft.OData.SampleService.Models.TripPin.PlanItem" OpenType="true">
  112. <Property Name="Description" Type="Edm.String"/>
  113. <Property Name="OccursAt" Type="Microsoft.OData.SampleService.Models.TripPin.EventLocation" Nullable="false"/>
  114. </EntityType>
  115. <EntityType Name="Trip">
  116. <Key>
  117. <PropertyRef Name="TripId"/>
  118. </Key>
  119. <Property Name="TripId" Type="Edm.Int32" Nullable="false">
  120. <Annotation Term="Org.OData.Core.V1.Permissions">
  121. <EnumMember>Org.OData.Core.V1.Permission/Read</EnumMember>
  122. </Annotation>
  123. </Property>
  124. <Property Name="ShareId" Type="Edm.Guid"/>
  125. <Property Name="Description" Type="Edm.String"/>
  126. <Property Name="Name" Type="Edm.String" Nullable="false"/>
  127. <Property Name="Budget" Type="Edm.Single" Nullable="false">
  128. <Annotation Term="Org.OData.Measures.V1.ISOCurrency" String="USD"/>
  129. <Annotation Term="Org.OData.Measures.V1.Scale" Int="2"/>
  130. </Property>
  131. <Property Name="StartsAt" Type="Edm.DateTimeOffset" Nullable="false"/>
  132. <Property Name="EndsAt" Type="Edm.DateTimeOffset" Nullable="false"/>
  133. <Property Name="Tags" Type="Collection(Edm.String)" Nullable="false"/>
  134. <NavigationProperty Name="Photos" Type="Collection(Microsoft.OData.SampleService.Models.TripPin.Photo)"/>
  135. <NavigationProperty Name="PlanItems" Type="Collection(Microsoft.OData.SampleService.Models.TripPin.PlanItem)" ContainsTarget="true"/>
  136. </EntityType>
  137. <Function Name="GetFavoriteAirline" IsBound="true" EntitySetPath="person/Trips/PlanItems/Microsoft.OData.SampleService.Models.TripPin.Flight/Airline" IsComposable="true">
  138. <Parameter Name="person" Type="Microsoft.OData.SampleService.Models.TripPin.Person" Nullable="false"/>
  139. <ReturnType Type="Microsoft.OData.SampleService.Models.TripPin.Airline" Nullable="false"/>
  140. </Function>
  141. <Function Name="GetInvolvedPeople" IsBound="true" IsComposable="true">
  142. <Parameter Name="trip" Type="Microsoft.OData.SampleService.Models.TripPin.Trip" Nullable="false"/>
  143. <ReturnType Type="Collection(Microsoft.OData.SampleService.Models.TripPin.Person)" Nullable="false"/>
  144. </Function>
  145. <Function Name="GetFriendsTrips" IsBound="true" EntitySetPath="person/Friends/Trips" IsComposable="true">
  146. <Parameter Name="person" Type="Microsoft.OData.SampleService.Models.TripPin.Person" Nullable="false"/>
  147. <Parameter Name="userName" Type="Edm.String" Nullable="false"/>
  148. <ReturnType Type="Collection(Microsoft.OData.SampleService.Models.TripPin.Trip)" Nullable="false"/>
  149. </Function>
  150. <Function Name="GetNearestAirport" IsComposable="true">
  151. <Parameter Name="lat" Type="Edm.Double" Nullable="false"/>
  152. <Parameter Name="lon" Type="Edm.Double" Nullable="false"/>
  153. <ReturnType Type="Microsoft.OData.SampleService.Models.TripPin.Airport" Nullable="false"/>
  154. </Function>
  155. <Action Name="ResetDataSource"/>
  156. <Action Name="ShareTrip" IsBound="true">
  157. <Parameter Name="person" Type="Microsoft.OData.SampleService.Models.TripPin.Person" Nullable="false"/>
  158. <Parameter Name="userName" Type="Edm.String" Nullable="false"/>
  159. <Parameter Name="tripId" Type="Edm.Int32" Nullable="false"/>
  160. </Action>
  161. <EntityContainer Name="DefaultContainer">
  162. <EntitySet Name="Photos" EntityType="Microsoft.OData.SampleService.Models.TripPin.Photo">
  163. <Annotation Term="Org.OData.Core.V1.ResourcePath" String="Photos"/>
  164. <Annotation Term="Org.OData.Capabilities.V1.SearchRestrictions">
  165. <Record>
  166. <PropertyValue Property="Searchable" Bool="true"/>
  167. <PropertyValue Property="UnsupportedExpressions">
  168. <EnumMember>Org.OData.Capabilities.V1.SearchExpressions/none</EnumMember>
  169. </PropertyValue>
  170. </Record>
  171. </Annotation>
  172. <Annotation Term="Org.OData.Capabilities.V1.InsertRestrictions">
  173. <Record>
  174. <PropertyValue Property="Insertable" Bool="true"/>
  175. <PropertyValue Property="NonInsertableNavigationProperties">
  176. <Collection/>
  177. </PropertyValue>
  178. </Record>
  179. </Annotation>
  180. </EntitySet>
  181. <EntitySet Name="People" EntityType="Microsoft.OData.SampleService.Models.TripPin.Person">
  182. <NavigationPropertyBinding Path="Friends" Target="People"/>
  183. <NavigationPropertyBinding Path="Microsoft.OData.SampleService.Models.TripPin.Flight/Airline" Target="Airlines"/>
  184. <NavigationPropertyBinding Path="Microsoft.OData.SampleService.Models.TripPin.Flight/From" Target="Airports"/>
  185. <NavigationPropertyBinding Path="Microsoft.OData.SampleService.Models.TripPin.Flight/To" Target="Airports"/>
  186. <NavigationPropertyBinding Path="Photo" Target="Photos"/>
  187. <NavigationPropertyBinding Path="Microsoft.OData.SampleService.Models.TripPin.Trip/Photos" Target="Photos"/>
  188. <Annotation Term="Org.OData.Core.V1.OptimisticConcurrency">
  189. <Collection>
  190. <PropertyPath>Concurrency</PropertyPath>
  191. </Collection>
  192. </Annotation>
  193. <Annotation Term="Org.OData.Core.V1.ResourcePath" String="People"/>
  194. <Annotation Term="Org.OData.Capabilities.V1.NavigationRestrictions">
  195. <Record>
  196. <PropertyValue Property="Navigability">
  197. <EnumMember>Org.OData.Capabilities.V1.NavigationType/None</EnumMember>
  198. </PropertyValue>
  199. <PropertyValue Property="RestrictedProperties">
  200. <Collection>
  201. <Record>
  202. <PropertyValue Property="NavigationProperty" NavigationPropertyPath="Friends"/>
  203. <PropertyValue Property="Navigability">
  204. <EnumMember>Org.OData.Capabilities.V1.NavigationType/Recursive</EnumMember>
  205. </PropertyValue>
  206. </Record>
  207. </Collection>
  208. </PropertyValue>
  209. </Record>
  210. </Annotation>
  211. <Annotation Term="Org.OData.Capabilities.V1.SearchRestrictions">
  212. <Record>
  213. <PropertyValue Property="Searchable" Bool="true"/>
  214. <PropertyValue Property="UnsupportedExpressions">
  215. <EnumMember>Org.OData.Capabilities.V1.SearchExpressions/none</EnumMember>
  216. </PropertyValue>
  217. </Record>
  218. </Annotation>
  219. <Annotation Term="Org.OData.Capabilities.V1.InsertRestrictions">
  220. <Record>
  221. <PropertyValue Property="Insertable" Bool="true"/>
  222. <PropertyValue Property="NonInsertableNavigationProperties">
  223. <Collection>
  224. <NavigationPropertyPath>Trips</NavigationPropertyPath>
  225. <NavigationPropertyPath>Friends</NavigationPropertyPath>
  226. </Collection>
  227. </PropertyValue>
  228. </Record>
  229. </Annotation>
  230. </EntitySet>
  231. <EntitySet Name="Airlines" EntityType="Microsoft.OData.SampleService.Models.TripPin.Airline">
  232. <Annotation Term="Org.OData.Core.V1.ResourcePath" String="Airlines"/>
  233. <Annotation Term="Org.OData.Capabilities.V1.SearchRestrictions">
  234. <Record>
  235. <PropertyValue Property="Searchable" Bool="true"/>
  236. <PropertyValue Property="UnsupportedExpressions">
  237. <EnumMember>Org.OData.Capabilities.V1.SearchExpressions/none</EnumMember>
  238. </PropertyValue>
  239. </Record>
  240. </Annotation>
  241. <Annotation Term="Org.OData.Capabilities.V1.InsertRestrictions">
  242. <Record>
  243. <PropertyValue Property="Insertable" Bool="true"/>
  244. <PropertyValue Property="NonInsertableNavigationProperties">
  245. <Collection/>
  246. </PropertyValue>
  247. </Record>
  248. </Annotation>
  249. </EntitySet>
  250. <EntitySet Name="Airports" EntityType="Microsoft.OData.SampleService.Models.TripPin.Airport">
  251. <Annotation Term="Org.OData.Core.V1.ResourcePath" String="Airports"/>
  252. <Annotation Term="Org.OData.Capabilities.V1.SearchRestrictions">
  253. <Record>
  254. <PropertyValue Property="Searchable" Bool="true"/>
  255. <PropertyValue Property="UnsupportedExpressions">
  256. <EnumMember>Org.OData.Capabilities.V1.SearchExpressions/none</EnumMember>
  257. </PropertyValue>
  258. </Record>
  259. </Annotation>
  260. <Annotation Term="Org.OData.Capabilities.V1.InsertRestrictions">
  261. <Record>
  262. <PropertyValue Property="Insertable" Bool="false"/>
  263. <PropertyValue Property="NonInsertableNavigationProperties">
  264. <Collection/>
  265. </PropertyValue>
  266. </Record>
  267. </Annotation>
  268. <Annotation Term="Org.OData.Capabilities.V1.DeleteRestrictions">
  269. <Record>
  270. <PropertyValue Property="Deletable" Bool="false"/>
  271. <PropertyValue Property="NonDeletableNavigationProperties">
  272. <Collection/>
  273. </PropertyValue>
  274. </Record>
  275. </Annotation>
  276. </EntitySet>
  277. <Singleton Name="Me" Type="Microsoft.OData.SampleService.Models.TripPin.Person">
  278. <NavigationPropertyBinding Path="Friends" Target="People"/>
  279. <NavigationPropertyBinding Path="Microsoft.OData.SampleService.Models.TripPin.Flight/Airline" Target="Airlines"/>
  280. <NavigationPropertyBinding Path="Microsoft.OData.SampleService.Models.TripPin.Flight/From" Target="Airports"/>
  281. <NavigationPropertyBinding Path="Microsoft.OData.SampleService.Models.TripPin.Flight/To" Target="Airports"/>
  282. <NavigationPropertyBinding Path="Photo" Target="Photos"/>
  283. <NavigationPropertyBinding Path="Microsoft.OData.SampleService.Models.TripPin.Trip/Photos" Target="Photos"/>
  284. <Annotation Term="Org.OData.Core.V1.ResourcePath" String="Me"/>
  285. </Singleton>
  286. <FunctionImport Name="GetNearestAirport" Function="Microsoft.OData.SampleService.Models.TripPin.GetNearestAirport" EntitySet="Airports" IncludeInServiceDocument="true">
  287. <Annotation Term="Org.OData.Core.V1.ResourcePath" String="Microsoft.OData.SampleService.Models.TripPin.GetNearestAirport"/>
  288. </FunctionImport>
  289. <ActionImport Name="ResetDataSource" Action="Microsoft.OData.SampleService.Models.TripPin.ResetDataSource"/>
  290. <Annotation Term="Org.OData.Core.V1.Description" String="TripPin service is a sample service for OData V4."/>
  291. </EntityContainer>
  292. <Annotations Target="Microsoft.OData.SampleService.Models.TripPin.DefaultContainer">
  293. <Annotation Term="Org.OData.Core.V1.DereferenceableIDs" Bool="true"/>
  294. <Annotation Term="Org.OData.Core.V1.ConventionalIDs" Bool="true"/>
  295. <Annotation Term="Org.OData.Capabilities.V1.ConformanceLevel">
  296. <EnumMember>Org.OData.Capabilities.V1.ConformanceLevelType/Advanced</EnumMember>
  297. </Annotation>
  298. <Annotation Term="Org.OData.Capabilities.V1.SupportedFormats">
  299. <Collection>
  300. <String>application/json;odata.metadata=full;IEEE754Compatible=false;odata.streaming=true</String>
  301. <String>application/json;odata.metadata=minimal;IEEE754Compatible=false;odata.streaming=true</String>
  302. <String>application/json;odata.metadata=none;IEEE754Compatible=false;odata.streaming=true</String>
  303. </Collection>
  304. </Annotation>
  305. <Annotation Term="Org.OData.Capabilities.V1.AsynchronousRequestsSupported" Bool="true"/>
  306. <Annotation Term="Org.OData.Capabilities.V1.BatchContinueOnErrorSupported" Bool="false"/>
  307. <Annotation Term="Org.OData.Capabilities.V1.FilterFunctions">
  308. <Collection>
  309. <String>contains</String>
  310. <String>endswith</String>
  311. <String>startswith</String>
  312. <String>length</String>
  313. <String>indexof</String>
  314. <String>substring</String>
  315. <String>tolower</String>
  316. <String>toupper</String>
  317. <String>trim</String>
  318. <String>concat</String>
  319. <String>year</String>
  320. <String>month</String>
  321. <String>day</String>
  322. <String>hour</String>
  323. <String>minute</String>
  324. <String>second</String>
  325. <String>round</String>
  326. <String>floor</String>
  327. <String>ceiling</String>
  328. <String>cast</String>
  329. <String>isof</String>
  330. </Collection>
  331. </Annotation>
  332. </Annotations>
  333. </Schema>
  334. </edmx:DataServices>
  335. </edmx:Edmx>