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

Lazy loading of Annotations: Add optional Attribute "TargetNamespace" to edmx:IncludeAnnotations element

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: V4.0_CSD01
    • Fix Version/s: V4.0_CSD02
    • Component/s: CSDL XML
    • Labels:
      None
    • Environment:

      [Applied]

    • Proposal:
      Hide

      Add a section 3.5.3 to CSDL Spec:

      3.5.3 Attribute TargetNamespace

      An edmx:IncludeAnnotations element MAY specify a Namespace value for the TargetNamespace attribute.
      If the TargetNamespace is specified, only those annotations which apply a term from the specified TermNamespace (if present) to an element of the Targetnamespace with the specified Qualifier (if present) SHOULD be imported. If TargetNamespace is not specified, all annotations within the document from the specified TermNamespace (taking into account the Qualifier, if present) SHOULD be applied.
      If a value is supplied, the include element will import the set of annotations that apply terms from the namespace in the value. The TargetNamespace attribute also provides consumers insight about what namespaces are used in the annotations document. If there are no target elements that have a namespace of interest to the consumer, the consumer can opt not to download the document.

      Reformulate 3.5.2 "Attribute Qualifier" accordingly, and extend example under 3.5. and change edmx schema definition

      Accepted: https://www.oasis-open.org/committees/download.php/49325/odata-meeting-38_on-20130523-minutes.html#odata-397

      Show
      Add a section 3.5.3 to CSDL Spec: 3.5.3 Attribute TargetNamespace An edmx:IncludeAnnotations element MAY specify a Namespace value for the TargetNamespace attribute. If the TargetNamespace is specified, only those annotations which apply a term from the specified TermNamespace (if present) to an element of the Targetnamespace with the specified Qualifier (if present) SHOULD be imported. If TargetNamespace is not specified, all annotations within the document from the specified TermNamespace (taking into account the Qualifier, if present) SHOULD be applied. If a value is supplied, the include element will import the set of annotations that apply terms from the namespace in the value. The TargetNamespace attribute also provides consumers insight about what namespaces are used in the annotations document. If there are no target elements that have a namespace of interest to the consumer, the consumer can opt not to download the document. Reformulate 3.5.2 "Attribute Qualifier" accordingly, and extend example under 3.5. and change edmx schema definition Accepted: https://www.oasis-open.org/committees/download.php/49325/odata-meeting-38_on-20130523-minutes.html#odata-397
    • Resolution:
      Show
      https://www.oasis-open.org/committees/download.php/49277/odata-v4.0-wd02-part3-csdl-2013-05-28.docx https://tools.oasis-open.org/version-control/browse/wsvn/odata/trunk/spec/schemas/edmx.xsd?rev=319 Accepted: https://www.oasis-open.org/committees/download.php/49557/odata-meeting-41_on-20130613_14-F2F-minutes.html#odata-397

      Description

      If a term is annotated at a model element (with an optional qualifier), this annotation is uniquely identified by (the "target" model element, the term, the qualifier). E.g. the following annotation is identified by (com.sap.erp.products.Product,UIVA.DataFieldWithNavigation,FirstDataField):
      <Annotations Target="com.sap.erp.products.Product">
      <Annotation Term="UIVA.DataFieldWithNavigation" Qualifier="FirstDataField">
      <Record>
      <PropertyValue Property="Label" String="Supplier" />
      <PropertyValue Property="Value" Path="@com.sap.AnnoCrossReferenceTerm.Supplier#Foo/SupplierName" />
      </Record>
      </Annotation>
      </Annotations>
      This annotation uses a other annotation in the path attribute identified by (com.sap.erp.products.Product,com.sap.AnnoCrossReferenceTerm.Supplier,Foo). If this annotation is not included in the same file as the sample annotation above, the consumer has to load this annotation to figure out the annotation value. How can he find the right edmx:reference URI? Today we can qualify an edmx:includeAnnotation element inside an edmx:reference element by a TermNamspace attribute (MUST) and a Qualifier attribute (MAY). In our example he can search for (com.sap.AnnoCrossReferenceTerm,Foo) inside the edmx:includeAnnotation elements and load all matching edmx:reference files. There can be many.
      If we allow annotation providers to express in addition to the TermNamespace and the Qualifier a so called TargetNamespace (the namespace the annotated model element belongs to), the number of matching files could be reduced, because the consumer can search for (com.sap.erp.products,com.sap.AnnoCrossReferenceTerm,Foo) inside the edmx:includeAnnotation elements and load only the edmx:reference files matching this more specific search query.

        Attachments

          Activity

            People

            • Assignee:
              handl Ralf Handl
              Reporter:
              martinzurmuehl Martin Zurmuehl
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: