oasis-tcs/odata-vocabularies

the Type of the Edm Term for LabeledElement, IsOf....

Closed this issue · 5 comments

xuzhg commented

HI, TC

From OData XML CSDL spec, it says:

Element edm:Term

The edm:Term element MUST contain the attributes Name and Type.

so, What's the Type of the term which is used with "Is-Of", "Cast", "Labeled Element", ... etc.

for example:

<Annotation Term="self.IsPreferredCustomer">
  <IsOf Type="self.PreferredCustomer">
    <Path>Customer</Path>
  </IsOf>
</Annotation>

What's the Type for the Term (self.IsPreferrredCustomer)?

The IsOf expression returns a Boolean, so term IsPreferredCustomer must also be of type Boolean.

xuzhg commented

@ralfhandl How about "LabeledElement"?

14.4.9 Labeled Element says

The value of the child expression is also the value of the labeled element expression.

xuzhg commented

@ralfhandl Thanks.

I mean what's the Type of term org.example.display.DisplayName in the following examples:

<Annotation Term="org.example.display.DisplayName">
  <LabeledElementReference>Model.CustomerFirstName</LabeledElementReference>
</Annotation>

and

<Annotation Term="org.example.display.DisplayName">
  <LabeledElement Name="CustomerFirstName" Path="FirstName" />
</Annotation>

That's a made-up term. As the labeled element is defined within an annotation with the same term as the one within which it is referenced, the type is naturally the same, no matter what type the hypothetical DisplayName has.