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

Clarify representation of GEO literals and streams in annotations (XML, JSON)

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: V4.02
    • Component/s: CSDL JSON, CSDL XML
    • Labels:
      None
    • Proposal:
      Hide

      In CSDL JSON a constant annotation (property) value is the type-specific JSON representation of that value, see [OData-JSON].

      • For Edm.Geo* this is the GeoJSON value
      • For properties of type Edm.Stream this is
        • native JSON for streams of media type application/json or one of its subtypes, optionally with format parameters
        • a string containing the plain text for streams of media types text/*
        • a string containing the base64url-encoded value for all other media types (same as Edm.Binary)

      In CSDL XML a constant annotation (property) value is represented according to the appropriate alternative in the primitiveValue rule defined in [OData‑ABNF], using element or attribute notation:

      • a constant string expression for Edm.Geo* whose value is the appropriate full_Xxx_Literal for Edm.Geo*, e.g. fullPointLiteral for Edm.GeometryPoint and Edm.GeographyPoint
      • a constant string expression for Edm.Stream with media types application/json or text/*
      • a constant binary expression for Edm.Stream for all other media types

      For stream values the annotation (property) MUST be annotated with term Core.MediaType and the media type of the stream as its value.

      Services SHOULD only return these annotation values in CSDL documents with Version 4.02 or later.

      Clients SHOULD already ignore unknown annotations. This now extends to annotations containing literal Edm.Stream and Edm.Geo* values.

      Show
      In CSDL JSON a constant annotation (property) value is the type-specific JSON representation of that value, see [OData-JSON] . For Edm.Geo* this is the GeoJSON value For properties of type Edm.Stream this is native JSON for streams of media type application/json or one of its subtypes, optionally with format parameters a string containing the plain text for streams of media types text/* a string containing the base64url-encoded value for all other media types (same as Edm.Binary) In CSDL XML a constant annotation (property) value is represented according to the appropriate alternative in the primitiveValue rule defined in [OData‑ABNF] , using element or attribute notation: a constant string expression for Edm.Geo* whose value is the appropriate full_Xxx_Literal for Edm.Geo*, e.g. fullPointLiteral for Edm.GeometryPoint and Edm.GeographyPoint a constant string expression for Edm.Stream with media types application/json or text/* a constant binary expression for Edm.Stream for all other media types For stream values the annotation (property) MUST be annotated with term Core.MediaType and the media type of the stream as its value. Services SHOULD only return these annotation values in CSDL documents with Version 4.02 or later. Clients SHOULD already ignore unknown annotations. This now extends to annotations containing literal Edm.Stream and Edm.Geo* values.
    • Resolution:
      Show
      https://github.com/oasis-tcs/odata-specs/pull/161

      Description

      Section 14.3 Constant Expression defines representations for primitive constant values in annotations, with two exceptions:

      • Edm.Stream
      • Edm.Geo*

      We currently have no concrete use cases for either, but it's a gap.

        Attachments

          Activity

            People

            • Assignee:
              handl Ralf Handl
              Reporter:
              handl Ralf Handl
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: