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

Define ID, ReadLink and EditLink in Part 1: Protocol, define representation in Atom and JSON

    XMLWordPrintable

    Details

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

      [Applied]

    • Proposal:
      Hide

      JSON Services:
      -MUST write the odata.id annotation for the object if it does not follow convention OR full metadata is specified
      -MUST write odata.id=null for "transient" entities (that cannot be refetched or updated) (in minimal or full metadata)
      -MUST write the odata.editlink annotation if entity is updatable and (editlink is different from the id OR full metadata)
      -MUST write the odata.readlink annotation if entity is read-only and (readlink is different from id OR full metadata) or (entity is updatable but readlink is different from editlink)
      -MAY write the odata.readlink annotation to signal that an entity is read-only but other entities in the set may be updatable
      -MAY write odata.readlink annotation to feed, in which case it MUST represent the original query
      -MUST NOT write odata.editlink or odata.id for feeds as the meaning of these annotations has not been defined

      JSON Clients:
      -MAY assume an entity with odata.id=null cannot be compared to other entities, refetched, or updated
      -MAY generate the id for an entity by convention if it is not present in the entity
      -MAY use the id for an entity as an editlink if it is not transient and no editlink or readlink is present
      -SHOULD NOT attempt to update an entity with a readlink and no editlink, (i.e., should not "fabricate" an editlink if a readlink is present) or if the entity is annotated with the odata.readonly annotation set to false
      -MAY use the editlink for an entity as a readlink if no readlink is present
      -MAY use the id for an entity as a readlink if it is not transient and no readlink or editlink is present

      ATOM, services
      -MUST write an <id> for the entry (this is required by ATOM)
      -SHOULD follow the naming pattern <id>odata:transient:

      {some-generated-unique-identifier-to-not-break-atom-parsers}

      </id> for transient ids
      -MUST write an edit link if, and only if the entry is updatable
      -MUST write a self link if, and only if, the entry is can be fetched and is read-only or the read link is different from the editlink
      -MUST write write an <id> for the feed that uniquely identifies the collection from which the feed was generated (required by ATOM).
      -MAY write a self link in a feed, in which case it MUST represent the original query
      -MUST write an <id> for a feed (this is required by ATOM)
      -MAY write a self link for a feed, in which case it MUST represent the original query
      -MUST NOT write edit link for a feed

      ATOM Clients:
      -MAY assume an entity with an id that matches the transient pattern cannot be compared to other entities, refetched, or updated
      -MAY interpret the edit link as a self link if no self link is present
      -SHOULD NOT attempt to update an entity without an editlink

      Accepted:https://www.oasis-open.org/committees/download.php/49212/odata-meeting-37_on-20130516-minutes.html#odata-351

      Show
      JSON Services: -MUST write the odata.id annotation for the object if it does not follow convention OR full metadata is specified -MUST write odata.id=null for "transient" entities (that cannot be refetched or updated) (in minimal or full metadata) -MUST write the odata.editlink annotation if entity is updatable and (editlink is different from the id OR full metadata) -MUST write the odata.readlink annotation if entity is read-only and (readlink is different from id OR full metadata) or (entity is updatable but readlink is different from editlink) -MAY write the odata.readlink annotation to signal that an entity is read-only but other entities in the set may be updatable -MAY write odata.readlink annotation to feed, in which case it MUST represent the original query -MUST NOT write odata.editlink or odata.id for feeds as the meaning of these annotations has not been defined JSON Clients: -MAY assume an entity with odata.id=null cannot be compared to other entities, refetched, or updated -MAY generate the id for an entity by convention if it is not present in the entity -MAY use the id for an entity as an editlink if it is not transient and no editlink or readlink is present -SHOULD NOT attempt to update an entity with a readlink and no editlink, (i.e., should not "fabricate" an editlink if a readlink is present) or if the entity is annotated with the odata.readonly annotation set to false -MAY use the editlink for an entity as a readlink if no readlink is present -MAY use the id for an entity as a readlink if it is not transient and no readlink or editlink is present ATOM, services -MUST write an <id> for the entry (this is required by ATOM) -SHOULD follow the naming pattern <id>odata:transient: {some-generated-unique-identifier-to-not-break-atom-parsers} </id> for transient ids -MUST write an edit link if, and only if the entry is updatable -MUST write a self link if, and only if, the entry is can be fetched and is read-only or the read link is different from the editlink -MUST write write an <id> for the feed that uniquely identifies the collection from which the feed was generated (required by ATOM). -MAY write a self link in a feed, in which case it MUST represent the original query -MUST write an <id> for a feed (this is required by ATOM) -MAY write a self link for a feed, in which case it MUST represent the original query -MUST NOT write edit link for a feed ATOM Clients: -MAY assume an entity with an id that matches the transient pattern cannot be compared to other entities, refetched, or updated -MAY interpret the edit link as a self link if no self link is present -SHOULD NOT attempt to update an entity without an editlink Accepted: https://www.oasis-open.org/committees/download.php/49212/odata-meeting-37_on-20130516-minutes.html#odata-351
    • Resolution:
      Show
      https://www.oasis-open.org/committees/download.php/49275/odata-v4.0-wd02-part1-protocol-2013-05-21.docx https://www.oasis-open.org/committees/download.php/49273/odata-atom-format-v4.0-wd02-2013-05-21.docx https://www.oasis-open.org/committees/download.php/49274/odata-json-format-v4.0-wd02-2013-05-21.docx Accepted: https://www.oasis-open.org/committees/download.php/49557/odata-meeting-41_on-20130613_14-F2F-minutes.html#odata-351

      Description

      In certain situations, especially Data Aggregation, we need the concept of "transient" entities and feeds in addition to the already defined "addressable" entities and feeds.

      Protocol should define the concepts ID, ReadLink and EditLink.

      Restrictions due to Atom and AtomPub

      • ID required, MUST be IRI
      • Feed: MAY have Self-Link to re-retrieve THIS feed
      • Entry
        • Links are optional
        • <link rel="self"> identifies resource equivalent to current resource
        • AtomPub: <link rel="edit"> can be used to retrieve, update, and delete the Resource represented by that Entry

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: