OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

odata message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [OASIS Issue Tracker] Issue Comment Edited: (ODATA-351) Define ID, ReadLink and EditLink in Part 1: Protocol, define representation in Atom and JSON


    [ http://tools.oasis-open.org/issues/browse/ODATA-351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33462#action_33462 ] 

Hubert Heijkers edited comment on ODATA-351 at 5/16/13 10:30 AM:
-----------------------------------------------------------------

Could we consider adding an annotation to indicate if an entity is readonly, odata.readonly for example, to indicate if an entity is updateable or not instead of having to put in the full link even if it follows conventions? This would help in cases were a lot of entities might potentially deviate from the default and prevent us from putting in all those verbose links in the minimal metadata format.

So, revised proposal (including Ralf's comments): 

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.readonly boolean annotation to convey that an entity is updateable or not if neither readlink or editlink have been specified
-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 

      was (Author: hubert.heijkers):
    Could we consider adding an annotation to indicate if an entity is updateable, odata.updateable for example, to indicate if an entity is updateable or not instead of having to put in the full link even if it follows conventions? This would help in cases were a lot of entities might potentially deviate from the default and prevent us from putting in all those verbose links in the minimal metadata format.
  
> Define ID, ReadLink and EditLink in Part 1: Protocol, define representation in Atom and JSON
> --------------------------------------------------------------------------------------------
>
>                 Key: ODATA-351
>                 URL: http://tools.oasis-open.org/issues/browse/ODATA-351
>             Project: OASIS Open Data Protocol (OData) TC
>          Issue Type: Improvement
>          Components: OData ATOM Format , OData JSON Format, OData Protocol 
>    Affects Versions: V4.0_WD01, V4.0_CSD01
>         Environment: [Proposed]
>            Reporter: Ralf Handl
>             Fix For: V4.0_CSD02
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://tools.oasis-open.org/issues/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]