Skip to content

Commit

Permalink
Avoid EnumType
Browse files Browse the repository at this point in the history
  • Loading branch information
HeikoTheissen committed Nov 10, 2023
1 parent 4750db8 commit 53368e3
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 34 deletions.
21 changes: 13 additions & 8 deletions vocabularies/Analytics.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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": {}
},
{
Expand All @@ -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,
Expand All @@ -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,
"[email protected]": "Sort in descending order"
"@Validation.AllowedValues": [
{ "Value": "asc", "@Core.Description": "Sort in ascending order" },
{ "Value": "desc", "@Core.Description": "Sort in descending order" }
]
}
}
}
28 changes: 15 additions & 13 deletions vocabularies/Analytics.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ Term|Type|Description
Parameter|Type|Description
:--------|:---|:----------
**[InputSet](./Analytics.xml#L183:~:text=<Function%20Name="-,AutoExpand,-")**|\[EntityType\]|**Binding parameter:** Entity set to be processed
[Levels](./Analytics.xml#L186:~:text=<Function%20Name="-,AutoExpand,-")|\[[AutoExpandLevel](#AutoExpandLevel)\]|Collection of aggregation levels forming a leveled hierarchy<br>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=<Function%20Name="-,AutoExpand,-")|\[[AutoExpandLevel](#AutoExpandLevel)\]|Collection of aggregation levels forming 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. All referenced properties must be groupable.
[ExpandLevel](./Analytics.xml#L196:~:text=<Function%20Name="-,AutoExpand,-")|Int64|Number of levels to be expanded, counting from left<br>The function result comprises the leveled hierarchy with the expanded levels and the following level as leaves in preorder.
[Aggregation](./Analytics.xml#L202:~: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#L208:~: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#L211:~:text=<Function%20Name="-,AutoExpand,-")*|String|*Optional parameter:* Expression valid for `filter` transformation to restrict the input set before any further procressing
*[AggregatedValuesLeafFilter](./Analytics.xml#L217:~: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#L223:~:text=<Function%20Name="-,AutoExpand,-")*|Int64|*Optional parameter:* Number of entries to skip from the top of the fully ordered result
*[Top](./Analytics.xml#L231:~:text=<Function%20Name="-,AutoExpand,-")*|Int64|*Optional parameter:* Number of entries to return from the result set after any skipping
*[Top](./Analytics.xml#L231:~: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#L237:~: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#L245:~:text=<Function%20Name="-,AutoExpand,-")|\[EntityType\]|

Expand Down Expand Up @@ -67,28 +67,30 @@ Property|Type|Description
[Measure](./Analytics.xml#L162:~:text=<ComplexType%20Name="-,AnalyticalContextType,-")|[Tag](https://github.com/oasis-tcs/odata-vocabularies/blob/main/vocabularies/Org.OData.Core.V1.md#Tag)|The property holds the numeric value of a measure
[AccumulativeMeasure](./Analytics.xml#L165:~: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="AutoExpandLevels"></a>
## [AutoExpandLevels](./Analytics.xml#L247:~:text=<ComplexType%20Name="-,AutoExpandLevels,-") *([Experimental](Common.md#Experimental))*
<a name="AutoExpandLevel"></a>
## [AutoExpandLevel](./Analytics.xml#L247:~:text=<ComplexType%20Name="-,AutoExpandLevel,-") *([Experimental](Common.md#Experimental))*


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

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


Property|Type|Description
:-------|:---|:----------
[Property](./Analytics.xml#L253:~:text=<ComplexType%20Name="-,AutoExpandSiblingOrder,-")|String|Property by which to sort
[Order](./Analytics.xml#L256:~:text=<ComplexType%20Name="-,AutoExpandSiblingOrder,-")|[SortOrder](#SortOrder)|Sorting direction
[Property](./Analytics.xml#L255:~:text=<ComplexType%20Name="-,AutoExpandSiblingOrder,-")|String|Property by which to sort
[Order](./Analytics.xml#L258:~:text=<ComplexType%20Name="-,AutoExpandSiblingOrder,-")|[SortOrder](#SortOrder)|Sorting direction

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


Member|Value|Description
:-----|----:|:----------
[Asc](./Analytics.xml#L262:~:text=<EnumType%20Name="-,SortOrder,-")|0|Sort in ascending order
[Desc](./Analytics.xml#L265:~:text=<EnumType%20Name="-,SortOrder,-")|1|Sort in descending order

Allowed Value|Description
:------------|:----------
[asc](./Analytics.xml#L266:~:text=<TypeDefinition%20Name="-,SortOrder,-")|Sort in ascending order
[desc](./Analytics.xml#L270:~:text=<TypeDefinition%20Name="-,SortOrder,-")|Sort in descending order
34 changes: 21 additions & 13 deletions vocabularies/Analytics.xml
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,11 @@
<Parameter Name="Levels" Type="Collection(Analytics.AutoExpandLevel)" Nullable="false">
<Annotation Term="Core.Description" String="Collection of aggregation levels forming a leveled hierarchy" />
<Annotation Term="Core.LongDescription">
<String>Each element in the collection defines a non-empty set of property names constituting a level.
<String>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.</String>
All referenced properties must be groupable.</String>
</Annotation>
</Parameter>
<Parameter Name="ExpandLevel" Type="Edm.Int64" Nullable="false">
Expand Down Expand Up @@ -229,7 +229,7 @@
</Annotation>
</Parameter>
<Parameter Name="Top" Type="Edm.Int64" Nullable="false">
<Annotation Term="Core.Description" String="Number of entries to return from the result set after any skipping" />
<Annotation Term="Core.Description" String="Number of entries to return from the result set after any skipping (absent means all)" />
<Annotation Term="Core.OptionalParameter">
<Record/>
</Annotation>
Expand All @@ -244,9 +244,11 @@
</Parameter>
<ReturnType Type="Collection(Edm.EntityType)" />
</Function>
<ComplexType Name="AutoExpandLevels">
<ComplexType Name="AutoExpandLevel">
<Annotation Term="Common.Experimental" />
<Property Name="P" Type="Collection(Edm.String)" Nullable="false" />
<Property Name="P" Type="Collection(Edm.String)" Nullable="false">
<Annotation Term="Core.Description" String="A non-empty set of property names constituting a level" />
</Property>
</ComplexType>
<ComplexType Name="AutoExpandSiblingOrder">
<Annotation Term="Common.Experimental" />
Expand All @@ -257,15 +259,21 @@
<Annotation Term="Core.Description" String="Sorting direction" />
</Property>
</ComplexType>
<EnumType Name="SortOrder">
<TypeDefinition Name="SortOrder" UnderlyingType="Edm.String">
<Annotation Term="Common.Experimental" />
<Member Name="Asc">
<Annotation Term="Core.Description" String="Sort in ascending order" />
</Member>
<Member Name="Desc">
<Annotation Term="Core.Description" String="Sort in descending order" />
</Member>
</EnumType>
<Annotation Term="Validation.AllowedValues">
<Collection>
<Record>
<PropertyValue Property="Value" String="asc" />
<Annotation Term="Core.Description" String="Sort in ascending order" />
</Record>
<Record>
<PropertyValue Property="Value" String="desc" />
<Annotation Term="Core.Description" String="Sort in descending order" />
</Record>
</Collection>
</Annotation>
</TypeDefinition>

</Schema>
</edmx:DataServices>
Expand Down

0 comments on commit 53368e3

Please sign in to comment.