Skip to content

Commit

Permalink
Changes to Aggregation vocabulary for CS03 (#178)
Browse files Browse the repository at this point in the history
* ODATA-1218 - Enhance hierarchy processing (#121)
* ODATA-1142 - resolved - Clarify MaxDistance is an optional parameter in hierarchy filter functions (#78)
* ODATA-1136 - resolved - Allow hierarchy filter functions for ancestors and descendants ... (#77)
* ODATA-1384 - Clarify usage of annotation qualifiers as references to hierarchies (#125)
* Digital/Physical -> Food/NonFood (#186)
* Aggregation voc - update descriptions: remove rollupall, add rolluprecursive  (#193)
* Preview on new transformations (#218)
* Changes resulting from OData-Aggr walkthrough (#191)
* remove commented-out Cycle term (#221)
  • Loading branch information
HeikoTheissen authored Oct 18, 2023
1 parent 1e0e049 commit 6cc0ce5
Show file tree
Hide file tree
Showing 10 changed files with 1,317 additions and 287 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

strategy:
matrix:
node-version: [18.x,20.x]
node-version: [20.x]

steps:
- uses: actions/checkout@v3
Expand Down
310 changes: 310 additions & 0 deletions examples/Org.OData.Aggregation.V1.SalesModel-sample.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,310 @@
{
"$Version": "4.0",
"$Reference": {
"https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Core.V1.json": {
"$Include": [
{
"$Namespace": "Org.OData.Core.V1",
"$Alias": "Core"
}
]
},
"https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Aggregation.V1.json": {
"$Include": [
{
"$Namespace": "Org.OData.Aggregation.V1",
"$Alias": "Aggregation"
}
]
}
},
"org.example.odata.salesservice": {
"$Alias": "SalesModel",
"Currency": {
"$Kind": "EntityType",
"$Key": [
"Code"
],
"Code": {
"$Nullable": true
},
"Name": {
"$Nullable": true,
"@Core.IsLanguageDependent": true
}
},
"Time": {
"$Kind": "EntityType",
"$Key": [
"Date"
],
"Date": {
"$Type": "Edm.Date"
},
"Month": {},
"Quarter": {},
"Year": {
"$Type": "Edm.Int16"
},
"@Aggregation.LeveledHierarchy#TimeHierarchy": [
"Year",
"Quarter",
"Month"
]
},
"Category": {
"$Kind": "EntityType",
"$Key": [
"ID"
],
"ID": {},
"Name": {
"$Nullable": true
},
"Products": {
"$Kind": "NavigationProperty",
"$Collection": true,
"$Type": "SalesModel.Product",
"$Partner": "Category"
}
},
"SalesOrganization": {
"$Kind": "EntityType",
"$Key": [
"ID"
],
"ID": {},
"Name": {
"$Nullable": true
},
"Superordinate": {
"$Kind": "NavigationProperty",
"$Type": "SalesModel.SalesOrganization",
"$Nullable": true
},
"Sales": {
"$Kind": "NavigationProperty",
"$Collection": true,
"$Type": "SalesModel.Sale",
"$Partner": "SalesOrganization"
},
"@Aggregation.RecursiveHierarchy#SalesOrgHierarchy": {
"NodeProperty": "ID",
"ParentNavigationProperty": "Superordinate"
}
},
"Customer": {
"$Kind": "EntityType",
"$Key": [
"ID"
],
"ID": {},
"Name": {
"$Nullable": true
},
"Country": {
"$Nullable": true
},
"Sales": {
"$Kind": "NavigationProperty",
"$Collection": true,
"$Type": "SalesModel.Sale",
"$Partner": "Customer"
}
},
"Product": {
"$Kind": "EntityType",
"$Abstract": true,
"$Key": [
"ID"
],
"ID": {},
"Name": {
"$Nullable": true
},
"Color": {
"$Nullable": true
},
"TaxRate": {
"$Type": "Edm.Decimal",
"$Nullable": true,
"$Scale": 2
},
"Category": {
"$Kind": "NavigationProperty",
"$Type": "SalesModel.Category",
"$Partner": "Products"
},
"Sales": {
"$Kind": "NavigationProperty",
"$Collection": true,
"$Type": "SalesModel.Sale",
"$Partner": "Product"
},
"@Aggregation.LeveledHierarchy#ProductHierarchy": [
"Category/Name",
"Name"
]
},
"FoodProduct": {
"$Kind": "EntityType",
"$BaseType": "SalesModel.Product",
"Rating": {
"$Type": "Edm.Byte",
"$Nullable": true
}
},
"NonFoodProduct": {
"$Kind": "EntityType",
"$BaseType": "SalesModel.Product",
"RatingClass": {
"$Nullable": true
}
},
"Sale": {
"$Kind": "EntityType",
"$Key": [
"ID"
],
"ID": {},
"Amount": {
"$Type": "Edm.Decimal",
"$Nullable": true,
"$Scale": 2,
"@Aggregation.ContextDefiningProperties": [
"Currency/Code"
]
},
"Currency": {
"$Kind": "NavigationProperty",
"$Type": "SalesModel.Currency"
},
"SalesOrganization": {
"$Kind": "NavigationProperty",
"$Type": "SalesModel.SalesOrganization",
"$Nullable": true,
"$Partner": "Sales"
},
"Product": {
"$Kind": "NavigationProperty",
"$Type": "SalesModel.Product",
"$Nullable": true,
"$Partner": "Sales"
},
"Customer": {
"$Kind": "NavigationProperty",
"$Type": "SalesModel.Customer",
"$Nullable": true,
"$Partner": "Sales"
},
"Time": {
"$Kind": "NavigationProperty",
"$Type": "SalesModel.Time",
"$Nullable": true
}
},
"SalesData": {
"$Kind": "EntityContainer",
"Time": {
"$Collection": true,
"$Type": "SalesModel.Time"
},
"Categories": {
"$Collection": true,
"$Type": "SalesModel.Category",
"$NavigationPropertyBinding": {
"Products": "Products"
}
},
"SalesOrganizations": {
"$Collection": true,
"$Type": "SalesModel.SalesOrganization",
"$NavigationPropertyBinding": {
"Superordinate": "SalesOrganizations",
"Sales": "Sales"
}
},
"Customers": {
"$Collection": true,
"$Type": "SalesModel.Customer",
"$NavigationPropertyBinding": {
"Sales": "Sales"
}
},
"Products": {
"$Collection": true,
"$Type": "SalesModel.Product",
"$NavigationPropertyBinding": {
"Category": "Categories",
"Sales": "Sales"
}
},
"Sales": {
"$Collection": true,
"$Type": "SalesModel.Sale",
"$NavigationPropertyBinding": {
"SalesOrganization": "SalesOrganizations",
"Customer": "Customers",
"Product": "Products",
"Time": "Time"
}
}
},
"$Annotations": {
"SalesModel.SalesData/Sales": {
"@Aggregation.ApplySupported": {
"Rollup": "MultipleHierarchies",
"GroupableProperties": [
"Amount",
"Product/ID",
"Product/Name",
"Product/Category/ID",
"Product/Category/Name",
"Customer",
"Customer/ID",
"Customer/Name",
"Customer/Country",
"Time",
"Time/Month",
"Time/Year"
],
"AggregatableProperties": [
{
"Property": "Amount",
"SupportedAggregationMethods": [
"sum",
"min",
"max"
],
"RecommendedAggregationMethod": "sum"
}
]
},
"@Aggregation.CustomAggregate#[email protected]": [
"Currency/Code"
],
"@Aggregation.CustomAggregate#Forecast": "Edm.Decimal"
},
"SalesModel.SalesData/Customers": {
"@Aggregation.ApplySupported": {
"Rollup": "None",
"GroupableProperties": [
"Name",
"Country"
]
}
},
"SalesModel.SalesData/Products": {
"@Aggregation.ApplySupported": {
"Rollup": "None",
"GroupableProperties": [
"Name",
"SalesModel.FoodProduct/Rating",
"SalesModel.NonFoodProduct/RatingClass"
]
}
}
}
},
"$EntityContainer": "org.example.odata.salesservice.SalesData"
}
Loading

0 comments on commit 6cc0ce5

Please sign in to comment.