Uploaded image for project: 'OASIS Open Data Protocol (OData) TC'
  1. OASIS Open Data Protocol (OData) TC
  2. ODATA-109

Define rules for specifying annotations within annotations

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: CSDL XML
    • Labels:
      None
    • Environment:

      [Proposed]

    • Proposal:
      Hide

      The value of the Path attribute of an Annotation or PropertyValue element MAY use terms as path segments if and only if the model element addressed with the preceding path part is annotated with this term.

      Examples:

      Type containing the following annotation is also annotated with the structured term CreativeWorks.Movie which has a Title property:

      <Annotation Term="Display.Caption" Path="CreativeWorks.Movie/Title"/>
      <Annotation Term="Display.Caption" Path="vCard.Contact/Fullname" />

      Type containing the following annotation has a complex property or navigation property WorkAddress whose type is annotated with vCard.Address using the qualifier Billing:

      <Annotation Term="Display.Caption" Path="WorkAddress/vCard.Address/Region#Billing" />

      Refer to an annotation on the same property (assume path starts at enclosing entity type)

      <EntityType Name="SomeType">
      <Property Name="Something" Type="String">
      <Annotation Term="Display.Hidden" Path="Something/Core.ReadOnly" />
      </Property>
      <Property Name="SomethingElse" Type="String">
      <Annotation Term="Display.Hidden" Path="Something/Core.ReadOnly" />
      </Property>
      </EntityType>

      Accepted: https://www.oasis-open.org/committees/download.php/48097/odata-meeting-23_on-20130130_31-F2F-minutes.html#odata-109

      Show
      The value of the Path attribute of an Annotation or PropertyValue element MAY use terms as path segments if and only if the model element addressed with the preceding path part is annotated with this term. Examples: Type containing the following annotation is also annotated with the structured term CreativeWorks.Movie which has a Title property: <Annotation Term="Display.Caption" Path="CreativeWorks.Movie/Title"/> <Annotation Term="Display.Caption" Path="vCard.Contact/Fullname" /> Type containing the following annotation has a complex property or navigation property WorkAddress whose type is annotated with vCard.Address using the qualifier Billing: <Annotation Term="Display.Caption" Path="WorkAddress/vCard.Address/Region#Billing" /> Refer to an annotation on the same property (assume path starts at enclosing entity type) <EntityType Name="SomeType"> <Property Name="Something" Type="String"> <Annotation Term="Display.Hidden" Path="Something/Core.ReadOnly" /> </Property> <Property Name="SomethingElse" Type="String"> <Annotation Term="Display.Hidden" Path="Something/Core.ReadOnly" /> </Property> </EntityType> Accepted: https://www.oasis-open.org/committees/download.php/48097/odata-meeting-23_on-20130130_31-F2F-minutes.html#odata-109
    • Resolution:
      Show
      https://www.oasis-open.org/committees/download.php/48171/odata-core-v1.0-wd01-part3-csdl-2013-02-07-RH.doc https://tools.oasis-open.org/version-control/browse/wsvn/odata/trunk/spec/schemas/csdl.xsd?rev=175 Accepted: https://www.oasis-open.org/committees/download.php/48269/odata-meeting-25_on-20130214-minutes.html#odata-109

      Description

      An Annotation should be able to use a previously defined Annotation when specifying a value. For example, the value of the "Caption" Annotation may be the "Title" property of the "Movie" type, which has been applied to a type in my model through a Annotation. This requires casting to the type specified in the annotation.

        Attachments

          Activity

            People

            • Assignee:
              handl Ralf Handl
              Reporter:
              mikep Michael Pizzo (Inactive)
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: