-
Notifications
You must be signed in to change notification settings - Fork 62
/
Offline.xml
75 lines (75 loc) · 4.8 KB
/
Offline.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
<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" Version="4.0">
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Core.V1.xml">
<edmx:Include Alias="Core" Namespace="Org.OData.Core.V1" />
</edmx:Reference>
<edmx:Reference Uri="https://sap.github.io/odata-vocabularies/vocabularies/Common.xml">
<edmx:Include Namespace="com.sap.vocabularies.Common.v1" Alias="Common" />
</edmx:Reference>
<edmx:DataServices>
<Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="com.sap.vocabularies.Offline.v1" Alias="Offline">
<Annotation Term="Core.Description" String="Terms for annotating Offline OData"/>
<Annotation Term="Core.LongDescription">
<String>
Offline OData is a solution for data synchronization between back-ends and mobile devices.
It is built on top of in-house technology which has been designed and used in database synchronization for over 20 years.
</String>
</Annotation>
<Annotation Term="Core.Description" Qualifier="Published">
<String>2022-10-27 © Copyright 2022 SAP SE. All rights reserved</String>
</Annotation>
<Annotation Term="Core.Links">
<Collection>
<Record>
<PropertyValue Property="rel" String="latest-version" />
<PropertyValue Property="href" String="https://sap.github.io/odata-vocabularies/vocabularies/Offline.xml" />
</Record>
<Record>
<PropertyValue Property="rel" String="alternate" />
<PropertyValue Property="href" String="https://sap.github.io/odata-vocabularies/vocabularies/Offline.json" />
</Record>
<Record>
<PropertyValue Property="rel" String="describedby" />
<PropertyValue Property="href" String="https://github.com/sap/odata-vocabularies/blob/main/vocabularies/Offline.md" />
</Record>
</Collection>
</Annotation>
<Term Name="ClientOnly" Type="Offline.ClientOnlyType" Nullable="false" AppliesTo="EntityType EntitySet EnumType ComplexType TypeDefinition">
<Annotation Term="Common.Experimental" />
<Annotation Term="Core.Description" String="The annotated model element exists only on client devices"/>
<Annotation Term="Core.LongDescription">
<String>
Occasionally a customer will want to store additional “client-only” entities in the same database.
The easiest way to accommodate this is for the client to extend the backend-returned $metadata
(upon which the local persistence is based) and to mark some entities as client-only so that the
client won’t attempt to upload any changes that are made to them locally.
The service as implemented on the server is described by the CSDL document if all elements annotated
with `Offline.ClientOnly` are removed together with all subsequently dangling references.
</String>
</Annotation>
</Term>
<ComplexType Name="ClientOnlyType">
<Annotation Term="Common.Experimental" />
<Annotation Term="Core.Description" String="Tag type for annotating client-only model elements."/>
</ComplexType>
<ComplexType Name="LocalDraft" BaseType="Offline.ClientOnlyType">
<Annotation Term="Common.Experimental" />
<Annotation Term="Core.Description" String="Marks a local draft version of an entity set, which uses the same entity type as a non-draft entity set defined in the backend defined metadata"/>
<Annotation Term="Core.LongDescription">
<String>
Typically for each entity type there is one corresponding entity set. However OData permits having multiple entity sets sharing the same entity type.
This can be taken advantage of to enable a facility for local (offline) drafts by defining an additional local draft entity set corresponding to an existing backend-defined entity set.
For example, with a server-side entity set `Orders` and entity type `Order`, an additional `DraftOrders` entity set could be defined, marked with a `ClientOnly` annotation using the `LocalDraft` term type.
The annotation value is the name of the non-draft entity set using the same entity type.
When a client application creates an entity instance, it could be created locally in the `DraftOrders` entity set.
A subsequent offline entity upload operation will not upload any local draft entities.
Draft entities and their children need to be transitioned into non-draft entities to become uploadable.
</String>
</Annotation>
<Property Name="ActiveEntitySet" Type="Core.SimpleIdentifier" Nullable="false">
<Annotation Term="Core.Description" String="Unqualified name of the corresponding non-draft entity set in the backend-defined metadata"/>
</Property>
</ComplexType>
</Schema>
</edmx:DataServices>
</edmx:Edmx>