Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New instance annotation @Core.changed for delta messages #201

Draft
wants to merge 19 commits into
base: v4.02-release-candidate
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
0fa290e
New instance annotation @Core.changed for delta messages
ralfhandl Sep 16, 2022
d8796cd
Heiko's proposal
ralfhandl Sep 16, 2022
a2160a4
UpperCamelCase for term name
ralfhandl Sep 22, 2022
6ab958c
Renamed to Core.PreviousState
ralfhandl Sep 23, 2022
786c213
Core.PreviousState: new value "Absent"
ralfhandl Oct 4, 2022
d2c0678
Core.PreviousState: also allow for nested entities in a deep update/u…
ralfhandl Oct 4, 2022
a88d43b
Apply suggestions from code review
ralfhandl Oct 4, 2022
5991ca2
Rebuilt
ralfhandl Oct 4, 2022
71367fb
Merge branch 'main' into ODATA-1239-Core.changed-for-delta-messages
ralfhandl Dec 20, 2022
f09dad5
Merge branch 'main' into ODATA-1239-Core.changed-for-delta-messages
ralfhandl Jan 10, 2023
b83c330
Update Org.OData.Core.V1.md
ralfhandl Jan 10, 2023
1d39eab
Merge branch 'main' into ODATA-1239-Core.changed-for-delta-messages
ralfhandl Mar 21, 2023
47edd82
Merge branch 'main' into ODATA-1239-Core.changed-for-delta-messages
ralfhandl Apr 27, 2023
5037774
Merge branch 'main' into ODATA-1239-Core.changed-for-delta-messages
ralfhandl Jul 4, 2023
bcc6d8b
Merge branch 'main' into ODATA-1239-Core.changed-for-delta-messages
ralfhandl Sep 7, 2023
ca7fbc5
Merge branch 'main' into ODATA-1239-Core.changed-for-delta-messages
ralfhandl Sep 7, 2023
c095a23
Merge branch 'v4.02-release-candidate' into ODATA-1239-Core.changed-f…
ralfhandl Jun 6, 2024
51c853d
Revert unintended line breaks
ralfhandl Jun 6, 2024
765f78e
Revert more unintended changes
ralfhandl Jun 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions vocabularies/Org.OData.Core.V1.json
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,20 @@
"$Nullable": true,
"@Core.Description": "Commonly used identifer for a Feature"
}
},
"PreviousState": {
"$Kind": "Term",
"$Type": "Core.PreviousStateType",
"@Core.Description": "Previous state of a resource whose changes are described by the [added/changed entity in a delta message](https://docs.oasis-open.org/odata/odata-json-format/v4.01/odata-json-format-v4.01.html#sec_AddedChangedEntity) carrying this instance annotation",
"@Core.LongDescription": "The presence or absence of this instance annotation does not alter the idempotent nature of a delta message, nor does it alter the UPSERT nature of an added/changed entity.\n\nThe recipient of a delta message MAY use the instance annotation for optimization only; ultimately any received added/changed entity MUST be processed as an UPSERT."
},
"PreviousStateType": {
"$Kind": "EnumType",
"@Core.Description": "Previous state of a resource whose changes are described by an [added/changed entity in a delta message](https://docs.oasis-open.org/odata/odata-json-format/v4.01/odata-json-format-v4.01.html#sec_AddedChangedEntity)",
"Existed": 1,
"[email protected]": "The annotated entity describes changes to a resource that already existed prior to capturing these changes",
"Unknown": 0,
"[email protected]": "The sender does not know whether the resource already existed prior to capturing these changes"
}
}
}
9 changes: 9 additions & 0 deletions vocabularies/Org.OData.Core.V1.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Term|Type|Description
[OperationAvailable](./Org.OData.Core.V1.xml#L507:~:text=<Term%20Name="-,OperationAvailable,-")|Boolean?|<a name="OperationAvailable"></a>Action or function is available<br>The annotation value will usually be an expression, e.g. using properties of the binding parameter type for instance-dependent availability, or using properties of a singleton for global availability. The static value `null` means that availability cannot be determined upfront and is instead expressed as an operation advertisement.
[SymbolicName](./Org.OData.Core.V1.xml#L518:~:text=<Term%20Name="-,SymbolicName,-")|[SimpleIdentifier](#SimpleIdentifier)|<a name="SymbolicName"></a>A symbolic name for a model element
[GeometryFeature](./Org.OData.Core.V1.xml#L526:~:text=<Term%20Name="-,GeometryFeature,-")|[GeometryFeatureType?](#GeometryFeatureType)|<a name="GeometryFeature"></a>A [Feature Object](https://datatracker.ietf.org/doc/html/rfc7946#section-3.2) represents a spatially bounded thing
[PreviousState](./Org.OData.Core.V1.xml#L542:~:text=<Term%20Name="-,PreviousState,-")|[PreviousStateType](#PreviousStateType)|<a name="PreviousState"></a>Previous state of a resource whose changes are described by the [added/changed entity in a delta message](https://docs.oasis-open.org/odata/odata-json-format/v4.01/odata-json-format-v4.01.html#sec_AddedChangedEntity) carrying this instance annotation<br>The presence or absence of this instance annotation does not alter the idempotent nature of a delta message, nor does it alter the UPSERT nature of an added/changed entity.<br/>The recipient of a delta message MAY use the instance annotation for optimization only; ultimately any received added/changed entity MUST be processed as an UPSERT.

## <a name="RevisionType"></a>[RevisionType](./Org.OData.Core.V1.xml#L80:~:text=<ComplexType%20Name="-,RevisionType,-")

Expand Down Expand Up @@ -281,3 +282,11 @@ Property|Type|Description
[geometry](./Org.OData.Core.V1.xml#L531:~:text=<ComplexType%20Name="-,GeometryFeatureType,-")|Geometry?|Location of the Feature
[properties](./Org.OData.Core.V1.xml#L534:~:text=<ComplexType%20Name="-,GeometryFeatureType,-")|[Dictionary?](#Dictionary)|Properties of the Feature
[id](./Org.OData.Core.V1.xml#L537:~:text=<ComplexType%20Name="-,GeometryFeatureType,-")|String?|Commonly used identifer for a Feature

## <a name="PreviousStateType"></a>[PreviousStateType](./Org.OData.Core.V1.xml#L550:~:text=<EnumType%20Name="-,PreviousStateType,-")
Previous state of a resource whose changes are described by an [added/changed entity in a delta message](https://docs.oasis-open.org/odata/odata-json-format/v4.01/odata-json-format-v4.01.html#sec_AddedChangedEntity)

Member|Value|Description
:-----|----:|:----------
[Existed](./Org.OData.Core.V1.xml#L552:~:text=<EnumType%20Name="-,PreviousStateType,-")|1|The annotated entity describes changes to a resource that already existed prior to capturing these changes
[Unknown](./Org.OData.Core.V1.xml#L555:~:text=<EnumType%20Name="-,PreviousStateType,-")|0|The sender does not know whether the resource already existed prior to capturing these changes
18 changes: 18 additions & 0 deletions vocabularies/Org.OData.Core.V1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,24 @@ Any simple identifier | Any type listed in `Validation.OpenPropertyTypeConstrain
</Property>
</ComplexType>

<Term Name="PreviousState" Type="Core.PreviousStateType" Nullable="false">
<Annotation Term="Core.Description" String="Previous state of a resource whose changes are described by the [added/changed entity in a delta message](https://docs.oasis-open.org/odata/odata-json-format/v4.01/odata-json-format-v4.01.html#sec_AddedChangedEntity) carrying this instance annotation" />
<Annotation Term="Core.LongDescription">
<String>The presence or absence of this instance annotation does not alter the idempotent nature of a delta message, nor does it alter the UPSERT nature of an added/changed entity.

The recipient of a delta message MAY use the instance annotation for optimization only; ultimately any received added/changed entity MUST be processed as an UPSERT.</String>
</Annotation>
</Term>
<EnumType Name="PreviousStateType">
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switch to String with AllowedValues

<Annotation Term="Core.Description" String="Previous state of a resource whose changes are described by an [added/changed entity in a delta message](https://docs.oasis-open.org/odata/odata-json-format/v4.01/odata-json-format-v4.01.html#sec_AddedChangedEntity)" />
<Member Name="Existed" Value="1">
<Annotation Term="Core.Description" String="The annotated entity describes changes to a resource that already existed prior to capturing these changes" />
</Member>
<Member Name="Unknown" Value="0">
<Annotation Term="Core.Description" String="The sender does not know whether the resource already existed prior to capturing these changes" />
</Member>
</EnumType>

</Schema>
</edmx:DataServices>
</edmx:Edmx>