[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: [odata] Groups - OData CSDL XML Representation Version 4.01 uploaded
How about this – second paragraph and example are new: 14.2
Annotation
An annotation applies a term
to a model element and defines how to calculate a value for the term application. Both term and model element MUST be in scope. Section
14.1.2 specifies which model elements MAY be annotated with a term. Annotation values can be constant values, but more often they refer to resources or parts of resources published by the service. The most common construct for assigning an annotation value is a
path _expression_
that refers to a property of the same or a related structured type. Example 40: term
Measures.ISOCurrency, once annotated with constant value, once with dynamic value "AmountInReportingCurrency": { "$Type": "Edm.Decimal", "@Measures.ISOCurrency": "USD" }, "AmountInTransactionCurrency": { "$Type": "Edm.Decimal", "@Measures.ISOCurrency": { "$Path": "Currency" } }, "Currency": { "$MaxLength": 3 } From: Ericson, George [mailto:George.Ericson@dell.com]
The real purpose of the note was to suggest that additional text be added to the description of Terms and Annotations to highlight this capability.
At least for me, the clause on Dynamic expressions didn’t connect as being particularly relevant, so I had not really internalized it. Now that I have, I’m not sure how to fix the issue. One thought is that I avoided the Dynamic Expressions clause as something
I didn’t probably need. It’s not clear that the distinction between Constant and Dynamic is helpful. Both result in values. Perhaps it would help to rename Dynamic Expressions to simply “Expressions” and move the Constant Expressions clause into the renamed
clause. G From:
odata@lists.oasis-open.org [mailto:odata@lists.oasis-open.org]
On Behalf Of Ericson, George Thanks From: Handl, Ralf [mailto:ralf.handl@sap.com]
The simpler example is hidden in chapter 11: Example 29: "Length": { "$Kind": "TypeDefinition", "$UnderlyingType": "Edm.Int32",
"@Measures.Unit": "Centimeters" }, "Weight": { "$Kind": "TypeDefinition", "$UnderlyingType": "Edm.Int32",
"@Measures.Unit": "Kilograms" }, "Size": { "$Kind": "ComplexType", "Height": { "$Type": "self.Length" }, "Weight": { "$Type": "self.Weight" } } From: Ericson, George [mailto:George.Ericson@dell.com]
Interesting, but not obvious example. The use of dynamic expressions deserves more explanation w.r.t. application to an ordinary Term. I learned
something new today, but it required persistence.: "Price": { "$Type": "Edm.Decimal", "@Measures.ISOCurrency": { "$Path": "Currency" } }, "Currency": { "$MaxLength": 3 }, Additional simpler example would be helpful for comparison: "Price": { "$Type": "Edm.Decimal", "@Measures.ISOCurrency": "EUR" }, Regards, George From:
odata@lists.oasis-open.org [mailto:odata@lists.oasis-open.org]
On Behalf Of Ralf Handl Submitter's message
|
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]