You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Ralf Handl (JIRA)" <ji...@apache.org> on 2015/05/12 09:41:01 UTC

[jira] [Commented] (OLINGO-641) Edm.Stream based links are not present in the payload

    [ https://issues.apache.org/jira/browse/OLINGO-641?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14539454#comment-14539454 ] 

Ralf Handl commented on OLINGO-641:
-----------------------------------

The canonical read/edit URL of a stream property is the canonical URL of a property:

http://someServiceRoot/someEntitySet(key)/someStreamProperty

If that is the actual read/edit URL of the stream property, no odata.mediaReadLink or odata.mediaEditLink is required for odata.metadata=minimal.

The canonical read/edit URL of a media resource attached to a media entity is constructed by appending /$value to the canonical URL of the media entity:

http://someServiceRoot/someEntitySet(key)/$value

Again if this is the actual read/edit URL of the media resource, no odata.mediaReadLink or odata.mediaEditLink is required for odata.metadata=minimal.

The odata.mediaContentType is a bit tricky: it is perfectly legal to allow content negotiation on e.g. a stream for an image and e.g. allow requesting it as image/png or image/gif. The actual media content type then depends on the request, and an odata.mediaContentType can only be a hint for the "preferred" or "default" content type of the stream. 

And if you allow content negotiation for streams and use strong ETags, then the ETags MUST differ for different content types because strong ETags indicate byte-for-byte identical representations. So the odata.mediaETag can also only be a hint for the actual ETag of the "preferred" or "default" content type of the stream. 

Next it may be expensive for the service to fetch the (default) content type or ETag from the data store when fetching the structured data of the entity, in which case it is faster to omit them from the response.

So there's a pretty narrow scenario in which the service can actually include odata.mediaETag and odata.mediaContentType in a fast and reliable fashion. Consequently they MAY be included.

> Edm.Stream based links are not present in the payload
> -----------------------------------------------------
>
>                 Key: OLINGO-641
>                 URL: https://issues.apache.org/jira/browse/OLINGO-641
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata4-server
>            Reporter: Ramesh Reddy
>
> When a server returns the EDM.Stream based properties in the payload the JSON serializer does not create the required annotations for representing the stream properties.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)