Skip to content

Commit

Permalink
Make LeafLevel mandatory
Browse files Browse the repository at this point in the history
It is needed if `AggregatedValuesLeafFilter` is specified or properties
from `Aggregation` occur in `SiblingOrder`. Especially the latter is
typical.
  • Loading branch information
HeikoTheissen committed Nov 15, 2023
1 parent 2fb8ff2 commit f5dea9f
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 36 deletions.
13 changes: 6 additions & 7 deletions vocabularies/Analytics.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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",
Expand Down
36 changes: 18 additions & 18 deletions vocabularies/Analytics.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Term|Type|Description
[AggregatedProperties](./Analytics.xml#L106:~:text=<Term%20Name="-,AggregatedProperties,-") *(Deprecated)*|\[[AggregatedPropertyType](#AggregatedPropertyType)\]|<a name="AggregatedProperties"></a>Deprecated in favor of [`AggregatedProperty`](#AggregatedProperty)
[AggregatedProperty](./Analytics.xml#L124:~:text=<Term%20Name="-,AggregatedProperty,-")|[AggregatedPropertyType](#AggregatedPropertyType)|<a name="AggregatedProperty"></a>Dynamic property for aggregate expression with specified aggregation method defined on the annotated entity type.
[AnalyticalContext](./Analytics.xml#L144:~:text=<Term%20Name="-,AnalyticalContext,-")|\[[AnalyticalContextType](#AnalyticalContextType)\]|<a name="AnalyticalContext"></a>Collection of properties that define an analytical context
[LevelInformation](./Analytics.xml#L289:~:text=<Term%20Name="-,LevelInformation,-") *([Experimental](Common.md#Experimental))*|[HierarchyType](Hierarchy.md#HierarchyType)|<a name="LevelInformation"></a>Information about grouping levels in the result set of a request including the [`AutoExpand`](#AutoExpand) transformation
[LevelInformation](./Analytics.xml#L285:~:text=<Term%20Name="-,LevelInformation,-") *([Experimental](Common.md#Experimental))*|[HierarchyType](Hierarchy.md#HierarchyType)|<a name="LevelInformation"></a>Information about grouping levels in the result set of a request including the [`AutoExpand`](#AutoExpand) transformation


## Functions
Expand All @@ -31,15 +31,15 @@ Parameter|Type|Description
:--------|:---|:----------
**[InputSet](./Analytics.xml#L186:~:text=<Function%20Name="-,AutoExpand,-")**|\[EntityType\]|**Binding parameter:** Entity set to be processed
[Levels](./Analytics.xml#L189:~:text=<Function%20Name="-,AutoExpand,-")|\[[AutoExpandLevel](#AutoExpandLevel)\]|Collection of aggregation levels forming the visible part of a leveled hierarchy<br>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=<Function%20Name="-,AutoExpand,-")|\[String\]|Properties to aggregate for all result entries on all levels<br>All properties in this collection must be custom aggregates.
[SiblingOrder](./Analytics.xml#L206:~:text=<Function%20Name="-,AutoExpand,-")|\[[AutoExpandSiblingOrder](#AutoExpandSiblingOrder)\]|Sort specification to apply to all direct descendants of a given entry in the resulting leveled hierarchy
*[LeafLevel](./Analytics.xml#L209:~:text=<Function%20Name="-,AutoExpand,-")*|\[String\]|*Optional parameter:* A possibly empty set of property names that constitute, together with the property names from `Levels`, the leaf level of the leveled hierarchy<br>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=<Function%20Name="-,AutoExpand,-")*|String|*Optional parameter:* Expression valid for `filter` transformation to restrict the input set before any further procressing
*[AggregatedValuesLeafFilter](./Analytics.xml#L226:~:text=<Function%20Name="-,AutoExpand,-")*|String|*Optional parameter:* Expression valid for `filter` transformation to restrict the input set at the most detailed grouping level with conditions on aggregated values
*[Skip](./Analytics.xml#L232:~:text=<Function%20Name="-,AutoExpand,-")*|Int64|*Optional parameter:* Number of entries to skip from the top of the fully ordered result
*[Top](./Analytics.xml#L240:~:text=<Function%20Name="-,AutoExpand,-")*|Int64|*Optional parameter:* Number of entries to return from the result set after any skipping (absent means all)
*[ResultEntriesCount](./Analytics.xml#L246:~:text=<Function%20Name="-,AutoExpand,-")*|Bool|*Optional parameter:* Whether to return the total number of entries in the result independent of Skip/Top
[&rarr;](./Analytics.xml#L254:~:text=<Function%20Name="-,AutoExpand,-")|\[EntityType\]|Output set including the instance annotation [`LevelInformation`](#LevelInformation)
[LeafLevel](./Analytics.xml#L200:~:text=<Function%20Name="-,AutoExpand,-")|\[String\]|A possibly empty set of property names that constitute, together with the property names from `Levels`, the leaf level of the leveled hierarchy<br>Property names that occur in `Levels` must not be repeated here. All referenced properties must be groupable.
[Aggregation](./Analytics.xml#L207:~:text=<Function%20Name="-,AutoExpand,-")|\[String\]|Properties to aggregate for all result entries on all levels<br>All properties in this collection must be custom aggregates.
[SiblingOrder](./Analytics.xml#L213:~:text=<Function%20Name="-,AutoExpand,-")|\[[AutoExpandSiblingOrder](#AutoExpandSiblingOrder)\]|Sort specification to apply to all direct descendants of a given entry in the resulting leveled hierarchy
*[BeforeAggregationFilter](./Analytics.xml#L216:~:text=<Function%20Name="-,AutoExpand,-")*|String|*Optional parameter:* Expression valid for `filter` transformation to restrict the input set before any further procressing
*[AggregatedValuesLeafFilter](./Analytics.xml#L222:~:text=<Function%20Name="-,AutoExpand,-")*|String|*Optional parameter:* Expression valid for `filter` transformation to restrict the input set at the most detailed grouping level with conditions on aggregated values
*[Skip](./Analytics.xml#L228:~:text=<Function%20Name="-,AutoExpand,-")*|Int64|*Optional parameter:* Number of entries to skip from the top of the fully ordered result
*[Top](./Analytics.xml#L236:~:text=<Function%20Name="-,AutoExpand,-")*|Int64|*Optional parameter:* Number of entries to return from the result set after any skipping (absent means all)
*[ResultEntriesCount](./Analytics.xml#L242:~:text=<Function%20Name="-,AutoExpand,-")*|Bool|*Optional parameter:* Whether to return the total number of entries in the result independent of Skip/Top
[&rarr;](./Analytics.xml#L250:~:text=<Function%20Name="-,AutoExpand,-")|\[EntityType\]|Output set including the instance annotation [`LevelInformation`](#LevelInformation)


<a name="AggregatedPropertyType"></a>
Expand Down Expand Up @@ -69,29 +69,29 @@ Property|Type|Description
[AccumulativeMeasure](./Analytics.xml#L168:~:text=<ComplexType%20Name="-,AnalyticalContextType,-")|[Tag](https://github.com/oasis-tcs/odata-vocabularies/blob/main/vocabularies/Org.OData.Core.V1.md#Tag)|The measure has non-negative and additive values; it can be used in whole-part charts, e.g. the Donut

<a name="AutoExpandLevel"></a>
## [AutoExpandLevel](./Analytics.xml#L258:~:text=<ComplexType%20Name="-,AutoExpandLevel,-") *([Experimental](Common.md#Experimental))*
## [AutoExpandLevel](./Analytics.xml#L254:~:text=<ComplexType%20Name="-,AutoExpandLevel,-") *([Experimental](Common.md#Experimental))*


Property|Type|Description
:-------|:---|:----------
[P](./Analytics.xml#L260:~:text=<ComplexType%20Name="-,AutoExpandLevel,-")|\[String\]|A non-empty set of property names constituting a level
[P](./Analytics.xml#L256:~:text=<ComplexType%20Name="-,AutoExpandLevel,-")|\[String\]|A non-empty set of property names constituting a level

<a name="AutoExpandSiblingOrder"></a>
## [AutoExpandSiblingOrder](./Analytics.xml#L264:~:text=<ComplexType%20Name="-,AutoExpandSiblingOrder,-") *([Experimental](Common.md#Experimental))*
## [AutoExpandSiblingOrder](./Analytics.xml#L260:~:text=<ComplexType%20Name="-,AutoExpandSiblingOrder,-") *([Experimental](Common.md#Experimental))*


Property|Type|Description
:-------|:---|:----------
[Property](./Analytics.xml#L266:~:text=<ComplexType%20Name="-,AutoExpandSiblingOrder,-")|String|Property by which to sort
[Order](./Analytics.xml#L269:~:text=<ComplexType%20Name="-,AutoExpandSiblingOrder,-")|[SortOrderType](#SortOrderType)|Sorting direction
[Property](./Analytics.xml#L262:~:text=<ComplexType%20Name="-,AutoExpandSiblingOrder,-")|String|Property by which to sort
[Order](./Analytics.xml#L265:~:text=<ComplexType%20Name="-,AutoExpandSiblingOrder,-")|[SortOrderType](#SortOrderType)|Sorting direction

<a name="SortOrderType"></a>
## [SortOrderType](./Analytics.xml#L273:~:text=<TypeDefinition%20Name="-,SortOrderType,-") *([Experimental](Common.md#Experimental))*
## [SortOrderType](./Analytics.xml#L269:~:text=<TypeDefinition%20Name="-,SortOrderType,-") *([Experimental](Common.md#Experimental))*
**Type:** String



Allowed Value|Description
:------------|:----------
[asc](./Analytics.xml#L277:~:text=<TypeDefinition%20Name="-,SortOrderType,-")|Sort in ascending order
[desc](./Analytics.xml#L281:~:text=<TypeDefinition%20Name="-,SortOrderType,-")|Sort in descending order
[asc](./Analytics.xml#L273:~:text=<TypeDefinition%20Name="-,SortOrderType,-")|Sort in ascending order
[desc](./Analytics.xml#L277:~:text=<TypeDefinition%20Name="-,SortOrderType,-")|Sort in descending order
18 changes: 7 additions & 11 deletions vocabularies/Analytics.xml
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,13 @@
All referenced properties must be groupable.</String>
</Annotation>
</Parameter>
<Parameter Name="LeafLevel" Type="Collection(Edm.String)" Nullable="false">
<Annotation Term="Core.Description" String="A possibly empty set of property names that constitute, together with the property names from `Levels`, the leaf level of the leveled hierarchy" />
<Annotation Term="Core.LongDescription">
<String>Property names that occur in `Levels` must not be repeated here.
All referenced properties must be groupable.</String>
</Annotation>
</Parameter>
<Parameter Name="Aggregation" Type="Collection(Edm.String)" Nullable="false">
<Annotation Term="Core.Description" String="Properties to aggregate for all result entries on all levels" />
<Annotation Term="Core.LongDescription">
Expand All @@ -206,17 +213,6 @@
<Parameter Name="SiblingOrder" Type="Collection(Analytics.AutoExpandSiblingOrder)" Nullable="false">
<Annotation Term="Core.Description" String="Sort specification to apply to all direct descendants of a given entry in the resulting leveled hierarchy" />
</Parameter>
<Parameter Name="LeafLevel" Type="Collection(Edm.String)" Nullable="false">
<Annotation Term="Core.Description" String="A possibly empty set of property names that constitute, together with the property names from `Levels`, the leaf level of the leveled hierarchy" />
<Annotation Term="Core.LongDescription">
<String>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.</String>
</Annotation>
<Annotation Term="Core.OptionalParameter">
<Record/>
</Annotation>
</Parameter>
<Parameter Name="BeforeAggregationFilter" Type="Edm.String" Nullable="false">
<Annotation Term="Core.Description" String="Expression valid for `filter` transformation to restrict the input set before any further procressing" />
<Annotation Term="Core.OptionalParameter">
Expand Down

0 comments on commit f5dea9f

Please sign in to comment.