From 4750db8b1f34221e31f7b7fc9a72d8635683af7a Mon Sep 17 00:00:00 2001 From: D024504 Date: Fri, 10 Nov 2023 12:59:56 +0100 Subject: [PATCH 01/32] auto-expand transformation --- vocabularies/Analytics.json | 91 +++++++++++++++++++++++++++++++++++++ vocabularies/Analytics.md | 49 ++++++++++++++++++++ vocabularies/Analytics.xml | 91 +++++++++++++++++++++++++++++++++++++ 3 files changed, 231 insertions(+) diff --git a/vocabularies/Analytics.json b/vocabularies/Analytics.json index 350c48764..1988e26c0 100644 --- a/vocabularies/Analytics.json +++ b/vocabularies/Analytics.json @@ -161,6 +161,97 @@ "@Validation.ApplicableTerms@Core.Description": "Adding a list of other terms that can be annotated to it.", "@Validation.ApplicableTerms": ["Common.Label"] } + }, + "AutoExpand": [ + { + "$Kind": "Function", + "$EntitySetPath": "InputSet", + "$IsBound": true, + "@Common.Experimental": true, + "@Core.IsSignature": true, + "@Core.Description": "`$apply` transformation that expands an unnamed leveled hierarchy with custom aggregation of certain properties", + "$Parameter": [ + { + "$Name": "InputSet", + "$Collection": true, + "$Type": "Edm.EntityType", + "@Core.Description": "Entity set to be processed" + }, + { + "$Name": "Levels", + "$Collection": true, + "$Type": "Analytics.AutoExpandLevel", + "@Core.Description": "Collection of aggregation levels forming a leveled hierarchy", + "@Core.LongDescription": "Each element in the collection defines a non-empty set of property names constituting a level.\n A property must not referenced by more than one level.\n The first element in the collection defines the property names of the coarsest level,\n the following elements define the property names of consecutively finer-grained aggregation levels.\n All referenced properties in this collection must be groupable." + }, + { + "$Name": "ExpandLevel", + "$Type": "Edm.Int64", + "@Core.Description": "Number of levels to be expanded, counting from left", + "@Core.LongDescription": "The function result comprises the leveled hierarchy with the expanded levels and the following level as leaves in preorder." + }, + { + "$Name": "Aggregation", + "$Collection": true, + "@Core.Description": "Properties to aggregate for all result entries on all levels", + "@Core.LongDescription": "All properties in this collection must be custom aggregates." + }, + { + "$Name": "SiblingOrder", + "$Collection": true, + "$Type": "Analytics.AutoExpandSiblingOrder", + "@Core.Description": "Sort specification to apply to all direct descendants of a given entry in the resulting leveled hierarchy" + }, + { + "$Name": "BeforeAggregationFilter", + "@Core.Description": "Expression valid for `filter` transformation to restrict the input set before any further procressing", + "@Core.OptionalParameter": {} + }, + { + "$Name": "AggregatedValuesLeafFilter", + "@Core.Description": "Expression valid for `filter` transformation to restrict the input set at the most detailed grouping level with conditions on aggregated values", + "@Core.OptionalParameter": {} + }, + { + "$Name": "Skip", + "$Type": "Edm.Int64", + "@Core.Description": "Number of entries to skip from the top of the fully ordered result", + "@Core.OptionalParameter": { "DefaultValue": "0" } + }, + { + "$Name": "Top", + "$Type": "Edm.Int64", + "@Core.Description": "Number of entries to return from the result set after any skipping", + "@Core.OptionalParameter": {} + }, + { + "$Name": "ResultEntriesCount", + "$Type": "Edm.Bool", + "@Core.Description": "Whether to return the total number of entries in the result independent of Skip/Top", + "@Core.OptionalParameter": { "DefaultValue": "false" } + } + ], + "$ReturnType": { "$Collection": true, "$Type": "Edm.EntityType" } + } + ], + "AutoExpandLevels": { "$Kind": "ComplexType", "@Common.Experimental": true, "P": { "$Collection": true } }, + "AutoExpandSiblingOrder": { + "$Kind": "ComplexType", + "@Common.Experimental": true, + "Property": { "@Core.Description": "Property by which to sort" }, + "Order": { + "$Type": "Analytics.SortOrder", + "$DefaultValue": "Analytics.SortOrder/Asc", + "@Core.Description": "Sorting direction" + } + }, + "SortOrder": { + "$Kind": "EnumType", + "@Common.Experimental": true, + "Asc": 0, + "Asc@Core.Description": "Sort in ascending order", + "Desc": 1, + "Desc@Core.Description": "Sort in descending order" } } } diff --git a/vocabularies/Analytics.md b/vocabularies/Analytics.md index 20e2df5ac..afb3cd854 100644 --- a/vocabularies/Analytics.md +++ b/vocabularies/Analytics.md @@ -18,6 +18,29 @@ Term|Type|Description [AggregatedProperty](./Analytics.xml#L121:~:text=Dynamic property for aggregate expression with specified aggregation method defined on the annotated entity type. [AnalyticalContext](./Analytics.xml#L141:~:text=Collection of properties that define an analytical context + +## Functions + + +### [AutoExpand](./Analytics.xml#L179:~:text=Each element in the collection defines a non-empty set of property names constituting a level. A property must not referenced by more than one level. The first element in the collection defines the property names of the coarsest level, the following elements define the property names of consecutively finer-grained aggregation levels. All referenced properties in this collection must be groupable. +[ExpandLevel](./Analytics.xml#L196:~:text=The function result comprises the leveled hierarchy with the expanded levels and the following level as leaves in preorder. +[Aggregation](./Analytics.xml#L202:~:text=All properties in this collection must be custom aggregates. +[SiblingOrder](./Analytics.xml#L208:~:text= ## [AggregatedPropertyType](./Analytics.xml#L124:~:text= +## [AutoExpandLevels](./Analytics.xml#L247:~:text= +## [AutoExpandSiblingOrder](./Analytics.xml#L251:~:text= +## [SortOrder](./Analytics.xml#L260:~:text= + + + + + + + + + + + Each element in the collection defines a non-empty set of property names constituting a level. + A property must not referenced by more than one level. + The first element in the collection defines the property names of the coarsest level, + the following elements define the property names of consecutively finer-grained aggregation levels. + All referenced properties in this collection must be groupable. + + + + + + The function result comprises the leveled hierarchy with the expanded levels and the following level as leaves in preorder. + + + + + + All properties in this collection must be custom aggregates. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 53368e3f9bdc66ce721681d53f1ce6f1ff56eb23 Mon Sep 17 00:00:00 2001 From: D024504 Date: Fri, 10 Nov 2023 13:30:21 +0100 Subject: [PATCH 02/32] Avoid EnumType --- vocabularies/Analytics.json | 21 +++++++++++++-------- vocabularies/Analytics.md | 28 +++++++++++++++------------- vocabularies/Analytics.xml | 34 +++++++++++++++++++++------------- 3 files changed, 49 insertions(+), 34 deletions(-) diff --git a/vocabularies/Analytics.json b/vocabularies/Analytics.json index 1988e26c0..727cd3ae1 100644 --- a/vocabularies/Analytics.json +++ b/vocabularies/Analytics.json @@ -182,7 +182,7 @@ "$Collection": true, "$Type": "Analytics.AutoExpandLevel", "@Core.Description": "Collection of aggregation levels forming a leveled hierarchy", - "@Core.LongDescription": "Each element in the collection defines a non-empty set of property names constituting a level.\n A property must not referenced by more than one level.\n The first element in the collection defines the property names of the coarsest level,\n the following elements define the property names of consecutively finer-grained aggregation levels.\n All referenced properties in this collection must be groupable." + "@Core.LongDescription": "Each element in the collection defines the property names for one level.\n A property must not referenced by more than one level.\n The first element in the collection defines the property names of the coarsest level,\n the following elements define the property names of consecutively finer-grained aggregation levels.\n All referenced properties must be groupable." }, { "$Name": "ExpandLevel", @@ -221,7 +221,7 @@ { "$Name": "Top", "$Type": "Edm.Int64", - "@Core.Description": "Number of entries to return from the result set after any skipping", + "@Core.Description": "Number of entries to return from the result set after any skipping (absent means all)", "@Core.OptionalParameter": {} }, { @@ -234,7 +234,11 @@ "$ReturnType": { "$Collection": true, "$Type": "Edm.EntityType" } } ], - "AutoExpandLevels": { "$Kind": "ComplexType", "@Common.Experimental": true, "P": { "$Collection": true } }, + "AutoExpandLevel": { + "$Kind": "ComplexType", + "@Common.Experimental": true, + "P": { "$Collection": true, "@Core.Description": "A non-empty set of property names constituting a level" } + }, "AutoExpandSiblingOrder": { "$Kind": "ComplexType", "@Common.Experimental": true, @@ -246,12 +250,13 @@ } }, "SortOrder": { - "$Kind": "EnumType", + "$Kind": "TypeDefinition", + "$UnderlyingType": "Edm.String", "@Common.Experimental": true, - "Asc": 0, - "Asc@Core.Description": "Sort in ascending order", - "Desc": 1, - "Desc@Core.Description": "Sort in descending order" + "@Validation.AllowedValues": [ + { "Value": "asc", "@Core.Description": "Sort in ascending order" }, + { "Value": "desc", "@Core.Description": "Sort in descending order" } + ] } } } diff --git a/vocabularies/Analytics.md b/vocabularies/Analytics.md index afb3cd854..84c59a50a 100644 --- a/vocabularies/Analytics.md +++ b/vocabularies/Analytics.md @@ -29,14 +29,14 @@ Term|Type|Description Parameter|Type|Description :--------|:---|:---------- **[InputSet](./Analytics.xml#L183:~:text=Each element in the collection defines a non-empty set of property names constituting a level. A property must not referenced by more than one level. The first element in the collection defines the property names of the coarsest level, the following elements define the property names of consecutively finer-grained aggregation levels. All referenced properties in this collection must be groupable. +[Levels](./Analytics.xml#L186:~:text=Each element in the collection defines the property names for one level. A property must not referenced by more than one level. The first element in the collection defines the property names of the coarsest level, the following elements define the property names of consecutively finer-grained aggregation levels. All referenced properties must be groupable. [ExpandLevel](./Analytics.xml#L196:~:text=The function result comprises the leveled hierarchy with the expanded levels and the following level as leaves in preorder. [Aggregation](./Analytics.xml#L202:~:text=All properties in this collection must be custom aggregates. [SiblingOrder](./Analytics.xml#L208:~:text= -## [AutoExpandLevels](./Analytics.xml#L247:~:text= +## [AutoExpandLevel](./Analytics.xml#L247:~:text= -## [AutoExpandSiblingOrder](./Analytics.xml#L251:~:text= -## [SortOrder](./Analytics.xml#L260:~:text= - Each element in the collection defines a non-empty set of property names constituting a level. + Each element in the collection defines the property names for one level. A property must not referenced by more than one level. The first element in the collection defines the property names of the coarsest level, the following elements define the property names of consecutively finer-grained aggregation levels. - All referenced properties in this collection must be groupable. + All referenced properties must be groupable. @@ -229,7 +229,7 @@ - + @@ -244,9 +244,11 @@ - + - + + + @@ -257,15 +259,21 @@ - + - - - - - - - + + + + + + + + + + + + + From 64e5ae7c157a3b24c07753a85df45d30d6df1a2f Mon Sep 17 00:00:00 2001 From: D024504 Date: Tue, 14 Nov 2023 08:03:10 +0100 Subject: [PATCH 03/32] Instance annotations for auto-expanded result sets --- vocabularies/Analytics.json | 17 ++++++- vocabularies/Analytics.md | 79 +++++++++++++++++---------------- vocabularies/Analytics.xml | 13 +++++- vocabularies/Hierarchy.json | 38 +++++++++------- vocabularies/Hierarchy.md | 88 ++++++++++++++++++++++--------------- vocabularies/Hierarchy.xml | 45 +++++++++++-------- 6 files changed, 168 insertions(+), 112 deletions(-) diff --git a/vocabularies/Analytics.json b/vocabularies/Analytics.json index 727cd3ae1..365f816cb 100644 --- a/vocabularies/Analytics.json +++ b/vocabularies/Analytics.json @@ -12,6 +12,9 @@ }, "https://sap.github.io/odata-vocabularies/vocabularies/Common.json": { "$Include": [{ "$Namespace": "com.sap.vocabularies.Common.v1", "$Alias": "Common" }] + }, + "https://sap.github.io/odata-vocabularies/vocabularies/Hierarchy.json": { + "$Include": [{ "$Namespace": "com.sap.vocabularies.Hierarchy.v1", "$Alias": "Hierarchy" }] } }, "com.sap.vocabularies.Analytics.v1": { @@ -231,7 +234,11 @@ "@Core.OptionalParameter": { "DefaultValue": "false" } } ], - "$ReturnType": { "$Collection": true, "$Type": "Edm.EntityType" } + "$ReturnType": { + "$Collection": true, + "$Type": "Edm.EntityType", + "@Core.Description": "Output set including the instance annotation [`LevelInformation`](#LevelInformation)" + } } ], "AutoExpandLevel": { @@ -257,6 +264,14 @@ { "Value": "asc", "@Core.Description": "Sort in ascending order" }, { "Value": "desc", "@Core.Description": "Sort in descending order" } ] + }, + "LevelInformation": { + "$Kind": "Term", + "$Type": "Hierarchy.HierarchyType", + "$AppliesTo": ["EntityType"], + "@Common.Experimental": true, + "@Common.IsInstanceAnnotation": true, + "@Core.Description": "Information about grouping levels in the result set of an analytical request" } } } diff --git a/vocabularies/Analytics.md b/vocabularies/Analytics.md index 84c59a50a..a9c6e5599 100644 --- a/vocabularies/Analytics.md +++ b/vocabularies/Analytics.md @@ -8,89 +8,90 @@ Terms for annotating analytical resources Term|Type|Description :---|:---|:---------- -[Dimension](./Analytics.xml#L41:~:text=Deprecated in favor of [`AnalyticalContext/Dimension`](#AnalyticalContext) -[Measure](./Analytics.xml#L53:~:text=Deprecated in favor of [`AnalyticalContext/Measure`](#AnalyticalContext) -[AccumulativeMeasure](./Analytics.xml#L65:~:text=Deprecated in favor of [`AnalyticalContext/AccumulativeMeasure`](#AnalyticalContext) -[RolledUpPropertyCount](./Analytics.xml#L77:~:text=Number of properties in the entity instance that have been aggregated away -[DrillURL](./Analytics.xml#L83:~:text=URL to retrieve more detailed data related to a node of a recursive hierarchy. Annotations with this term MUST include a qualifier to select the hierarchy for which the drill URL is provided. -[PlanningAction](./Analytics.xml#L95:~:text=Processes or generates plan data. Its logic may have side-effects on entity sets. -[AggregatedProperties](./Analytics.xml#L103:~:text=Deprecated in favor of [`AggregatedProperty`](#AggregatedProperty) -[AggregatedProperty](./Analytics.xml#L121:~:text=Dynamic property for aggregate expression with specified aggregation method defined on the annotated entity type. -[AnalyticalContext](./Analytics.xml#L141:~:text=Collection of properties that define an analytical context +[Dimension](./Analytics.xml#L44:~:text=Deprecated in favor of [`AnalyticalContext/Dimension`](#AnalyticalContext) +[Measure](./Analytics.xml#L56:~:text=Deprecated in favor of [`AnalyticalContext/Measure`](#AnalyticalContext) +[AccumulativeMeasure](./Analytics.xml#L68:~:text=Deprecated in favor of [`AnalyticalContext/AccumulativeMeasure`](#AnalyticalContext) +[RolledUpPropertyCount](./Analytics.xml#L80:~:text=Number of properties in the entity instance that have been aggregated away +[DrillURL](./Analytics.xml#L86:~:text=URL to retrieve more detailed data related to a node of a recursive hierarchy. Annotations with this term MUST include a qualifier to select the hierarchy for which the drill URL is provided. +[PlanningAction](./Analytics.xml#L98:~:text=Processes or generates plan data. Its logic may have side-effects on entity sets. +[AggregatedProperties](./Analytics.xml#L106:~:text=Deprecated in favor of [`AggregatedProperty`](#AggregatedProperty) +[AggregatedProperty](./Analytics.xml#L124:~:text=Dynamic property for aggregate expression with specified aggregation method defined on the annotated entity type. +[AnalyticalContext](./Analytics.xml#L144:~:text=Collection of properties that define an analytical context +[LevelInformation](./Analytics.xml#L283:~:text=Information about grouping levels in the result set of an analytical request ## Functions -### [AutoExpand](./Analytics.xml#L179:~:text=Each element in the collection defines the property names for one level. A property must not referenced by more than one level. The first element in the collection defines the property names of the coarsest level, the following elements define the property names of consecutively finer-grained aggregation levels. All referenced properties must be groupable. -[ExpandLevel](./Analytics.xml#L196:~:text=The function result comprises the leveled hierarchy with the expanded levels and the following level as leaves in preorder. -[Aggregation](./Analytics.xml#L202:~:text=All properties in this collection must be custom aggregates. -[SiblingOrder](./Analytics.xml#L208:~:text=Each element in the collection defines the property names for one level. A property must not referenced by more than one level. The first element in the collection defines the property names of the coarsest level, the following elements define the property names of consecutively finer-grained aggregation levels. All referenced properties must be groupable. +[ExpandLevel](./Analytics.xml#L199:~:text=The function result comprises the leveled hierarchy with the expanded levels and the following level as leaves in preorder. +[Aggregation](./Analytics.xml#L205:~:text=All properties in this collection must be custom aggregates. +[SiblingOrder](./Analytics.xml#L211:~:text= -## [AggregatedPropertyType](./Analytics.xml#L124:~:text= -## [AnalyticalContextType](./Analytics.xml#L145:~:text=Allowed terms:
- [AggregatedProperty](#AggregatedProperty)
- [CustomAggregate](https://github.com/oasis-tcs/odata-vocabularies/blob/main/vocabularies/Org.OData.Aggregation.V1.md#CustomAggregate) -[Dimension](./Analytics.xml#L159:~:text=Allowed terms:
- [AggregatedProperty](#AggregatedProperty)
- [CustomAggregate](https://github.com/oasis-tcs/odata-vocabularies/blob/main/vocabularies/Org.OData.Aggregation.V1.md#CustomAggregate) +[Dimension](./Analytics.xml#L162:~:text= -## [AutoExpandLevel](./Analytics.xml#L247:~:text= -## [AutoExpandSiblingOrder](./Analytics.xml#L253:~:text= -## [SortOrder](./Analytics.xml#L262:~:text= + + + @@ -242,7 +245,9 @@ - + + + @@ -275,6 +280,12 @@ + + + + + + diff --git a/vocabularies/Hierarchy.json b/vocabularies/Hierarchy.json index b2035e65d..81631909f 100644 --- a/vocabularies/Hierarchy.json +++ b/vocabularies/Hierarchy.json @@ -33,8 +33,30 @@ "@Core.Description": "Hierarchy-specific information in the result set of a hierarchical request", "@Core.LongDescription": "The [base term](https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Aggregation.V1.html#RecursiveHierarchy)\n governs what are the nodes and parents in the hierarchy, whereas this term defines derived information." }, + "HierarchyType": { + "$Kind": "ComplexType", + "@Common.Experimental": true, + "@Core.LongDescription": "The properties in this complex type contain information about\n an entry in the result set of a request with multiple grouping levels.", + "LimitedDescendantCount": { + "$Type": "Edm.Int64", + "$Nullable": true, + "@Core.Description": "Number of descendants a node has in the limited hierarchy" + }, + "DrillState": { + "$Nullable": true, + "@Core.Description": "Drill state of an occurrence of a node", + "@Core.LongDescription": "Possible drill states are:\n
- `expanded` if a node has children in the limited hierarchy\n
- `collapsed` if a node has children in the unlimited hierarchy but not in the limited hierarchy\n
- `leaf` if a node has no children in the unlimited hierarchy" + }, + "DistanceFromRoot": { + "$Type": "Edm.Int64", + "$Nullable": true, + "@Core.Description": "Number of ancestors an occurrence of a node has in the limited hierarchy", + "@Core.LongDescription": "This equals the number of ancestors in the sub-hierarchy, if the request involves a sub-hierarchy." + } + }, "RecursiveHierarchyType": { "$Kind": "ComplexType", + "$BaseType": "Hierarchy.HierarchyType", "@Common.Experimental": true, "@Core.LongDescription": "The properties in this complex type contain information about\na node in the result set of a hierarchical request. If the same node occurs multiple times\nwith different parents, certain properties may differ between the occurrences.\nThe properties are derived when hierarchical transformations\nare applied whose first parameter has the annotated entity type\nand whose second parameter is the annotation qualifier.\n\nFor requests like\n```\nSalesOrganizations?$apply=\ndescendants(..., ID, filter(ID eq 'US'), keep start)\n/ancestors(..., ID, filter(contains(Name, 'New York')), keep start)\n/Hierarchy.TopLevels(..., NodeProperty='ID', Levels=2)\n&$top=10\n```\nor\n```\nSalesOrganizations?$apply=groupby((rolluprecursive(..., ID,\n descendants(..., ID, filter(ID eq 'US')),\n ancestors(..., ID, filter(contains(Name, 'New York')), keep start))), aggregate(...))\n/Hierarchy.TopLevels(..., NodeProperty='ID', Levels=2)\n&$top=10\n```\n(where `...,` stands for hierarchy nodes and hierarchy qualifier)\nthe following collections of hierarchy nodes are distinguished:\n\n|Collection|Definition|Value|Where in request|\n|----------|----------|-----|----------------|\n|sub-hierarchy|output set of a `descendants` transformation, possibly embedded in a `rolluprecursive` transformation, that is not preceded by an `ancestors` or `descendants` transformation|US sales organizations|rows 1–2|\n|matching nodes|see [`MatchCount`](#MatchCount)|US sales organizations with \"New York\" in their name|output set of `filter` transformation in row 3|\n|unlimited hierarchy|output set of the last `ancestors`, `descendants` or `traverse` transformation, possibly embedded in a `rolluprecursive` transformation, disregarding numeric fifth parameters|US sales organizations with leaves containing \"New York\"|rows 1–3|\n|limited hierarchy|output set of the last `ancestors`, `descendants`, `traverse` or [`Hierarchy.TopLevels`](#TopLevels) transformation, possibly embedded in a `rolluprecursive` transformation|2 levels of US sales organizations with leaves containing \"New York\"|rows 1–4|\n", "ExternalKey": { @@ -57,22 +79,6 @@ "$Nullable": true, "@Core.Description": "Number of descendants a node has in the unlimited hierarchy" }, - "LimitedDescendantCount": { - "$Type": "Edm.Int64", - "$Nullable": true, - "@Core.Description": "Number of descendants a node has in the limited hierarchy" - }, - "DrillState": { - "$Nullable": true, - "@Core.Description": "Drill state of an occurrence of a node", - "@Core.LongDescription": "Possible drill states are:\n
- `expanded` if a node has children in the limited hierarchy\n
- `collapsed` if a node has children in the unlimited hierarchy but not in the limited hierarchy\n
- `leaf` if a node has no children in the unlimited hierarchy" - }, - "DistanceFromRoot": { - "$Type": "Edm.Int64", - "$Nullable": true, - "@Core.Description": "Number of ancestors an occurrence of a node has in the limited hierarchy", - "@Core.LongDescription": "This equals the number of ancestors in the sub-hierarchy, if the request involves a sub-hierarchy." - }, "LimitedRank": { "$Type": "Edm.Int64", "$Nullable": true, diff --git a/vocabularies/Hierarchy.md b/vocabularies/Hierarchy.md index b092ab032..2c05d7133 100644 --- a/vocabularies/Hierarchy.md +++ b/vocabularies/Hierarchy.md @@ -9,26 +9,26 @@ Terms for Hierarchies Term|Type|Description :---|:---|:---------- [RecursiveHierarchy](./Hierarchy.xml#L41:~:text=Hierarchy-specific information in the result set of a hierarchical request
The [base term](https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Aggregation.V1.html#RecursiveHierarchy) governs what are the nodes and parents in the hierarchy, whereas this term defines derived information. -[RecursiveHierarchyActions](./Hierarchy.xml#L154:~:text=Actions for maintaining the recursive hierarchy defined by the [base term](https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Aggregation.V1.html#RecursiveHierarchy)
When an annotation with this term is present, the [`ParentNavigationProperty`](https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Aggregation.V1.html#RecursiveHierarchyType) in the base term must not have a collection-valued segment prior to its last segment. -[MatchCount](./Hierarchy.xml#L186:~:text=Instance annotation on the result of an `$apply` query option containing the number of matching nodes after hierarchical transformations
The service MAY designate a subset of the `$apply` result as "matching nodes". For requests following the pattern described [here](#RecursiveHierarchyType), this subset is the output set of the `filter` or `search` transformation that occurs as the fourth parameter of the last `ancestors` transformation or occurs nested into it.
For requests not following this pattern, the subset NEED NOT be defined.
This instance annotation is available if [`RecursiveHierarchy/Matched`](#RecursiveHierarchyType) and [`RecursiveHierarchy/MatchedDescendantCount`](#RecursiveHierarchyType) are also available. -[RecursiveHierarchySupported](./Hierarchy.xml#L268:~:text=Whether the annotated collection acts as a [`RecursiveHierarchy`](#RecursiveHierarchy) with the given qualifier
This tag is applied to a collection with the same qualifier as the [`RecursiveHierarchy`](#RecursiveHierarchy) term which is applied to its entity type. The recursive hierarchy can then only be addressed through a collection where this tag is true. +[RecursiveHierarchyActions](./Hierarchy.xml#L161:~:text=Actions for maintaining the recursive hierarchy defined by the [base term](https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Aggregation.V1.html#RecursiveHierarchy)
When an annotation with this term is present, the [`ParentNavigationProperty`](https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Aggregation.V1.html#RecursiveHierarchyType) in the base term must not have a collection-valued segment prior to its last segment. +[MatchCount](./Hierarchy.xml#L193:~:text=Instance annotation on the result of an `$apply` query option containing the number of matching nodes after hierarchical transformations
The service MAY designate a subset of the `$apply` result as "matching nodes". For requests following the pattern described [here](#RecursiveHierarchyType), this subset is the output set of the `filter` or `search` transformation that occurs as the fourth parameter of the last `ancestors` transformation or occurs nested into it.
For requests not following this pattern, the subset NEED NOT be defined.
This instance annotation is available if [`RecursiveHierarchy/Matched`](#RecursiveHierarchyType) and [`RecursiveHierarchy/MatchedDescendantCount`](#RecursiveHierarchyType) are also available. +[RecursiveHierarchySupported](./Hierarchy.xml#L275:~:text=Whether the annotated collection acts as a [`RecursiveHierarchy`](#RecursiveHierarchy) with the given qualifier
This tag is applied to a collection with the same qualifier as the [`RecursiveHierarchy`](#RecursiveHierarchy) term which is applied to its entity type. The recursive hierarchy can then only be addressed through a collection where this tag is true. ## Actions -### [Template_ChangeNextSiblingAction](./Hierarchy.xml#L278:~:text=This parameter has properties with the same names as the key properties of the entity type. next(T) = S after the action. If R is a node with next(R) = S before the action, then next(R) = T after the action, even if S = null. It is an error if S has a different parent than T. +**[Node](./Hierarchy.xml#L288:~:text=This parameter has properties with the same names as the key properties of the entity type. next(T) = S after the action. If R is a node with next(R) = S before the action, then next(R) = T after the action, even if S = null. It is an error if S has a different parent than T. -### [Template_CopyAction](./Hierarchy.xml#L312:~:text= -### [TopLevels](./Hierarchy.xml#L214:~:text= +## [HierarchyType](./Hierarchy.xml#L50:~:text=Possible drill states are:
- `expanded` if a node has children in the limited hierarchy
- `collapsed` if a node has children in the unlimited hierarchy but not in the limited hierarchy
- `leaf` if a node has no children in the unlimited hierarchy +[DistanceFromRoot](./Hierarchy.xml#L68:~:text=This equals the number of ancestors in the sub-hierarchy, if the request involves a sub-hierarchy. + -## [RecursiveHierarchyType](./Hierarchy.xml#L50:~:text=If a `NodeType` exists, the external key is unique only in combination with it. Or the external key can coincide with the [`Aggregation.RecursiveHierarchy/NodeProperty`](https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Aggregation.V1.html#RecursiveHierarchyType). -[NodeType](./Hierarchy.xml#L94:~:text=In a recursive hierarchy with mixed types, nodes can
- have a type-specific (navigation) property whose name is the node type or
- be represented by entities of different subtypes of a common entity type that is annotated with the `RecursiveHierarchy` annotation. The qualified name of the subtype is the node type. -[ChildCount](./Hierarchy.xml#L103:~:text=Possible drill states are:
- `expanded` if a node has children in the limited hierarchy
- `collapsed` if a node has children in the unlimited hierarchy but not in the limited hierarchy
- `leaf` if a node has no children in the unlimited hierarchy -[DistanceFromRoot](./Hierarchy.xml#L121:~:text=This equals the number of ancestors in the sub-hierarchy, if the request involves a sub-hierarchy. -[LimitedRank](./Hierarchy.xml#L127:~:text=The rank of a node is the index of the node in the sequence of nodes created from a preorder or postorder traversal of the limited hierarchy. The first node in the traversal has rank 0. -[SiblingRank](./Hierarchy.xml#L134:~:text=The sibling rank of a node is the index of the node in the sequence of all nodes in the unlimited hierarchy with the same parent. The first sibling has rank 0. -[Matched](./Hierarchy.xml#L141:~:text=Possible drill states are:
- `expanded` if a node has children in the limited hierarchy
- `collapsed` if a node has children in the unlimited hierarchy but not in the limited hierarchy
- `leaf` if a node has no children in the unlimited hierarchy +[*DistanceFromRoot*](./Hierarchy.xml#L68:~:text=This equals the number of ancestors in the sub-hierarchy, if the request involves a sub-hierarchy. +[ExternalKey](./Hierarchy.xml#L112:~:text=If a `NodeType` exists, the external key is unique only in combination with it. Or the external key can coincide with the [`Aggregation.RecursiveHierarchy/NodeProperty`](https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Aggregation.V1.html#RecursiveHierarchyType). +[NodeType](./Hierarchy.xml#L119:~:text=In a recursive hierarchy with mixed types, nodes can
- have a type-specific (navigation) property whose name is the node type or
- be represented by entities of different subtypes of a common entity type that is annotated with the `RecursiveHierarchy` annotation. The qualified name of the subtype is the node type. +[ChildCount](./Hierarchy.xml#L128:~:text=The rank of a node is the index of the node in the sequence of nodes created from a preorder or postorder traversal of the limited hierarchy. The first node in the traversal has rank 0. +[SiblingRank](./Hierarchy.xml#L141:~:text=The sibling rank of a node is the index of the node in the sequence of all nodes in the unlimited hierarchy with the same parent. The first sibling has rank 0. +[Matched](./Hierarchy.xml#L148:~:text= -## [RecursiveHierarchyActionsType](./Hierarchy.xml#L162:~:text= -## [TopLevelsExpandType](./Hierarchy.xml#L257:~:text= - + + + + The properties in this complex type contain information about + an entry in the result set of a request with multiple grouping levels. + + + + + + + + Possible drill states are: + <br>- `expanded` if a node has children in the limited hierarchy + <br>- `collapsed` if a node has children in the unlimited hierarchy but not in the limited hierarchy + <br>- `leaf` if a node has no children in the unlimited hierarchy + + + + + + This equals the number of ancestors in the sub-hierarchy, if the request involves a sub-hierarchy. + + + + The properties in this complex type contain information about @@ -106,24 +131,6 @@ the following collections of hierarchy nodes are distinguished: - - - - - - - Possible drill states are: - <br>- `expanded` if a node has children in the limited hierarchy - <br>- `collapsed` if a node has children in the unlimited hierarchy but not in the limited hierarchy - <br>- `leaf` if a node has no children in the unlimited hierarchy - - - - - - This equals the number of ancestors in the sub-hierarchy, if the request involves a sub-hierarchy. - - From b5a6f3498f8196de918c90f7f01331b2de4aecf3 Mon Sep 17 00:00:00 2001 From: D024504 Date: Tue, 14 Nov 2023 08:35:48 +0100 Subject: [PATCH 04/32] Reprased definitions --- vocabularies/Analytics.json | 2 +- vocabularies/Analytics.md | 2 +- vocabularies/Analytics.xml | 2 +- vocabularies/Hierarchy.json | 27 +++++++++--- vocabularies/Hierarchy.md | 82 +++++++++++++++++++------------------ vocabularies/Hierarchy.xml | 37 ++++++++++++----- 6 files changed, 93 insertions(+), 59 deletions(-) diff --git a/vocabularies/Analytics.json b/vocabularies/Analytics.json index 365f816cb..3e15d1940 100644 --- a/vocabularies/Analytics.json +++ b/vocabularies/Analytics.json @@ -271,7 +271,7 @@ "$AppliesTo": ["EntityType"], "@Common.Experimental": true, "@Common.IsInstanceAnnotation": true, - "@Core.Description": "Information about grouping levels in the result set of an analytical request" + "@Core.Description": "Information about grouping levels in the result set of a request including the [`AutoExpand`](#AutoExpand) transformation" } } } diff --git a/vocabularies/Analytics.md b/vocabularies/Analytics.md index a9c6e5599..58d6fe82c 100644 --- a/vocabularies/Analytics.md +++ b/vocabularies/Analytics.md @@ -17,7 +17,7 @@ Term|Type|Description [AggregatedProperties](./Analytics.xml#L106:~:text=Deprecated in favor of [`AggregatedProperty`](#AggregatedProperty) [AggregatedProperty](./Analytics.xml#L124:~:text=Dynamic property for aggregate expression with specified aggregation method defined on the annotated entity type. [AnalyticalContext](./Analytics.xml#L144:~:text=Collection of properties that define an analytical context -[LevelInformation](./Analytics.xml#L283:~:text=Information about grouping levels in the result set of an analytical request +[LevelInformation](./Analytics.xml#L283:~:text=Information about grouping levels in the result set of a request including the [`AutoExpand`](#AutoExpand) transformation ## Functions diff --git a/vocabularies/Analytics.xml b/vocabularies/Analytics.xml index 3a99df4e8..0ca1045c5 100644 --- a/vocabularies/Analytics.xml +++ b/vocabularies/Analytics.xml @@ -283,7 +283,7 @@ - + diff --git a/vocabularies/Hierarchy.json b/vocabularies/Hierarchy.json index 81631909f..ad085d9ed 100644 --- a/vocabularies/Hierarchy.json +++ b/vocabularies/Hierarchy.json @@ -36,22 +36,21 @@ "HierarchyType": { "$Kind": "ComplexType", "@Common.Experimental": true, - "@Core.LongDescription": "The properties in this complex type contain information about\n an entry in the result set of a request with multiple grouping levels.", + "@Core.LongDescription": "The properties in this complex type contain information about\n an entry in the result set of a request with multiple aggregation levels, some which are expanded.\n These properties also serve in the derived [`RecursiveHierarchyType`](#RecursiveHierarchyType)\n with their definitions rephrased in the concept of recursive hierarchies.", "LimitedDescendantCount": { "$Type": "Edm.Int64", "$Nullable": true, - "@Core.Description": "Number of descendants a node has in the limited hierarchy" + "@Core.Description": "Number of entries from deeper aggregation levels that are expanded" }, "DrillState": { "$Nullable": true, - "@Core.Description": "Drill state of an occurrence of a node", - "@Core.LongDescription": "Possible drill states are:\n
- `expanded` if a node has children in the limited hierarchy\n
- `collapsed` if a node has children in the unlimited hierarchy but not in the limited hierarchy\n
- `leaf` if a node has no children in the unlimited hierarchy" + "@Core.Description": "Drill state of an entry", + "@Core.LongDescription": "Possible drill states are:\n
`expanded`
if an entry precedes entries from deeper aggregation levels\n
`collapsed`
if an entry belongs to the highest non-expanded aggregation level, but not the deepest\n
`leaf`
if an entry belongs to the deepest aggregation level" }, "DistanceFromRoot": { "$Type": "Edm.Int64", "$Nullable": true, - "@Core.Description": "Number of ancestors an occurrence of a node has in the limited hierarchy", - "@Core.LongDescription": "This equals the number of ancestors in the sub-hierarchy, if the request involves a sub-hierarchy." + "@Core.Description": "Position of the current aggregation level in the list of all aggregation levels" } }, "RecursiveHierarchyType": { @@ -69,6 +68,22 @@ "@Core.Description": "Type of a node", "@Core.LongDescription": "In a recursive hierarchy with mixed types, nodes can\n
- have a type-specific (navigation) property whose name is the node type or\n
- be represented by entities of different subtypes of a common entity type that is\n annotated with the `RecursiveHierarchy` annotation. The qualified name of the subtype is the node type." }, + "LimitedDescendantCount": { + "$Type": "Edm.Int64", + "$Nullable": true, + "@Core.Description": "Number of descendants a node has in the limited hierarchy" + }, + "DrillState": { + "$Nullable": true, + "@Core.Description": "Drill state of an occurrence of a node", + "@Core.LongDescription": "Possible drill states are:\n
`expanded`
if a node has children in the limited hierarchy\n
`collapsed`
if a node has children in the unlimited hierarchy but not in the limited hierarchy\n
`leaf`
if a node has no children in the unlimited hierarchy" + }, + "DistanceFromRoot": { + "$Type": "Edm.Int64", + "$Nullable": true, + "@Core.Description": "Number of ancestors an occurrence of a node has in the limited hierarchy", + "@Core.LongDescription": "This equals the number of ancestors in the sub-hierarchy, if the request involves a sub-hierarchy." + }, "ChildCount": { "$Type": "Edm.Int64", "$Nullable": true, diff --git a/vocabularies/Hierarchy.md b/vocabularies/Hierarchy.md index 2c05d7133..670992765 100644 --- a/vocabularies/Hierarchy.md +++ b/vocabularies/Hierarchy.md @@ -9,26 +9,26 @@ Terms for Hierarchies Term|Type|Description :---|:---|:---------- [RecursiveHierarchy](./Hierarchy.xml#L41:~:text=Hierarchy-specific information in the result set of a hierarchical request
The [base term](https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Aggregation.V1.html#RecursiveHierarchy) governs what are the nodes and parents in the hierarchy, whereas this term defines derived information. -[RecursiveHierarchyActions](./Hierarchy.xml#L161:~:text=Actions for maintaining the recursive hierarchy defined by the [base term](https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Aggregation.V1.html#RecursiveHierarchy)
When an annotation with this term is present, the [`ParentNavigationProperty`](https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Aggregation.V1.html#RecursiveHierarchyType) in the base term must not have a collection-valued segment prior to its last segment. -[MatchCount](./Hierarchy.xml#L193:~:text=Instance annotation on the result of an `$apply` query option containing the number of matching nodes after hierarchical transformations
The service MAY designate a subset of the `$apply` result as "matching nodes". For requests following the pattern described [here](#RecursiveHierarchyType), this subset is the output set of the `filter` or `search` transformation that occurs as the fourth parameter of the last `ancestors` transformation or occurs nested into it.
For requests not following this pattern, the subset NEED NOT be defined.
This instance annotation is available if [`RecursiveHierarchy/Matched`](#RecursiveHierarchyType) and [`RecursiveHierarchy/MatchedDescendantCount`](#RecursiveHierarchyType) are also available. -[RecursiveHierarchySupported](./Hierarchy.xml#L275:~:text=Whether the annotated collection acts as a [`RecursiveHierarchy`](#RecursiveHierarchy) with the given qualifier
This tag is applied to a collection with the same qualifier as the [`RecursiveHierarchy`](#RecursiveHierarchy) term which is applied to its entity type. The recursive hierarchy can then only be addressed through a collection where this tag is true. +[RecursiveHierarchyActions](./Hierarchy.xml#L178:~:text=Actions for maintaining the recursive hierarchy defined by the [base term](https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Aggregation.V1.html#RecursiveHierarchy)
When an annotation with this term is present, the [`ParentNavigationProperty`](https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Aggregation.V1.html#RecursiveHierarchyType) in the base term must not have a collection-valued segment prior to its last segment. +[MatchCount](./Hierarchy.xml#L210:~:text=Instance annotation on the result of an `$apply` query option containing the number of matching nodes after hierarchical transformations
The service MAY designate a subset of the `$apply` result as "matching nodes". For requests following the pattern described [here](#RecursiveHierarchyType), this subset is the output set of the `filter` or `search` transformation that occurs as the fourth parameter of the last `ancestors` transformation or occurs nested into it.
For requests not following this pattern, the subset NEED NOT be defined.
This instance annotation is available if [`RecursiveHierarchy/Matched`](#RecursiveHierarchyType) and [`RecursiveHierarchy/MatchedDescendantCount`](#RecursiveHierarchyType) are also available. +[RecursiveHierarchySupported](./Hierarchy.xml#L292:~:text=Whether the annotated collection acts as a [`RecursiveHierarchy`](#RecursiveHierarchy) with the given qualifier
This tag is applied to a collection with the same qualifier as the [`RecursiveHierarchy`](#RecursiveHierarchy) term which is applied to its entity type. The recursive hierarchy can then only be addressed through a collection where this tag is true. ## Actions -### [Template_ChangeNextSiblingAction](./Hierarchy.xml#L285:~:text=This parameter has properties with the same names as the key properties of the entity type. next(T) = S after the action. If R is a node with next(R) = S before the action, then next(R) = T after the action, even if S = null. It is an error if S has a different parent than T. +**[Node](./Hierarchy.xml#L305:~:text=This parameter has properties with the same names as the key properties of the entity type. next(T) = S after the action. If R is a node with next(R) = S before the action, then next(R) = T after the action, even if S = null. It is an error if S has a different parent than T. -### [Template_CopyAction](./Hierarchy.xml#L319:~:text= -### [TopLevels](./Hierarchy.xml#L221:~:text= @@ -91,19 +91,21 @@ Parameter|Type|Description The properties in this complex type contain information about - an entry in the result set of a request with multiple grouping levels. + an entry in the result set of a request with multiple aggregation levels, some which are expanded. + These properties also serve in the derived [`RecursiveHierarchyType`](#RecursiveHierarchyType) + with their definitions rephrased in the concept of recursive hierarchies. **Derived Types:** - [RecursiveHierarchyType](#RecursiveHierarchyType) Property|Type|Description :-------|:---|:---------- -[LimitedDescendantCount](./Hierarchy.xml#L56:~:text=Possible drill states are:
- `expanded` if a node has children in the limited hierarchy
- `collapsed` if a node has children in the unlimited hierarchy but not in the limited hierarchy
- `leaf` if a node has no children in the unlimited hierarchy -[DistanceFromRoot](./Hierarchy.xml#L68:~:text=This equals the number of ancestors in the sub-hierarchy, if the request involves a sub-hierarchy. +[LimitedDescendantCount](./Hierarchy.xml#L58:~:text=Possible drill states are:
`expanded`
if an entry precedes entries from deeper aggregation levels
`collapsed`
if an entry belongs to the highest non-expanded aggregation level, but not the deepest
`leaf`
if an entry belongs to the deepest aggregation level +[DistanceFromRoot](./Hierarchy.xml#L70:~:text= -## [RecursiveHierarchyType](./Hierarchy.xml#L75:~:text=Possible drill states are:
- `expanded` if a node has children in the limited hierarchy
- `collapsed` if a node has children in the unlimited hierarchy but not in the limited hierarchy
- `leaf` if a node has no children in the unlimited hierarchy -[*DistanceFromRoot*](./Hierarchy.xml#L68:~:text=This equals the number of ancestors in the sub-hierarchy, if the request involves a sub-hierarchy. -[ExternalKey](./Hierarchy.xml#L112:~:text=If a `NodeType` exists, the external key is unique only in combination with it. Or the external key can coincide with the [`Aggregation.RecursiveHierarchy/NodeProperty`](https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Aggregation.V1.html#RecursiveHierarchyType). -[NodeType](./Hierarchy.xml#L119:~:text=In a recursive hierarchy with mixed types, nodes can
- have a type-specific (navigation) property whose name is the node type or
- be represented by entities of different subtypes of a common entity type that is annotated with the `RecursiveHierarchy` annotation. The qualified name of the subtype is the node type. -[ChildCount](./Hierarchy.xml#L128:~:text=The rank of a node is the index of the node in the sequence of nodes created from a preorder or postorder traversal of the limited hierarchy. The first node in the traversal has rank 0. -[SiblingRank](./Hierarchy.xml#L141:~:text=The sibling rank of a node is the index of the node in the sequence of all nodes in the unlimited hierarchy with the same parent. The first sibling has rank 0. -[Matched](./Hierarchy.xml#L148:~:text=If a `NodeType` exists, the external key is unique only in combination with it. Or the external key can coincide with the [`Aggregation.RecursiveHierarchy/NodeProperty`](https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Aggregation.V1.html#RecursiveHierarchyType). +[NodeType](./Hierarchy.xml#L118:~:text=In a recursive hierarchy with mixed types, nodes can
- have a type-specific (navigation) property whose name is the node type or
- be represented by entities of different subtypes of a common entity type that is annotated with the `RecursiveHierarchy` annotation. The qualified name of the subtype is the node type. +[LimitedDescendantCount](./Hierarchy.xml#L127:~:text=Possible drill states are:
`expanded`
if a node has children in the limited hierarchy
`collapsed`
if a node has children in the unlimited hierarchy but not in the limited hierarchy
`leaf`
if a node has no children in the unlimited hierarchy +[DistanceFromRoot](./Hierarchy.xml#L139:~:text=This equals the number of ancestors in the sub-hierarchy, if the request involves a sub-hierarchy. +[ChildCount](./Hierarchy.xml#L145:~:text=The rank of a node is the index of the node in the sequence of nodes created from a preorder or postorder traversal of the limited hierarchy. The first node in the traversal has rank 0. +[SiblingRank](./Hierarchy.xml#L158:~:text=The sibling rank of a node is the index of the node in the sequence of all nodes in the unlimited hierarchy with the same parent. The first sibling has rank 0. +[Matched](./Hierarchy.xml#L165:~:text= -## [RecursiveHierarchyActionsType](./Hierarchy.xml#L169:~:text= -## [TopLevelsExpandType](./Hierarchy.xml#L264:~:text= The properties in this complex type contain information about - an entry in the result set of a request with multiple grouping levels. + an entry in the result set of a request with multiple aggregation levels, some which are expanded. + These properties also serve in the derived [`RecursiveHierarchyType`](#RecursiveHierarchyType) + with their definitions rephrased in the concept of recursive hierarchies. - + - + Possible drill states are: - <br>- `expanded` if a node has children in the limited hierarchy - <br>- `collapsed` if a node has children in the unlimited hierarchy but not in the limited hierarchy - <br>- `leaf` if a node has no children in the unlimited hierarchy + <dt>`expanded` <dd>if an entry precedes entries from deeper aggregation levels + <dt>`collapsed` <dd>if an entry belongs to the highest non-expanded aggregation level, but not the deepest + <dt>`leaf` <dd>if an entry belongs to the deepest aggregation level - - - This equals the number of ancestors in the sub-hierarchy, if the request involves a sub-hierarchy. - + @@ -125,6 +124,24 @@ the following collections of hierarchy nodes are distinguished: annotated with the `RecursiveHierarchy` annotation. The qualified name of the subtype is the node type. + + + + + + + Possible drill states are: + <dt>`expanded` <dd>if a node has children in the limited hierarchy + <dt>`collapsed` <dd>if a node has children in the unlimited hierarchy but not in the limited hierarchy + <dt>`leaf` <dd>if a node has no children in the unlimited hierarchy + + + + + + This equals the number of ancestors in the sub-hierarchy, if the request involves a sub-hierarchy. + + From 92387025e483ded8134ec3ac61f1ef5c24357b6f Mon Sep 17 00:00:00 2001 From: D024504 Date: Tue, 14 Nov 2023 10:13:33 +0100 Subject: [PATCH 05/32] SortOrder -> SortOrderType --- vocabularies/Analytics.json | 6 +++--- vocabularies/Analytics.md | 10 +++++----- vocabularies/Analytics.xml | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/vocabularies/Analytics.json b/vocabularies/Analytics.json index 3e15d1940..d94468462 100644 --- a/vocabularies/Analytics.json +++ b/vocabularies/Analytics.json @@ -251,12 +251,12 @@ "@Common.Experimental": true, "Property": { "@Core.Description": "Property by which to sort" }, "Order": { - "$Type": "Analytics.SortOrder", - "$DefaultValue": "Analytics.SortOrder/Asc", + "$Type": "Analytics.SortOrderType", + "$DefaultValue": "Analytics.SortOrderType/Asc", "@Core.Description": "Sorting direction" } }, - "SortOrder": { + "SortOrderType": { "$Kind": "TypeDefinition", "$UnderlyingType": "Edm.String", "@Common.Experimental": true, diff --git a/vocabularies/Analytics.md b/vocabularies/Analytics.md index 58d6fe82c..adc8fea74 100644 --- a/vocabularies/Analytics.md +++ b/vocabularies/Analytics.md @@ -83,15 +83,15 @@ Property|Type|Description Property|Type|Description :-------|:---|:---------- [Property](./Analytics.xml#L260:~:text= -## [SortOrder](./Analytics.xml#L267:~:text= +## [SortOrderType](./Analytics.xml#L267:~:text= - + - + From 34b5a64f516f9844be2fd47bebdf222539888591 Mon Sep 17 00:00:00 2001 From: D024504 Date: Tue, 14 Nov 2023 15:02:41 +0100 Subject: [PATCH 06/32] Avoid
--- vocabularies/Hierarchy.json | 4 ++-- vocabularies/Hierarchy.md | 4 ++-- vocabularies/Hierarchy.xml | 12 ++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/vocabularies/Hierarchy.json b/vocabularies/Hierarchy.json index ad085d9ed..466b954be 100644 --- a/vocabularies/Hierarchy.json +++ b/vocabularies/Hierarchy.json @@ -45,7 +45,7 @@ "DrillState": { "$Nullable": true, "@Core.Description": "Drill state of an entry", - "@Core.LongDescription": "Possible drill states are:\n
`expanded`
if an entry precedes entries from deeper aggregation levels\n
`collapsed`
if an entry belongs to the highest non-expanded aggregation level, but not the deepest\n
`leaf`
if an entry belongs to the deepest aggregation level" + "@Core.LongDescription": "Possible drill states are:\n
- `expanded` if an entry precedes entries from deeper aggregation levels\n
- `collapsed` if an entry belongs to the highest non-expanded aggregation level, but not the deepest\n
- `leaf` if an entry belongs to the deepest aggregation level" }, "DistanceFromRoot": { "$Type": "Edm.Int64", @@ -76,7 +76,7 @@ "DrillState": { "$Nullable": true, "@Core.Description": "Drill state of an occurrence of a node", - "@Core.LongDescription": "Possible drill states are:\n
`expanded`
if a node has children in the limited hierarchy\n
`collapsed`
if a node has children in the unlimited hierarchy but not in the limited hierarchy\n
`leaf`
if a node has no children in the unlimited hierarchy" + "@Core.LongDescription": "Possible drill states are:\n
- `expanded` if a node has children in the limited hierarchy\n
- `collapsed` if a node has children in the unlimited hierarchy but not in the limited hierarchy\n
- `leaf` if a node has no children in the unlimited hierarchy" }, "DistanceFromRoot": { "$Type": "Edm.Int64", diff --git a/vocabularies/Hierarchy.md b/vocabularies/Hierarchy.md index 670992765..512061ecd 100644 --- a/vocabularies/Hierarchy.md +++ b/vocabularies/Hierarchy.md @@ -101,7 +101,7 @@ The properties in this complex type contain information about Property|Type|Description :-------|:---|:---------- [LimitedDescendantCount](./Hierarchy.xml#L58:~:text=Possible drill states are:
`expanded`
if an entry precedes entries from deeper aggregation levels
`collapsed`
if an entry belongs to the highest non-expanded aggregation level, but not the deepest
`leaf`
if an entry belongs to the deepest aggregation level +[DrillState](./Hierarchy.xml#L61:~:text=Possible drill states are:
- `expanded` if an entry precedes entries from deeper aggregation levels
- `collapsed` if an entry belongs to the highest non-expanded aggregation level, but not the deepest
- `leaf` if an entry belongs to the deepest aggregation level [DistanceFromRoot](./Hierarchy.xml#L70:~:text= @@ -147,7 +147,7 @@ Property|Type|Description [ExternalKey](./Hierarchy.xml#L111:~:text=If a `NodeType` exists, the external key is unique only in combination with it. Or the external key can coincide with the [`Aggregation.RecursiveHierarchy/NodeProperty`](https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Aggregation.V1.html#RecursiveHierarchyType). [NodeType](./Hierarchy.xml#L118:~:text=In a recursive hierarchy with mixed types, nodes can
- have a type-specific (navigation) property whose name is the node type or
- be represented by entities of different subtypes of a common entity type that is annotated with the `RecursiveHierarchy` annotation. The qualified name of the subtype is the node type. [LimitedDescendantCount](./Hierarchy.xml#L127:~:text=Possible drill states are:
`expanded`
if a node has children in the limited hierarchy
`collapsed`
if a node has children in the unlimited hierarchy but not in the limited hierarchy
`leaf`
if a node has no children in the unlimited hierarchy +[DrillState](./Hierarchy.xml#L130:~:text=Possible drill states are:
- `expanded` if a node has children in the limited hierarchy
- `collapsed` if a node has children in the unlimited hierarchy but not in the limited hierarchy
- `leaf` if a node has no children in the unlimited hierarchy [DistanceFromRoot](./Hierarchy.xml#L139:~:text=This equals the number of ancestors in the sub-hierarchy, if the request involves a sub-hierarchy. [ChildCount](./Hierarchy.xml#L145:~:text= Possible drill states are: - <dt>`expanded` <dd>if an entry precedes entries from deeper aggregation levels - <dt>`collapsed` <dd>if an entry belongs to the highest non-expanded aggregation level, but not the deepest - <dt>`leaf` <dd>if an entry belongs to the deepest aggregation level + <br>- `expanded` if an entry precedes entries from deeper aggregation levels + <br>- `collapsed` if an entry belongs to the highest non-expanded aggregation level, but not the deepest + <br>- `leaf` if an entry belongs to the deepest aggregation level @@ -131,9 +131,9 @@ the following collections of hierarchy nodes are distinguished: Possible drill states are: - <dt>`expanded` <dd>if a node has children in the limited hierarchy - <dt>`collapsed` <dd>if a node has children in the unlimited hierarchy but not in the limited hierarchy - <dt>`leaf` <dd>if a node has no children in the unlimited hierarchy + <br>- `expanded` if a node has children in the limited hierarchy + <br>- `collapsed` if a node has children in the unlimited hierarchy but not in the limited hierarchy + <br>- `leaf` if a node has no children in the unlimited hierarchy From 443f99c4e2ad3c8945fdc43bbd42557642972c42 Mon Sep 17 00:00:00 2001 From: D024504 Date: Wed, 15 Nov 2023 09:59:00 +0100 Subject: [PATCH 07/32] After alignment with @uhlmannm --- vocabularies/Analytics.json | 17 +++++++++-------- vocabularies/Analytics.md | 38 ++++++++++++++++++------------------- vocabularies/Analytics.xml | 20 ++++++++++++------- 3 files changed, 41 insertions(+), 34 deletions(-) diff --git a/vocabularies/Analytics.json b/vocabularies/Analytics.json index d94468462..40676ec8e 100644 --- a/vocabularies/Analytics.json +++ b/vocabularies/Analytics.json @@ -184,14 +184,8 @@ "$Name": "Levels", "$Collection": true, "$Type": "Analytics.AutoExpandLevel", - "@Core.Description": "Collection of aggregation levels forming a leveled hierarchy", - "@Core.LongDescription": "Each element in the collection defines the property names for one level.\n A property must not referenced by more than one level.\n The first element in the collection defines the property names of the coarsest level,\n the following elements define the property names of consecutively finer-grained aggregation levels.\n All referenced properties must be groupable." - }, - { - "$Name": "ExpandLevel", - "$Type": "Edm.Int64", - "@Core.Description": "Number of levels to be expanded, counting from left", - "@Core.LongDescription": "The function result comprises the leveled hierarchy with the expanded levels and the following level as leaves in preorder." + "@Core.Description": "Collection of aggregation levels forming the visible part of a leveled hierarchy", + "@Core.LongDescription": "Each element in the collection defines the property names for one level.\n A property must not referenced by more than one level.\n The first element in the collection defines the property names of the coarsest level,\n the following elements define the property names of consecutively finer-grained aggregation levels.\n The function result comprises the leveled hierarchy with these levels in preorder.\n All referenced properties must be groupable." }, { "$Name": "Aggregation", @@ -205,6 +199,13 @@ "$Type": "Analytics.AutoExpandSiblingOrder", "@Core.Description": "Sort specification to apply to all direct descendants of a given entry in the resulting leveled hierarchy" }, + { + "$Name": "LeafLevel", + "$Collection": true, + "@Core.Description": "A possibly empty set of property names that constitute, together with the property names from `Levels`, the leaf level of the leveled hierarchy", + "@Core.LongDescription": "This parameter is only relevant if `AggregatedValuesLeafFilter` is specified,\n it can be omitted otherwise. Property names that occur in `Levels` must not be repeated.\n All referenced properties must be groupable.", + "@Core.OptionalParameter": {} + }, { "$Name": "BeforeAggregationFilter", "@Core.Description": "Expression valid for `filter` transformation to restrict the input set before any further procressing", diff --git a/vocabularies/Analytics.md b/vocabularies/Analytics.md index adc8fea74..a6b74f796 100644 --- a/vocabularies/Analytics.md +++ b/vocabularies/Analytics.md @@ -17,7 +17,7 @@ Term|Type|Description [AggregatedProperties](./Analytics.xml#L106:~:text=Deprecated in favor of [`AggregatedProperty`](#AggregatedProperty) [AggregatedProperty](./Analytics.xml#L124:~:text=Dynamic property for aggregate expression with specified aggregation method defined on the annotated entity type. [AnalyticalContext](./Analytics.xml#L144:~:text=Collection of properties that define an analytical context -[LevelInformation](./Analytics.xml#L283:~:text=Information about grouping levels in the result set of a request including the [`AutoExpand`](#AutoExpand) transformation +[LevelInformation](./Analytics.xml#L289:~:text=Information about grouping levels in the result set of a request including the [`AutoExpand`](#AutoExpand) transformation ## Functions @@ -30,16 +30,16 @@ Term|Type|Description Parameter|Type|Description :--------|:---|:---------- **[InputSet](./Analytics.xml#L186:~:text=Each element in the collection defines the property names for one level. A property must not referenced by more than one level. The first element in the collection defines the property names of the coarsest level, the following elements define the property names of consecutively finer-grained aggregation levels. All referenced properties must be groupable. -[ExpandLevel](./Analytics.xml#L199:~:text=The function result comprises the leveled hierarchy with the expanded levels and the following level as leaves in preorder. -[Aggregation](./Analytics.xml#L205:~:text=All properties in this collection must be custom aggregates. -[SiblingOrder](./Analytics.xml#L211:~:text=Each element in the collection defines the property names for one level. A property must not referenced by more than one level. The first element in the collection defines the property names of the coarsest level, the following elements define the property names of consecutively finer-grained aggregation levels. The function result comprises the leveled hierarchy with these levels in preorder. All referenced properties must be groupable. +[Aggregation](./Analytics.xml#L200:~:text=All properties in this collection must be custom aggregates. +[SiblingOrder](./Analytics.xml#L206:~:text=This parameter is only relevant if `AggregatedValuesLeafFilter` is specified, it can be omitted otherwise. Property names that occur in `Levels` must not be repeated. All referenced properties must be groupable. +*[BeforeAggregationFilter](./Analytics.xml#L220:~:text= @@ -69,29 +69,29 @@ Property|Type|Description [AccumulativeMeasure](./Analytics.xml#L168:~:text= -## [AutoExpandLevel](./Analytics.xml#L252:~:text= -## [AutoExpandSiblingOrder](./Analytics.xml#L258:~:text= -## [SortOrderType](./Analytics.xml#L267:~:text= - + Each element in the collection defines the property names for one level. A property must not referenced by more than one level. The first element in the collection defines the property names of the coarsest level, the following elements define the property names of consecutively finer-grained aggregation levels. + The function result comprises the leveled hierarchy with these levels in preorder. All referenced properties must be groupable. - - - - The function result comprises the leveled hierarchy with the expanded levels and the following level as leaves in preorder. - - @@ -211,6 +206,17 @@ + + + + This parameter is only relevant if `AggregatedValuesLeafFilter` is specified, + it can be omitted otherwise. Property names that occur in `Levels` must not be repeated. + All referenced properties must be groupable. + + + + + From 2fb8ff2b553e16f1bfdc3b6a7e27ac3c6ab66d91 Mon Sep 17 00:00:00 2001 From: D024504 Date: Wed, 15 Nov 2023 12:03:48 +0100 Subject: [PATCH 08/32] rephrasing --- vocabularies/Analytics.json | 2 +- vocabularies/Analytics.md | 2 +- vocabularies/Analytics.xml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/vocabularies/Analytics.json b/vocabularies/Analytics.json index 40676ec8e..e3802753c 100644 --- a/vocabularies/Analytics.json +++ b/vocabularies/Analytics.json @@ -203,7 +203,7 @@ "$Name": "LeafLevel", "$Collection": true, "@Core.Description": "A possibly empty set of property names that constitute, together with the property names from `Levels`, the leaf level of the leveled hierarchy", - "@Core.LongDescription": "This parameter is only relevant if `AggregatedValuesLeafFilter` is specified,\n it can be omitted otherwise. Property names that occur in `Levels` must not be repeated.\n All referenced properties must be groupable.", + "@Core.LongDescription": "This parameter is mandatory if `AggregatedValuesLeafFilter` is specified,\n it can be omitted otherwise. Property names that occur in `Levels` must not be repeated here.\n All referenced properties must be groupable.", "@Core.OptionalParameter": {} }, { diff --git a/vocabularies/Analytics.md b/vocabularies/Analytics.md index a6b74f796..3cba325ed 100644 --- a/vocabularies/Analytics.md +++ b/vocabularies/Analytics.md @@ -33,7 +33,7 @@ Parameter|Type|Description [Levels](./Analytics.xml#L189:~:text=Each element in the collection defines the property names for one level. A property must not referenced by more than one level. The first element in the collection defines the property names of the coarsest level, the following elements define the property names of consecutively finer-grained aggregation levels. The function result comprises the leveled hierarchy with these levels in preorder. All referenced properties must be groupable. [Aggregation](./Analytics.xml#L200:~:text=All properties in this collection must be custom aggregates. [SiblingOrder](./Analytics.xml#L206:~:text=This parameter is only relevant if `AggregatedValuesLeafFilter` is specified, it can be omitted otherwise. Property names that occur in `Levels` must not be repeated. All referenced properties must be groupable. +*[LeafLevel](./Analytics.xml#L209:~:text=This parameter is mandatory if `AggregatedValuesLeafFilter` is specified, it can be omitted otherwise. Property names that occur in `Levels` must not be repeated here. All referenced properties must be groupable. *[BeforeAggregationFilter](./Analytics.xml#L220:~:text= - This parameter is only relevant if `AggregatedValuesLeafFilter` is specified, - it can be omitted otherwise. Property names that occur in `Levels` must not be repeated. + This parameter is mandatory if `AggregatedValuesLeafFilter` is specified, + it can be omitted otherwise. Property names that occur in `Levels` must not be repeated here. All referenced properties must be groupable. From f5dea9f94ca6498ea9f47ca64186df3224911075 Mon Sep 17 00:00:00 2001 From: D024504 Date: Wed, 15 Nov 2023 12:12:14 +0100 Subject: [PATCH 09/32] Make `LeafLevel` mandatory It is needed if `AggregatedValuesLeafFilter` is specified or properties from `Aggregation` occur in `SiblingOrder`. Especially the latter is typical. --- vocabularies/Analytics.json | 13 ++++++------- vocabularies/Analytics.md | 36 ++++++++++++++++++------------------ vocabularies/Analytics.xml | 18 +++++++----------- 3 files changed, 31 insertions(+), 36 deletions(-) diff --git a/vocabularies/Analytics.json b/vocabularies/Analytics.json index e3802753c..2c7c08326 100644 --- a/vocabularies/Analytics.json +++ b/vocabularies/Analytics.json @@ -187,6 +187,12 @@ "@Core.Description": "Collection of aggregation levels forming the visible part of a leveled hierarchy", "@Core.LongDescription": "Each element in the collection defines the property names for one level.\n A property must not referenced by more than one level.\n The first element in the collection defines the property names of the coarsest level,\n the following elements define the property names of consecutively finer-grained aggregation levels.\n The function result comprises the leveled hierarchy with these levels in preorder.\n All referenced properties must be groupable." }, + { + "$Name": "LeafLevel", + "$Collection": true, + "@Core.Description": "A possibly empty set of property names that constitute, together with the property names from `Levels`, the leaf level of the leveled hierarchy", + "@Core.LongDescription": "Property names that occur in `Levels` must not be repeated here.\n All referenced properties must be groupable." + }, { "$Name": "Aggregation", "$Collection": true, @@ -199,13 +205,6 @@ "$Type": "Analytics.AutoExpandSiblingOrder", "@Core.Description": "Sort specification to apply to all direct descendants of a given entry in the resulting leveled hierarchy" }, - { - "$Name": "LeafLevel", - "$Collection": true, - "@Core.Description": "A possibly empty set of property names that constitute, together with the property names from `Levels`, the leaf level of the leveled hierarchy", - "@Core.LongDescription": "This parameter is mandatory if `AggregatedValuesLeafFilter` is specified,\n it can be omitted otherwise. Property names that occur in `Levels` must not be repeated here.\n All referenced properties must be groupable.", - "@Core.OptionalParameter": {} - }, { "$Name": "BeforeAggregationFilter", "@Core.Description": "Expression valid for `filter` transformation to restrict the input set before any further procressing", diff --git a/vocabularies/Analytics.md b/vocabularies/Analytics.md index 3cba325ed..4a3519211 100644 --- a/vocabularies/Analytics.md +++ b/vocabularies/Analytics.md @@ -17,7 +17,7 @@ Term|Type|Description [AggregatedProperties](./Analytics.xml#L106:~:text=Deprecated in favor of [`AggregatedProperty`](#AggregatedProperty) [AggregatedProperty](./Analytics.xml#L124:~:text=Dynamic property for aggregate expression with specified aggregation method defined on the annotated entity type. [AnalyticalContext](./Analytics.xml#L144:~:text=Collection of properties that define an analytical context -[LevelInformation](./Analytics.xml#L289:~:text=Information about grouping levels in the result set of a request including the [`AutoExpand`](#AutoExpand) transformation +[LevelInformation](./Analytics.xml#L285:~:text=Information about grouping levels in the result set of a request including the [`AutoExpand`](#AutoExpand) transformation ## Functions @@ -31,15 +31,15 @@ Parameter|Type|Description :--------|:---|:---------- **[InputSet](./Analytics.xml#L186:~:text=Each element in the collection defines the property names for one level. A property must not referenced by more than one level. The first element in the collection defines the property names of the coarsest level, the following elements define the property names of consecutively finer-grained aggregation levels. The function result comprises the leveled hierarchy with these levels in preorder. All referenced properties must be groupable. -[Aggregation](./Analytics.xml#L200:~:text=All properties in this collection must be custom aggregates. -[SiblingOrder](./Analytics.xml#L206:~:text=This parameter is mandatory if `AggregatedValuesLeafFilter` is specified, it can be omitted otherwise. Property names that occur in `Levels` must not be repeated here. All referenced properties must be groupable. -*[BeforeAggregationFilter](./Analytics.xml#L220:~:text=Property names that occur in `Levels` must not be repeated here. All referenced properties must be groupable. +[Aggregation](./Analytics.xml#L207:~:text=All properties in this collection must be custom aggregates. +[SiblingOrder](./Analytics.xml#L213:~:text= @@ -69,29 +69,29 @@ Property|Type|Description [AccumulativeMeasure](./Analytics.xml#L168:~:text= -## [AutoExpandLevel](./Analytics.xml#L258:~:text= -## [AutoExpandSiblingOrder](./Analytics.xml#L264:~:text= -## [SortOrderType](./Analytics.xml#L273:~:text= + + + + Property names that occur in `Levels` must not be repeated here. + All referenced properties must be groupable. + + @@ -206,17 +213,6 @@ - - - - This parameter is mandatory if `AggregatedValuesLeafFilter` is specified, - it can be omitted otherwise. Property names that occur in `Levels` must not be repeated here. - All referenced properties must be groupable. - - - - - From 41b289a693fb20dce3f474e751532f83ae4b50aa Mon Sep 17 00:00:00 2001 From: D024504 Date: Fri, 2 Feb 2024 11:07:29 +0100 Subject: [PATCH 10/32] Don't call out instance annotation --- vocabularies/Analytics.json | 1 - vocabularies/Analytics.xml | 1 - 2 files changed, 2 deletions(-) diff --git a/vocabularies/Analytics.json b/vocabularies/Analytics.json index 2c7c08326..502b2c779 100644 --- a/vocabularies/Analytics.json +++ b/vocabularies/Analytics.json @@ -270,7 +270,6 @@ "$Type": "Hierarchy.HierarchyType", "$AppliesTo": ["EntityType"], "@Common.Experimental": true, - "@Common.IsInstanceAnnotation": true, "@Core.Description": "Information about grouping levels in the result set of a request including the [`AutoExpand`](#AutoExpand) transformation" } } diff --git a/vocabularies/Analytics.xml b/vocabularies/Analytics.xml index 6c49aa4fe..b28851e12 100644 --- a/vocabularies/Analytics.xml +++ b/vocabularies/Analytics.xml @@ -284,7 +284,6 @@ - From defafdf0a41916e994c3bb46eef722ef84f05f05 Mon Sep 17 00:00:00 2001 From: D024504 Date: Mon, 8 Apr 2024 15:04:18 +0200 Subject: [PATCH 11/32] Allowed values for DrillState --- vocabularies/Hierarchy.json | 18 ++++++++- vocabularies/Hierarchy.md | 78 ++++++++++++++++++------------------- vocabularies/Hierarchy.xml | 40 ++++++++++++++----- 3 files changed, 85 insertions(+), 51 deletions(-) diff --git a/vocabularies/Hierarchy.json b/vocabularies/Hierarchy.json index 6bbd40730..2c66ecade 100644 --- a/vocabularies/Hierarchy.json +++ b/vocabularies/Hierarchy.json @@ -45,7 +45,14 @@ "DrillState": { "$Nullable": true, "@Core.Description": "Drill state of an entry", - "@Core.LongDescription": "Possible drill states are:\n
- `expanded` if an entry precedes entries from deeper aggregation levels\n
- `collapsed` if an entry belongs to the highest non-expanded aggregation level, but not the deepest\n
- `leaf` if an entry belongs to the deepest aggregation level" + "@Validation.AllowedValues": [ + { "Value": "expanded", "@Core.Description": "The entry precedes entries from deeper aggregation levels" }, + { + "Value": "collapsed", + "@Core.Description": "The entry belongs to the highest non-expanded aggregation level, but not the deepest" + }, + { "Value": "leaf", "@Core.Description": "The entry belongs to the deepest aggregation level" } + ] }, "DistanceFromRoot": { "$Type": "Edm.Int64", @@ -76,7 +83,14 @@ "DrillState": { "$Nullable": true, "@Core.Description": "Drill state of an occurrence of a node", - "@Core.LongDescription": "Possible drill states are:\n
- `expanded` if a node has children in the limited hierarchy\n
- `collapsed` if a node has children in the unlimited hierarchy but not in the limited hierarchy\n
- `leaf` if a node has no children in the unlimited hierarchy" + "@Validation.AllowedValues": [ + { "Value": "expanded", "@Core.Description": "The node has children in the limited hierarchy" }, + { + "Value": "collapsed", + "@Core.Description": "The node has children in the unlimited hierarchy but not in the limited hierarchy" + }, + { "Value": "leaf", "@Core.Description": "The node has no children in the unlimited hierarchy" } + ] }, "DistanceFromRoot": { "$Type": "Edm.Int64", diff --git a/vocabularies/Hierarchy.md b/vocabularies/Hierarchy.md index 25140acf6..d6547e727 100644 --- a/vocabularies/Hierarchy.md +++ b/vocabularies/Hierarchy.md @@ -9,26 +9,26 @@ Terms for Hierarchies Term|Type|Description :---|:---|:---------- [RecursiveHierarchy](./Hierarchy.xml#L41:~:text=Hierarchy-specific information in the result set of a hierarchical request
The [base term](https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Aggregation.V1.html#RecursiveHierarchy) governs what are the nodes and parents in the hierarchy, whereas this term defines derived information. -[RecursiveHierarchyActions](./Hierarchy.xml#L178:~:text=Actions for maintaining the recursive hierarchy defined by the [base term](https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Aggregation.V1.html#RecursiveHierarchy)
When an annotation with this term is present, the [`ParentNavigationProperty`](https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Aggregation.V1.html#RecursiveHierarchyType) in the base term must not have a collection-valued segment prior to its last segment. -[MatchCount](./Hierarchy.xml#L232:~:text=Instance annotation on the result of an `$apply` query option containing the number of matching nodes after hierarchical transformations
The service MAY designate a subset of the `$apply` result as "matching nodes". For requests following the pattern described [here](#RecursiveHierarchyType), this subset is the output set of the `filter` or `search` transformation that occurs as the fourth parameter of the last `ancestors` transformation or occurs nested into it.
For requests not following this pattern, the subset NEED NOT be defined.
This instance annotation is available if [`RecursiveHierarchy/Matched`](#RecursiveHierarchyType) and [`RecursiveHierarchy/MatchedDescendantCount`](#RecursiveHierarchyType) are also available. -[RecursiveHierarchySupported](./Hierarchy.xml#L314:~:text=Whether the annotated collection acts as a [`RecursiveHierarchy`](#RecursiveHierarchy) with the given qualifier
This tag is applied to a collection with the same qualifier as the [`RecursiveHierarchy`](#RecursiveHierarchy) term which is applied to its entity type. The recursive hierarchy can then only be addressed through a collection where this tag is true. +[RecursiveHierarchyActions](./Hierarchy.xml#L198:~:text=Actions for maintaining the recursive hierarchy defined by the [base term](https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Aggregation.V1.html#RecursiveHierarchy)
When an annotation with this term is present, the [`ParentNavigationProperty`](https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Aggregation.V1.html#RecursiveHierarchyType) in the base term must not have a collection-valued segment prior to its last segment. +[MatchCount](./Hierarchy.xml#L252:~:text=Instance annotation on the result of an `$apply` query option containing the number of matching nodes after hierarchical transformations
The service MAY designate a subset of the `$apply` result as "matching nodes". For requests following the pattern described [here](#RecursiveHierarchyType), this subset is the output set of the `filter` or `search` transformation that occurs as the fourth parameter of the last `ancestors` transformation or occurs nested into it.
For requests not following this pattern, the subset NEED NOT be defined.
This instance annotation is available if [`RecursiveHierarchy/Matched`](#RecursiveHierarchyType) and [`RecursiveHierarchy/MatchedDescendantCount`](#RecursiveHierarchyType) are also available. +[RecursiveHierarchySupported](./Hierarchy.xml#L334:~:text=Whether the annotated collection acts as a [`RecursiveHierarchy`](#RecursiveHierarchy) with the given qualifier
This tag is applied to a collection with the same qualifier as the [`RecursiveHierarchy`](#RecursiveHierarchy) term which is applied to its entity type. The recursive hierarchy can then only be addressed through a collection where this tag is true. ## Actions -### [Template_ChangeNextSiblingAction](./Hierarchy.xml#L324:~:text=This parameter has properties with the same names as the key properties of the entity type. next(T) = S after the action. If R is a node with next(R) = S before the action, then next(R) = T after the action, even if S = null. It is an error if S has a different parent than T. +**[Node](./Hierarchy.xml#L347:~:text=This parameter has properties with the same names as the key properties of the entity type. next(T) = S after the action. If R is a node with next(R) = S before the action, then next(R) = T after the action, even if S = null. It is an error if S has a different parent than T. -### [Template_CopyAction](./Hierarchy.xml#L358:~:text= -### [TopLevels](./Hierarchy.xml#L260:~:text= @@ -101,11 +101,11 @@ The properties in this complex type contain information about Property|Type|Description :-------|:---|:---------- [LimitedDescendantCount](./Hierarchy.xml#L58:~:text=Possible drill states are:
- `expanded` if an entry precedes entries from deeper aggregation levels
- `collapsed` if an entry belongs to the highest non-expanded aggregation level, but not the deepest
- `leaf` if an entry belongs to the deepest aggregation level -[DistanceFromRoot](./Hierarchy.xml#L70:~:text=Allowed values:
- [expanded](./Hierarchy.xml#L65): The entry precedes entries from deeper aggregation levels
- [collapsed](./Hierarchy.xml#L69): The entry belongs to the highest non-expanded aggregation level, but not the deepest
- [leaf](./Hierarchy.xml#L73): The entry belongs to the deepest aggregation level +[DistanceFromRoot](./Hierarchy.xml#L80:~:text= -## [RecursiveHierarchyType](./Hierarchy.xml#L74:~:text=If a `NodeType` exists, the external key is unique only in combination with it. Or the external key can coincide with the [`Aggregation.RecursiveHierarchy/NodeProperty`](https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Aggregation.V1.html#RecursiveHierarchyType). -[NodeType](./Hierarchy.xml#L118:~:text=In a recursive hierarchy with mixed types, nodes can
- have a type-specific (navigation) property whose name is the node type or
- be represented by entities of different subtypes of a common entity type that is annotated with the `RecursiveHierarchy` annotation. The qualified name of the subtype is the node type. -[LimitedDescendantCount](./Hierarchy.xml#L127:~:text=Possible drill states are:
- `expanded` if a node has children in the limited hierarchy
- `collapsed` if a node has children in the unlimited hierarchy but not in the limited hierarchy
- `leaf` if a node has no children in the unlimited hierarchy -[DistanceFromRoot](./Hierarchy.xml#L139:~:text=This equals the number of ancestors in the sub-hierarchy, if the request involves a sub-hierarchy. -[ChildCount](./Hierarchy.xml#L145:~:text=The rank of a node is the index of the node in the sequence of nodes created from a preorder or postorder traversal of the limited hierarchy. The first node in the traversal has rank 0. -[SiblingRank](./Hierarchy.xml#L158:~:text=The sibling rank of a node is the index of the node in the sequence of all nodes in the unlimited hierarchy with the same parent. The first sibling has rank 0. -[Matched](./Hierarchy.xml#L165:~:text=If a `NodeType` exists, the external key is unique only in combination with it. Or the external key can coincide with the [`Aggregation.RecursiveHierarchy/NodeProperty`](https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Aggregation.V1.html#RecursiveHierarchyType). +[NodeType](./Hierarchy.xml#L128:~:text=In a recursive hierarchy with mixed types, nodes can
- have a type-specific (navigation) property whose name is the node type or
- be represented by entities of different subtypes of a common entity type that is annotated with the `RecursiveHierarchy` annotation. The qualified name of the subtype is the node type. +[LimitedDescendantCount](./Hierarchy.xml#L137:~:text=Allowed values:
- [expanded](./Hierarchy.xml#L144): The node has children in the limited hierarchy
- [collapsed](./Hierarchy.xml#L148): The node has children in the unlimited hierarchy but not in the limited hierarchy
- [leaf](./Hierarchy.xml#L152): The node has no children in the unlimited hierarchy +[DistanceFromRoot](./Hierarchy.xml#L159:~:text=This equals the number of ancestors in the sub-hierarchy, if the request involves a sub-hierarchy. +[ChildCount](./Hierarchy.xml#L165:~:text=The rank of a node is the index of the node in the sequence of nodes created from a preorder or postorder traversal of the limited hierarchy. The first node in the traversal has rank 0. +[SiblingRank](./Hierarchy.xml#L178:~:text=The sibling rank of a node is the index of the node in the sequence of all nodes in the unlimited hierarchy with the same parent. The first sibling has rank 0. +[Matched](./Hierarchy.xml#L185:~:text= -## [RecursiveHierarchyActionsType](./Hierarchy.xml#L186:~:text= -## [TopLevelsExpandType](./Hierarchy.xml#L303:~:text= - - Possible drill states are: - <br>- `expanded` if an entry precedes entries from deeper aggregation levels - <br>- `collapsed` if an entry belongs to the highest non-expanded aggregation level, but not the deepest - <br>- `leaf` if an entry belongs to the deepest aggregation level + + + + + + + + + + + + + + + @@ -129,11 +139,21 @@ the following collections of hierarchy nodes are distinguished: - - Possible drill states are: - <br>- `expanded` if a node has children in the limited hierarchy - <br>- `collapsed` if a node has children in the unlimited hierarchy but not in the limited hierarchy - <br>- `leaf` if a node has no children in the unlimited hierarchy + + + + + + + + + + + + + + + From f27abe8e81ca535d3c7034bffb334b30b829cd44 Mon Sep 17 00:00:00 2001 From: HeikoTheissen Date: Thu, 11 Apr 2024 16:25:32 +0000 Subject: [PATCH 12/32] auto-refreshed --- vocabularies/Common.md | 4 ++-- vocabularies/DirectEdit.md | 2 +- vocabularies/Hierarchy.md | 2 +- vocabularies/PersonalData.md | 2 +- vocabularies/Session.md | 8 ++++---- vocabularies/UI.md | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/vocabularies/Common.md b/vocabularies/Common.md index 9292f1fb5..6ebca2160 100644 --- a/vocabularies/Common.md +++ b/vocabularies/Common.md @@ -46,7 +46,7 @@ Term|Type|Description [Timestamp](./Common.xml#L458:~:text=... [TransactionId](./Common.xml#L463:~:text=... [ErrorResolution](./Common.xml#L468:~:text=Hints for resolving this error -[Messages](./Common.xml#L486:~:text=Collection of end-user messages
The name of the message type is service-specific, its structure components are identified by naming convention, following the names of the OData error response structure.
The minimum structure is - `code: Edm.String` - `message: Edm.String` - `target: Edm.String nullable` - `additionalTargets: Collection(Edm.String)` - `transition: Edm.Boolean` - `numericSeverity: Edm.Byte` - `longtextUrl: Edm.String nullable` +[Messages](./Common.xml#L486:~:text=Collection of end-user messages

The name of the message type is service-specific, its structure components are identified by naming convention, following the names of the OData error response structure.

The minimum structure is

  • code: Edm.String
  • message: Edm.String
  • target: Edm.String nullable
  • additionalTargets: Collection(Edm.String)
  • transition: Edm.Boolean
  • numericSeverity: Edm.Byte
  • longtextUrl: Edm.String nullable
[additionalTargets](./Common.xml#L502:~:text=Additional targets for the message
This instance annotation can be applied to the `error` object and the objects within the `details` array of an OData error response [longtextUrl](./Common.xml#L508:~:text=Location of the message long text
This instance annotation can be applied to the `error` object and the objects within the `details` array of an OData error response [numericSeverity](./Common.xml#L514:~:text=Classifies an end-user message as info, success, warning, or error
This instance annotation can be applied to the `error` object and the objects within the `details` array of an OData error response @@ -147,7 +147,7 @@ When changes are requested, the value of this annotation in the before-image or Member|Value|Description :-----|----:|:---------- -[Mandatory](./Common.xml#L387:~:text=A request that - sets the property to null or an empty value or - creates a non-[draft](#DraftRoot) entity and omits the property or - activates a draft entity while the property is null or empty
fails entirely if this annotation is `Mandatory` in the after-image of the request. The empty string is an empty value. Service-specific rules may consider other values, also of non-string type, empty. Values in draft entities are never considered empty. Mandatory properties SHOULD be decorated in the UI with an asterisk. Null or empty values can also be disallowed by restricting the property value range with the standard type facet `Nullable` or terms from the [Validation vocabulary](https://github.com/oasis-tcs/odata-vocabularies/blob/main/vocabularies/Org.OData.Validation.V1.md). +[Mandatory](./Common.xml#L387:~:text=

A request that

  • sets the property to null or an empty value or
  • creates a non-draft entity and omits the property or
  • activates a draft entity while the property is null or empty

fails entirely if this annotation is Mandatory in the after-image of the request. The empty string is an empty value. Service-specific rules may consider other values, also of non-string type, empty. Values in draft entities are never considered empty. Mandatory properties SHOULD be decorated in the UI with an asterisk. Null or empty values can also be disallowed by restricting the property value range with the standard type facet Nullable or terms from the Validation vocabulary.

[Optional](./Common.xml#L403:~:text=This value does not make sense as a static annotation value. [ReadOnly](./Common.xml#L407:~:text=A request to change the property to a value that differs from the before-image fails entirely according to [OData-Protocol, section 11.4.3](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_UpdateanEntity) if this annotation is given dynamically as `ReadOnly` in the before-image of the request.
To statically mark a property as read-only use term [Core.Computed](https://github.com/oasis-tcs/odata-vocabularies/blob/main/vocabularies/Org.OData.Core.V1.md#Computed) instead. [Inapplicable](./Common.xml#L417:~:text=A request that sets the property to a non-initial non-null value fails entirely if this annotation is `Inapplicable` in the after-image of the request.
This value does not make sense as a static annotation value.
Example for dynamic use: in a travel expense report the property `DestinationCountry` is inapplicable if trip type is domestic, and mandatory if trip type is international. diff --git a/vocabularies/DirectEdit.md b/vocabularies/DirectEdit.md index 8ab4b4739..940f24687 100644 --- a/vocabularies/DirectEdit.md +++ b/vocabularies/DirectEdit.md @@ -19,4 +19,4 @@ After a change to a property whose path is contained in `Triggers`, the client s Property|Type|Description :-------|:---|:---------- [Triggers](./DirectEdit.xml#L48:~:text=The **return type** of the action also needs to be either the entity type of the annotated entity set or structure-compatible with it, it can be the same type as for `Data`.
Structure-compatible means: - each primitive property that has the same name as a corresponding primitive property of the entity type of the annotated entity set is cast-compatible with the corresponding property and is nullable, - each complex property that has the same name as a corresponding complex or navigation property of the entity type of the annotated entity set is structure-compatible with the corresponding property - it may contain properties without a corresponding property in the entity type - it may omit properties of the entity type +[CalculationFunction](./DirectEdit.xml#L52:~:text=The operation calculating the side effects. While non-changing for the service, this technically is an action bound to the entity set so that the parameters can be sent in the POST request body. The action has the following non-binding parameters:

  • Qualifier of type Core.SimpleIdentifier or cast-compatible: the qualifier of the SideEffects annotation
  • Trigger of type Edm.String: the trigger of the side-effects determination, see Triggers property
  • Data of either the entity type of the annotated entity set or a complex type that is structure-compatible with it

The return type of the action also needs to be either the entity type of the annotated entity set or structure-compatible with it, it can be the same type as for Data.

Structure-compatible means:

  • each primitive property that has the same name as a corresponding primitive property of the entity type of the annotated entity set is cast-compatible with the corresponding property and is nullable,
  • each complex property that has the same name as a corresponding complex or navigation property of the entity type of the annotated entity set is structure-compatible with the corresponding property
  • it may contain properties without a corresponding property in the entity type
  • it may omit properties of the entity type
diff --git a/vocabularies/Hierarchy.md b/vocabularies/Hierarchy.md index 844746e2b..d90b1ca00 100644 --- a/vocabularies/Hierarchy.md +++ b/vocabularies/Hierarchy.md @@ -145,7 +145,7 @@ the following collections of hierarchy nodes are distinguished: Property|Type|Description :-------|:---|:---------- [ExternalKey](./Hierarchy.xml#L121:~:text=If a `NodeType` exists, the external key is unique only in combination with it. Or the external key can coincide with the [`Aggregation.RecursiveHierarchy/NodeProperty`](https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Aggregation.V1.html#RecursiveHierarchyType). -[NodeType](./Hierarchy.xml#L128:~:text=In a recursive hierarchy with mixed types, nodes can - have a type-specific (navigation) property whose name is the node type or - be represented by entities of different subtypes of a common entity type that is
annotated with the `RecursiveHierarchy` annotation. The qualified name of the subtype is the node type. +[NodeType](./Hierarchy.xml#L128:~:text=

In a recursive hierarchy with mixed types, nodes can

  • have a type-specific (navigation) property whose name is the node type or
  • be represented by entities of different subtypes of a common entity type that is

annotated with the RecursiveHierarchy annotation. The qualified name of the subtype is the node type.

[LimitedDescendantCount](./Hierarchy.xml#L138:~:text=Allowed values:
[expanded](./Hierarchy.xml#L145)
The node has children in the limited hierarchy
[collapsed](./Hierarchy.xml#L149)
The node has children in the unlimited hierarchy but not in the limited hierarchy
[leaf](./Hierarchy.xml#L153)
The node has no children in the unlimited hierarchy [DistanceFromRoot](./Hierarchy.xml#L160:~:text=This equals the number of ancestors in the sub-hierarchy, if the request involves a sub-hierarchy. diff --git a/vocabularies/PersonalData.md b/vocabularies/PersonalData.md index 735bada68..87766e81c 100644 --- a/vocabularies/PersonalData.md +++ b/vocabularies/PersonalData.md @@ -32,7 +32,7 @@ Term|Type|Description [DataSubjectRoleDescription](./PersonalData.xml#L68:~:text=Language-dependent description of the role of the data subjects in this set (e.g. employee, customer)
Values are application-specific. Can be a static value or a `Path` expression If the role varies per entity [FieldSemantics](./PersonalData.xml#L111:~:text=Primary meaning of the personal data contained in the annotated property
Changes to values of annotated properties are tracked in the audit log. Use this annotation also on fields that are already marked as contact or address data. [IsPotentiallyPersonal](./PersonalData.xml#L195:~:text=Property contains potentially personal data
Personal data is information relating to an identified or identifiable natural person (data subject).
Note: properties annotated with [`FieldSemantics`](#FieldSemantics) need not be additionally annotated with this term.
See also: [What is personal data?](https://ec.europa.eu/info/law/law-topic/data-protection/reform/what-personal-data_en) -[IsPotentiallySensitive](./PersonalData.xml#L206:~:text=Property contains potentially sensitive personal data
Sensitive data is a colloquial term usually including the following data: - Special categories of personal data such as data revealing racial or ethnic origin, political opinions, religious or philosophical beliefs, or trade union membership, and the processing of genetic data, biometric data, data concerning health or sex life or sexual orientation - Personal data subject to professional secrecy - Personal data relating to criminal or administrative offences - Personal data concerning bank or credit card accounts
See also: [What personal data is considered sensitive?](https://ec.europa.eu/info/law/law-topic/data-protection/reform/rules-business-and-organisations/legal-grounds-processing-data/sensitive-data/what-personal-data-considered-sensitive_en) +[IsPotentiallySensitive](./PersonalData.xml#L206:~:text=Property contains potentially sensitive personal data

Sensitive data is a colloquial term usually including the following data:

  • Special categories of personal data such as data revealing racial or ethnic origin, political opinions, religious or philosophical beliefs, or trade union membership, and the processing of genetic data, biometric data, data concerning health or sex life or sexual orientation
  • Personal data subject to professional secrecy
  • Personal data relating to criminal or administrative offences
  • Personal data concerning bank or credit card accounts

See also: What personal data is considered sensitive?

## [EntitySemanticsType](./PersonalData.xml#L76:~:text=Signature: - Binding parameter is collection of type of annotated entity set - No non-binding parameters - No return type
If called within a sticky session the sticky session continues.
Otherwise: - On success this action initiates a sticky session. - On failure no sticky session is initiated. +[NewAction](./Session.xml#L88:~:text=

Signature:

  • Binding parameter is collection of type of annotated entity set
  • No non-binding parameters
  • No return type

If called within a sticky session the sticky session continues.

Otherwise:

  • On success this action initiates a sticky session.
  • On failure no sticky session is initiated.
[AdditionalNewActions](./Session.xml#L103:~:text=Actions have the same binding parameter as the `NewAction` and may have non-binding paramters -[EditAction](./Session.xml#L108:~:text=Signature: - Binding parameter is type of annotated entity set - No non-binding parameters - Return type is same as binding parameter type
If called within a sticky session the sticky session continues.
Otherwise: - On success this action returns the targeted entity and initiates a sticky session. - On failure no sticky session is initiated. -[SaveAction](./Session.xml#L123:~:text=Signature: - Binding parameter is type of annotated entity set - No non-binding parameters - Return type is same as binding parameter type
On success this action returns the newly created or edited entity. The sticky session is terminated after all entities that were newly created or edited in it have been saved.
On failure the sticky session is kept alive. -[DiscardAction](./Session.xml#L136:~:text=Signature: - No parameters - No return type
If called within a sticky session the sticky session is terminated, irrespective of whether the action succeeds or fails.
If called outside of a sticky session the action fails and does not initiate a session. +[EditAction](./Session.xml#L108:~:text=

Signature:

  • Binding parameter is type of annotated entity set
  • No non-binding parameters
  • Return type is same as binding parameter type

If called within a sticky session the sticky session continues.

Otherwise:

  • On success this action returns the targeted entity and initiates a sticky session.
  • On failure no sticky session is initiated.
+[SaveAction](./Session.xml#L123:~:text=

Signature:

  • Binding parameter is type of annotated entity set
  • No non-binding parameters
  • Return type is same as binding parameter type

On success this action returns the newly created or edited entity. The sticky session is terminated after all entities that were newly created or edited in it have been saved.

On failure the sticky session is kept alive.

+[DiscardAction](./Session.xml#L136:~:text=

Signature:

  • No parameters
  • No return type

If called within a sticky session the sticky session is terminated, irrespective of whether the action succeeds or fails.

If called outside of a sticky session the action fails and does not initiate a session.

diff --git a/vocabularies/UI.md b/vocabularies/UI.md index e96ae9a91..13efe5408 100644 --- a/vocabularies/UI.md +++ b/vocabularies/UI.md @@ -54,7 +54,7 @@ Term|Type|Description [IsImage](./UI.xml#L1383:~:text=Properties annotated with this term MUST be a stream property annotated with a MIME type image. Entity types annotated with this term MUST be a media entity type annotated with a MIME type image.
Can be annotated with:
  • [IsNaturalPerson](Common.md#IsNaturalPerson)
[MultiLineText](./UI.xml#L1394:~:text=Properties and parameters annotated with this annotation should be rendered as multi-line text (e.g. text area) [Placeholder](./UI.xml#L1399:~:text=A short, human-readable text that gives a hint or an example to help the user with data entry -[TextArrangement](./UI.xml#L1404:~:text=Describes the arrangement of a code or ID value and its text
This term annotates one of the following: 1. a [`Common.Text`](Common.md#Text) annotation of the code or ID property where the annotation value is the text 2. an entity type, this has the same effect as annotating all `Common.Text` annotations of properties of that entity type. +[TextArrangement](./UI.xml#L1404:~:text=Describes the arrangement of a code or ID value and its text

This term annotates one of the following:

  1. a Common.Text annotation of the code or ID property where the annotation value is the text
  2. an entity type, this has the same effect as annotating all Common.Text annotations of properties of that entity type.
[Note](./UI.xml#L1427:~:text=Visualization of a note attached to an entity
Administrative data is given by the annotations [`Common.CreatedBy`](Common.md#CreatedBy), [`Common.CreatedAt`](Common.md#CreatedAt), [`Common.ChangedBy`](Common.md#ChangedBy), [`Common.ChangedAt`](Common.md#ChangedAt) on the same entity type. [Importance](./UI.xml#L1480:~:text=Expresses the importance of e.g. a DataField or an annotation [Hidden](./UI.xml#L1495:~:text=Properties or facets (see UI.Facet) annotated with this term will not be rendered if the annotation evaluates to true.
Hidden properties usually carry technical information that is used for application control and is of no direct interest to end users. The annotation value may be an expression to dynamically hide or render the annotated feature. If a navigation property is annotated with `Hidden` true, all subsequent parts are hidden - independent of their own potential `Hidden` annotations. From 3ca799dde4ffc8ae5a06085ce0a8cca343d5a234 Mon Sep 17 00:00:00 2001 From: D024504 Date: Fri, 12 Apr 2024 17:29:12 +0200 Subject: [PATCH 13/32] @uhlmannm's suggestion --- vocabularies/Hierarchy.json | 6 +++--- vocabularies/Hierarchy.md | 2 +- vocabularies/Hierarchy.xml | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/vocabularies/Hierarchy.json b/vocabularies/Hierarchy.json index d042e8266..3a64cd40f 100644 --- a/vocabularies/Hierarchy.json +++ b/vocabularies/Hierarchy.json @@ -47,11 +47,11 @@ "@Core.Description": "Drill state of an entry", "@Validation.AllowedValues": [ { "Value": "expanded", "@Core.Description": "The entry precedes entries from deeper aggregation levels" }, + { "Value": "leaf", "@Core.Description": "The entry belongs to the deepest aggregation level" }, { "Value": "collapsed", - "@Core.Description": "The entry belongs to the highest non-expanded aggregation level, but not the deepest" - }, - { "Value": "leaf", "@Core.Description": "The entry belongs to the deepest aggregation level" } + "@Core.Description": "The entry belongs to the highest non-expanded aggregation level, but is not a leaf" + } ] }, "DistanceFromRoot": { diff --git a/vocabularies/Hierarchy.md b/vocabularies/Hierarchy.md index d90b1ca00..c90af60e6 100644 --- a/vocabularies/Hierarchy.md +++ b/vocabularies/Hierarchy.md @@ -101,7 +101,7 @@ The properties in this complex type contain information about Property|Type|Description :-------|:---|:---------- [LimitedDescendantCount](./Hierarchy.xml#L58:~:text=Allowed values:
[expanded](./Hierarchy.xml#L65)
The entry precedes entries from deeper aggregation levels
[collapsed](./Hierarchy.xml#L69)
The entry belongs to the highest non-expanded aggregation level, but not the deepest
[leaf](./Hierarchy.xml#L73)
The entry belongs to the deepest aggregation level +[DrillState](./Hierarchy.xml#L61:~:text=Allowed values:
[expanded](./Hierarchy.xml#L65)
The entry precedes entries from deeper aggregation levels
[leaf](./Hierarchy.xml#L69)
The entry belongs to the deepest aggregation level
[collapsed](./Hierarchy.xml#L73)
The entry belongs to the highest non-expanded aggregation level, but is not a leaf [DistanceFromRoot](./Hierarchy.xml#L80:~:text= diff --git a/vocabularies/Hierarchy.xml b/vocabularies/Hierarchy.xml index cc4212237..17108c70e 100644 --- a/vocabularies/Hierarchy.xml +++ b/vocabularies/Hierarchy.xml @@ -66,14 +66,14 @@ - - - - + + + + From 92f1abd07c6c701f585670ce03cffe223a94a62b Mon Sep 17 00:00:00 2001 From: D024504 Date: Fri, 26 Apr 2024 13:38:33 +0200 Subject: [PATCH 14/32] Simplifications agreed in V4 table meeting --- vocabularies/Analytics.json | 32 +++++--------------------------- vocabularies/Analytics.md | 36 ++++++++++++++++-------------------- vocabularies/Analytics.xml | 35 +++-------------------------------- vocabularies/Hierarchy.json | 10 ++++++++++ vocabularies/Hierarchy.md | 26 +++++++++++++++++++------- vocabularies/Hierarchy.xml | 7 +++++++ 6 files changed, 60 insertions(+), 86 deletions(-) diff --git a/vocabularies/Analytics.json b/vocabularies/Analytics.json index 502b2c779..658ed98ac 100644 --- a/vocabularies/Analytics.json +++ b/vocabularies/Analytics.json @@ -171,7 +171,6 @@ "$EntitySetPath": "InputSet", "$IsBound": true, "@Common.Experimental": true, - "@Core.IsSignature": true, "@Core.Description": "`$apply` transformation that expands an unnamed leveled hierarchy with custom aggregation of certain properties", "$Parameter": [ { @@ -185,7 +184,7 @@ "$Collection": true, "$Type": "Analytics.AutoExpandLevel", "@Core.Description": "Collection of aggregation levels forming the visible part of a leveled hierarchy", - "@Core.LongDescription": "Each element in the collection defines the property names for one level.\n A property must not referenced by more than one level.\n The first element in the collection defines the property names of the coarsest level,\n the following elements define the property names of consecutively finer-grained aggregation levels.\n The function result comprises the leveled hierarchy with these levels in preorder.\n All referenced properties must be groupable." + "@Core.LongDescription": "Each element in the collection defines the properties that constitute one level.\n A property must not referenced by more than one level.\n The first element in the collection defines the property names of the coarsest level,\n the following elements define the property names of consecutively finer-grained aggregation levels.\n The function result comprises the leveled hierarchy with these levels in preorder.\n All referenced properties must be groupable." }, { "$Name": "LeafLevel", @@ -206,32 +205,11 @@ "@Core.Description": "Sort specification to apply to all direct descendants of a given entry in the resulting leveled hierarchy" }, { - "$Name": "BeforeAggregationFilter", - "@Core.Description": "Expression valid for `filter` transformation to restrict the input set before any further procressing", - "@Core.OptionalParameter": {} - }, - { - "$Name": "AggregatedValuesLeafFilter", - "@Core.Description": "Expression valid for `filter` transformation to restrict the input set at the most detailed grouping level with conditions on aggregated values", - "@Core.OptionalParameter": {} - }, - { - "$Name": "Skip", - "$Type": "Edm.Int64", - "@Core.Description": "Number of entries to skip from the top of the fully ordered result", - "@Core.OptionalParameter": { "DefaultValue": "0" } - }, - { - "$Name": "Top", - "$Type": "Edm.Int64", - "@Core.Description": "Number of entries to return from the result set after any skipping (absent means all)", + "$Name": "ExpandLevels", + "$Collection": true, + "$Type": "Hierarchy.AutoLevelsExpandType", + "@Core.Description": "Entries to be expanded", "@Core.OptionalParameter": {} - }, - { - "$Name": "ResultEntriesCount", - "$Type": "Edm.Bool", - "@Core.Description": "Whether to return the total number of entries in the result independent of Skip/Top", - "@Core.OptionalParameter": { "DefaultValue": "false" } } ], "$ReturnType": { diff --git a/vocabularies/Analytics.md b/vocabularies/Analytics.md index 1f1d584fd..09615594a 100644 --- a/vocabularies/Analytics.md +++ b/vocabularies/Analytics.md @@ -17,7 +17,7 @@ Term|Type|Description [AggregatedProperties](./Analytics.xml#L106:~:text=Deprecated in favor of [`AggregatedProperty`](#AggregatedProperty) [AggregatedProperty](./Analytics.xml#L124:~:text=Dynamic property for aggregate expression with specified aggregation method defined on the annotated entity type. [AnalyticalContext](./Analytics.xml#L144:~:text=Collection of properties that define an analytical context -[LevelInformation](./Analytics.xml#L285:~:text=Information about grouping levels in the result set of a request including the [`AutoExpand`](#AutoExpand) transformation +[LevelInformation](./Analytics.xml#L256:~:text=Information about grouping levels in the result set of a request including the [`AutoExpand`](#AutoExpand) transformation ## Functions @@ -29,17 +29,13 @@ Term|Type|Description Parameter|Type|Description :--------|:---|:---------- -**[InputSet](./Analytics.xml#L186:~:text=Each element in the collection defines the property names for one level. A property must not referenced by more than one level. The first element in the collection defines the property names of the coarsest level, the following elements define the property names of consecutively finer-grained aggregation levels. The function result comprises the leveled hierarchy with these levels in preorder. All referenced properties must be groupable. -[LeafLevel](./Analytics.xml#L200:~:text=Property names that occur in `Levels` must not be repeated here. All referenced properties must be groupable. -[Aggregation](./Analytics.xml#L207:~:text=All properties in this collection must be custom aggregates. -[SiblingOrder](./Analytics.xml#L213:~:text=Each element in the collection defines the properties that constitute one level. A property must not referenced by more than one level. The first element in the collection defines the property names of the coarsest level, the following elements define the property names of consecutively finer-grained aggregation levels. The function result comprises the leveled hierarchy with these levels in preorder. All referenced properties must be groupable. +[LeafLevel](./Analytics.xml#L199:~:text=Property names that occur in `Levels` must not be repeated here. All referenced properties must be groupable. +[Aggregation](./Analytics.xml#L206:~:text=All properties in this collection must be custom aggregates. +[SiblingOrder](./Analytics.xml#L212:~:text= @@ -69,29 +65,29 @@ Property|Type|Description [AccumulativeMeasure](./Analytics.xml#L168:~:text= -## [AutoExpandLevel](./Analytics.xml#L254:~:text= -## [AutoExpandSiblingOrder](./Analytics.xml#L260:~:text= -## [SortOrderType](./Analytics.xml#L269:~:text= - @@ -189,7 +188,7 @@ - Each element in the collection defines the property names for one level. + Each element in the collection defines the properties that constitute one level. A property must not referenced by more than one level. The first element in the collection defines the property names of the coarsest level, the following elements define the property names of consecutively finer-grained aggregation levels. @@ -213,40 +212,12 @@ - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vocabularies/Hierarchy.json b/vocabularies/Hierarchy.json index 3a64cd40f..80eeac2a0 100644 --- a/vocabularies/Hierarchy.json +++ b/vocabularies/Hierarchy.json @@ -224,6 +224,16 @@ "@Core.Description": "Number of levels to be expanded, null means all levels, 0 means collapsed" } }, + "AutoLevelsExpandType": { + "$Kind": "ComplexType", + "$BaseType": "Hierarchy.TopLevelsExpandType", + "@Common.Experimental": true, + "@Core.Description": "Information about entries in a leveled hierarchy to be expanded", + "NodeID": { + "$Collection": true, + "@Core.Description": "An entry on a given [level](Analytics.md#AutoExpandLevel) is identified by a collection of values for the properties that constitute this level" + } + }, "RecursiveHierarchySupported": { "$Kind": "Term", "$Type": "Core.Tag", diff --git a/vocabularies/Hierarchy.md b/vocabularies/Hierarchy.md index c90af60e6..592ec3855 100644 --- a/vocabularies/Hierarchy.md +++ b/vocabularies/Hierarchy.md @@ -11,24 +11,24 @@ Term|Type|Description [RecursiveHierarchy](./Hierarchy.xml#L41:~:text=Hierarchy-specific information in the result set of a hierarchical request
The [base term](https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Aggregation.V1.html#RecursiveHierarchy) governs what are the nodes and parents in the hierarchy, whereas this term defines derived information. [RecursiveHierarchyActions](./Hierarchy.xml#L199:~:text=Actions for maintaining the recursive hierarchy defined by the [base term](https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Aggregation.V1.html#RecursiveHierarchy)
When an annotation with this term is present, the [`ParentNavigationProperty`](https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Aggregation.V1.html#RecursiveHierarchyType) in the base term must not have a collection-valued segment prior to its last segment. [MatchCount](./Hierarchy.xml#L253:~:text=Instance annotation on the result of an `$apply` query option containing the number of matching nodes after hierarchical transformations
The service MAY designate a subset of the `$apply` result as "matching nodes". For requests following the pattern described [here](#RecursiveHierarchyType), this subset is the output set of the `filter` or `search` transformation that occurs as the fourth parameter of the last `ancestors` transformation or occurs nested into it.
For requests not following this pattern, the subset NEED NOT be defined.
This instance annotation is available if [`RecursiveHierarchy/Matched`](#RecursiveHierarchyType) and [`RecursiveHierarchy/MatchedDescendantCount`](#RecursiveHierarchyType) are also available. -[RecursiveHierarchySupported](./Hierarchy.xml#L337:~:text=Whether the annotated collection acts as a [`RecursiveHierarchy`](#RecursiveHierarchy) with the given qualifier
This tag is applied to a collection with the same qualifier as the [`RecursiveHierarchy`](#RecursiveHierarchy) term which is applied to its entity type. The recursive hierarchy can then only be addressed through a collection where this tag is true. +[RecursiveHierarchySupported](./Hierarchy.xml#L344:~:text=Whether the annotated collection acts as a [`RecursiveHierarchy`](#RecursiveHierarchy) with the given qualifier
This tag is applied to a collection with the same qualifier as the [`RecursiveHierarchy`](#RecursiveHierarchy) term which is applied to its entity type. The recursive hierarchy can then only be addressed through a collection where this tag is true. ## Actions -### [Template_ChangeNextSiblingAction](./Hierarchy.xml#L347:~:text=This parameter has properties with the same names as the key properties of the entity type. next(T) = S after the action. If R is a node with next(R) = S before the action, then next(R) = T after the action, even if S = null. It is an error if S has a different parent than T. +**[Node](./Hierarchy.xml#L357:~:text=This parameter has properties with the same names as the key properties of the entity type. next(T) = S after the action. If R is a node with next(R) = S before the action, then next(R) = T after the action, even if S = null. It is an error if S has a different parent than T. -### [Template_CopyAction](./Hierarchy.xml#L381:~:text= +## [AutoLevelsExpandType](./Hierarchy.xml#L336:~:text= + + + + + + + From bb78f7dd6ad767aa29431236ca0450dd5b4212e0 Mon Sep 17 00:00:00 2001 From: D024504 Date: Fri, 26 Apr 2024 14:28:49 +0200 Subject: [PATCH 15/32] Example request --- vocabularies/Analytics.json | 13 +++++++- vocabularies/Analytics.md | 63 +++++++++++++++++++++++++++---------- vocabularies/Analytics.xml | 35 ++++++++++++++++++++- vocabularies/Hierarchy.json | 10 ------ vocabularies/Hierarchy.md | 26 +++++---------- vocabularies/Hierarchy.xml | 7 ----- 6 files changed, 100 insertions(+), 54 deletions(-) diff --git a/vocabularies/Analytics.json b/vocabularies/Analytics.json index 658ed98ac..ff67df8cd 100644 --- a/vocabularies/Analytics.json +++ b/vocabularies/Analytics.json @@ -172,6 +172,7 @@ "$IsBound": true, "@Common.Experimental": true, "@Core.Description": "`$apply` transformation that expands an unnamed leveled hierarchy with custom aggregation of certain properties", + "@Core.LongDescription": "Example transformation sequence:\n```\n$apply=filter(Industry eq 'IT')\n/groupby((Country,CountryName,Region,RegionName),\n filter($these/aggregate(Amount) gt 0 and\n $these/aggregate(Currency) ne null))\n/concat(\n Analytics.AutoExpand(\n Levels=[{\"P\":[\"Country\",\"CountryName\"]},\n {\"P\":[\"Region\",\"RegionName\"]}],\n LeafLevel=[\"Segment\",\"Industry\"],\n Aggregation=[\"Amount\",\"Currency\"],\n SiblingOrder=[{\"Property\":\"Amount\",\n \"Order\":\"desc\"}],\n ExpandLevels=[{\"Entry\":[\"US\",\"USA\"],\"Levels\":0},\n {\"Entry\":[\"DE\",\"Germany\",\"BW\",\"Baden-Württemberg\"],\"Levels\":2}])\n /concat(aggregate($count) as ResultEntriesCount,\n skip(20)/top(10)),\n aggregate(Amount,Currency))\n```\n", "$Parameter": [ { "$Name": "InputSet", @@ -207,7 +208,7 @@ { "$Name": "ExpandLevels", "$Collection": true, - "$Type": "Hierarchy.AutoLevelsExpandType", + "$Type": "Analytics.AutoExpandLevelType", "@Core.Description": "Entries to be expanded", "@Core.OptionalParameter": {} } @@ -243,6 +244,16 @@ { "Value": "desc", "@Core.Description": "Sort in descending order" } ] }, + "AutoExpandLevelType": { + "$Kind": "ComplexType", + "@Common.Experimental": true, + "@Core.Description": "Information about entries in a leveled hierarchy that are not completely expanded", + "Entry": { + "$Collection": true, + "@Core.Description": "An entry on a given [level](#AutoExpandLevel) is identified by a collection of values for the properties that constitute all levels up to the given one" + }, + "Levels": { "$Type": "Edm.Int64", "@Core.Description": "Number of levels to be expanded, 0 means collapsed" } + }, "LevelInformation": { "$Kind": "Term", "$Type": "Hierarchy.HierarchyType", diff --git a/vocabularies/Analytics.md b/vocabularies/Analytics.md index 09615594a..589460ebf 100644 --- a/vocabularies/Analytics.md +++ b/vocabularies/Analytics.md @@ -17,7 +17,7 @@ Term|Type|Description [AggregatedProperties](./Analytics.xml#L106:~:text=Deprecated in favor of [`AggregatedProperty`](#AggregatedProperty) [AggregatedProperty](./Analytics.xml#L124:~:text=Dynamic property for aggregate expression with specified aggregation method defined on the annotated entity type. [AnalyticalContext](./Analytics.xml#L144:~:text=Collection of properties that define an analytical context -[LevelInformation](./Analytics.xml#L256:~:text=Information about grouping levels in the result set of a request including the [`AutoExpand`](#AutoExpand) transformation +[LevelInformation](./Analytics.xml#L289:~:text=Information about grouping levels in the result set of a request including the [`AutoExpand`](#AutoExpand) transformation ## Functions @@ -27,15 +27,37 @@ Term|Type|Description `$apply` transformation that expands an unnamed leveled hierarchy with custom aggregation of certain properties +Example transformation sequence: +``` +$apply=filter(Industry eq 'IT') +/groupby((Country,CountryName,Region,RegionName), + filter($these/aggregate(Amount) gt 0 and + $these/aggregate(Currency) ne null)) +/concat( + Analytics.AutoExpand( + Levels=[{"P":["Country","CountryName"]}, + {"P":["Region","RegionName"]}], + LeafLevel=["Segment","Industry"], + Aggregation=["Amount","Currency"], + SiblingOrder=[{"Property":"Amount", + "Order":"desc"}], + ExpandLevels=[{"Entry":["US","USA"],"Levels":0}, + {"Entry":["DE","Germany","BW","Baden-Württemberg"],"Levels":2}]) + /concat(aggregate($count) as ResultEntriesCount, + skip(20)/top(10)), + aggregate(Amount,Currency)) +``` + + Parameter|Type|Description :--------|:---|:---------- -**[InputSet](./Analytics.xml#L185:~:text=Each element in the collection defines the properties that constitute one level. A property must not referenced by more than one level. The first element in the collection defines the property names of the coarsest level, the following elements define the property names of consecutively finer-grained aggregation levels. The function result comprises the leveled hierarchy with these levels in preorder. All referenced properties must be groupable. -[LeafLevel](./Analytics.xml#L199:~:text=Property names that occur in `Levels` must not be repeated here. All referenced properties must be groupable. -[Aggregation](./Analytics.xml#L206:~:text=All properties in this collection must be custom aggregates. -[SiblingOrder](./Analytics.xml#L212:~:text=Each element in the collection defines the properties that constitute one level. A property must not referenced by more than one level. The first element in the collection defines the property names of the coarsest level, the following elements define the property names of consecutively finer-grained aggregation levels. The function result comprises the leveled hierarchy with these levels in preorder. All referenced properties must be groupable. +[LeafLevel](./Analytics.xml#L222:~:text=Property names that occur in `Levels` must not be repeated here. All referenced properties must be groupable. +[Aggregation](./Analytics.xml#L229:~:text=All properties in this collection must be custom aggregates. +[SiblingOrder](./Analytics.xml#L235:~:text= @@ -65,29 +87,38 @@ Property|Type|Description [AccumulativeMeasure](./Analytics.xml#L168:~:text= -## [AutoExpandLevel](./Analytics.xml#L225:~:text= -## [AutoExpandSiblingOrder](./Analytics.xml#L231:~:text= -## [SortOrderType](./Analytics.xml#L240:~:text= +## [AutoExpandLevelType](./Analytics.xml#L278:~:text= + + Example transformation sequence: +``` +$apply=filter(Industry eq 'IT') +/groupby((Country,CountryName,Region,RegionName), + filter($these/aggregate(Amount) gt 0 and + $these/aggregate(Currency) ne null)) +/concat( + Analytics.AutoExpand( + Levels=[{"P":["Country","CountryName"]}, + {"P":["Region","RegionName"]}], + LeafLevel=["Segment","Industry"], + Aggregation=["Amount","Currency"], + SiblingOrder=[{"Property":"Amount", + "Order":"desc"}], + ExpandLevels=[{"Entry":["US","USA"],"Levels":0}, + {"Entry":["DE","Germany","BW","Baden-Württemberg"],"Levels":2}]) + /concat(aggregate($count) as ResultEntriesCount, + skip(20)/top(10)), + aggregate(Amount,Currency)) +``` + + @@ -212,7 +235,7 @@ - + @@ -252,6 +275,16 @@ + + + + + + + + + + diff --git a/vocabularies/Hierarchy.json b/vocabularies/Hierarchy.json index 80eeac2a0..3a64cd40f 100644 --- a/vocabularies/Hierarchy.json +++ b/vocabularies/Hierarchy.json @@ -224,16 +224,6 @@ "@Core.Description": "Number of levels to be expanded, null means all levels, 0 means collapsed" } }, - "AutoLevelsExpandType": { - "$Kind": "ComplexType", - "$BaseType": "Hierarchy.TopLevelsExpandType", - "@Common.Experimental": true, - "@Core.Description": "Information about entries in a leveled hierarchy to be expanded", - "NodeID": { - "$Collection": true, - "@Core.Description": "An entry on a given [level](Analytics.md#AutoExpandLevel) is identified by a collection of values for the properties that constitute this level" - } - }, "RecursiveHierarchySupported": { "$Kind": "Term", "$Type": "Core.Tag", diff --git a/vocabularies/Hierarchy.md b/vocabularies/Hierarchy.md index 592ec3855..c90af60e6 100644 --- a/vocabularies/Hierarchy.md +++ b/vocabularies/Hierarchy.md @@ -11,24 +11,24 @@ Term|Type|Description [RecursiveHierarchy](./Hierarchy.xml#L41:~:text=Hierarchy-specific information in the result set of a hierarchical request
The [base term](https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Aggregation.V1.html#RecursiveHierarchy) governs what are the nodes and parents in the hierarchy, whereas this term defines derived information. [RecursiveHierarchyActions](./Hierarchy.xml#L199:~:text=Actions for maintaining the recursive hierarchy defined by the [base term](https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Aggregation.V1.html#RecursiveHierarchy)
When an annotation with this term is present, the [`ParentNavigationProperty`](https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Aggregation.V1.html#RecursiveHierarchyType) in the base term must not have a collection-valued segment prior to its last segment. [MatchCount](./Hierarchy.xml#L253:~:text=Instance annotation on the result of an `$apply` query option containing the number of matching nodes after hierarchical transformations
The service MAY designate a subset of the `$apply` result as "matching nodes". For requests following the pattern described [here](#RecursiveHierarchyType), this subset is the output set of the `filter` or `search` transformation that occurs as the fourth parameter of the last `ancestors` transformation or occurs nested into it.
For requests not following this pattern, the subset NEED NOT be defined.
This instance annotation is available if [`RecursiveHierarchy/Matched`](#RecursiveHierarchyType) and [`RecursiveHierarchy/MatchedDescendantCount`](#RecursiveHierarchyType) are also available. -[RecursiveHierarchySupported](./Hierarchy.xml#L344:~:text=Whether the annotated collection acts as a [`RecursiveHierarchy`](#RecursiveHierarchy) with the given qualifier
This tag is applied to a collection with the same qualifier as the [`RecursiveHierarchy`](#RecursiveHierarchy) term which is applied to its entity type. The recursive hierarchy can then only be addressed through a collection where this tag is true. +[RecursiveHierarchySupported](./Hierarchy.xml#L337:~:text=Whether the annotated collection acts as a [`RecursiveHierarchy`](#RecursiveHierarchy) with the given qualifier
This tag is applied to a collection with the same qualifier as the [`RecursiveHierarchy`](#RecursiveHierarchy) term which is applied to its entity type. The recursive hierarchy can then only be addressed through a collection where this tag is true. ## Actions -### [Template_ChangeNextSiblingAction](./Hierarchy.xml#L354:~:text=This parameter has properties with the same names as the key properties of the entity type. next(T) = S after the action. If R is a node with next(R) = S before the action, then next(R) = T after the action, even if S = null. It is an error if S has a different parent than T. +**[Node](./Hierarchy.xml#L350:~:text=This parameter has properties with the same names as the key properties of the entity type. next(T) = S after the action. If R is a node with next(R) = S before the action, then next(R) = T after the action, even if S = null. It is an error if S has a different parent than T. -### [Template_CopyAction](./Hierarchy.xml#L388:~:text= -## [AutoLevelsExpandType](./Hierarchy.xml#L336:~:text= - - - - - - - From 41815730da4f4e1f0f4f8af41b157dc9a6703e30 Mon Sep 17 00:00:00 2001 From: D024504 Date: Fri, 26 Apr 2024 14:39:46 +0200 Subject: [PATCH 16/32] Rephrased --- vocabularies/Analytics.json | 2 +- vocabularies/Analytics.md | 2 +- vocabularies/Analytics.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vocabularies/Analytics.json b/vocabularies/Analytics.json index ff67df8cd..fb9380bea 100644 --- a/vocabularies/Analytics.json +++ b/vocabularies/Analytics.json @@ -209,7 +209,7 @@ "$Name": "ExpandLevels", "$Collection": true, "$Type": "Analytics.AutoExpandLevelType", - "@Core.Description": "Entries to be expanded", + "@Core.Description": "Entries to be specially (not fully) expanded", "@Core.OptionalParameter": {} } ], diff --git a/vocabularies/Analytics.md b/vocabularies/Analytics.md index 589460ebf..8bce7ac37 100644 --- a/vocabularies/Analytics.md +++ b/vocabularies/Analytics.md @@ -56,7 +56,7 @@ Parameter|Type|Description [LeafLevel](./Analytics.xml#L222:~:text=Property names that occur in `Levels` must not be repeated here. All referenced properties must be groupable. [Aggregation](./Analytics.xml#L229:~:text=All properties in this collection must be custom aggregates. [SiblingOrder](./Analytics.xml#L235:~:text=
- + From b227e7fdd86b092dfe55a9df7dab7cb473fa5420 Mon Sep 17 00:00:00 2001 From: D024504 Date: Fri, 26 Apr 2024 15:31:36 +0200 Subject: [PATCH 17/32] Typos --- vocabularies/Hierarchy.json | 3 ++- vocabularies/Hierarchy.md | 50 ++++++++++++++++++------------------- vocabularies/Hierarchy.xml | 3 ++- 3 files changed, 29 insertions(+), 27 deletions(-) diff --git a/vocabularies/Hierarchy.json b/vocabularies/Hierarchy.json index 3a64cd40f..916ff53f9 100644 --- a/vocabularies/Hierarchy.json +++ b/vocabularies/Hierarchy.json @@ -36,7 +36,7 @@ "HierarchyType": { "$Kind": "ComplexType", "@Common.Experimental": true, - "@Core.LongDescription": "The properties in this complex type contain information about\n an entry in the result set of a request with multiple aggregation levels, some which are expanded.\n These properties also serve in the derived [`RecursiveHierarchyType`](#RecursiveHierarchyType)\n with their definitions rephrased in the concept of recursive hierarchies.", + "@Core.LongDescription": "The properties in this complex type contain information about\n an entry in the result set of a request with multiple aggregation levels, some of which are expanded.\n These properties also serve in the derived [`RecursiveHierarchyType`](#RecursiveHierarchyType)\n with their definitions rephrased in the concept of recursive hierarchies.", "LimitedDescendantCount": { "$Type": "Edm.Int64", "$Nullable": true, @@ -142,6 +142,7 @@ }, "RecursiveHierarchyActionsType": { "$Kind": "ComplexType", + "@Common.Experimental": true, "@Core.LongDescription": "The qualified action names identify actions for maintaining nodes in the recursive hierarchy,\nwhich are specific for the given annotation qualifier.\nThese actions MUST have the same signature as the template actions linked below, with\n`Edm.EntityType` replaced with the entity type on which the recursive hierarchy is defined.\nThe resource path of the binding parameter MUST traverse the hierarchy collection,\nincluding any hierarchy directory. If the resource path contains a Content ID reference to an earlier request,\nthe hierarchy directory MUST be determined from the resource path of that request.\n```json\n{\"requests\": [{\n \"id\": \"1\",\n \"method\": \"post\",\n \"url\": \"HierarchyDirectory(1)/Nodes\",\n \"body\": {\n \"Name\": \"child of A\",\n \"Superordinate@odata.bind\": \"Nodes('A')\"\n }\n}, {\n \"id\": \"2\",\n \"dependsOn\": [\"1\"],\n \"method\": \"post\",\n \"url\": \"$1/Hierarchy.ChangeNextSiblingAction\",\n \"body\": {\n \"NextSibling\": null\n }\n}]}\n```\nThe template actions themselves cannot be invoked.", "ChangeNextSiblingAction": { "$Type": "Common.QualifiedName", diff --git a/vocabularies/Hierarchy.md b/vocabularies/Hierarchy.md index c90af60e6..f781b12f7 100644 --- a/vocabularies/Hierarchy.md +++ b/vocabularies/Hierarchy.md @@ -10,25 +10,25 @@ Term|Type|Description :---|:---|:---------- [RecursiveHierarchy](./Hierarchy.xml#L41:~:text=Hierarchy-specific information in the result set of a hierarchical request
The [base term](https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Aggregation.V1.html#RecursiveHierarchy) governs what are the nodes and parents in the hierarchy, whereas this term defines derived information. [RecursiveHierarchyActions](./Hierarchy.xml#L199:~:text=Actions for maintaining the recursive hierarchy defined by the [base term](https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Aggregation.V1.html#RecursiveHierarchy)
When an annotation with this term is present, the [`ParentNavigationProperty`](https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Aggregation.V1.html#RecursiveHierarchyType) in the base term must not have a collection-valued segment prior to its last segment. -[MatchCount](./Hierarchy.xml#L253:~:text=Instance annotation on the result of an `$apply` query option containing the number of matching nodes after hierarchical transformations
The service MAY designate a subset of the `$apply` result as "matching nodes". For requests following the pattern described [here](#RecursiveHierarchyType), this subset is the output set of the `filter` or `search` transformation that occurs as the fourth parameter of the last `ancestors` transformation or occurs nested into it.
For requests not following this pattern, the subset NEED NOT be defined.
This instance annotation is available if [`RecursiveHierarchy/Matched`](#RecursiveHierarchyType) and [`RecursiveHierarchy/MatchedDescendantCount`](#RecursiveHierarchyType) are also available. -[RecursiveHierarchySupported](./Hierarchy.xml#L337:~:text=Whether the annotated collection acts as a [`RecursiveHierarchy`](#RecursiveHierarchy) with the given qualifier
This tag is applied to a collection with the same qualifier as the [`RecursiveHierarchy`](#RecursiveHierarchy) term which is applied to its entity type. The recursive hierarchy can then only be addressed through a collection where this tag is true. +[MatchCount](./Hierarchy.xml#L254:~:text=Instance annotation on the result of an `$apply` query option containing the number of matching nodes after hierarchical transformations
The service MAY designate a subset of the `$apply` result as "matching nodes". For requests following the pattern described [here](#RecursiveHierarchyType), this subset is the output set of the `filter` or `search` transformation that occurs as the fourth parameter of the last `ancestors` transformation or occurs nested into it.
For requests not following this pattern, the subset NEED NOT be defined.
This instance annotation is available if [`RecursiveHierarchy/Matched`](#RecursiveHierarchyType) and [`RecursiveHierarchy/MatchedDescendantCount`](#RecursiveHierarchyType) are also available. +[RecursiveHierarchySupported](./Hierarchy.xml#L338:~:text=Whether the annotated collection acts as a [`RecursiveHierarchy`](#RecursiveHierarchy) with the given qualifier
This tag is applied to a collection with the same qualifier as the [`RecursiveHierarchy`](#RecursiveHierarchy) term which is applied to its entity type. The recursive hierarchy can then only be addressed through a collection where this tag is true. ## Actions -### [Template_ChangeNextSiblingAction](./Hierarchy.xml#L347:~:text=This parameter has properties with the same names as the key properties of the entity type. next(T) = S after the action. If R is a node with next(R) = S before the action, then next(R) = T after the action, even if S = null. It is an error if S has a different parent than T. +**[Node](./Hierarchy.xml#L351:~:text=This parameter has properties with the same names as the key properties of the entity type. next(T) = S after the action. If R is a node with next(R) = S before the action, then next(R) = T after the action, even if S = null. It is an error if S has a different parent than T. -### [Template_CopyAction](./Hierarchy.xml#L381:~:text= -### [TopLevels](./Hierarchy.xml#L283:~:text= @@ -91,7 +91,7 @@ Parameter|Type|Description The properties in this complex type contain information about - an entry in the result set of a request with multiple aggregation levels, some which are expanded. + an entry in the result set of a request with multiple aggregation levels, some of which are expanded. These properties also serve in the derived [`RecursiveHierarchyType`](#RecursiveHierarchyType) with their definitions rephrased in the concept of recursive hierarchies. @@ -157,7 +157,7 @@ Property|Type|Description [MatchedDescendantCount](./Hierarchy.xml#L189:~:text= -## [RecursiveHierarchyActionsType](./Hierarchy.xml#L207:~:text= -## [TopLevelsExpandType](./Hierarchy.xml#L326:~:text= The properties in this complex type contain information about - an entry in the result set of a request with multiple aggregation levels, some which are expanded. + an entry in the result set of a request with multiple aggregation levels, some of which are expanded. These properties also serve in the derived [`RecursiveHierarchyType`](#RecursiveHierarchyType) with their definitions rephrased in the concept of recursive hierarchies. @@ -205,6 +205,7 @@ annotated with the `RecursiveHierarchy` annotation. The qualified name of the su
+ The qualified action names identify actions for maintaining nodes in the recursive hierarchy, which are specific for the given annotation qualifier. From e390b0cd15694c005fb65830d650915ed37f499e Mon Sep 17 00:00:00 2001 From: D024504 Date: Mon, 29 Apr 2024 08:06:15 +0200 Subject: [PATCH 18/32] @uhlmannm's comments --- vocabularies/Analytics.json | 8 +----- vocabularies/Analytics.md | 51 +++++++++++++++++++------------------ vocabularies/Analytics.xml | 21 ++++++--------- 3 files changed, 35 insertions(+), 45 deletions(-) diff --git a/vocabularies/Analytics.json b/vocabularies/Analytics.json index fb9380bea..2c0bd78ea 100644 --- a/vocabularies/Analytics.json +++ b/vocabularies/Analytics.json @@ -172,7 +172,7 @@ "$IsBound": true, "@Common.Experimental": true, "@Core.Description": "`$apply` transformation that expands an unnamed leveled hierarchy with custom aggregation of certain properties", - "@Core.LongDescription": "Example transformation sequence:\n```\n$apply=filter(Industry eq 'IT')\n/groupby((Country,CountryName,Region,RegionName),\n filter($these/aggregate(Amount) gt 0 and\n $these/aggregate(Currency) ne null))\n/concat(\n Analytics.AutoExpand(\n Levels=[{\"P\":[\"Country\",\"CountryName\"]},\n {\"P\":[\"Region\",\"RegionName\"]}],\n LeafLevel=[\"Segment\",\"Industry\"],\n Aggregation=[\"Amount\",\"Currency\"],\n SiblingOrder=[{\"Property\":\"Amount\",\n \"Order\":\"desc\"}],\n ExpandLevels=[{\"Entry\":[\"US\",\"USA\"],\"Levels\":0},\n {\"Entry\":[\"DE\",\"Germany\",\"BW\",\"Baden-Württemberg\"],\"Levels\":2}])\n /concat(aggregate($count) as ResultEntriesCount,\n skip(20)/top(10)),\n aggregate(Amount,Currency))\n```\n", + "@Core.LongDescription": "Example transformation sequence:\n```\n$apply=filter(Industry in ['IT','AI'])\n/groupby((Country,CountryName,Region,RegionName,Segment,Industry),\n filter($these/aggregate(Amount) gt 0 and\n $these/aggregate(Currency) ne null))\n/concat(\n groupby((Country,CountryName,Region,RegionName,Segment,Industry),\n aggregate($count) as LeavesCount),\n aggregate(Amount,Currency),\n Analytics.AutoExpand(\n Levels=[{\"P\":[\"Country\",\"CountryName\"]},\n {\"P\":[\"Region\",\"RegionName\"]},\n {\"P\":[\"Segment\",\"Industry\"]}],\n Aggregation=[\"Amount\",\"Currency\"],\n SiblingOrder=[{\"Property\":\"Amount\",\n \"Order\":\"desc\"}],\n ExpandLevels=[{\"Entry\":[\"US\",\"USA\"],\"Levels\":0},\n {\"Entry\":[\"DE\",\"Germany\",\"BW\",\"Baden-Württemberg\"],\"Levels\":2}])\n /concat(aggregate($count) as ResultEntriesCount,\n skip(20)/top(10)))\n```\n", "$Parameter": [ { "$Name": "InputSet", @@ -187,12 +187,6 @@ "@Core.Description": "Collection of aggregation levels forming the visible part of a leveled hierarchy", "@Core.LongDescription": "Each element in the collection defines the properties that constitute one level.\n A property must not referenced by more than one level.\n The first element in the collection defines the property names of the coarsest level,\n the following elements define the property names of consecutively finer-grained aggregation levels.\n The function result comprises the leveled hierarchy with these levels in preorder.\n All referenced properties must be groupable." }, - { - "$Name": "LeafLevel", - "$Collection": true, - "@Core.Description": "A possibly empty set of property names that constitute, together with the property names from `Levels`, the leaf level of the leveled hierarchy", - "@Core.LongDescription": "Property names that occur in `Levels` must not be repeated here.\n All referenced properties must be groupable." - }, { "$Name": "Aggregation", "$Collection": true, diff --git a/vocabularies/Analytics.md b/vocabularies/Analytics.md index 8bce7ac37..54ad10ff1 100644 --- a/vocabularies/Analytics.md +++ b/vocabularies/Analytics.md @@ -17,7 +17,7 @@ Term|Type|Description [AggregatedProperties](./Analytics.xml#L106:~:text=Deprecated in favor of [`AggregatedProperty`](#AggregatedProperty) [AggregatedProperty](./Analytics.xml#L124:~:text=Dynamic property for aggregate expression with specified aggregation method defined on the annotated entity type. [AnalyticalContext](./Analytics.xml#L144:~:text=Collection of properties that define an analytical context -[LevelInformation](./Analytics.xml#L289:~:text=Information about grouping levels in the result set of a request including the [`AutoExpand`](#AutoExpand) transformation +[LevelInformation](./Analytics.xml#L284:~:text=Information about grouping levels in the result set of a request including the [`AutoExpand`](#AutoExpand) transformation ## Functions @@ -29,35 +29,36 @@ Term|Type|Description Example transformation sequence: ``` -$apply=filter(Industry eq 'IT') -/groupby((Country,CountryName,Region,RegionName), +$apply=filter(Industry in ['IT','AI']) +/groupby((Country,CountryName,Region,RegionName,Segment,Industry), filter($these/aggregate(Amount) gt 0 and $these/aggregate(Currency) ne null)) /concat( + groupby((Country,CountryName,Region,RegionName,Segment,Industry), + aggregate($count) as LeavesCount), + aggregate(Amount,Currency), Analytics.AutoExpand( Levels=[{"P":["Country","CountryName"]}, - {"P":["Region","RegionName"]}], - LeafLevel=["Segment","Industry"], + {"P":["Region","RegionName"]}, + {"P":["Segment","Industry"]}], Aggregation=["Amount","Currency"], SiblingOrder=[{"Property":"Amount", "Order":"desc"}], ExpandLevels=[{"Entry":["US","USA"],"Levels":0}, {"Entry":["DE","Germany","BW","Baden-Württemberg"],"Levels":2}]) /concat(aggregate($count) as ResultEntriesCount, - skip(20)/top(10)), - aggregate(Amount,Currency)) + skip(20)/top(10))) ``` Parameter|Type|Description :--------|:---|:---------- -**[InputSet](./Analytics.xml#L208:~:text=Each element in the collection defines the properties that constitute one level. A property must not referenced by more than one level. The first element in the collection defines the property names of the coarsest level, the following elements define the property names of consecutively finer-grained aggregation levels. The function result comprises the leveled hierarchy with these levels in preorder. All referenced properties must be groupable. -[LeafLevel](./Analytics.xml#L222:~:text=Property names that occur in `Levels` must not be repeated here. All referenced properties must be groupable. -[Aggregation](./Analytics.xml#L229:~:text=All properties in this collection must be custom aggregates. -[SiblingOrder](./Analytics.xml#L235:~:text=Each element in the collection defines the properties that constitute one level. A property must not referenced by more than one level. The first element in the collection defines the property names of the coarsest level, the following elements define the property names of consecutively finer-grained aggregation levels. The function result comprises the leveled hierarchy with these levels in preorder. All referenced properties must be groupable. +[Aggregation](./Analytics.xml#L224:~:text=All properties in this collection must be custom aggregates. +[SiblingOrder](./Analytics.xml#L230:~:text= @@ -87,38 +88,38 @@ Property|Type|Description [AccumulativeMeasure](./Analytics.xml#L168:~:text= -## [AutoExpandLevel](./Analytics.xml#L248:~:text= -## [AutoExpandSiblingOrder](./Analytics.xml#L254:~:text= -## [SortOrderType](./Analytics.xml#L263:~:text= -## [AutoExpandLevelType](./Analytics.xml#L278:~:text= Example transformation sequence: ``` -$apply=filter(Industry eq 'IT') -/groupby((Country,CountryName,Region,RegionName), +$apply=filter(Industry in ['IT','AI']) +/groupby((Country,CountryName,Region,RegionName,Segment,Industry), filter($these/aggregate(Amount) gt 0 and $these/aggregate(Currency) ne null)) /concat( + groupby((Country,CountryName,Region,RegionName,Segment,Industry), + aggregate($count) as LeavesCount), + aggregate(Amount,Currency), Analytics.AutoExpand( Levels=[{"P":["Country","CountryName"]}, - {"P":["Region","RegionName"]}], - LeafLevel=["Segment","Industry"], + {"P":["Region","RegionName"]}, + {"P":["Segment","Industry"]}], Aggregation=["Amount","Currency"], SiblingOrder=[{"Property":"Amount", "Order":"desc"}], ExpandLevels=[{"Entry":["US","USA"],"Levels":0}, {"Entry":["DE","Germany","BW","Baden-Württemberg"],"Levels":2}]) /concat(aggregate($count) as ResultEntriesCount, - skip(20)/top(10)), - aggregate(Amount,Currency)) + skip(20)/top(10))) ``` @@ -219,13 +221,6 @@ $apply=filter(Industry eq 'IT') All referenced properties must be groupable.
- - - - Property names that occur in `Levels` must not be repeated here. - All referenced properties must be groupable. - - From b9ecf4fe7eeaec9bfe9bd75bdc1823eb01bb8478 Mon Sep 17 00:00:00 2001 From: D024504 Date: Mon, 29 Apr 2024 09:24:31 +0200 Subject: [PATCH 19/32] explained example --- vocabularies/Analytics.json | 2 +- vocabularies/Analytics.md | 39 ++++++++++++++++++++----------------- vocabularies/Analytics.xml | 3 +++ 3 files changed, 25 insertions(+), 19 deletions(-) diff --git a/vocabularies/Analytics.json b/vocabularies/Analytics.json index 2c0bd78ea..921319471 100644 --- a/vocabularies/Analytics.json +++ b/vocabularies/Analytics.json @@ -172,7 +172,7 @@ "$IsBound": true, "@Common.Experimental": true, "@Core.Description": "`$apply` transformation that expands an unnamed leveled hierarchy with custom aggregation of certain properties", - "@Core.LongDescription": "Example transformation sequence:\n```\n$apply=filter(Industry in ['IT','AI'])\n/groupby((Country,CountryName,Region,RegionName,Segment,Industry),\n filter($these/aggregate(Amount) gt 0 and\n $these/aggregate(Currency) ne null))\n/concat(\n groupby((Country,CountryName,Region,RegionName,Segment,Industry),\n aggregate($count) as LeavesCount),\n aggregate(Amount,Currency),\n Analytics.AutoExpand(\n Levels=[{\"P\":[\"Country\",\"CountryName\"]},\n {\"P\":[\"Region\",\"RegionName\"]},\n {\"P\":[\"Segment\",\"Industry\"]}],\n Aggregation=[\"Amount\",\"Currency\"],\n SiblingOrder=[{\"Property\":\"Amount\",\n \"Order\":\"desc\"}],\n ExpandLevels=[{\"Entry\":[\"US\",\"USA\"],\"Levels\":0},\n {\"Entry\":[\"DE\",\"Germany\",\"BW\",\"Baden-Württemberg\"],\"Levels\":2}])\n /concat(aggregate($count) as ResultEntriesCount,\n skip(20)/top(10)))\n```\n", + "@Core.LongDescription": "Example transformation sequence:\nfilter on columns `Industry`, `Amount` and `Currency`,\norder by `Amount` descending,\nmanually changed expansion state of two nodes\n```\n$apply=filter(Industry in ['IT','AI'])\n/groupby((Country,CountryName,Region,RegionName,Segment,Industry),\n filter($these/aggregate(Amount) gt 0 and\n $these/aggregate(Currency) ne null))\n/concat(\n groupby((Country,CountryName,Region,RegionName,Segment,Industry),\n aggregate($count) as LeavesCount),\n aggregate(Amount,Currency),\n Analytics.AutoExpand(\n Levels=[{\"P\":[\"Country\",\"CountryName\"]},\n {\"P\":[\"Region\",\"RegionName\"]},\n {\"P\":[\"Segment\",\"Industry\"]}],\n Aggregation=[\"Amount\",\"Currency\"],\n SiblingOrder=[{\"Property\":\"Amount\",\n \"Order\":\"desc\"}],\n ExpandLevels=[{\"Entry\":[\"US\",\"USA\"],\"Levels\":0},\n {\"Entry\":[\"DE\",\"Germany\",\"BW\",\"Baden-Württemberg\"],\"Levels\":2}])\n /concat(aggregate($count) as ResultEntriesCount,\n skip(20)/top(10)))\n```\n", "$Parameter": [ { "$Name": "InputSet", diff --git a/vocabularies/Analytics.md b/vocabularies/Analytics.md index 54ad10ff1..9674dfa3d 100644 --- a/vocabularies/Analytics.md +++ b/vocabularies/Analytics.md @@ -17,7 +17,7 @@ Term|Type|Description [AggregatedProperties](./Analytics.xml#L106:~:text=Deprecated in favor of [`AggregatedProperty`](#AggregatedProperty) [AggregatedProperty](./Analytics.xml#L124:~:text=Dynamic property for aggregate expression with specified aggregation method defined on the annotated entity type. [AnalyticalContext](./Analytics.xml#L144:~:text=Collection of properties that define an analytical context -[LevelInformation](./Analytics.xml#L284:~:text=Information about grouping levels in the result set of a request including the [`AutoExpand`](#AutoExpand) transformation +[LevelInformation](./Analytics.xml#L287:~:text=Information about grouping levels in the result set of a request including the [`AutoExpand`](#AutoExpand) transformation ## Functions @@ -28,6 +28,9 @@ Term|Type|Description `$apply` transformation that expands an unnamed leveled hierarchy with custom aggregation of certain properties Example transformation sequence: +filter on columns `Industry`, `Amount` and `Currency`, +order by `Amount` descending, +manually changed expansion state of two nodes ``` $apply=filter(Industry in ['IT','AI']) /groupby((Country,CountryName,Region,RegionName,Segment,Industry), @@ -53,12 +56,12 @@ $apply=filter(Industry in ['IT','AI']) Parameter|Type|Description :--------|:---|:---------- -**[InputSet](./Analytics.xml#L210:~:text=Each element in the collection defines the properties that constitute one level. A property must not referenced by more than one level. The first element in the collection defines the property names of the coarsest level, the following elements define the property names of consecutively finer-grained aggregation levels. The function result comprises the leveled hierarchy with these levels in preorder. All referenced properties must be groupable. -[Aggregation](./Analytics.xml#L224:~:text=All properties in this collection must be custom aggregates. -[SiblingOrder](./Analytics.xml#L230:~:text=Each element in the collection defines the properties that constitute one level. A property must not referenced by more than one level. The first element in the collection defines the property names of the coarsest level, the following elements define the property names of consecutively finer-grained aggregation levels. The function result comprises the leveled hierarchy with these levels in preorder. All referenced properties must be groupable. +[Aggregation](./Analytics.xml#L227:~:text=All properties in this collection must be custom aggregates. +[SiblingOrder](./Analytics.xml#L233:~:text= @@ -88,38 +91,38 @@ Property|Type|Description [AccumulativeMeasure](./Analytics.xml#L168:~:text= -## [AutoExpandLevel](./Analytics.xml#L243:~:text= -## [AutoExpandSiblingOrder](./Analytics.xml#L249:~:text= -## [SortOrderType](./Analytics.xml#L258:~:text= -## [AutoExpandLevelType](./Analytics.xml#L273:~:text= Example transformation sequence: +filter on columns `Industry`, `Amount` and `Currency`, +order by `Amount` descending, +manually changed expansion state of two nodes ``` $apply=filter(Industry in ['IT','AI']) /groupby((Country,CountryName,Region,RegionName,Segment,Industry), From b58713753b15e317b8c9ce64c7a99af2a5a6d086 Mon Sep 17 00:00:00 2001 From: D024504 Date: Mon, 29 Apr 2024 13:20:48 +0200 Subject: [PATCH 20/32] expand N levels --- vocabularies/Analytics.json | 16 +++++++++++--- vocabularies/Analytics.md | 44 +++++++++++++++++++------------------ vocabularies/Analytics.xml | 21 ++++++++++++------ 3 files changed, 50 insertions(+), 31 deletions(-) diff --git a/vocabularies/Analytics.json b/vocabularies/Analytics.json index 921319471..3ce7a572e 100644 --- a/vocabularies/Analytics.json +++ b/vocabularies/Analytics.json @@ -172,7 +172,7 @@ "$IsBound": true, "@Common.Experimental": true, "@Core.Description": "`$apply` transformation that expands an unnamed leveled hierarchy with custom aggregation of certain properties", - "@Core.LongDescription": "Example transformation sequence:\nfilter on columns `Industry`, `Amount` and `Currency`,\norder by `Amount` descending,\nmanually changed expansion state of two nodes\n```\n$apply=filter(Industry in ['IT','AI'])\n/groupby((Country,CountryName,Region,RegionName,Segment,Industry),\n filter($these/aggregate(Amount) gt 0 and\n $these/aggregate(Currency) ne null))\n/concat(\n groupby((Country,CountryName,Region,RegionName,Segment,Industry),\n aggregate($count) as LeavesCount),\n aggregate(Amount,Currency),\n Analytics.AutoExpand(\n Levels=[{\"P\":[\"Country\",\"CountryName\"]},\n {\"P\":[\"Region\",\"RegionName\"]},\n {\"P\":[\"Segment\",\"Industry\"]}],\n Aggregation=[\"Amount\",\"Currency\"],\n SiblingOrder=[{\"Property\":\"Amount\",\n \"Order\":\"desc\"}],\n ExpandLevels=[{\"Entry\":[\"US\",\"USA\"],\"Levels\":0},\n {\"Entry\":[\"DE\",\"Germany\",\"BW\",\"Baden-Württemberg\"],\"Levels\":2}])\n /concat(aggregate($count) as ResultEntriesCount,\n skip(20)/top(10)))\n```\n", + "@Core.LongDescription": "Example transformation sequence:\nfilter on columns `Industry`, `Amount` and `Currency`,\norder by `Amount` descending,\nexpand 2 levels, with two exceptions\n```\n$apply=filter(Industry in ['IT','AI'])\n/groupby((Country,CountryName,Region,RegionName,Segment,Industry),\n filter($these/aggregate(Amount) gt 0 and\n $these/aggregate(Currency) ne null))\n/concat(\n groupby((Country,CountryName,Region,RegionName,Segment,Industry),\n aggregate($count) as LeavesCount),\n aggregate(Amount,Currency),\n Analytics.AutoExpand(\n Levels=[{\"P\":[\"Country\",\"CountryName\"]},\n {\"P\":[\"Region\",\"RegionName\"]},\n {\"P\":[\"Segment\",\"Industry\"]}],\n Aggregation=[\"Amount\",\"Currency\"],\n SiblingOrder=[{\"Property\":\"Amount\",\n \"Order\":\"desc\"}],\n ExpandLevels=2,\n ExpandEntries=[{\"Entry\":[\"US\",\"USA\"],\"Levels\":0},\n {\"Entry\":[\"DE\",\"Germany\",\"BW\",\"Baden-Württemberg\"],\"Levels\":1}])\n /concat(aggregate($count) as ResultEntriesCount,\n skip(20)/top(10)))\n```\n", "$Parameter": [ { "$Name": "InputSet", @@ -201,9 +201,15 @@ }, { "$Name": "ExpandLevels", + "$Type": "Edm.Int64", + "@Core.Description": "Number of levels to be expanded (absent means all levels)", + "@Core.OptionalParameter": {} + }, + { + "$Name": "ExpandEntries", "$Collection": true, "$Type": "Analytics.AutoExpandLevelType", - "@Core.Description": "Entries to be specially (not fully) expanded", + "@Core.Description": "Entries with exceptional expansion", "@Core.OptionalParameter": {} } ], @@ -246,7 +252,11 @@ "$Collection": true, "@Core.Description": "An entry on a given [level](#AutoExpandLevel) is identified by a collection of values for the properties that constitute all levels up to the given one" }, - "Levels": { "$Type": "Edm.Int64", "@Core.Description": "Number of levels to be expanded, 0 means collapsed" } + "Levels": { + "$Type": "Edm.Int64", + "$Nullable": true, + "@Core.Description": "Number of levels to be expanded, null means all levels, 0 means collapsed" + } }, "LevelInformation": { "$Kind": "Term", diff --git a/vocabularies/Analytics.md b/vocabularies/Analytics.md index 9674dfa3d..157406694 100644 --- a/vocabularies/Analytics.md +++ b/vocabularies/Analytics.md @@ -17,7 +17,7 @@ Term|Type|Description [AggregatedProperties](./Analytics.xml#L106:~:text=Deprecated in favor of [`AggregatedProperty`](#AggregatedProperty) [AggregatedProperty](./Analytics.xml#L124:~:text=Dynamic property for aggregate expression with specified aggregation method defined on the annotated entity type. [AnalyticalContext](./Analytics.xml#L144:~:text=Collection of properties that define an analytical context -[LevelInformation](./Analytics.xml#L287:~:text=Information about grouping levels in the result set of a request including the [`AutoExpand`](#AutoExpand) transformation +[LevelInformation](./Analytics.xml#L294:~:text=Information about grouping levels in the result set of a request including the [`AutoExpand`](#AutoExpand) transformation ## Functions @@ -30,7 +30,7 @@ Term|Type|Description Example transformation sequence: filter on columns `Industry`, `Amount` and `Currency`, order by `Amount` descending, -manually changed expansion state of two nodes +expand 2 levels, with two exceptions ``` $apply=filter(Industry in ['IT','AI']) /groupby((Country,CountryName,Region,RegionName,Segment,Industry), @@ -47,8 +47,9 @@ $apply=filter(Industry in ['IT','AI']) Aggregation=["Amount","Currency"], SiblingOrder=[{"Property":"Amount", "Order":"desc"}], - ExpandLevels=[{"Entry":["US","USA"],"Levels":0}, - {"Entry":["DE","Germany","BW","Baden-Württemberg"],"Levels":2}]) + ExpandLevels=2, + ExpandEntries=[{"Entry":["US","USA"],"Levels":0}, + {"Entry":["DE","Germany","BW","Baden-Württemberg"],"Levels":1}]) /concat(aggregate($count) as ResultEntriesCount, skip(20)/top(10))) ``` @@ -56,12 +57,13 @@ $apply=filter(Industry in ['IT','AI']) Parameter|Type|Description :--------|:---|:---------- -**[InputSet](./Analytics.xml#L213:~:text=Each element in the collection defines the properties that constitute one level. A property must not referenced by more than one level. The first element in the collection defines the property names of the coarsest level, the following elements define the property names of consecutively finer-grained aggregation levels. The function result comprises the leveled hierarchy with these levels in preorder. All referenced properties must be groupable. -[Aggregation](./Analytics.xml#L227:~:text=All properties in this collection must be custom aggregates. -[SiblingOrder](./Analytics.xml#L233:~:text=Each element in the collection defines the properties that constitute one level. A property must not referenced by more than one level. The first element in the collection defines the property names of the coarsest level, the following elements define the property names of consecutively finer-grained aggregation levels. The function result comprises the leveled hierarchy with these levels in preorder. All referenced properties must be groupable. +[Aggregation](./Analytics.xml#L228:~:text=All properties in this collection must be custom aggregates. +[SiblingOrder](./Analytics.xml#L234:~:text= @@ -91,38 +93,38 @@ Property|Type|Description [AccumulativeMeasure](./Analytics.xml#L168:~:text= -## [AutoExpandLevel](./Analytics.xml#L246:~:text= -## [AutoExpandSiblingOrder](./Analytics.xml#L252:~:text= -## [SortOrderType](./Analytics.xml#L261:~:text= -## [AutoExpandLevelType](./Analytics.xml#L276:~:text=Example transformation sequence: filter on columns `Industry`, `Amount` and `Currency`, order by `Amount` descending, -manually changed expansion state of two nodes +expand 2 levels, with two exceptions ``` $apply=filter(Industry in ['IT','AI']) /groupby((Country,CountryName,Region,RegionName,Segment,Industry), @@ -203,8 +203,9 @@ $apply=filter(Industry in ['IT','AI']) Aggregation=["Amount","Currency"], SiblingOrder=[{"Property":"Amount", "Order":"desc"}], - ExpandLevels=[{"Entry":["US","USA"],"Levels":0}, - {"Entry":["DE","Germany","BW","Baden-Württemberg"],"Levels":2}]) + ExpandLevels=2, + ExpandEntries=[{"Entry":["US","USA"],"Levels":0}, + {"Entry":["DE","Germany","BW","Baden-Württemberg"],"Levels":1}]) /concat(aggregate($count) as ResultEntriesCount, skip(20)/top(10))) ``` @@ -233,8 +234,14 @@ $apply=filter(Industry in ['IT','AI']) - - + + + + + + + + @@ -279,8 +286,8 @@ $apply=filter(Industry in ['IT','AI']) - - + + From ae774a6626922e48b7bba4d7fc411d5a089294b7 Mon Sep 17 00:00:00 2001 From: D024504 Date: Mon, 29 Apr 2024 13:36:41 +0200 Subject: [PATCH 21/32] renamed type --- vocabularies/Analytics.json | 4 ++-- vocabularies/Analytics.md | 10 +++++----- vocabularies/Analytics.xml | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/vocabularies/Analytics.json b/vocabularies/Analytics.json index 3ce7a572e..42a150c7f 100644 --- a/vocabularies/Analytics.json +++ b/vocabularies/Analytics.json @@ -208,7 +208,7 @@ { "$Name": "ExpandEntries", "$Collection": true, - "$Type": "Analytics.AutoExpandLevelType", + "$Type": "Analytics.AutoExpandEntryType", "@Core.Description": "Entries with exceptional expansion", "@Core.OptionalParameter": {} } @@ -244,7 +244,7 @@ { "Value": "desc", "@Core.Description": "Sort in descending order" } ] }, - "AutoExpandLevelType": { + "AutoExpandEntryType": { "$Kind": "ComplexType", "@Common.Experimental": true, "@Core.Description": "Information about entries in a leveled hierarchy that are not completely expanded", diff --git a/vocabularies/Analytics.md b/vocabularies/Analytics.md index 157406694..f406c0801 100644 --- a/vocabularies/Analytics.md +++ b/vocabularies/Analytics.md @@ -62,7 +62,7 @@ Parameter|Type|Description [Aggregation](./Analytics.xml#L228:~:text=All properties in this collection must be custom aggregates. [SiblingOrder](./Analytics.xml#L234:~:text= -## [AutoExpandLevelType](./Analytics.xml#L283:~:text= +## [AutoExpandEntryType](./Analytics.xml#L283:~:text= - + @@ -280,7 +280,7 @@ $apply=filter(Industry in ['IT','AI']) - + From 3cb508264b9597d762228aeb7c53dece899118fe Mon Sep 17 00:00:00 2001 From: D024504 Date: Mon, 29 Apr 2024 13:46:57 +0200 Subject: [PATCH 22/32] typo --- vocabularies/Analytics.json | 6 +++--- vocabularies/Analytics.md | 12 ++++++------ vocabularies/Analytics.xml | 6 +++--- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/vocabularies/Analytics.json b/vocabularies/Analytics.json index 42a150c7f..3332f54c6 100644 --- a/vocabularies/Analytics.json +++ b/vocabularies/Analytics.json @@ -208,7 +208,7 @@ { "$Name": "ExpandEntries", "$Collection": true, - "$Type": "Analytics.AutoExpandEntryType", + "$Type": "Analytics.AutoExpandEntry", "@Core.Description": "Entries with exceptional expansion", "@Core.OptionalParameter": {} } @@ -244,10 +244,10 @@ { "Value": "desc", "@Core.Description": "Sort in descending order" } ] }, - "AutoExpandEntryType": { + "AutoExpandEntry": { "$Kind": "ComplexType", "@Common.Experimental": true, - "@Core.Description": "Information about entries in a leveled hierarchy that are not completely expanded", + "@Core.Description": "Expansion state of an entry in a leveled hierarchy", "Entry": { "$Collection": true, "@Core.Description": "An entry on a given [level](#AutoExpandLevel) is identified by a collection of values for the properties that constitute all levels up to the given one" diff --git a/vocabularies/Analytics.md b/vocabularies/Analytics.md index f406c0801..3fb581f25 100644 --- a/vocabularies/Analytics.md +++ b/vocabularies/Analytics.md @@ -62,7 +62,7 @@ Parameter|Type|Description [Aggregation](./Analytics.xml#L228:~:text=All properties in this collection must be custom aggregates. [SiblingOrder](./Analytics.xml#L234:~:text= -## [AutoExpandEntryType](./Analytics.xml#L283:~:text= +## [AutoExpandEntry](./Analytics.xml#L283:~:text= - + @@ -280,9 +280,9 @@ $apply=filter(Industry in ['IT','AI']) - + - + From c9bbadf35f5738e74e87b9292274bb932fd7df47 Mon Sep 17 00:00:00 2001 From: D024504 Date: Mon, 29 Apr 2024 13:54:30 +0200 Subject: [PATCH 23/32] more links --- vocabularies/Analytics.json | 8 ++++++-- vocabularies/Analytics.md | 24 ++++++++++++------------ vocabularies/Analytics.xml | 5 +++-- 3 files changed, 21 insertions(+), 16 deletions(-) diff --git a/vocabularies/Analytics.json b/vocabularies/Analytics.json index 3332f54c6..cdbe16473 100644 --- a/vocabularies/Analytics.json +++ b/vocabularies/Analytics.json @@ -223,11 +223,15 @@ "AutoExpandLevel": { "$Kind": "ComplexType", "@Common.Experimental": true, - "P": { "$Collection": true, "@Core.Description": "A non-empty set of property names constituting a level" } + "P": { + "$Collection": true, + "@Core.Description": "A non-empty set of property names constituting a level in an [unnamed leveled hierarchy](#AutoExpand)" + } }, "AutoExpandSiblingOrder": { "$Kind": "ComplexType", "@Common.Experimental": true, + "@Core.Description": "Sibling order in an [unnamed leveled hierarchy](#AutoExpand)", "Property": { "@Core.Description": "Property by which to sort" }, "Order": { "$Type": "Analytics.SortOrderType", @@ -247,7 +251,7 @@ "AutoExpandEntry": { "$Kind": "ComplexType", "@Common.Experimental": true, - "@Core.Description": "Expansion state of an entry in a leveled hierarchy", + "@Core.Description": "Expansion state of an entry in an [unnamed leveled hierarchy](#AutoExpand)", "Entry": { "$Collection": true, "@Core.Description": "An entry on a given [level](#AutoExpandLevel) is identified by a collection of values for the properties that constitute all levels up to the given one" diff --git a/vocabularies/Analytics.md b/vocabularies/Analytics.md index 3fb581f25..34c7f8713 100644 --- a/vocabularies/Analytics.md +++ b/vocabularies/Analytics.md @@ -17,7 +17,7 @@ Term|Type|Description [AggregatedProperties](./Analytics.xml#L106:~:text=Deprecated in favor of [`AggregatedProperty`](#AggregatedProperty) [AggregatedProperty](./Analytics.xml#L124:~:text=Dynamic property for aggregate expression with specified aggregation method defined on the annotated entity type. [AnalyticalContext](./Analytics.xml#L144:~:text=Collection of properties that define an analytical context -[LevelInformation](./Analytics.xml#L294:~:text=Information about grouping levels in the result set of a request including the [`AutoExpand`](#AutoExpand) transformation +[LevelInformation](./Analytics.xml#L295:~:text=Information about grouping levels in the result set of a request including the [`AutoExpand`](#AutoExpand) transformation ## Functions @@ -98,33 +98,33 @@ Property|Type|Description Property|Type|Description :-------|:---|:---------- -[P](./Analytics.xml#L255:~:text= ## [AutoExpandSiblingOrder](./Analytics.xml#L259:~:text= -## [SortOrderType](./Analytics.xml#L268:~:text= -## [AutoExpandEntry](./Analytics.xml#L283:~:text= - + + @@ -282,7 +283,7 @@ $apply=filter(Industry in ['IT','AI']) - + From 3e6379aa05f1ec3519318549c3c20a6be93df1c7 Mon Sep 17 00:00:00 2001 From: D024504 Date: Mon, 29 Apr 2024 14:08:46 +0200 Subject: [PATCH 24/32] corrected LeavesCount, ResultEntriesCount --- vocabularies/Analytics.json | 2 +- vocabularies/Analytics.md | 6 +++--- vocabularies/Analytics.xml | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/vocabularies/Analytics.json b/vocabularies/Analytics.json index cdbe16473..b85781049 100644 --- a/vocabularies/Analytics.json +++ b/vocabularies/Analytics.json @@ -172,7 +172,7 @@ "$IsBound": true, "@Common.Experimental": true, "@Core.Description": "`$apply` transformation that expands an unnamed leveled hierarchy with custom aggregation of certain properties", - "@Core.LongDescription": "Example transformation sequence:\nfilter on columns `Industry`, `Amount` and `Currency`,\norder by `Amount` descending,\nexpand 2 levels, with two exceptions\n```\n$apply=filter(Industry in ['IT','AI'])\n/groupby((Country,CountryName,Region,RegionName,Segment,Industry),\n filter($these/aggregate(Amount) gt 0 and\n $these/aggregate(Currency) ne null))\n/concat(\n groupby((Country,CountryName,Region,RegionName,Segment,Industry),\n aggregate($count) as LeavesCount),\n aggregate(Amount,Currency),\n Analytics.AutoExpand(\n Levels=[{\"P\":[\"Country\",\"CountryName\"]},\n {\"P\":[\"Region\",\"RegionName\"]},\n {\"P\":[\"Segment\",\"Industry\"]}],\n Aggregation=[\"Amount\",\"Currency\"],\n SiblingOrder=[{\"Property\":\"Amount\",\n \"Order\":\"desc\"}],\n ExpandLevels=2,\n ExpandEntries=[{\"Entry\":[\"US\",\"USA\"],\"Levels\":0},\n {\"Entry\":[\"DE\",\"Germany\",\"BW\",\"Baden-Württemberg\"],\"Levels\":1}])\n /concat(aggregate($count) as ResultEntriesCount,\n skip(20)/top(10)))\n```\n", + "@Core.LongDescription": "Example transformation sequence:\nfilter on columns `Industry`, `Amount` and `Currency`,\norder by `Amount` descending,\nexpand 2 levels, with two exceptions\n```\n$apply=filter(Industry in ['IT','AI'])\n/groupby((Country,CountryName,Region,RegionName,Segment,Industry),\n filter($these/aggregate(Amount) gt 0 and\n $these/aggregate(Currency) ne null))\n/concat(\n groupby((Country,CountryName,Region,RegionName,Segment,Industry))\n /aggregate($count as LeavesCount),\n aggregate(Amount,Currency),\n Analytics.AutoExpand(\n Levels=[{\"P\":[\"Country\",\"CountryName\"]},\n {\"P\":[\"Region\",\"RegionName\"]},\n {\"P\":[\"Segment\",\"Industry\"]}],\n Aggregation=[\"Amount\",\"Currency\"],\n SiblingOrder=[{\"Property\":\"Amount\",\n \"Order\":\"desc\"}],\n ExpandLevels=2,\n ExpandEntries=[{\"Entry\":[\"US\",\"USA\"],\"Levels\":0},\n {\"Entry\":[\"DE\",\"Germany\",\"BW\",\"Baden-Württemberg\"],\"Levels\":1}])\n /concat(aggregate($count as ResultEntriesCount),\n skip(20)/top(10)))\n```\n", "$Parameter": [ { "$Name": "InputSet", diff --git a/vocabularies/Analytics.md b/vocabularies/Analytics.md index 34c7f8713..4de65b4f4 100644 --- a/vocabularies/Analytics.md +++ b/vocabularies/Analytics.md @@ -37,8 +37,8 @@ $apply=filter(Industry in ['IT','AI']) filter($these/aggregate(Amount) gt 0 and $these/aggregate(Currency) ne null)) /concat( - groupby((Country,CountryName,Region,RegionName,Segment,Industry), - aggregate($count) as LeavesCount), + groupby((Country,CountryName,Region,RegionName,Segment,Industry)) + /aggregate($count as LeavesCount), aggregate(Amount,Currency), Analytics.AutoExpand( Levels=[{"P":["Country","CountryName"]}, @@ -50,7 +50,7 @@ $apply=filter(Industry in ['IT','AI']) ExpandLevels=2, ExpandEntries=[{"Entry":["US","USA"],"Levels":0}, {"Entry":["DE","Germany","BW","Baden-Württemberg"],"Levels":1}]) - /concat(aggregate($count) as ResultEntriesCount, + /concat(aggregate($count as ResultEntriesCount), skip(20)/top(10))) ``` diff --git a/vocabularies/Analytics.xml b/vocabularies/Analytics.xml index 5030355a1..41ce93a4c 100644 --- a/vocabularies/Analytics.xml +++ b/vocabularies/Analytics.xml @@ -193,8 +193,8 @@ $apply=filter(Industry in ['IT','AI']) filter($these/aggregate(Amount) gt 0 and $these/aggregate(Currency) ne null)) /concat( - groupby((Country,CountryName,Region,RegionName,Segment,Industry), - aggregate($count) as LeavesCount), + groupby((Country,CountryName,Region,RegionName,Segment,Industry)) + /aggregate($count as LeavesCount), aggregate(Amount,Currency), Analytics.AutoExpand( Levels=[{"P":["Country","CountryName"]}, @@ -206,7 +206,7 @@ $apply=filter(Industry in ['IT','AI']) ExpandLevels=2, ExpandEntries=[{"Entry":["US","USA"],"Levels":0}, {"Entry":["DE","Germany","BW","Baden-Württemberg"],"Levels":1}]) - /concat(aggregate($count) as ResultEntriesCount, + /concat(aggregate($count as ResultEntriesCount), skip(20)/top(10))) ``` From f98c9991c99249a82af31f4f0aa4d32ce3fcfc10 Mon Sep 17 00:00:00 2001 From: D024504 Date: Mon, 29 Apr 2024 14:15:51 +0200 Subject: [PATCH 25/32] example formatting --- vocabularies/Analytics.json | 2 +- vocabularies/Analytics.md | 6 +++--- vocabularies/Analytics.xml | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/vocabularies/Analytics.json b/vocabularies/Analytics.json index b85781049..19a3a00ec 100644 --- a/vocabularies/Analytics.json +++ b/vocabularies/Analytics.json @@ -172,7 +172,7 @@ "$IsBound": true, "@Common.Experimental": true, "@Core.Description": "`$apply` transformation that expands an unnamed leveled hierarchy with custom aggregation of certain properties", - "@Core.LongDescription": "Example transformation sequence:\nfilter on columns `Industry`, `Amount` and `Currency`,\norder by `Amount` descending,\nexpand 2 levels, with two exceptions\n```\n$apply=filter(Industry in ['IT','AI'])\n/groupby((Country,CountryName,Region,RegionName,Segment,Industry),\n filter($these/aggregate(Amount) gt 0 and\n $these/aggregate(Currency) ne null))\n/concat(\n groupby((Country,CountryName,Region,RegionName,Segment,Industry))\n /aggregate($count as LeavesCount),\n aggregate(Amount,Currency),\n Analytics.AutoExpand(\n Levels=[{\"P\":[\"Country\",\"CountryName\"]},\n {\"P\":[\"Region\",\"RegionName\"]},\n {\"P\":[\"Segment\",\"Industry\"]}],\n Aggregation=[\"Amount\",\"Currency\"],\n SiblingOrder=[{\"Property\":\"Amount\",\n \"Order\":\"desc\"}],\n ExpandLevels=2,\n ExpandEntries=[{\"Entry\":[\"US\",\"USA\"],\"Levels\":0},\n {\"Entry\":[\"DE\",\"Germany\",\"BW\",\"Baden-Württemberg\"],\"Levels\":1}])\n /concat(aggregate($count as ResultEntriesCount),\n skip(20)/top(10)))\n```\n", + "@Core.LongDescription": "Example transformation sequence:\nfilter on columns `Industry`, `Amount` and `Currency`,\norder by `Amount` descending,\nexpand 2 levels, with two exceptions\n```\n$apply=filter(Industry in ['IT','AI'])\n/groupby((Country,CountryName,Region,RegionName,Segment,Industry),\n filter($these/aggregate(Amount) gt 0 and\n $these/aggregate(Currency) ne null))\n/concat(\n groupby((Country,CountryName,Region,RegionName,Segment,Industry))\n /aggregate($count as LeavesCount),\n aggregate(Amount,Currency),\n Analytics.AutoExpand(\n Levels=[{\"P\":[\"Country\",\"CountryName\"]},\n {\"P\":[\"Region\",\"RegionName\"]},\n {\"P\":[\"Segment\",\"Industry\"]}],\n Aggregation=[\"Amount\",\"Currency\"],\n SiblingOrder=[{\"Property\":\"Amount\",\n \"Order\":\"desc\"}],\n ExpandLevels=2,\n ExpandEntries=[{\"Entry\":[\"US\",\"USA\"],\"Levels\":0},\n {\"Entry\":[\"DE\",\"Germany\",\"BW\",\"Baden-Württemberg\"],\"Levels\":1}]\n )/concat(aggregate($count as ResultEntriesCount),\n skip(20)/top(10)))\n```\n", "$Parameter": [ { "$Name": "InputSet", diff --git a/vocabularies/Analytics.md b/vocabularies/Analytics.md index 4de65b4f4..7f31d0da5 100644 --- a/vocabularies/Analytics.md +++ b/vocabularies/Analytics.md @@ -49,9 +49,9 @@ $apply=filter(Industry in ['IT','AI']) "Order":"desc"}], ExpandLevels=2, ExpandEntries=[{"Entry":["US","USA"],"Levels":0}, - {"Entry":["DE","Germany","BW","Baden-Württemberg"],"Levels":1}]) - /concat(aggregate($count as ResultEntriesCount), - skip(20)/top(10))) + {"Entry":["DE","Germany","BW","Baden-Württemberg"],"Levels":1}] + )/concat(aggregate($count as ResultEntriesCount), + skip(20)/top(10))) ``` diff --git a/vocabularies/Analytics.xml b/vocabularies/Analytics.xml index 41ce93a4c..ace25ac82 100644 --- a/vocabularies/Analytics.xml +++ b/vocabularies/Analytics.xml @@ -205,9 +205,9 @@ $apply=filter(Industry in ['IT','AI']) "Order":"desc"}], ExpandLevels=2, ExpandEntries=[{"Entry":["US","USA"],"Levels":0}, - {"Entry":["DE","Germany","BW","Baden-Württemberg"],"Levels":1}]) - /concat(aggregate($count as ResultEntriesCount), - skip(20)/top(10))) + {"Entry":["DE","Germany","BW","Baden-Württemberg"],"Levels":1}] + )/concat(aggregate($count as ResultEntriesCount), + skip(20)/top(10))) ``` From 64f96eb8815e9f2c9479f3b5116225de8184dc89 Mon Sep 17 00:00:00 2001 From: D024504 Date: Mon, 29 Apr 2024 14:41:13 +0200 Subject: [PATCH 26/32] save lines --- vocabularies/Analytics.json | 2 +- vocabularies/Analytics.md | 41 ++++++++++++++++++------------------- vocabularies/Analytics.xml | 3 +-- 3 files changed, 22 insertions(+), 24 deletions(-) diff --git a/vocabularies/Analytics.json b/vocabularies/Analytics.json index 19a3a00ec..2ad3c4ea4 100644 --- a/vocabularies/Analytics.json +++ b/vocabularies/Analytics.json @@ -172,7 +172,7 @@ "$IsBound": true, "@Common.Experimental": true, "@Core.Description": "`$apply` transformation that expands an unnamed leveled hierarchy with custom aggregation of certain properties", - "@Core.LongDescription": "Example transformation sequence:\nfilter on columns `Industry`, `Amount` and `Currency`,\norder by `Amount` descending,\nexpand 2 levels, with two exceptions\n```\n$apply=filter(Industry in ['IT','AI'])\n/groupby((Country,CountryName,Region,RegionName,Segment,Industry),\n filter($these/aggregate(Amount) gt 0 and\n $these/aggregate(Currency) ne null))\n/concat(\n groupby((Country,CountryName,Region,RegionName,Segment,Industry))\n /aggregate($count as LeavesCount),\n aggregate(Amount,Currency),\n Analytics.AutoExpand(\n Levels=[{\"P\":[\"Country\",\"CountryName\"]},\n {\"P\":[\"Region\",\"RegionName\"]},\n {\"P\":[\"Segment\",\"Industry\"]}],\n Aggregation=[\"Amount\",\"Currency\"],\n SiblingOrder=[{\"Property\":\"Amount\",\n \"Order\":\"desc\"}],\n ExpandLevels=2,\n ExpandEntries=[{\"Entry\":[\"US\",\"USA\"],\"Levels\":0},\n {\"Entry\":[\"DE\",\"Germany\",\"BW\",\"Baden-Württemberg\"],\"Levels\":1}]\n )/concat(aggregate($count as ResultEntriesCount),\n skip(20)/top(10)))\n```\n", + "@Core.LongDescription": "Example transformation sequence:\nfilter on columns `Industry`, `Amount` and `Currency`,\norder by `Amount` descending,\nexpand 2 levels, with two exceptions\n```\n$apply=filter(Industry in ['IT','AI'])\n/groupby((Country,CountryName,Region,RegionName,Segment,Industry),\n filter($these/aggregate(Amount) gt 0 and\n $these/aggregate(Currency) ne null))\n/concat(\n groupby((Country,CountryName,Region,RegionName,Segment,Industry))\n /aggregate($count as LeavesCount),\n aggregate(Amount,Currency),\n Analytics.AutoExpand(\n Levels=[{\"P\":[\"Country\",\"CountryName\"]},\n {\"P\":[\"Region\",\"RegionName\"]},\n {\"P\":[\"Segment\",\"Industry\"]}],\n Aggregation=[\"Amount\",\"Currency\"],\n SiblingOrder=[{\"Property\":\"Amount\",\"Order\":\"desc\"}],\n ExpandLevels=2,\n ExpandEntries=[{\"Entry\":[\"US\",\"USA\"],\"Levels\":0},\n {\"Entry\":[\"DE\",\"Germany\",\"BW\",\"Baden-Württemberg\"],\"Levels\":1}]\n )/concat(aggregate($count as ResultEntriesCount),\n skip(20)/top(10)))\n```\n", "$Parameter": [ { "$Name": "InputSet", diff --git a/vocabularies/Analytics.md b/vocabularies/Analytics.md index 7f31d0da5..4b13c3e75 100644 --- a/vocabularies/Analytics.md +++ b/vocabularies/Analytics.md @@ -17,7 +17,7 @@ Term|Type|Description [AggregatedProperties](./Analytics.xml#L106:~:text=Deprecated in favor of [`AggregatedProperty`](#AggregatedProperty) [AggregatedProperty](./Analytics.xml#L124:~:text=Dynamic property for aggregate expression with specified aggregation method defined on the annotated entity type. [AnalyticalContext](./Analytics.xml#L144:~:text=Collection of properties that define an analytical context -[LevelInformation](./Analytics.xml#L295:~:text=Information about grouping levels in the result set of a request including the [`AutoExpand`](#AutoExpand) transformation +[LevelInformation](./Analytics.xml#L294:~:text=Information about grouping levels in the result set of a request including the [`AutoExpand`](#AutoExpand) transformation ## Functions @@ -45,8 +45,7 @@ $apply=filter(Industry in ['IT','AI']) {"P":["Region","RegionName"]}, {"P":["Segment","Industry"]}], Aggregation=["Amount","Currency"], - SiblingOrder=[{"Property":"Amount", - "Order":"desc"}], + SiblingOrder=[{"Property":"Amount","Order":"desc"}], ExpandLevels=2, ExpandEntries=[{"Entry":["US","USA"],"Levels":0}, {"Entry":["DE","Germany","BW","Baden-Württemberg"],"Levels":1}] @@ -57,13 +56,13 @@ $apply=filter(Industry in ['IT','AI']) Parameter|Type|Description :--------|:---|:---------- -**[InputSet](./Analytics.xml#L214:~:text=Each element in the collection defines the properties that constitute one level. A property must not referenced by more than one level. The first element in the collection defines the property names of the coarsest level, the following elements define the property names of consecutively finer-grained aggregation levels. The function result comprises the leveled hierarchy with these levels in preorder. All referenced properties must be groupable. -[Aggregation](./Analytics.xml#L228:~:text=All properties in this collection must be custom aggregates. -[SiblingOrder](./Analytics.xml#L234:~:text=Each element in the collection defines the properties that constitute one level. A property must not referenced by more than one level. The first element in the collection defines the property names of the coarsest level, the following elements define the property names of consecutively finer-grained aggregation levels. The function result comprises the leveled hierarchy with these levels in preorder. All referenced properties must be groupable. +[Aggregation](./Analytics.xml#L227:~:text=All properties in this collection must be custom aggregates. +[SiblingOrder](./Analytics.xml#L233:~:text= @@ -93,38 +92,38 @@ Property|Type|Description [AccumulativeMeasure](./Analytics.xml#L168:~:text= -## [AutoExpandLevel](./Analytics.xml#L253:~:text= -## [AutoExpandSiblingOrder](./Analytics.xml#L259:~:text= -## [SortOrderType](./Analytics.xml#L269:~:text= -## [AutoExpandEntry](./Analytics.xml#L284:~:text= Date: Mon, 29 Apr 2024 15:44:31 +0200 Subject: [PATCH 27/32] round parentheses for in --- vocabularies/Analytics.json | 2 +- vocabularies/Analytics.md | 2 +- vocabularies/Analytics.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vocabularies/Analytics.json b/vocabularies/Analytics.json index 2ad3c4ea4..ced277f94 100644 --- a/vocabularies/Analytics.json +++ b/vocabularies/Analytics.json @@ -172,7 +172,7 @@ "$IsBound": true, "@Common.Experimental": true, "@Core.Description": "`$apply` transformation that expands an unnamed leveled hierarchy with custom aggregation of certain properties", - "@Core.LongDescription": "Example transformation sequence:\nfilter on columns `Industry`, `Amount` and `Currency`,\norder by `Amount` descending,\nexpand 2 levels, with two exceptions\n```\n$apply=filter(Industry in ['IT','AI'])\n/groupby((Country,CountryName,Region,RegionName,Segment,Industry),\n filter($these/aggregate(Amount) gt 0 and\n $these/aggregate(Currency) ne null))\n/concat(\n groupby((Country,CountryName,Region,RegionName,Segment,Industry))\n /aggregate($count as LeavesCount),\n aggregate(Amount,Currency),\n Analytics.AutoExpand(\n Levels=[{\"P\":[\"Country\",\"CountryName\"]},\n {\"P\":[\"Region\",\"RegionName\"]},\n {\"P\":[\"Segment\",\"Industry\"]}],\n Aggregation=[\"Amount\",\"Currency\"],\n SiblingOrder=[{\"Property\":\"Amount\",\"Order\":\"desc\"}],\n ExpandLevels=2,\n ExpandEntries=[{\"Entry\":[\"US\",\"USA\"],\"Levels\":0},\n {\"Entry\":[\"DE\",\"Germany\",\"BW\",\"Baden-Württemberg\"],\"Levels\":1}]\n )/concat(aggregate($count as ResultEntriesCount),\n skip(20)/top(10)))\n```\n", + "@Core.LongDescription": "Example transformation sequence:\nfilter on columns `Industry`, `Amount` and `Currency`,\norder by `Amount` descending,\nexpand 2 levels, with two exceptions\n```\n$apply=filter(Industry in ('IT','AI'))\n/groupby((Country,CountryName,Region,RegionName,Segment,Industry),\n filter($these/aggregate(Amount) gt 0 and\n $these/aggregate(Currency) ne null))\n/concat(\n groupby((Country,CountryName,Region,RegionName,Segment,Industry))\n /aggregate($count as LeavesCount),\n aggregate(Amount,Currency),\n Analytics.AutoExpand(\n Levels=[{\"P\":[\"Country\",\"CountryName\"]},\n {\"P\":[\"Region\",\"RegionName\"]},\n {\"P\":[\"Segment\",\"Industry\"]}],\n Aggregation=[\"Amount\",\"Currency\"],\n SiblingOrder=[{\"Property\":\"Amount\",\"Order\":\"desc\"}],\n ExpandLevels=2,\n ExpandEntries=[{\"Entry\":[\"US\",\"USA\"],\"Levels\":0},\n {\"Entry\":[\"DE\",\"Germany\",\"BW\",\"Baden-Württemberg\"],\"Levels\":1}]\n )/concat(aggregate($count as ResultEntriesCount),\n skip(20)/top(10)))\n```\n", "$Parameter": [ { "$Name": "InputSet", diff --git a/vocabularies/Analytics.md b/vocabularies/Analytics.md index 4b13c3e75..0830ff3a5 100644 --- a/vocabularies/Analytics.md +++ b/vocabularies/Analytics.md @@ -32,7 +32,7 @@ filter on columns `Industry`, `Amount` and `Currency`, order by `Amount` descending, expand 2 levels, with two exceptions ``` -$apply=filter(Industry in ['IT','AI']) +$apply=filter(Industry in ('IT','AI')) /groupby((Country,CountryName,Region,RegionName,Segment,Industry), filter($these/aggregate(Amount) gt 0 and $these/aggregate(Currency) ne null)) diff --git a/vocabularies/Analytics.xml b/vocabularies/Analytics.xml index 60077e36f..d9be8acfe 100644 --- a/vocabularies/Analytics.xml +++ b/vocabularies/Analytics.xml @@ -188,7 +188,7 @@ filter on columns `Industry`, `Amount` and `Currency`, order by `Amount` descending, expand 2 levels, with two exceptions ``` -$apply=filter(Industry in ['IT','AI']) +$apply=filter(Industry in ('IT','AI')) /groupby((Country,CountryName,Region,RegionName,Segment,Industry), filter($these/aggregate(Amount) gt 0 and $these/aggregate(Currency) ne null)) From 9f2403904b8a75b1f0ab917a2a9ce8f95097a158 Mon Sep 17 00:00:00 2001 From: D024504 Date: Mon, 29 Apr 2024 15:47:27 +0200 Subject: [PATCH 28/32] More elegance --- vocabularies/Analytics.json | 2 +- vocabularies/Analytics.md | 4 ++-- vocabularies/Analytics.xml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/vocabularies/Analytics.json b/vocabularies/Analytics.json index ced277f94..b92c7045b 100644 --- a/vocabularies/Analytics.json +++ b/vocabularies/Analytics.json @@ -172,7 +172,7 @@ "$IsBound": true, "@Common.Experimental": true, "@Core.Description": "`$apply` transformation that expands an unnamed leveled hierarchy with custom aggregation of certain properties", - "@Core.LongDescription": "Example transformation sequence:\nfilter on columns `Industry`, `Amount` and `Currency`,\norder by `Amount` descending,\nexpand 2 levels, with two exceptions\n```\n$apply=filter(Industry in ('IT','AI'))\n/groupby((Country,CountryName,Region,RegionName,Segment,Industry),\n filter($these/aggregate(Amount) gt 0 and\n $these/aggregate(Currency) ne null))\n/concat(\n groupby((Country,CountryName,Region,RegionName,Segment,Industry))\n /aggregate($count as LeavesCount),\n aggregate(Amount,Currency),\n Analytics.AutoExpand(\n Levels=[{\"P\":[\"Country\",\"CountryName\"]},\n {\"P\":[\"Region\",\"RegionName\"]},\n {\"P\":[\"Segment\",\"Industry\"]}],\n Aggregation=[\"Amount\",\"Currency\"],\n SiblingOrder=[{\"Property\":\"Amount\",\"Order\":\"desc\"}],\n ExpandLevels=2,\n ExpandEntries=[{\"Entry\":[\"US\",\"USA\"],\"Levels\":0},\n {\"Entry\":[\"DE\",\"Germany\",\"BW\",\"Baden-Württemberg\"],\"Levels\":1}]\n )/concat(aggregate($count as ResultEntriesCount),\n skip(20)/top(10)))\n```\n", + "@Core.LongDescription": "Example transformation sequence:\nfilter on columns `Industry`, `Amount` and `Currency`,\norder by `Amount` descending,\nexpand 2 levels, with two exceptions\n```\n$apply=filter(Industry in ('IT','AI'))\n/groupby((Country,Region,Segment,Industry),\n filter($these/aggregate(Amount) gt 0 and\n $these/aggregate(Currency) ne null))\n/concat(\n groupby((Country,Region,Segment,Industry))\n /aggregate($count as LeavesCount),\n aggregate(Amount,Currency),\n Analytics.AutoExpand(\n Levels=[{\"P\":[\"Country\",\"CountryName\"]},\n {\"P\":[\"Region\",\"RegionName\"]},\n {\"P\":[\"Segment\",\"Industry\"]}],\n Aggregation=[\"Amount\",\"Currency\"],\n SiblingOrder=[{\"Property\":\"Amount\",\"Order\":\"desc\"}],\n ExpandLevels=2,\n ExpandEntries=[{\"Entry\":[\"US\",\"USA\"],\"Levels\":0},\n {\"Entry\":[\"DE\",\"Germany\",\"BW\",\"Baden-Württemberg\"],\"Levels\":1}]\n )/concat(aggregate($count as ResultEntriesCount),\n skip(20)/top(10)))\n```\n", "$Parameter": [ { "$Name": "InputSet", diff --git a/vocabularies/Analytics.md b/vocabularies/Analytics.md index 0830ff3a5..0dd61c4c3 100644 --- a/vocabularies/Analytics.md +++ b/vocabularies/Analytics.md @@ -33,11 +33,11 @@ order by `Amount` descending, expand 2 levels, with two exceptions ``` $apply=filter(Industry in ('IT','AI')) -/groupby((Country,CountryName,Region,RegionName,Segment,Industry), +/groupby((Country,Region,Segment,Industry), filter($these/aggregate(Amount) gt 0 and $these/aggregate(Currency) ne null)) /concat( - groupby((Country,CountryName,Region,RegionName,Segment,Industry)) + groupby((Country,Region,Segment,Industry)) /aggregate($count as LeavesCount), aggregate(Amount,Currency), Analytics.AutoExpand( diff --git a/vocabularies/Analytics.xml b/vocabularies/Analytics.xml index d9be8acfe..f9a5a7da4 100644 --- a/vocabularies/Analytics.xml +++ b/vocabularies/Analytics.xml @@ -189,11 +189,11 @@ order by `Amount` descending, expand 2 levels, with two exceptions ``` $apply=filter(Industry in ('IT','AI')) -/groupby((Country,CountryName,Region,RegionName,Segment,Industry), +/groupby((Country,Region,Segment,Industry), filter($these/aggregate(Amount) gt 0 and $these/aggregate(Currency) ne null)) /concat( - groupby((Country,CountryName,Region,RegionName,Segment,Industry)) + groupby((Country,Region,Segment,Industry)) /aggregate($count as LeavesCount), aggregate(Amount,Currency), Analytics.AutoExpand( From 8c7b80bf767e9b13b706b1aeb24029aae39e9ece Mon Sep 17 00:00:00 2001 From: D024504 Date: Mon, 29 Apr 2024 15:54:54 +0200 Subject: [PATCH 29/32] reword: deeper -> finer-grained --- vocabularies/Analytics.json | 6 +++--- vocabularies/Analytics.md | 36 ++++++++++++++++++------------------ vocabularies/Analytics.xml | 7 ++++--- vocabularies/Hierarchy.json | 11 +++++++---- vocabularies/Hierarchy.md | 4 ++-- vocabularies/Hierarchy.xml | 8 ++++---- 6 files changed, 38 insertions(+), 34 deletions(-) diff --git a/vocabularies/Analytics.json b/vocabularies/Analytics.json index b92c7045b..6739fa5be 100644 --- a/vocabularies/Analytics.json +++ b/vocabularies/Analytics.json @@ -184,8 +184,8 @@ "$Name": "Levels", "$Collection": true, "$Type": "Analytics.AutoExpandLevel", - "@Core.Description": "Collection of aggregation levels forming the visible part of a leveled hierarchy", - "@Core.LongDescription": "Each element in the collection defines the properties that constitute one level.\n A property must not referenced by more than one level.\n The first element in the collection defines the property names of the coarsest level,\n the following elements define the property names of consecutively finer-grained aggregation levels.\n The function result comprises the leveled hierarchy with these levels in preorder.\n All referenced properties must be groupable." + "@Core.Description": "Collection of aggregation levels forming a leveled hierarchy", + "@Core.LongDescription": "Each element in the collection defines the properties that constitute one level.\n A property must not referenced by more than one level.\n The first element in the collection defines the property names of the coarsest level,\n the following elements define the property names of consecutively finer-grained aggregation levels.\n The function result is the leveled hierarchy with these levels in preorder,\n entries on the finest-grained level cannot be expanded further.\n All referenced properties must be groupable." }, { "$Name": "Aggregation", @@ -254,7 +254,7 @@ "@Core.Description": "Expansion state of an entry in an [unnamed leveled hierarchy](#AutoExpand)", "Entry": { "$Collection": true, - "@Core.Description": "An entry on a given [level](#AutoExpandLevel) is identified by a collection of values for the properties that constitute all levels up to the given one" + "@Core.Description": "An entry on a given [level](#AutoExpandLevel) is identified by a collection of values for the properties that constitute all levels up to and including the given one" }, "Levels": { "$Type": "Edm.Int64", diff --git a/vocabularies/Analytics.md b/vocabularies/Analytics.md index 0dd61c4c3..401d0eace 100644 --- a/vocabularies/Analytics.md +++ b/vocabularies/Analytics.md @@ -17,7 +17,7 @@ Term|Type|Description [AggregatedProperties](./Analytics.xml#L106:~:text=Deprecated in favor of [`AggregatedProperty`](#AggregatedProperty) [AggregatedProperty](./Analytics.xml#L124:~:text=Dynamic property for aggregate expression with specified aggregation method defined on the annotated entity type. [AnalyticalContext](./Analytics.xml#L144:~:text=Collection of properties that define an analytical context -[LevelInformation](./Analytics.xml#L294:~:text=Information about grouping levels in the result set of a request including the [`AutoExpand`](#AutoExpand) transformation +[LevelInformation](./Analytics.xml#L295:~:text=Information about grouping levels in the result set of a request including the [`AutoExpand`](#AutoExpand) transformation ## Functions @@ -57,12 +57,12 @@ $apply=filter(Industry in ('IT','AI')) Parameter|Type|Description :--------|:---|:---------- **[InputSet](./Analytics.xml#L213:~:text=Each element in the collection defines the properties that constitute one level. A property must not referenced by more than one level. The first element in the collection defines the property names of the coarsest level, the following elements define the property names of consecutively finer-grained aggregation levels. The function result comprises the leveled hierarchy with these levels in preorder. All referenced properties must be groupable. -[Aggregation](./Analytics.xml#L227:~:text=All properties in this collection must be custom aggregates. -[SiblingOrder](./Analytics.xml#L233:~:text=Each element in the collection defines the properties that constitute one level. A property must not referenced by more than one level. The first element in the collection defines the property names of the coarsest level, the following elements define the property names of consecutively finer-grained aggregation levels. The function result is the leveled hierarchy with these levels in preorder, entries on the finest-grained level cannot be expanded further. All referenced properties must be groupable. +[Aggregation](./Analytics.xml#L228:~:text=All properties in this collection must be custom aggregates. +[SiblingOrder](./Analytics.xml#L234:~:text= @@ -92,38 +92,38 @@ Property|Type|Description [AccumulativeMeasure](./Analytics.xml#L168:~:text= -## [AutoExpandLevel](./Analytics.xml#L252:~:text= -## [AutoExpandSiblingOrder](./Analytics.xml#L258:~:text= -## [SortOrderType](./Analytics.xml#L268:~:text= -## [AutoExpandEntry](./Analytics.xml#L283:~:text= - + Each element in the collection defines the properties that constitute one level. A property must not referenced by more than one level. The first element in the collection defines the property names of the coarsest level, the following elements define the property names of consecutively finer-grained aggregation levels. - The function result comprises the leveled hierarchy with these levels in preorder. + The function result is the leveled hierarchy with these levels in preorder, + entries on the finest-grained level cannot be expanded further. All referenced properties must be groupable. @@ -284,7 +285,7 @@ $apply=filter(Industry in ('IT','AI')) - + diff --git a/vocabularies/Hierarchy.json b/vocabularies/Hierarchy.json index 916ff53f9..71e6d815e 100644 --- a/vocabularies/Hierarchy.json +++ b/vocabularies/Hierarchy.json @@ -40,17 +40,20 @@ "LimitedDescendantCount": { "$Type": "Edm.Int64", "$Nullable": true, - "@Core.Description": "Number of entries from deeper aggregation levels that are expanded" + "@Core.Description": "Number of entries from finer-grained aggregation levels that are expanded" }, "DrillState": { "$Nullable": true, "@Core.Description": "Drill state of an entry", "@Validation.AllowedValues": [ - { "Value": "expanded", "@Core.Description": "The entry precedes entries from deeper aggregation levels" }, - { "Value": "leaf", "@Core.Description": "The entry belongs to the deepest aggregation level" }, + { + "Value": "expanded", + "@Core.Description": "The entry precedes entries from finer-grained aggregation levels" + }, + { "Value": "leaf", "@Core.Description": "The entry belongs to the finest-grained aggregation level" }, { "Value": "collapsed", - "@Core.Description": "The entry belongs to the highest non-expanded aggregation level, but is not a leaf" + "@Core.Description": "The entry belongs to the coarsest-grained non-expanded aggregation level, but is not a leaf" } ] }, diff --git a/vocabularies/Hierarchy.md b/vocabularies/Hierarchy.md index f781b12f7..13a0a7046 100644 --- a/vocabularies/Hierarchy.md +++ b/vocabularies/Hierarchy.md @@ -100,8 +100,8 @@ The properties in this complex type contain information about Property|Type|Description :-------|:---|:---------- -[LimitedDescendantCount](./Hierarchy.xml#L58:~:text=Allowed values:
[expanded](./Hierarchy.xml#L65)
The entry precedes entries from deeper aggregation levels
[leaf](./Hierarchy.xml#L69)
The entry belongs to the deepest aggregation level
[collapsed](./Hierarchy.xml#L73)
The entry belongs to the highest non-expanded aggregation level, but is not a leaf +[LimitedDescendantCount](./Hierarchy.xml#L58:~:text=Allowed values:
[expanded](./Hierarchy.xml#L65)
The entry precedes entries from finer-grained aggregation levels
[leaf](./Hierarchy.xml#L69)
The entry belongs to the finest-grained aggregation level
[collapsed](./Hierarchy.xml#L73)
The entry belongs to the coarsest-grained non-expanded aggregation level, but is not a leaf [DistanceFromRoot](./Hierarchy.xml#L80:~:text= diff --git a/vocabularies/Hierarchy.xml b/vocabularies/Hierarchy.xml index 326592a97..aa962850c 100644 --- a/vocabularies/Hierarchy.xml +++ b/vocabularies/Hierarchy.xml @@ -56,7 +56,7 @@ with their definitions rephrased in the concept of recursive hierarchies. - + @@ -64,15 +64,15 @@ - + - + - + From 4dfd1c60ec9da3f9e7d17c8e02f1b2012db0bfea Mon Sep 17 00:00:00 2001 From: D024504 Date: Thu, 2 May 2024 16:42:28 +0200 Subject: [PATCH 30/32] Sort order like Common.SortOrderType --- vocabularies/Analytics.json | 19 +++++-------------- vocabularies/Analytics.md | 23 ++++++----------------- vocabularies/Analytics.xml | 21 +++------------------ 3 files changed, 14 insertions(+), 49 deletions(-) diff --git a/vocabularies/Analytics.json b/vocabularies/Analytics.json index 6739fa5be..be6282328 100644 --- a/vocabularies/Analytics.json +++ b/vocabularies/Analytics.json @@ -172,7 +172,7 @@ "$IsBound": true, "@Common.Experimental": true, "@Core.Description": "`$apply` transformation that expands an unnamed leveled hierarchy with custom aggregation of certain properties", - "@Core.LongDescription": "Example transformation sequence:\nfilter on columns `Industry`, `Amount` and `Currency`,\norder by `Amount` descending,\nexpand 2 levels, with two exceptions\n```\n$apply=filter(Industry in ('IT','AI'))\n/groupby((Country,Region,Segment,Industry),\n filter($these/aggregate(Amount) gt 0 and\n $these/aggregate(Currency) ne null))\n/concat(\n groupby((Country,Region,Segment,Industry))\n /aggregate($count as LeavesCount),\n aggregate(Amount,Currency),\n Analytics.AutoExpand(\n Levels=[{\"P\":[\"Country\",\"CountryName\"]},\n {\"P\":[\"Region\",\"RegionName\"]},\n {\"P\":[\"Segment\",\"Industry\"]}],\n Aggregation=[\"Amount\",\"Currency\"],\n SiblingOrder=[{\"Property\":\"Amount\",\"Order\":\"desc\"}],\n ExpandLevels=2,\n ExpandEntries=[{\"Entry\":[\"US\",\"USA\"],\"Levels\":0},\n {\"Entry\":[\"DE\",\"Germany\",\"BW\",\"Baden-Württemberg\"],\"Levels\":1}]\n )/concat(aggregate($count as ResultEntriesCount),\n skip(20)/top(10)))\n```\n", + "@Core.LongDescription": "Example transformation sequence:\nfilter on columns `Industry`, `Amount` and `Currency`,\norder by `Amount` descending,\nexpand 2 levels, with two exceptions\n```\n$apply=filter(Industry in ('IT','AI'))\n/groupby((Country,Region,Segment,Industry),\n filter($these/aggregate(Amount) gt 0 and\n $these/aggregate(Currency) ne null))\n/concat(\n groupby((Country,Region,Segment,Industry))\n /aggregate($count as LeavesCount),\n aggregate(Amount,Currency),\n Analytics.AutoExpand(\n Levels=[{\"P\":[\"Country\",\"CountryName\"]},\n {\"P\":[\"Region\",\"RegionName\"]},\n {\"P\":[\"Segment\",\"Industry\"]}],\n Aggregation=[\"Amount\",\"Currency\"],\n SiblingOrder=[{\"Property\":\"Amount\",\"Descending\":true}],\n ExpandLevels=2,\n ExpandEntries=[{\"Entry\":[\"US\",\"USA\"],\"Levels\":0},\n {\"Entry\":[\"DE\",\"Germany\",\"BW\",\"Baden-Württemberg\"],\"Levels\":1}]\n )/concat(aggregate($count as ResultEntriesCount),\n skip(20)/top(10)))\n```\n", "$Parameter": [ { "$Name": "InputSet", @@ -233,21 +233,12 @@ "@Common.Experimental": true, "@Core.Description": "Sibling order in an [unnamed leveled hierarchy](#AutoExpand)", "Property": { "@Core.Description": "Property by which to sort" }, - "Order": { - "$Type": "Analytics.SortOrderType", - "$DefaultValue": "Analytics.SortOrderType/Asc", - "@Core.Description": "Sorting direction" + "Descending": { + "$Type": "Edm.Boolean", + "$Nullable": true, + "@Core.Description": "Sort direction, ascending if not specified otherwise" } }, - "SortOrderType": { - "$Kind": "TypeDefinition", - "$UnderlyingType": "Edm.String", - "@Common.Experimental": true, - "@Validation.AllowedValues": [ - { "Value": "asc", "@Core.Description": "Sort in ascending order" }, - { "Value": "desc", "@Core.Description": "Sort in descending order" } - ] - }, "AutoExpandEntry": { "$Kind": "ComplexType", "@Common.Experimental": true, diff --git a/vocabularies/Analytics.md b/vocabularies/Analytics.md index 401d0eace..fbdd36443 100644 --- a/vocabularies/Analytics.md +++ b/vocabularies/Analytics.md @@ -17,7 +17,7 @@ Term|Type|Description [AggregatedProperties](./Analytics.xml#L106:~:text=Deprecated in favor of [`AggregatedProperty`](#AggregatedProperty) [AggregatedProperty](./Analytics.xml#L124:~:text=Dynamic property for aggregate expression with specified aggregation method defined on the annotated entity type. [AnalyticalContext](./Analytics.xml#L144:~:text=Collection of properties that define an analytical context -[LevelInformation](./Analytics.xml#L295:~:text=Information about grouping levels in the result set of a request including the [`AutoExpand`](#AutoExpand) transformation +[LevelInformation](./Analytics.xml#L280:~:text=Information about grouping levels in the result set of a request including the [`AutoExpand`](#AutoExpand) transformation ## Functions @@ -45,7 +45,7 @@ $apply=filter(Industry in ('IT','AI')) {"P":["Region","RegionName"]}, {"P":["Segment","Industry"]}], Aggregation=["Amount","Currency"], - SiblingOrder=[{"Property":"Amount","Order":"desc"}], + SiblingOrder=[{"Property":"Amount","Descending":true}], ExpandLevels=2, ExpandEntries=[{"Entry":["US","USA"],"Levels":0}, {"Entry":["DE","Germany","BW","Baden-Württemberg"],"Levels":1}] @@ -106,24 +106,13 @@ Sibling order in an [unnamed leveled hierarchy](#AutoExpand) Property|Type|Description :-------|:---|:---------- [Property](./Analytics.xml#L262:~:text= -## [SortOrderType](./Analytics.xml#L269:~:text= -## [AutoExpandEntry](./Analytics.xml#L284:~:text= - - + + - - - - - - - - - - - - - - - From 5036eba3ec46afc391cbe24dac03a7f3b90fb585 Mon Sep 17 00:00:00 2001 From: D024504 Date: Fri, 24 May 2024 11:51:51 +0200 Subject: [PATCH 31/32] As agreed in meeting on 2024-05-24 --- vocabularies/Analytics.json | 17 +++++++++++------ vocabularies/Analytics.md | 35 ++++++++++++++++++----------------- vocabularies/Analytics.xml | 28 ++++++++++++++++------------ 3 files changed, 45 insertions(+), 35 deletions(-) diff --git a/vocabularies/Analytics.json b/vocabularies/Analytics.json index be6282328..0398430b6 100644 --- a/vocabularies/Analytics.json +++ b/vocabularies/Analytics.json @@ -172,7 +172,7 @@ "$IsBound": true, "@Common.Experimental": true, "@Core.Description": "`$apply` transformation that expands an unnamed leveled hierarchy with custom aggregation of certain properties", - "@Core.LongDescription": "Example transformation sequence:\nfilter on columns `Industry`, `Amount` and `Currency`,\norder by `Amount` descending,\nexpand 2 levels, with two exceptions\n```\n$apply=filter(Industry in ('IT','AI'))\n/groupby((Country,Region,Segment,Industry),\n filter($these/aggregate(Amount) gt 0 and\n $these/aggregate(Currency) ne null))\n/concat(\n groupby((Country,Region,Segment,Industry))\n /aggregate($count as LeavesCount),\n aggregate(Amount,Currency),\n Analytics.AutoExpand(\n Levels=[{\"P\":[\"Country\",\"CountryName\"]},\n {\"P\":[\"Region\",\"RegionName\"]},\n {\"P\":[\"Segment\",\"Industry\"]}],\n Aggregation=[\"Amount\",\"Currency\"],\n SiblingOrder=[{\"Property\":\"Amount\",\"Descending\":true}],\n ExpandLevels=2,\n ExpandEntries=[{\"Entry\":[\"US\",\"USA\"],\"Levels\":0},\n {\"Entry\":[\"DE\",\"Germany\",\"BW\",\"Baden-Württemberg\"],\"Levels\":1}]\n )/concat(aggregate($count as ResultEntriesCount),\n skip(20)/top(10)))\n```\n", + "@Core.LongDescription": "Example transformation sequence:\nfilter on columns `Industry`, `Amount` and `Currency`,\norder by `Amount` descending,\nshow 2 levels, with two exceptions\n```\n$apply=filter(Industry in ('IT','AI'))\n/groupby((Country,Region,Segment,Industry),\n filter($these/aggregate(Amount) gt 0 and\n $these/aggregate(Currency) ne null))\n/concat(\n groupby((Country,Region,Segment,Industry))\n /aggregate($count as LeavesCount),\n aggregate(Amount,Currency),\n Analytics.AutoExpand(\n Levels=[{\"D\":[\"Country\"],\"A\":[\"CountryName\"]},\n {\"D\":[\"Region\"],\"A\":[\"RegionName\"]},\n {\"D\":[\"Segment\",\"Industry\"],\"A\":[]}],\n Aggregation=[\"Amount\",\"Currency\"],\n SiblingOrder=[{\"Property\":\"Amount\",\"Descending\":true}],\n ShowLevels=2,\n ExpandEntries=[{\"Entry\":[\"US\"],\"Levels\":0},\n {\"Entry\":[\"DE\",\"BW\"],\"Levels\":1}]\n )/concat(aggregate($count as ResultEntriesCount),\n skip(20)/top(10)))\n```\n", "$Parameter": [ { "$Name": "InputSet", @@ -200,9 +200,9 @@ "@Core.Description": "Sort specification to apply to all direct descendants of a given entry in the resulting leveled hierarchy" }, { - "$Name": "ExpandLevels", + "$Name": "ShowLevels", "$Type": "Edm.Int64", - "@Core.Description": "Number of levels to be expanded (absent means all levels)", + "@Core.Description": "Number of levels to be shown in the initial expansion (absent means all levels)", "@Core.OptionalParameter": {} }, { @@ -223,9 +223,14 @@ "AutoExpandLevel": { "$Kind": "ComplexType", "@Common.Experimental": true, - "P": { + "@Core.Description": "Property names constituting a level in an [unnamed leveled hierarchy](#AutoExpand)", + "D": { "$Collection": true, - "@Core.Description": "A non-empty set of property names constituting a level in an [unnamed leveled hierarchy](#AutoExpand)" + "@Core.Description": "A non-empty set of property names defining a combination of dimension values" + }, + "A": { + "$Collection": true, + "@Core.Description": "A possibly empty set of names of additional properties of the dimensions that occur in `D`" } }, "AutoExpandSiblingOrder": { @@ -245,7 +250,7 @@ "@Core.Description": "Expansion state of an entry in an [unnamed leveled hierarchy](#AutoExpand)", "Entry": { "$Collection": true, - "@Core.Description": "An entry on a given [level](#AutoExpandLevel) is identified by a collection of values for the properties that constitute all levels up to and including the given one" + "@Core.Description": "An entry on a given [level](#AutoExpandLevel) is identified by a collection of values for the `D` properties that constitute all levels up to and including the given one" }, "Levels": { "$Type": "Edm.Int64", diff --git a/vocabularies/Analytics.md b/vocabularies/Analytics.md index fbdd36443..19fd12b26 100644 --- a/vocabularies/Analytics.md +++ b/vocabularies/Analytics.md @@ -17,7 +17,7 @@ Term|Type|Description [AggregatedProperties](./Analytics.xml#L106:~:text=Deprecated in favor of [`AggregatedProperty`](#AggregatedProperty) [AggregatedProperty](./Analytics.xml#L124:~:text=Dynamic property for aggregate expression with specified aggregation method defined on the annotated entity type. [AnalyticalContext](./Analytics.xml#L144:~:text=Collection of properties that define an analytical context -[LevelInformation](./Analytics.xml#L280:~:text=Information about grouping levels in the result set of a request including the [`AutoExpand`](#AutoExpand) transformation +[LevelInformation](./Analytics.xml#L284:~:text=Information about grouping levels in the result set of a request including the [`AutoExpand`](#AutoExpand) transformation ## Functions @@ -30,7 +30,7 @@ Term|Type|Description Example transformation sequence: filter on columns `Industry`, `Amount` and `Currency`, order by `Amount` descending, -expand 2 levels, with two exceptions +show 2 levels, with two exceptions ``` $apply=filter(Industry in ('IT','AI')) /groupby((Country,Region,Segment,Industry), @@ -41,14 +41,14 @@ $apply=filter(Industry in ('IT','AI')) /aggregate($count as LeavesCount), aggregate(Amount,Currency), Analytics.AutoExpand( - Levels=[{"P":["Country","CountryName"]}, - {"P":["Region","RegionName"]}, - {"P":["Segment","Industry"]}], + Levels=[{"D":["Country"],"A":["CountryName"]}, + {"D":["Region"],"A":["RegionName"]}, + {"D":["Segment","Industry"],"A":[]}], Aggregation=["Amount","Currency"], SiblingOrder=[{"Property":"Amount","Descending":true}], - ExpandLevels=2, - ExpandEntries=[{"Entry":["US","USA"],"Levels":0}, - {"Entry":["DE","Germany","BW","Baden-Württemberg"],"Levels":1}] + ShowLevels=2, + ExpandEntries=[{"Entry":["US"],"Levels":0}, + {"Entry":["DE","BW"],"Levels":1}] )/concat(aggregate($count as ResultEntriesCount), skip(20)/top(10))) ``` @@ -60,7 +60,7 @@ Parameter|Type|Description [Levels](./Analytics.xml#L216:~:text=Each element in the collection defines the properties that constitute one level. A property must not referenced by more than one level. The first element in the collection defines the property names of the coarsest level, the following elements define the property names of consecutively finer-grained aggregation levels. The function result is the leveled hierarchy with these levels in preorder, entries on the finest-grained level cannot be expanded further. All referenced properties must be groupable. [Aggregation](./Analytics.xml#L228:~:text=All properties in this collection must be custom aggregates. [SiblingOrder](./Analytics.xml#L234:~:text= ## [AutoExpandLevel](./Analytics.xml#L253:~:text= -## [AutoExpandSiblingOrder](./Analytics.xml#L259:~:text= -## [AutoExpandEntry](./Analytics.xml#L269:~:text=Example transformation sequence: filter on columns `Industry`, `Amount` and `Currency`, order by `Amount` descending, -expand 2 levels, with two exceptions +show 2 levels, with two exceptions ``` $apply=filter(Industry in ('IT','AI')) /groupby((Country,Region,Segment,Industry), @@ -197,14 +197,14 @@ $apply=filter(Industry in ('IT','AI')) /aggregate($count as LeavesCount), aggregate(Amount,Currency), Analytics.AutoExpand( - Levels=[{"P":["Country","CountryName"]}, - {"P":["Region","RegionName"]}, - {"P":["Segment","Industry"]}], + Levels=[{"D":["Country"],"A":["CountryName"]}, + {"D":["Region"],"A":["RegionName"]}, + {"D":["Segment","Industry"],"A":[]}], Aggregation=["Amount","Currency"], SiblingOrder=[{"Property":"Amount","Descending":true}], - ExpandLevels=2, - ExpandEntries=[{"Entry":["US","USA"],"Levels":0}, - {"Entry":["DE","Germany","BW","Baden-Württemberg"],"Levels":1}] + ShowLevels=2, + ExpandEntries=[{"Entry":["US"],"Levels":0}, + {"Entry":["DE","BW"],"Levels":1}] )/concat(aggregate($count as ResultEntriesCount), skip(20)/top(10))) ``` @@ -234,8 +234,8 @@ $apply=filter(Industry in ('IT','AI')) - - + + @@ -252,8 +252,12 @@ $apply=filter(Industry in ('IT','AI')) - - + + + + + + @@ -270,7 +274,7 @@ $apply=filter(Industry in ('IT','AI')) - + From 192cc177db22a3c74c1bc1c87bd514c60af2ebf2 Mon Sep 17 00:00:00 2001 From: D024504 Date: Fri, 24 May 2024 12:58:56 +0200 Subject: [PATCH 32/32] Explain D vs. A --- vocabularies/Analytics.json | 3 ++- vocabularies/Analytics.md | 21 ++++++++++++--------- vocabularies/Analytics.xml | 6 +++++- 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/vocabularies/Analytics.json b/vocabularies/Analytics.json index 0398430b6..3f164f8c9 100644 --- a/vocabularies/Analytics.json +++ b/vocabularies/Analytics.json @@ -224,9 +224,10 @@ "$Kind": "ComplexType", "@Common.Experimental": true, "@Core.Description": "Property names constituting a level in an [unnamed leveled hierarchy](#AutoExpand)", + "@Core.LongDescription": "Properties in `D` must be used to identify entries in [`ExpandEntries/Entry`](#AutoExpandEntry),\n otherwise they have the same effect as properties in `A`.", "D": { "$Collection": true, - "@Core.Description": "A non-empty set of property names defining a combination of dimension values" + "@Core.Description": "A non-empty set of property names that define a combination of dimension values" }, "A": { "$Collection": true, diff --git a/vocabularies/Analytics.md b/vocabularies/Analytics.md index 19fd12b26..667244413 100644 --- a/vocabularies/Analytics.md +++ b/vocabularies/Analytics.md @@ -17,7 +17,7 @@ Term|Type|Description [AggregatedProperties](./Analytics.xml#L106:~:text=Deprecated in favor of [`AggregatedProperty`](#AggregatedProperty) [AggregatedProperty](./Analytics.xml#L124:~:text=Dynamic property for aggregate expression with specified aggregation method defined on the annotated entity type. [AnalyticalContext](./Analytics.xml#L144:~:text=Collection of properties that define an analytical context -[LevelInformation](./Analytics.xml#L284:~:text=Information about grouping levels in the result set of a request including the [`AutoExpand`](#AutoExpand) transformation +[LevelInformation](./Analytics.xml#L288:~:text=Information about grouping levels in the result set of a request including the [`AutoExpand`](#AutoExpand) transformation ## Functions @@ -95,25 +95,28 @@ Property|Type|Description ## [AutoExpandLevel](./Analytics.xml#L253:~:text= -## [AutoExpandSiblingOrder](./Analytics.xml#L263:~:text= -## [AutoExpandEntry](./Analytics.xml#L273:~:text= + + Properties in `D` must be used to identify entries in [`ExpandEntries/Entry`](#AutoExpandEntry), + otherwise they have the same effect as properties in `A`. + - +