You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@olingo.apache.org by Vijay Kumar Rani <rv...@gmail.com> on 2014/10/20 06:33:16 UTC

Accessing media resource and complex proprty

Hi,

I am using Olingo4, let me know how can I  access Complex and Media
resource properties?
I downloaded the example in github

the below service is working fine
odata1.svc/ESCollAllPrim(1)

the above service has list of collections when I accessing
as odata1.svc/ESCollAllPrim(1)/CollPropertyString   I am getting
{"error": {"code": null,"message": "The requested functionality has not
been implemented (yet)."}}



Vijay

Re: Accessing media resource and complex proprty

Posted by "Bolz, Michael" <mi...@sap.com>.
Hi Vijay,

In Olingo 4.0.0-beta-01 the complex property is supported but unfortunately there is no according test data defined in the example.
Perhaps you could use the latest 4.0.0-beta-02-SNAPSHOT which has more test data defined (and more fixes and features).
We also try to release the "4.0.0-beta-02" soon.

Kind regards,
Michael

From: Vijay Kumar Rani <rv...@gmail.com>>
Reply-To: "user@olingo.apache.org<ma...@olingo.apache.org>" <us...@olingo.apache.org>>
Date: Monday 20 October 2014 09:13
To: "user@olingo.apache.org<ma...@olingo.apache.org>" <us...@olingo.apache.org>>
Subject: Re: Accessing media resource and complex proprty

I am using Olingo 4.0.0-beta-01.

On Mon, Oct 20, 2014 at 11:07 AM, Bolz, Michael <mi...@sap.com>> wrote:
Hi Vijay,

in OData 4 you can access complex properties like normal properties directly via url:
e.g.: "~/odata.svc/ESCompComp(1)/PropertyComp”

and the media stream of a media resource via the $value option:
e.g.: “~/odata.svc/ESMedia(1)/$value"

The access for complex properties is supported in current Olingo 4.0.0-beta-01 but support for media resources via $value is missing.

In your example:
odata1.svc/ESCollAllPrim(1)/CollPropertyString

you try to access a collection of string instead of a complex property.
However in current SNAPSHOT this is also supported, hence the question: which version of Olingo do you use?

Kind regards,
Michael

More details and documentation can be found here:
http://docs.oasis-open.org/odata/odata/v4.0/errata01/os/complete/part2-url-conventions/odata-v4.0-errata01-os-part2-url-conventions-complete.html#_Toc395267106


On 20 Oct 2014, at 06:33, Vijay Kumar Rani <rv...@gmail.com>> wrote:

Hi,

I am using Olingo4, let me know how can I  access Complex and Media resource properties?
I downloaded the example in github

the below service is working fine
odata1.svc/ESCollAllPrim(1)

the above service has list of collections when I accessing as odata1.svc/ESCollAllPrim(1)/CollPropertyString   I am getting
{"error": {"code": null,"message": "The requested functionality has not been implemented (yet)."}}



Vijay



Re: Accessing media resource and complex proprty

Posted by Ramesh Reddy <ra...@redhat.com>.
What is your client going to be? It depends upon your client implementation. Are you going to use Olingo for it? If yes, example here https://github.com/apache/olingo-odata4/blob/master/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BasicITCase.java Look at " readSimpleProperty" testcase. 

Ramesh.. 

----- Original Message -----

> Thanks ,
> by doing entity.addProperty(new PropertyImpl(null, "PT", ValueType.PRIMITIVE,
> obj.toString().getBytes("utf-8")));

> I got the value, but how to decode it as I am using my browser as the client.

> { " @odata.context ": " $metadata#ESEntities('CI')/PayloadTemplate " , "
> value ": " eyJiYWxhbmNlIjoxMDAwLjIxLCJudW0iOjEwMCwibmFtZSI6ImZvbyJ9 " }

> On Tue, Oct 21, 2014 at 8:35 PM, Ramesh Reddy < rareddy@redhat.com > wrote:

> > Please read this
> > http://docs.oasis-open.org/odata/odata/v4.0/errata01/os/complete/part1-protocol/odata-v4.0-errata01-os-part1-protocol-complete.html#_Toc399426696
> 

> > It is primitive type as Edm.Binary is primitive type.
> 

> > Ramesh..
> 

> > > What is the value type is it primitive or complex or what is is?
> > 
> 

> > > On Tuesday, October 21, 2014, Ramesh Reddy < rareddy@redhat.com > wrote:
> > 
> 

> > > > See
> > > > http://docs.oasis-open.org/odata/odata/v4.0/errata01/os/complete/part3-csdl/odata-v4.0-errata01-os-part3-csdl-complete.html#_Toc395268126
> > > > for available data types in the OData Specification. The value type
> > > > would
> > > > be
> > > > Edm.Binary, which maps to in java terms a byte[]. The contents of the
> > > > property depends upon your implementation of the service, it could be
> > > > json
> > > > or a small image etc. The example in 4.0.0 beta2 might not have binary
> > > > data
> > > > to showcase, but you can follow steps in there to provide your own.
> > > 
> > 
> 

> > > > Ramesh..
> > > 
> > 
> 

> > > > > 4.0.0 beta 2 is working good for the example , i am using binary what
> > > > > is
> > > > > the
> > > > > value type of type of binary? Actually I want to set entire json
> > > > > object
> > > > > to
> > > > > the property, how can I do that?
> > > > 
> > > 
> > 
> 
> > > > > On 21-Oct-2014 7:25 pm, "Bolz, Michael" < michael.bolz@sap.com >
> > > > > wrote:
> > > > 
> > > 
> > 
> 

> > > > > > Hello Vijay,
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > Can you please try your example with actual SNAPSHOT of Olingo
> > > > > > (4.0.0-beta-02-SNAPSHOT) and give feedback?
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > Kind regards,
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > Michael
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > From: Vijay Kumar Rani < rvkumar@gmail.com >
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > Reply-To: " user@olingo.apache.org " < user@olingo.apache.org >
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > Date: Tuesday 21 October 2014 06:39
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > To: " user@olingo.apache.org " < user@olingo.apache.org >
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > Subject: Re: Accessing media resource and complex proprty
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > In GITHUB example when I access any property
> > > > > > /odata1.svc/ESAllPrim(32767)/PropertyString - here PropertyString
> > > > > > is
> > > > > > property name.I am getting the below issue.
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > is it right way to access properties?
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > { " error ": { " code ": null , " message ": " The requested
> > > > > > functionality
> > > > > > has not been implemented (yet). " } }
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > On Mon, Oct 20, 2014 at 6:44 PM, Ramesh Reddy < rareddy@redhat.com
> > > > > > >
> > > > > > wrote:
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > Yes, the property type will be binary, the content will base64
> > > > > > > encoded.
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > Ramesh..
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > I am creating a JSONObject, if I set it to EdmBinary the
> > > > > > > > property
> > > > > > > > name
> > > > > > > > is
> > > > > > > > PropertyBinary, what will be the the ValueTtype? What will be
> > > > > > > > the
> > > > > > > > my
> > > > > > > > URL
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > Can I access like odata1.svc/ESCollAllPrim(1)/PropertyBinary ?
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > On Mon, Oct 20, 2014 at 1:54 PM, Bolz, Michael <
> > > > > > > > michael.bolz@sap.com
> > > > > > > > >
> > > > > > > > wrote:
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > Hi Vijay,
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > As I understand you the “Stream Property” fit for your use
> > > > > > > > > case
> > > > > > > > > (an
> > > > > > > > > entity
> > > > > > > > > with several stream properties).
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > > > Unfortunately this is not yet supported in Olingo
> > > > > > > > > 4.0.0-beta-02-SNAPSHOT.
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > > > However contributions are welcome and we do our best to
> > > > > > > > > support
> > > > > > > > > everyone
> > > > > > > > > to
> > > > > > > > > do so.
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > Currently for your use case you could use “EdmBinary”
> > > > > > > > > properties
> > > > > > > > > for
> > > > > > > > > you
> > > > > > > > > image and file data.
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > > > But I would only recommend this if those data is not to big.
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > Kind regards,
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > > > Michael
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > From: Vijay Kumar Rani < rvkumar@gmail.com >
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > > > Reply-To: " user@olingo.apache.org " < user@olingo.apache.org
> > > > > > > > > >
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > > > Date: Monday 20 October 2014 09:48
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > To: " user@olingo.apache.org " < user@olingo.apache.org >
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > > > Subject: Re: Accessing media resource and complex proprty
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > HI Michael ,
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > > > My Entity contains 3 media resources pointing to different
> > > > > > > > > media.
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > On Mon, Oct 20, 2014 at 1:07 PM, Bolz, Michael <
> > > > > > > > > michael.bolz@sap.com
> > > > > > > > > >
> > > > > > > > > wrote:
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > > Hi Vijay,
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > > Do you want an entity which contains the file and image as
> > > > > > > > > > binary
> > > > > > > > > > data
> > > > > > > > > > (normal entity with according properties)
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > > > > or do you want a media resource which represents one media
> > > > > > > > > > (e.g.
> > > > > > > > > > File
> > > > > > > > > > or
> > > > > > > > > > image)?
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > > In addition there is a new “Stream Property” introduced
> > > > > > > > > > with
> > > > > > > > > > Odata
> > > > > > > > > > 4
> > > > > > > > > > which
> > > > > > > > > > could be what you want:
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > > > > http://docs.oasis-open.org/odata/odata-json-format/v4.0/errata01/os/odata-json-format-v4.0-errata01-os-complete.html#_Toc395698775
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > > Kind regards,
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > > > > Michael
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > > Media Entity documentation:
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > > > > http://docs.oasis-open.org/odata/odata-json-format/v4.0/errata01/os/odata-json-format-v4.0-errata01-os-complete.html#_Toc395698776
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > > From: Vijay Kumar Rani < rvkumar@gmail.com >
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > > > > Reply-To: " user@olingo.apache.org " <
> > > > > > > > > > user@olingo.apache.org
> > > > > > > > > > >
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > > > > Date: Monday 20 October 2014 09:24
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > > > > To: " user@olingo.apache.org " < user@olingo.apache.org >
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > > > > Subject: Re: Accessing media resource and complex proprty
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > > If I have multiple media resources in single entity example
> > > > > > > > > > is
> > > > > > > > > > JSON,
> > > > > > > > > > File
> > > > > > > > > > and
> > > > > > > > > > Image.
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > > > > How Can I declare them in single entity and how my request
> > > > > > > > > > should
> > > > > > > > > > be.
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > > On Mon, Oct 20, 2014 at 12:43 PM, Vijay Kumar Rani <
> > > > > > > > > > rvkumar@gmail.com
> > > > > > > > > > >
> > > > > > > > > > wrote:
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > > > I am using Olingo 4.0.0-beta-01.
> > > > > > > > > > 
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > > > On Mon, Oct 20, 2014 at 11:07 AM, Bolz, Michael <
> > > > > > > > > > > michael.bolz@sap.com
> > > > > > > > > > > >
> > > > > > > > > > > wrote:
> > > > > > > > > > 
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > > > > Hi Vijay,
> > > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > > > > in OData 4 you can access complex properties like
> > > > > > > > > > > > normal
> > > > > > > > > > > > properties
> > > > > > > > > > > > directly
> > > > > > > > > > > > via url:
> > > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > > > > > > e.g.: "~/odata.svc/ESCompComp(1)/PropertyComp”
> > > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > > > > and the media stream of a media resource via the $value
> > > > > > > > > > > > option:
> > > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > > > > > > e.g.: “~/odata.svc/ESMedia(1)/$value"
> > > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > > > > The access for complex properties is supported in
> > > > > > > > > > > > current
> > > > > > > > > > > > Olingo
> > > > > > > > > > > > 4.0.0-beta-01 but support for media resources via
> > > > > > > > > > > > $value
> > > > > > > > > > > > is
> > > > > > > > > > > > missing.
> > > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > > > > In your example:
> > > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > > > > > odata1.svc/ESCollAllPrim(1)/CollPropertyString
> > > > > > > > > > > > 
> > > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > > > > you try to access a collection of string instead of a
> > > > > > > > > > > > complex
> > > > > > > > > > > > property.
> > > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > > > > > > However in current SNAPSHOT this is also supported,
> > > > > > > > > > > > hence
> > > > > > > > > > > > the
> > > > > > > > > > > > question:
> > > > > > > > > > > > which
> > > > > > > > > > > > version of Olingo do you use?
> > > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > > > > Kind regards,
> > > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > > > > > > Michael
> > > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > > > > More details and documentation can be found here:
> > > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > > > > > > http://docs.oasis-open.org/odata/odata/v4.0/errata01/os/complete/part2-url-conventions/odata-v4.0-errata01-os-part2-url-conventions-complete.html#_Toc395267106
> > > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > > > > On 20 Oct 2014, at 06:33, Vijay Kumar Rani <
> > > > > > > > > > > > rvkumar@gmail.com
> > > > > > > > > > > > >
> > > > > > > > > > > > wrote:
> > > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > > > > > Hi,
> > > > > > > > > > > > 
> > > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > > > > > I am using Olingo4, let me know how can I access
> > > > > > > > > > > > > Complex
> > > > > > > > > > > > > and
> > > > > > > > > > > > > Media
> > > > > > > > > > > > > resource
> > > > > > > > > > > > > properties?
> > > > > > > > > > > > 
> > > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > > > > > > > I downloaded the example in github
> > > > > > > > > > > > 
> > > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > > > > > the below service is working fine
> > > > > > > > > > > > 
> > > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > > > > > > > odata1.svc/ESCollAllPrim(1)
> > > > > > > > > > > > 
> > > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > > > > > the above service has list of collections when I
> > > > > > > > > > > > > accessing
> > > > > > > > > > > > > as
> > > > > > > > > > > > > odata1.svc/ESCollAllPrim(1)/CollPropertyString I am
> > > > > > > > > > > > > getting
> > > > > > > > > > > > 
> > > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > > > > > > > { " error ": { " code ": null , " message ": " The
> > > > > > > > > > > > > requested
> > > > > > > > > > > > > functionality
> > > > > > > > > > > > > has not been implemented (yet). " } }
> > > > > > > > > > > > 
> > > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > > > > > Vijay
> > > > > > > > > > > > 
> > > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

Re: Accessing media resource and complex proprty

Posted by Vijay Kumar Rani <rv...@gmail.com>.
Thanks ,
by doing entity.addProperty(new PropertyImpl(null, "PT",
ValueType.PRIMITIVE, obj.toString().getBytes("utf-8")));

I got the value, but how to decode it as I am using my browser as the
client.


{"@odata.context": "$metadata#ESEntities('CI')/PayloadTemplate","value": "
eyJiYWxhbmNlIjoxMDAwLjIxLCJudW0iOjEwMCwibmFtZSI6ImZvbyJ9"}

On Tue, Oct 21, 2014 at 8:35 PM, Ramesh Reddy <ra...@redhat.com> wrote:

> Please read this
> http://docs.oasis-open.org/odata/odata/v4.0/errata01/os/complete/part1-protocol/odata-v4.0-errata01-os-part1-protocol-complete.html#_Toc399426696
>
> It is primitive type as Edm.Binary is primitive type.
>
> Ramesh..
>
> ------------------------------
>
> What is the value type is it primitive or complex or what is is?
>
> On Tuesday, October 21, 2014, Ramesh Reddy <ra...@redhat.com> wrote:
>
>> See
>> http://docs.oasis-open.org/odata/odata/v4.0/errata01/os/complete/part3-csdl/odata-v4.0-errata01-os-part3-csdl-complete.html#_Toc395268126 for
>> available data types in the OData Specification. The value type would be
>> Edm.Binary, which maps to in java terms a byte[]. The contents of the
>> property depends upon your implementation of the service, it could be json
>> or a small image etc. The example in 4.0.0 beta2 might not have binary data
>> to showcase, but you can follow steps in there to provide your own.
>>
>> Ramesh..
>>
>> ------------------------------
>>
>> 4.0.0 beta 2 is working good for the example , i am using binary what is
>> the value type of type of binary?  Actually I want to set entire json
>> object to the property, how can I do that?
>> On 21-Oct-2014 7:25 pm, "Bolz, Michael" <mi...@sap.com> wrote:
>>
>>>  Hello Vijay,
>>>
>>>  Can you please try your example with actual SNAPSHOT of Olingo
>>> (4.0.0-beta-02-SNAPSHOT) and give feedback?
>>>
>>>  Kind regards,
>>> Michael
>>>
>>>   From: Vijay Kumar Rani <rv...@gmail.com>
>>> Reply-To: "user@olingo.apache.org" <us...@olingo.apache.org>
>>> Date: Tuesday 21 October 2014 06:39
>>> To: "user@olingo.apache.org" <us...@olingo.apache.org>
>>> Subject: Re: Accessing media resource and complex proprty
>>>
>>>   In GITHUB example when I access any
>>> property /odata1.svc/ESAllPrim(32767)/PropertyString - here PropertyString
>>> is property name.I am getting the below issue.
>>> is it right way to access properties?
>>>
>>>  {"error": {"code": null,"message": "The requested functionality has
>>> not been implemented (yet)."}}
>>>
>>> On Mon, Oct 20, 2014 at 6:44 PM, Ramesh Reddy <ra...@redhat.com>
>>> wrote:
>>>
>>>>  Yes, the property type will be binary, the content will base64
>>>> encoded.
>>>>
>>>>  Ramesh..
>>>>
>>>>  ------------------------------
>>>>
>>>> I am creating a JSONObject, if I set it to EdmBinary the property name
>>>> is PropertyBinary, what will be the the ValueTtype? What will be the my URL
>>>>
>>>>  Can I access like odata1.svc/ESCollAllPrim(1)/PropertyBinary ?
>>>>
>>>> On Mon, Oct 20, 2014 at 1:54 PM, Bolz, Michael <mi...@sap.com>
>>>> wrote:
>>>>
>>>>>  Hi Vijay,
>>>>>
>>>>>  As I understand you the “Stream Property” fit for your use case (an
>>>>> entity with several stream properties).
>>>>> Unfortunately this is not yet supported in Olingo
>>>>> 4.0.0-beta-02-SNAPSHOT.
>>>>> However contributions are welcome and we do our best to support
>>>>> everyone to do so.
>>>>>
>>>>>  Currently for your use case you could use “EdmBinary” properties for
>>>>> you image and file data.
>>>>> But I would only recommend this if those data is not to big.
>>>>>
>>>>>  Kind regards,
>>>>> Michael
>>>>>
>>>>>   From: Vijay Kumar Rani <rv...@gmail.com>
>>>>> Reply-To: "user@olingo.apache.org" <us...@olingo.apache.org>
>>>>> Date: Monday 20 October 2014 09:48
>>>>>
>>>>> To: "user@olingo.apache.org" <us...@olingo.apache.org>
>>>>> Subject: Re: Accessing media resource and complex proprty
>>>>>
>>>>>   HI Michael ,
>>>>> My Entity contains 3 media resources pointing to different media.
>>>>>
>>>>>
>>>>>
>>>>> On Mon, Oct 20, 2014 at 1:07 PM, Bolz, Michael <mi...@sap.com>
>>>>> wrote:
>>>>>
>>>>>>  Hi Vijay,
>>>>>>
>>>>>>  Do you want an entity which contains the file and image as binary
>>>>>> data (normal entity with according properties)
>>>>>> or do you want a media resource which represents one media (e.g. File
>>>>>> or image)?
>>>>>>
>>>>>>  In addition there is a new “Stream Property” introduced with Odata
>>>>>> 4 which could be what you want:
>>>>>>
>>>>>> http://docs.oasis-open.org/odata/odata-json-format/v4.0/errata01/os/odata-json-format-v4.0-errata01-os-complete.html#_Toc395698775
>>>>>>
>>>>>>
>>>>>>  Kind regards,
>>>>>> Michael
>>>>>>
>>>>>>  Media Entity documentation:
>>>>>>
>>>>>> http://docs.oasis-open.org/odata/odata-json-format/v4.0/errata01/os/odata-json-format-v4.0-errata01-os-complete.html#_Toc395698776
>>>>>>
>>>>>>   From: Vijay Kumar Rani <rv...@gmail.com>
>>>>>> Reply-To: "user@olingo.apache.org" <us...@olingo.apache.org>
>>>>>> Date: Monday 20 October 2014 09:24
>>>>>> To: "user@olingo.apache.org" <us...@olingo.apache.org>
>>>>>> Subject: Re: Accessing media resource and complex proprty
>>>>>>
>>>>>>   If I have multiple media resources in single entity  example is
>>>>>> JSON, File and Image.
>>>>>> How Can I declare them in single entity and how my request should be.
>>>>>>
>>>>>> On Mon, Oct 20, 2014 at 12:43 PM, Vijay Kumar Rani <rvkumar@gmail.com
>>>>>> > wrote:
>>>>>>
>>>>>>> I am using Olingo 4.0.0-beta-01.
>>>>>>>
>>>>>>> On Mon, Oct 20, 2014 at 11:07 AM, Bolz, Michael <
>>>>>>> michael.bolz@sap.com> wrote:
>>>>>>>
>>>>>>>> Hi Vijay,
>>>>>>>>
>>>>>>>>  in OData 4 you can access complex properties like normal
>>>>>>>> properties directly via url:
>>>>>>>> e.g.: "~/odata.svc/ESCompComp(1)/PropertyComp”
>>>>>>>>
>>>>>>>>  and the media stream of a media resource via the $value option:
>>>>>>>> e.g.: “~/odata.svc/ESMedia(1)/$value"
>>>>>>>>
>>>>>>>>  The access for complex properties is supported in current Olingo
>>>>>>>> 4.0.0-beta-01 but support for media resources via $value is missing.
>>>>>>>>
>>>>>>>>  In your example:
>>>>>>>>
>>>>>>>> odata1.svc/ESCollAllPrim(1)/CollPropertyString
>>>>>>>>
>>>>>>>>
>>>>>>>>  you try to access a collection of string instead of a complex
>>>>>>>> property.
>>>>>>>> However in current SNAPSHOT this is also supported, hence the
>>>>>>>> question: which version of Olingo do you use?
>>>>>>>>
>>>>>>>>  Kind regards,
>>>>>>>> Michael
>>>>>>>>
>>>>>>>>  More details and documentation can be found here:
>>>>>>>>
>>>>>>>> http://docs.oasis-open.org/odata/odata/v4.0/errata01/os/complete/part2-url-conventions/odata-v4.0-errata01-os-part2-url-conventions-complete.html#_Toc395267106
>>>>>>>>
>>>>>>>>
>>>>>>>>  On 20 Oct 2014, at 06:33, Vijay Kumar Rani <rv...@gmail.com>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>  Hi,
>>>>>>>>
>>>>>>>>  I am using Olingo4, let me know how can I  access Complex and
>>>>>>>> Media resource properties?
>>>>>>>> I downloaded the example in github
>>>>>>>>
>>>>>>>>  the below service is working fine
>>>>>>>> odata1.svc/ESCollAllPrim(1)
>>>>>>>>
>>>>>>>>  the above service has list of collections when I accessing
>>>>>>>> as odata1.svc/ESCollAllPrim(1)/CollPropertyString   I am getting
>>>>>>>> {"error": {"code": null,"message": "The requested functionality
>>>>>>>> has not been implemented (yet)."}}
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>  Vijay
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>
>>
>

Re: Accessing media resource and complex proprty

Posted by Ramesh Reddy <ra...@redhat.com>.
Please read this http://docs.oasis-open.org/odata/odata/v4.0/errata01/os/complete/part1-protocol/odata-v4.0-errata01-os-part1-protocol-complete.html#_Toc399426696 

It is primitive type as Edm.Binary is primitive type. 

Ramesh.. 

----- Original Message -----

> What is the value type is it primitive or complex or what is is?

> On Tuesday, October 21, 2014, Ramesh Reddy < rareddy@redhat.com > wrote:

> > See
> > http://docs.oasis-open.org/odata/odata/v4.0/errata01/os/complete/part3-csdl/odata-v4.0-errata01-os-part3-csdl-complete.html#_Toc395268126
> > for available data types in the OData Specification. The value type would
> > be
> > Edm.Binary, which maps to in java terms a byte[]. The contents of the
> > property depends upon your implementation of the service, it could be json
> > or a small image etc. The example in 4.0.0 beta2 might not have binary data
> > to showcase, but you can follow steps in there to provide your own.
> 

> > Ramesh..
> 

> > > 4.0.0 beta 2 is working good for the example , i am using binary what is
> > > the
> > > value type of type of binary? Actually I want to set entire json object
> > > to
> > > the property, how can I do that?
> > 
> 
> > > On 21-Oct-2014 7:25 pm, "Bolz, Michael" < michael.bolz@sap.com > wrote:
> > 
> 

> > > > Hello Vijay,
> > > 
> > 
> 

> > > > Can you please try your example with actual SNAPSHOT of Olingo
> > > > (4.0.0-beta-02-SNAPSHOT) and give feedback?
> > > 
> > 
> 

> > > > Kind regards,
> > > 
> > 
> 
> > > > Michael
> > > 
> > 
> 

> > > > From: Vijay Kumar Rani < rvkumar@gmail.com >
> > > 
> > 
> 
> > > > Reply-To: " user@olingo.apache.org " < user@olingo.apache.org >
> > > 
> > 
> 
> > > > Date: Tuesday 21 October 2014 06:39
> > > 
> > 
> 
> > > > To: " user@olingo.apache.org " < user@olingo.apache.org >
> > > 
> > 
> 
> > > > Subject: Re: Accessing media resource and complex proprty
> > > 
> > 
> 

> > > > In GITHUB example when I access any property
> > > > /odata1.svc/ESAllPrim(32767)/PropertyString - here PropertyString is
> > > > property name.I am getting the below issue.
> > > 
> > 
> 
> > > > is it right way to access properties?
> > > 
> > 
> 

> > > > { " error ": { " code ": null , " message ": " The requested
> > > > functionality
> > > > has not been implemented (yet). " } }
> > > 
> > 
> 

> > > > On Mon, Oct 20, 2014 at 6:44 PM, Ramesh Reddy < rareddy@redhat.com >
> > > > wrote:
> > > 
> > 
> 

> > > > > Yes, the property type will be binary, the content will base64
> > > > > encoded.
> > > > 
> > > 
> > 
> 

> > > > > Ramesh..
> > > > 
> > > 
> > 
> 

> > > > > > I am creating a JSONObject, if I set it to EdmBinary the property
> > > > > > name
> > > > > > is
> > > > > > PropertyBinary, what will be the the ValueTtype? What will be the
> > > > > > my
> > > > > > URL
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > Can I access like odata1.svc/ESCollAllPrim(1)/PropertyBinary ?
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > On Mon, Oct 20, 2014 at 1:54 PM, Bolz, Michael <
> > > > > > michael.bolz@sap.com
> > > > > > >
> > > > > > wrote:
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > Hi Vijay,
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > As I understand you the “Stream Property” fit for your use case
> > > > > > > (an
> > > > > > > entity
> > > > > > > with several stream properties).
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > Unfortunately this is not yet supported in Olingo
> > > > > > > 4.0.0-beta-02-SNAPSHOT.
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > However contributions are welcome and we do our best to support
> > > > > > > everyone
> > > > > > > to
> > > > > > > do so.
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > Currently for your use case you could use “EdmBinary” properties
> > > > > > > for
> > > > > > > you
> > > > > > > image and file data.
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > But I would only recommend this if those data is not to big.
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > Kind regards,
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > Michael
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > From: Vijay Kumar Rani < rvkumar@gmail.com >
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > Reply-To: " user@olingo.apache.org " < user@olingo.apache.org >
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > Date: Monday 20 October 2014 09:48
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > To: " user@olingo.apache.org " < user@olingo.apache.org >
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > Subject: Re: Accessing media resource and complex proprty
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > HI Michael ,
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > My Entity contains 3 media resources pointing to different media.
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > On Mon, Oct 20, 2014 at 1:07 PM, Bolz, Michael <
> > > > > > > michael.bolz@sap.com
> > > > > > > >
> > > > > > > wrote:
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > Hi Vijay,
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > Do you want an entity which contains the file and image as
> > > > > > > > binary
> > > > > > > > data
> > > > > > > > (normal entity with according properties)
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > > or do you want a media resource which represents one media
> > > > > > > > (e.g.
> > > > > > > > File
> > > > > > > > or
> > > > > > > > image)?
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > In addition there is a new “Stream Property” introduced with
> > > > > > > > Odata
> > > > > > > > 4
> > > > > > > > which
> > > > > > > > could be what you want:
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > > http://docs.oasis-open.org/odata/odata-json-format/v4.0/errata01/os/odata-json-format-v4.0-errata01-os-complete.html#_Toc395698775
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > Kind regards,
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > > Michael
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > Media Entity documentation:
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > > http://docs.oasis-open.org/odata/odata-json-format/v4.0/errata01/os/odata-json-format-v4.0-errata01-os-complete.html#_Toc395698776
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > From: Vijay Kumar Rani < rvkumar@gmail.com >
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > > Reply-To: " user@olingo.apache.org " < user@olingo.apache.org >
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > > Date: Monday 20 October 2014 09:24
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > > To: " user@olingo.apache.org " < user@olingo.apache.org >
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > > Subject: Re: Accessing media resource and complex proprty
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > If I have multiple media resources in single entity example is
> > > > > > > > JSON,
> > > > > > > > File
> > > > > > > > and
> > > > > > > > Image.
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > > How Can I declare them in single entity and how my request
> > > > > > > > should
> > > > > > > > be.
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > On Mon, Oct 20, 2014 at 12:43 PM, Vijay Kumar Rani <
> > > > > > > > rvkumar@gmail.com
> > > > > > > > >
> > > > > > > > wrote:
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > I am using Olingo 4.0.0-beta-01.
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > On Mon, Oct 20, 2014 at 11:07 AM, Bolz, Michael <
> > > > > > > > > michael.bolz@sap.com
> > > > > > > > > >
> > > > > > > > > wrote:
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > > Hi Vijay,
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > > in OData 4 you can access complex properties like normal
> > > > > > > > > > properties
> > > > > > > > > > directly
> > > > > > > > > > via url:
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > > > > e.g.: "~/odata.svc/ESCompComp(1)/PropertyComp”
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > > and the media stream of a media resource via the $value
> > > > > > > > > > option:
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > > > > e.g.: “~/odata.svc/ESMedia(1)/$value"
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > > The access for complex properties is supported in current
> > > > > > > > > > Olingo
> > > > > > > > > > 4.0.0-beta-01 but support for media resources via $value is
> > > > > > > > > > missing.
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > > In your example:
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > > > odata1.svc/ESCollAllPrim(1)/CollPropertyString
> > > > > > > > > > 
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > > you try to access a collection of string instead of a
> > > > > > > > > > complex
> > > > > > > > > > property.
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > > > > However in current SNAPSHOT this is also supported, hence
> > > > > > > > > > the
> > > > > > > > > > question:
> > > > > > > > > > which
> > > > > > > > > > version of Olingo do you use?
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > > Kind regards,
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > > > > Michael
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > > More details and documentation can be found here:
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > > > > http://docs.oasis-open.org/odata/odata/v4.0/errata01/os/complete/part2-url-conventions/odata-v4.0-errata01-os-part2-url-conventions-complete.html#_Toc395267106
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > > On 20 Oct 2014, at 06:33, Vijay Kumar Rani <
> > > > > > > > > > rvkumar@gmail.com
> > > > > > > > > > >
> > > > > > > > > > wrote:
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > > > Hi,
> > > > > > > > > > 
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > > > I am using Olingo4, let me know how can I access Complex
> > > > > > > > > > > and
> > > > > > > > > > > Media
> > > > > > > > > > > resource
> > > > > > > > > > > properties?
> > > > > > > > > > 
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > > > > > I downloaded the example in github
> > > > > > > > > > 
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > > > the below service is working fine
> > > > > > > > > > 
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > > > > > odata1.svc/ESCollAllPrim(1)
> > > > > > > > > > 
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > > > the above service has list of collections when I
> > > > > > > > > > > accessing
> > > > > > > > > > > as
> > > > > > > > > > > odata1.svc/ESCollAllPrim(1)/CollPropertyString I am
> > > > > > > > > > > getting
> > > > > > > > > > 
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > > > > > { " error ": { " code ": null , " message ": " The
> > > > > > > > > > > requested
> > > > > > > > > > > functionality
> > > > > > > > > > > has not been implemented (yet). " } }
> > > > > > > > > > 
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > > > Vijay
> > > > > > > > > > 
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

Re: Accessing media resource and complex proprty

Posted by Vijay Kumar Rani <rv...@gmail.com>.
Sorry for typo

What is the value type is it primitive/complex or what it is?

On Tuesday, October 21, 2014, Vijay Kumar Rani <rv...@gmail.com> wrote:

> What is the value type is it primitive or complex or what is is?
>
> On Tuesday, October 21, 2014, Ramesh Reddy <rareddy@redhat.com
> <javascript:_e(%7B%7D,'cvml','rareddy@redhat.com');>> wrote:
>
>> See
>> http://docs.oasis-open.org/odata/odata/v4.0/errata01/os/complete/part3-csdl/odata-v4.0-errata01-os-part3-csdl-complete.html#_Toc395268126 for
>> available data types in the OData Specification.
>>
>

>  The value type would be Edm.Binary, which maps to in java terms a byte[].
>> The contents of the property depends upon your implementation of the
>> service, it could be json or a small image etc. The example in 4.0.0 beta2
>> might not have binary data to showcase, but you can follow steps in there
>> to provide your own.
>>
>> Ramesh..
>>
>> ------------------------------
>>
>> 4.0.0 beta 2 is working good for the example , i am using binary what is
>> the value type of type of binary?  Actually I want to set entire json
>> object to the property, how can I do that?
>> On 21-Oct-2014 7:25 pm, "Bolz, Michael" <mi...@sap.com> wrote:
>>
>>>  Hello Vijay,
>>>
>>>  Can you please try your example with actual SNAPSHOT of Olingo
>>> (4.0.0-beta-02-SNAPSHOT) and give feedback?
>>>
>>>  Kind regards,
>>> Michael
>>>
>>>   From: Vijay Kumar Rani <rv...@gmail.com>
>>> Reply-To: "user@olingo.apache.org" <us...@olingo.apache.org>
>>> Date: Tuesday 21 October 2014 06:39
>>> To: "user@olingo.apache.org" <us...@olingo.apache.org>
>>> Subject: Re: Accessing media resource and complex proprty
>>>
>>>   In GITHUB example when I access any
>>> property /odata1.svc/ESAllPrim(32767)/PropertyString - here PropertyString
>>> is property name.I am getting the below issue.
>>> is it right way to access properties?
>>>
>>>  {"error": {"code": null,"message": "The requested functionality has
>>> not been implemented (yet)."}}
>>>
>>> On Mon, Oct 20, 2014 at 6:44 PM, Ramesh Reddy <ra...@redhat.com>
>>> wrote:
>>>
>>>>  Yes, the property type will be binary, the content will base64
>>>> encoded.
>>>>
>>>>  Ramesh..
>>>>
>>>>  ------------------------------
>>>>
>>>> I am creating a JSONObject, if I set it to EdmBinary the property name
>>>> is PropertyBinary, what will be the the ValueTtype? What will be the my URL
>>>>
>>>>  Can I access like odata1.svc/ESCollAllPrim(1)/PropertyBinary ?
>>>>
>>>> On Mon, Oct 20, 2014 at 1:54 PM, Bolz, Michael <mi...@sap.com>
>>>> wrote:
>>>>
>>>>>  Hi Vijay,
>>>>>
>>>>>  As I understand you the “Stream Property” fit for your use case (an
>>>>> entity with several stream properties).
>>>>> Unfortunately this is not yet supported in Olingo
>>>>> 4.0.0-beta-02-SNAPSHOT.
>>>>> However contributions are welcome and we do our best to support
>>>>> everyone to do so.
>>>>>
>>>>>  Currently for your use case you could use “EdmBinary” properties for
>>>>> you image and file data.
>>>>> But I would only recommend this if those data is not to big.
>>>>>
>>>>>  Kind regards,
>>>>> Michael
>>>>>
>>>>>   From: Vijay Kumar Rani <rv...@gmail.com>
>>>>> Reply-To: "user@olingo.apache.org" <us...@olingo.apache.org>
>>>>> Date: Monday 20 October 2014 09:48
>>>>>
>>>>> To: "user@olingo.apache.org" <us...@olingo.apache.org>
>>>>> Subject: Re: Accessing media resource and complex proprty
>>>>>
>>>>>   HI Michael ,
>>>>> My Entity contains 3 media resources pointing to different media.
>>>>>
>>>>>
>>>>>
>>>>> On Mon, Oct 20, 2014 at 1:07 PM, Bolz, Michael <mi...@sap.com>
>>>>> wrote:
>>>>>
>>>>>>  Hi Vijay,
>>>>>>
>>>>>>  Do you want an entity which contains the file and image as binary
>>>>>> data (normal entity with according properties)
>>>>>> or do you want a media resource which represents one media (e.g. File
>>>>>> or image)?
>>>>>>
>>>>>>  In addition there is a new “Stream Property” introduced with Odata
>>>>>> 4 which could be what you want:
>>>>>>
>>>>>> http://docs.oasis-open.org/odata/odata-json-format/v4.0/errata01/os/odata-json-format-v4.0-errata01-os-complete.html#_Toc395698775
>>>>>>
>>>>>>
>>>>>>  Kind regards,
>>>>>> Michael
>>>>>>
>>>>>>  Media Entity documentation:
>>>>>>
>>>>>> http://docs.oasis-open.org/odata/odata-json-format/v4.0/errata01/os/odata-json-format-v4.0-errata01-os-complete.html#_Toc395698776
>>>>>>
>>>>>>   From: Vijay Kumar Rani <rv...@gmail.com>
>>>>>> Reply-To: "user@olingo.apache.org" <us...@olingo.apache.org>
>>>>>> Date: Monday 20 October 2014 09:24
>>>>>> To: "user@olingo.apache.org" <us...@olingo.apache.org>
>>>>>> Subject: Re: Accessing media resource and complex proprty
>>>>>>
>>>>>>   If I have multiple media resources in single entity  example is
>>>>>> JSON, File and Image.
>>>>>> How Can I declare them in single entity and how my request should be.
>>>>>>
>>>>>> On Mon, Oct 20, 2014 at 12:43 PM, Vijay Kumar Rani <rvkumar@gmail.com
>>>>>> > wrote:
>>>>>>
>>>>>>> I am using Olingo 4.0.0-beta-01.
>>>>>>>
>>>>>>> On Mon, Oct 20, 2014 at 11:07 AM, Bolz, Michael <
>>>>>>> michael.bolz@sap.com> wrote:
>>>>>>>
>>>>>>>> Hi Vijay,
>>>>>>>>
>>>>>>>>  in OData 4 you can access complex properties like normal
>>>>>>>> properties directly via url:
>>>>>>>> e.g.: "~/odata.svc/ESCompComp(1)/PropertyComp”
>>>>>>>>
>>>>>>>>  and the media stream of a media resource via the $value option:
>>>>>>>> e.g.: “~/odata.svc/ESMedia(1)/$value"
>>>>>>>>
>>>>>>>>  The access for complex properties is supported in current Olingo
>>>>>>>> 4.0.0-beta-01 but support for media resources via $value is missing.
>>>>>>>>
>>>>>>>>  In your example:
>>>>>>>>
>>>>>>>> odata1.svc/ESCollAllPrim(1)/CollPropertyString
>>>>>>>>
>>>>>>>>
>>>>>>>>  you try to access a collection of string instead of a complex
>>>>>>>> property.
>>>>>>>> However in current SNAPSHOT this is also supported, hence the
>>>>>>>> question: which version of Olingo do you use?
>>>>>>>>
>>>>>>>>  Kind regards,
>>>>>>>> Michael
>>>>>>>>
>>>>>>>>  More details and documentation can be found here:
>>>>>>>>
>>>>>>>> http://docs.oasis-open.org/odata/odata/v4.0/errata01/os/complete/part2-url-conventions/odata-v4.0-errata01-os-part2-url-conventions-complete.html#_Toc395267106
>>>>>>>>
>>>>>>>>
>>>>>>>>  On 20 Oct 2014, at 06:33, Vijay Kumar Rani <rv...@gmail.com>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>  Hi,
>>>>>>>>
>>>>>>>>  I am using Olingo4, let me know how can I  access Complex and
>>>>>>>> Media resource properties?
>>>>>>>> I downloaded the example in github
>>>>>>>>
>>>>>>>>  the below service is working fine
>>>>>>>> odata1.svc/ESCollAllPrim(1)
>>>>>>>>
>>>>>>>>  the above service has list of collections when I accessing
>>>>>>>> as odata1.svc/ESCollAllPrim(1)/CollPropertyString   I am getting
>>>>>>>> {"error": {"code": null,"message": "The requested functionality
>>>>>>>> has not been implemented (yet)."}}
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>  Vijay
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>
>>

Re: Accessing media resource and complex proprty

Posted by Vijay Kumar Rani <rv...@gmail.com>.
What is the value type is it primitive or complex or what is is?

On Tuesday, October 21, 2014, Ramesh Reddy <ra...@redhat.com> wrote:

> See
> http://docs.oasis-open.org/odata/odata/v4.0/errata01/os/complete/part3-csdl/odata-v4.0-errata01-os-part3-csdl-complete.html#_Toc395268126 for
> available data types in the OData Specification. The value type would be
> Edm.Binary, which maps to in java terms a byte[]. The contents of the
> property depends upon your implementation of the service, it could be json
> or a small image etc. The example in 4.0.0 beta2 might not have binary data
> to showcase, but you can follow steps in there to provide your own.
>
> Ramesh..
>
> ------------------------------
>
> 4.0.0 beta 2 is working good for the example , i am using binary what is
> the value type of type of binary?  Actually I want to set entire json
> object to the property, how can I do that?
> On 21-Oct-2014 7:25 pm, "Bolz, Michael" <michael.bolz@sap.com
> <javascript:_e(%7B%7D,'cvml','michael.bolz@sap.com');>> wrote:
>
>>  Hello Vijay,
>>
>>  Can you please try your example with actual SNAPSHOT of Olingo
>> (4.0.0-beta-02-SNAPSHOT) and give feedback?
>>
>>  Kind regards,
>> Michael
>>
>>   From: Vijay Kumar Rani <rvkumar@gmail.com
>> <javascript:_e(%7B%7D,'cvml','rvkumar@gmail.com');>>
>> Reply-To: "user@olingo.apache.org
>> <javascript:_e(%7B%7D,'cvml','user@olingo.apache.org');>" <
>> user@olingo.apache.org
>> <javascript:_e(%7B%7D,'cvml','user@olingo.apache.org');>>
>> Date: Tuesday 21 October 2014 06:39
>> To: "user@olingo.apache.org
>> <javascript:_e(%7B%7D,'cvml','user@olingo.apache.org');>" <
>> user@olingo.apache.org
>> <javascript:_e(%7B%7D,'cvml','user@olingo.apache.org');>>
>> Subject: Re: Accessing media resource and complex proprty
>>
>>   In GITHUB example when I access any
>> property /odata1.svc/ESAllPrim(32767)/PropertyString - here PropertyString
>> is property name.I am getting the below issue.
>> is it right way to access properties?
>>
>>  {"error": {"code": null,"message": "The requested functionality has not
>> been implemented (yet)."}}
>>
>> On Mon, Oct 20, 2014 at 6:44 PM, Ramesh Reddy <rareddy@redhat.com
>> <javascript:_e(%7B%7D,'cvml','rareddy@redhat.com');>> wrote:
>>
>>>  Yes, the property type will be binary, the content will base64 encoded.
>>>
>>>  Ramesh..
>>>
>>>  ------------------------------
>>>
>>> I am creating a JSONObject, if I set it to EdmBinary the property name
>>> is PropertyBinary, what will be the the ValueTtype? What will be the my URL
>>>
>>>  Can I access like odata1.svc/ESCollAllPrim(1)/PropertyBinary ?
>>>
>>> On Mon, Oct 20, 2014 at 1:54 PM, Bolz, Michael <michael.bolz@sap.com
>>> <javascript:_e(%7B%7D,'cvml','michael.bolz@sap.com');>> wrote:
>>>
>>>>  Hi Vijay,
>>>>
>>>>  As I understand you the “Stream Property” fit for your use case (an
>>>> entity with several stream properties).
>>>> Unfortunately this is not yet supported in Olingo
>>>> 4.0.0-beta-02-SNAPSHOT.
>>>> However contributions are welcome and we do our best to support
>>>> everyone to do so.
>>>>
>>>>  Currently for your use case you could use “EdmBinary” properties for
>>>> you image and file data.
>>>> But I would only recommend this if those data is not to big.
>>>>
>>>>  Kind regards,
>>>> Michael
>>>>
>>>>   From: Vijay Kumar Rani <rvkumar@gmail.com
>>>> <javascript:_e(%7B%7D,'cvml','rvkumar@gmail.com');>>
>>>> Reply-To: "user@olingo.apache.org
>>>> <javascript:_e(%7B%7D,'cvml','user@olingo.apache.org');>" <
>>>> user@olingo.apache.org
>>>> <javascript:_e(%7B%7D,'cvml','user@olingo.apache.org');>>
>>>> Date: Monday 20 October 2014 09:48
>>>>
>>>> To: "user@olingo.apache.org
>>>> <javascript:_e(%7B%7D,'cvml','user@olingo.apache.org');>" <
>>>> user@olingo.apache.org
>>>> <javascript:_e(%7B%7D,'cvml','user@olingo.apache.org');>>
>>>> Subject: Re: Accessing media resource and complex proprty
>>>>
>>>>   HI Michael ,
>>>> My Entity contains 3 media resources pointing to different media.
>>>>
>>>>
>>>>
>>>> On Mon, Oct 20, 2014 at 1:07 PM, Bolz, Michael <michael.bolz@sap.com
>>>> <javascript:_e(%7B%7D,'cvml','michael.bolz@sap.com');>> wrote:
>>>>
>>>>>  Hi Vijay,
>>>>>
>>>>>  Do you want an entity which contains the file and image as binary
>>>>> data (normal entity with according properties)
>>>>> or do you want a media resource which represents one media (e.g. File
>>>>> or image)?
>>>>>
>>>>>  In addition there is a new “Stream Property” introduced with Odata 4
>>>>> which could be what you want:
>>>>>
>>>>> http://docs.oasis-open.org/odata/odata-json-format/v4.0/errata01/os/odata-json-format-v4.0-errata01-os-complete.html#_Toc395698775
>>>>>
>>>>>
>>>>>  Kind regards,
>>>>> Michael
>>>>>
>>>>>  Media Entity documentation:
>>>>>
>>>>> http://docs.oasis-open.org/odata/odata-json-format/v4.0/errata01/os/odata-json-format-v4.0-errata01-os-complete.html#_Toc395698776
>>>>>
>>>>>   From: Vijay Kumar Rani <rvkumar@gmail.com
>>>>> <javascript:_e(%7B%7D,'cvml','rvkumar@gmail.com');>>
>>>>> Reply-To: "user@olingo.apache.org
>>>>> <javascript:_e(%7B%7D,'cvml','user@olingo.apache.org');>" <
>>>>> user@olingo.apache.org
>>>>> <javascript:_e(%7B%7D,'cvml','user@olingo.apache.org');>>
>>>>> Date: Monday 20 October 2014 09:24
>>>>> To: "user@olingo.apache.org
>>>>> <javascript:_e(%7B%7D,'cvml','user@olingo.apache.org');>" <
>>>>> user@olingo.apache.org
>>>>> <javascript:_e(%7B%7D,'cvml','user@olingo.apache.org');>>
>>>>> Subject: Re: Accessing media resource and complex proprty
>>>>>
>>>>>   If I have multiple media resources in single entity  example is
>>>>> JSON, File and Image.
>>>>> How Can I declare them in single entity and how my request should be.
>>>>>
>>>>> On Mon, Oct 20, 2014 at 12:43 PM, Vijay Kumar Rani <rvkumar@gmail.com
>>>>> <javascript:_e(%7B%7D,'cvml','rvkumar@gmail.com');>> wrote:
>>>>>
>>>>>> I am using Olingo 4.0.0-beta-01.
>>>>>>
>>>>>> On Mon, Oct 20, 2014 at 11:07 AM, Bolz, Michael <michael.bolz@sap.com
>>>>>> <javascript:_e(%7B%7D,'cvml','michael.bolz@sap.com');>> wrote:
>>>>>>
>>>>>>> Hi Vijay,
>>>>>>>
>>>>>>>  in OData 4 you can access complex properties like normal
>>>>>>> properties directly via url:
>>>>>>> e.g.: "~/odata.svc/ESCompComp(1)/PropertyComp”
>>>>>>>
>>>>>>>  and the media stream of a media resource via the $value option:
>>>>>>> e.g.: “~/odata.svc/ESMedia(1)/$value"
>>>>>>>
>>>>>>>  The access for complex properties is supported in current Olingo
>>>>>>> 4.0.0-beta-01 but support for media resources via $value is missing.
>>>>>>>
>>>>>>>  In your example:
>>>>>>>
>>>>>>> odata1.svc/ESCollAllPrim(1)/CollPropertyString
>>>>>>>
>>>>>>>
>>>>>>>  you try to access a collection of string instead of a complex
>>>>>>> property.
>>>>>>> However in current SNAPSHOT this is also supported, hence the
>>>>>>> question: which version of Olingo do you use?
>>>>>>>
>>>>>>>  Kind regards,
>>>>>>> Michael
>>>>>>>
>>>>>>>  More details and documentation can be found here:
>>>>>>>
>>>>>>> http://docs.oasis-open.org/odata/odata/v4.0/errata01/os/complete/part2-url-conventions/odata-v4.0-errata01-os-part2-url-conventions-complete.html#_Toc395267106
>>>>>>>
>>>>>>>
>>>>>>>  On 20 Oct 2014, at 06:33, Vijay Kumar Rani <rvkumar@gmail.com
>>>>>>> <javascript:_e(%7B%7D,'cvml','rvkumar@gmail.com');>> wrote:
>>>>>>>
>>>>>>>  Hi,
>>>>>>>
>>>>>>>  I am using Olingo4, let me know how can I  access Complex and
>>>>>>> Media resource properties?
>>>>>>> I downloaded the example in github
>>>>>>>
>>>>>>>  the below service is working fine
>>>>>>> odata1.svc/ESCollAllPrim(1)
>>>>>>>
>>>>>>>  the above service has list of collections when I accessing
>>>>>>> as odata1.svc/ESCollAllPrim(1)/CollPropertyString   I am getting
>>>>>>> {"error": {"code": null,"message": "The requested functionality has
>>>>>>> not been implemented (yet)."}}
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>  Vijay
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>>
>>
>

Re: Accessing media resource and complex proprty

Posted by Ramesh Reddy <ra...@redhat.com>.
See http://docs.oasis-open.org/odata/odata/v4.0/errata01/os/complete/part3-csdl/odata-v4.0-errata01-os-part3-csdl-complete.html#_Toc395268126 for available data types in the OData Specification. The value type would be Edm.Binary, which maps to in java terms a byte[]. The contents of the property depends upon your implementation of the service, it could be json or a small image etc. The example in 4.0.0 beta2 might not have binary data to showcase, but you can follow steps in there to provide your own. 

Ramesh.. 

----- Original Message -----

> 4.0.0 beta 2 is working good for the example , i am using binary what is the
> value type of type of binary? Actually I want to set entire json object to
> the property, how can I do that?
> On 21-Oct-2014 7:25 pm, "Bolz, Michael" < michael.bolz@sap.com > wrote:

> > Hello Vijay,
> 

> > Can you please try your example with actual SNAPSHOT of Olingo
> > (4.0.0-beta-02-SNAPSHOT) and give feedback?
> 

> > Kind regards,
> 
> > Michael
> 

> > From: Vijay Kumar Rani < rvkumar@gmail.com >
> 
> > Reply-To: " user@olingo.apache.org " < user@olingo.apache.org >
> 
> > Date: Tuesday 21 October 2014 06:39
> 
> > To: " user@olingo.apache.org " < user@olingo.apache.org >
> 
> > Subject: Re: Accessing media resource and complex proprty
> 

> > In GITHUB example when I access any property
> > /odata1.svc/ESAllPrim(32767)/PropertyString - here PropertyString is
> > property name.I am getting the below issue.
> 
> > is it right way to access properties?
> 

> > { " error ": { " code ": null , " message ": " The requested functionality
> > has not been implemented (yet). " } }
> 

> > On Mon, Oct 20, 2014 at 6:44 PM, Ramesh Reddy < rareddy@redhat.com > wrote:
> 

> > > Yes, the property type will be binary, the content will base64 encoded.
> > 
> 

> > > Ramesh..
> > 
> 

> > > > I am creating a JSONObject, if I set it to EdmBinary the property name
> > > > is
> > > > PropertyBinary, what will be the the ValueTtype? What will be the my
> > > > URL
> > > 
> > 
> 

> > > > Can I access like odata1.svc/ESCollAllPrim(1)/PropertyBinary ?
> > > 
> > 
> 

> > > > On Mon, Oct 20, 2014 at 1:54 PM, Bolz, Michael < michael.bolz@sap.com >
> > > > wrote:
> > > 
> > 
> 

> > > > > Hi Vijay,
> > > > 
> > > 
> > 
> 

> > > > > As I understand you the “Stream Property” fit for your use case (an
> > > > > entity
> > > > > with several stream properties).
> > > > 
> > > 
> > 
> 
> > > > > Unfortunately this is not yet supported in Olingo
> > > > > 4.0.0-beta-02-SNAPSHOT.
> > > > 
> > > 
> > 
> 
> > > > > However contributions are welcome and we do our best to support
> > > > > everyone
> > > > > to
> > > > > do so.
> > > > 
> > > 
> > 
> 

> > > > > Currently for your use case you could use “EdmBinary” properties for
> > > > > you
> > > > > image and file data.
> > > > 
> > > 
> > 
> 
> > > > > But I would only recommend this if those data is not to big.
> > > > 
> > > 
> > 
> 

> > > > > Kind regards,
> > > > 
> > > 
> > 
> 
> > > > > Michael
> > > > 
> > > 
> > 
> 

> > > > > From: Vijay Kumar Rani < rvkumar@gmail.com >
> > > > 
> > > 
> > 
> 
> > > > > Reply-To: " user@olingo.apache.org " < user@olingo.apache.org >
> > > > 
> > > 
> > 
> 
> > > > > Date: Monday 20 October 2014 09:48
> > > > 
> > > 
> > 
> 

> > > > > To: " user@olingo.apache.org " < user@olingo.apache.org >
> > > > 
> > > 
> > 
> 
> > > > > Subject: Re: Accessing media resource and complex proprty
> > > > 
> > > 
> > 
> 

> > > > > HI Michael ,
> > > > 
> > > 
> > 
> 
> > > > > My Entity contains 3 media resources pointing to different media.
> > > > 
> > > 
> > 
> 

> > > > > On Mon, Oct 20, 2014 at 1:07 PM, Bolz, Michael < michael.bolz@sap.com
> > > > > >
> > > > > wrote:
> > > > 
> > > 
> > 
> 

> > > > > > Hi Vijay,
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > Do you want an entity which contains the file and image as binary
> > > > > > data
> > > > > > (normal entity with according properties)
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > or do you want a media resource which represents one media (e.g.
> > > > > > File
> > > > > > or
> > > > > > image)?
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > In addition there is a new “Stream Property” introduced with Odata
> > > > > > 4
> > > > > > which
> > > > > > could be what you want:
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > http://docs.oasis-open.org/odata/odata-json-format/v4.0/errata01/os/odata-json-format-v4.0-errata01-os-complete.html#_Toc395698775
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > Kind regards,
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > Michael
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > Media Entity documentation:
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > http://docs.oasis-open.org/odata/odata-json-format/v4.0/errata01/os/odata-json-format-v4.0-errata01-os-complete.html#_Toc395698776
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > From: Vijay Kumar Rani < rvkumar@gmail.com >
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > Reply-To: " user@olingo.apache.org " < user@olingo.apache.org >
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > Date: Monday 20 October 2014 09:24
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > To: " user@olingo.apache.org " < user@olingo.apache.org >
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > Subject: Re: Accessing media resource and complex proprty
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > If I have multiple media resources in single entity example is
> > > > > > JSON,
> > > > > > File
> > > > > > and
> > > > > > Image.
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > How Can I declare them in single entity and how my request should
> > > > > > be.
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > On Mon, Oct 20, 2014 at 12:43 PM, Vijay Kumar Rani <
> > > > > > rvkumar@gmail.com
> > > > > > >
> > > > > > wrote:
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > I am using Olingo 4.0.0-beta-01.
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > On Mon, Oct 20, 2014 at 11:07 AM, Bolz, Michael <
> > > > > > > michael.bolz@sap.com
> > > > > > > >
> > > > > > > wrote:
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > Hi Vijay,
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > in OData 4 you can access complex properties like normal
> > > > > > > > properties
> > > > > > > > directly
> > > > > > > > via url:
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > > e.g.: "~/odata.svc/ESCompComp(1)/PropertyComp”
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > and the media stream of a media resource via the $value option:
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > > e.g.: “~/odata.svc/ESMedia(1)/$value"
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > The access for complex properties is supported in current
> > > > > > > > Olingo
> > > > > > > > 4.0.0-beta-01 but support for media resources via $value is
> > > > > > > > missing.
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > In your example:
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > odata1.svc/ESCollAllPrim(1)/CollPropertyString
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > you try to access a collection of string instead of a complex
> > > > > > > > property.
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > > However in current SNAPSHOT this is also supported, hence the
> > > > > > > > question:
> > > > > > > > which
> > > > > > > > version of Olingo do you use?
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > Kind regards,
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > > Michael
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > More details and documentation can be found here:
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > > http://docs.oasis-open.org/odata/odata/v4.0/errata01/os/complete/part2-url-conventions/odata-v4.0-errata01-os-part2-url-conventions-complete.html#_Toc395267106
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > On 20 Oct 2014, at 06:33, Vijay Kumar Rani < rvkumar@gmail.com
> > > > > > > > >
> > > > > > > > wrote:
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > Hi,
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > I am using Olingo4, let me know how can I access Complex and
> > > > > > > > > Media
> > > > > > > > > resource
> > > > > > > > > properties?
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > > > I downloaded the example in github
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > the below service is working fine
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > > > odata1.svc/ESCollAllPrim(1)
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > the above service has list of collections when I accessing as
> > > > > > > > > odata1.svc/ESCollAllPrim(1)/CollPropertyString I am getting
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > > > > { " error ": { " code ": null , " message ": " The requested
> > > > > > > > > functionality
> > > > > > > > > has not been implemented (yet). " } }
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > > > > Vijay
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

Re: Accessing media resource and complex proprty

Posted by Vijay Kumar Rani <rv...@gmail.com>.
4.0.0 beta 2 is working good for the example , i am using binary what is
the value type of type of binary?  Actually I want to set entire json
object to the property, how can I do that?
On 21-Oct-2014 7:25 pm, "Bolz, Michael" <mi...@sap.com> wrote:

>  Hello Vijay,
>
>  Can you please try your example with actual SNAPSHOT of Olingo
> (4.0.0-beta-02-SNAPSHOT) and give feedback?
>
>  Kind regards,
> Michael
>
>   From: Vijay Kumar Rani <rv...@gmail.com>
> Reply-To: "user@olingo.apache.org" <us...@olingo.apache.org>
> Date: Tuesday 21 October 2014 06:39
> To: "user@olingo.apache.org" <us...@olingo.apache.org>
> Subject: Re: Accessing media resource and complex proprty
>
>   In GITHUB example when I access any
> property /odata1.svc/ESAllPrim(32767)/PropertyString - here PropertyString
> is property name.I am getting the below issue.
> is it right way to access properties?
>
>  {"error": {"code": null,"message": "The requested functionality has not
> been implemented (yet)."}}
>
> On Mon, Oct 20, 2014 at 6:44 PM, Ramesh Reddy <ra...@redhat.com> wrote:
>
>>  Yes, the property type will be binary, the content will base64 encoded.
>>
>>  Ramesh..
>>
>>  ------------------------------
>>
>> I am creating a JSONObject, if I set it to EdmBinary the property name
>> is PropertyBinary, what will be the the ValueTtype? What will be the my URL
>>
>>  Can I access like odata1.svc/ESCollAllPrim(1)/PropertyBinary ?
>>
>> On Mon, Oct 20, 2014 at 1:54 PM, Bolz, Michael <mi...@sap.com>
>> wrote:
>>
>>>  Hi Vijay,
>>>
>>>  As I understand you the “Stream Property” fit for your use case (an
>>> entity with several stream properties).
>>> Unfortunately this is not yet supported in Olingo 4.0.0-beta-02-SNAPSHOT.
>>> However contributions are welcome and we do our best to support everyone
>>> to do so.
>>>
>>>  Currently for your use case you could use “EdmBinary” properties for
>>> you image and file data.
>>> But I would only recommend this if those data is not to big.
>>>
>>>  Kind regards,
>>> Michael
>>>
>>>   From: Vijay Kumar Rani <rv...@gmail.com>
>>> Reply-To: "user@olingo.apache.org" <us...@olingo.apache.org>
>>> Date: Monday 20 October 2014 09:48
>>>
>>> To: "user@olingo.apache.org" <us...@olingo.apache.org>
>>> Subject: Re: Accessing media resource and complex proprty
>>>
>>>   HI Michael ,
>>> My Entity contains 3 media resources pointing to different media.
>>>
>>>
>>>
>>> On Mon, Oct 20, 2014 at 1:07 PM, Bolz, Michael <mi...@sap.com>
>>> wrote:
>>>
>>>>  Hi Vijay,
>>>>
>>>>  Do you want an entity which contains the file and image as binary
>>>> data (normal entity with according properties)
>>>> or do you want a media resource which represents one media (e.g. File
>>>> or image)?
>>>>
>>>>  In addition there is a new “Stream Property” introduced with Odata 4
>>>> which could be what you want:
>>>>
>>>> http://docs.oasis-open.org/odata/odata-json-format/v4.0/errata01/os/odata-json-format-v4.0-errata01-os-complete.html#_Toc395698775
>>>>
>>>>
>>>>  Kind regards,
>>>> Michael
>>>>
>>>>  Media Entity documentation:
>>>>
>>>> http://docs.oasis-open.org/odata/odata-json-format/v4.0/errata01/os/odata-json-format-v4.0-errata01-os-complete.html#_Toc395698776
>>>>
>>>>   From: Vijay Kumar Rani <rv...@gmail.com>
>>>> Reply-To: "user@olingo.apache.org" <us...@olingo.apache.org>
>>>> Date: Monday 20 October 2014 09:24
>>>> To: "user@olingo.apache.org" <us...@olingo.apache.org>
>>>> Subject: Re: Accessing media resource and complex proprty
>>>>
>>>>   If I have multiple media resources in single entity  example is
>>>> JSON, File and Image.
>>>> How Can I declare them in single entity and how my request should be.
>>>>
>>>> On Mon, Oct 20, 2014 at 12:43 PM, Vijay Kumar Rani <rv...@gmail.com>
>>>> wrote:
>>>>
>>>>> I am using Olingo 4.0.0-beta-01.
>>>>>
>>>>> On Mon, Oct 20, 2014 at 11:07 AM, Bolz, Michael <mi...@sap.com>
>>>>> wrote:
>>>>>
>>>>>> Hi Vijay,
>>>>>>
>>>>>>  in OData 4 you can access complex properties like normal properties
>>>>>> directly via url:
>>>>>> e.g.: "~/odata.svc/ESCompComp(1)/PropertyComp”
>>>>>>
>>>>>>  and the media stream of a media resource via the $value option:
>>>>>> e.g.: “~/odata.svc/ESMedia(1)/$value"
>>>>>>
>>>>>>  The access for complex properties is supported in current Olingo
>>>>>> 4.0.0-beta-01 but support for media resources via $value is missing.
>>>>>>
>>>>>>  In your example:
>>>>>>
>>>>>> odata1.svc/ESCollAllPrim(1)/CollPropertyString
>>>>>>
>>>>>>
>>>>>>  you try to access a collection of string instead of a complex
>>>>>> property.
>>>>>> However in current SNAPSHOT this is also supported, hence the
>>>>>> question: which version of Olingo do you use?
>>>>>>
>>>>>>  Kind regards,
>>>>>> Michael
>>>>>>
>>>>>>  More details and documentation can be found here:
>>>>>>
>>>>>> http://docs.oasis-open.org/odata/odata/v4.0/errata01/os/complete/part2-url-conventions/odata-v4.0-errata01-os-part2-url-conventions-complete.html#_Toc395267106
>>>>>>
>>>>>>
>>>>>>  On 20 Oct 2014, at 06:33, Vijay Kumar Rani <rv...@gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>  Hi,
>>>>>>
>>>>>>  I am using Olingo4, let me know how can I  access Complex and Media
>>>>>> resource properties?
>>>>>> I downloaded the example in github
>>>>>>
>>>>>>  the below service is working fine
>>>>>> odata1.svc/ESCollAllPrim(1)
>>>>>>
>>>>>>  the above service has list of collections when I accessing
>>>>>> as odata1.svc/ESCollAllPrim(1)/CollPropertyString   I am getting
>>>>>> {"error": {"code": null,"message": "The requested functionality has
>>>>>> not been implemented (yet)."}}
>>>>>>
>>>>>>
>>>>>>
>>>>>>  Vijay
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>>
>

Re: Accessing media resource and complex proprty

Posted by "Bolz, Michael" <mi...@sap.com>.
Hello Vijay,

Can you please try your example with actual SNAPSHOT of Olingo (4.0.0-beta-02-SNAPSHOT) and give feedback?

Kind regards,
Michael

From: Vijay Kumar Rani <rv...@gmail.com>>
Reply-To: "user@olingo.apache.org<ma...@olingo.apache.org>" <us...@olingo.apache.org>>
Date: Tuesday 21 October 2014 06:39
To: "user@olingo.apache.org<ma...@olingo.apache.org>" <us...@olingo.apache.org>>
Subject: Re: Accessing media resource and complex proprty

In GITHUB example when I access any property /odata1.svc/ESAllPrim(32767)/PropertyString - here PropertyString is property name.I am getting the below issue.
is it right way to access properties?

{"error": {"code": null,"message": "The requested functionality has not been implemented (yet)."}}

On Mon, Oct 20, 2014 at 6:44 PM, Ramesh Reddy <ra...@redhat.com>> wrote:
Yes, the property type will be binary, the content will base64 encoded.

Ramesh..

________________________________
I am creating a JSONObject, if I set it to EdmBinary the property name is PropertyBinary, what will be the the ValueTtype? What will be the my URL

Can I access like odata1.svc/ESCollAllPrim(1)/PropertyBinary ?

On Mon, Oct 20, 2014 at 1:54 PM, Bolz, Michael <mi...@sap.com>> wrote:
Hi Vijay,

As I understand you the “Stream Property” fit for your use case (an entity with several stream properties).
Unfortunately this is not yet supported in Olingo 4.0.0-beta-02-SNAPSHOT.
However contributions are welcome and we do our best to support everyone to do so.

Currently for your use case you could use “EdmBinary” properties for you image and file data.
But I would only recommend this if those data is not to big.

Kind regards,
Michael

From: Vijay Kumar Rani <rv...@gmail.com>>
Reply-To: "user@olingo.apache.org<ma...@olingo.apache.org>" <us...@olingo.apache.org>>
Date: Monday 20 October 2014 09:48

To: "user@olingo.apache.org<ma...@olingo.apache.org>" <us...@olingo.apache.org>>
Subject: Re: Accessing media resource and complex proprty

HI Michael ,
My Entity contains 3 media resources pointing to different media.



On Mon, Oct 20, 2014 at 1:07 PM, Bolz, Michael <mi...@sap.com>> wrote:
Hi Vijay,

Do you want an entity which contains the file and image as binary data (normal entity with according properties)
or do you want a media resource which represents one media (e.g. File or image)?

In addition there is a new “Stream Property” introduced with Odata 4 which could be what you want:
http://docs.oasis-open.org/odata/odata-json-format/v4.0/errata01/os/odata-json-format-v4.0-errata01-os-complete.html#_Toc395698775

Kind regards,
Michael

Media Entity documentation:
http://docs.oasis-open.org/odata/odata-json-format/v4.0/errata01/os/odata-json-format-v4.0-errata01-os-complete.html#_Toc395698776

From: Vijay Kumar Rani <rv...@gmail.com>>
Reply-To: "user@olingo.apache.org<ma...@olingo.apache.org>" <us...@olingo.apache.org>>
Date: Monday 20 October 2014 09:24
To: "user@olingo.apache.org<ma...@olingo.apache.org>" <us...@olingo.apache.org>>
Subject: Re: Accessing media resource and complex proprty

If I have multiple media resources in single entity  example is JSON, File and Image.
How Can I declare them in single entity and how my request should be.

On Mon, Oct 20, 2014 at 12:43 PM, Vijay Kumar Rani <rv...@gmail.com>> wrote:
I am using Olingo 4.0.0-beta-01.

On Mon, Oct 20, 2014 at 11:07 AM, Bolz, Michael <mi...@sap.com>> wrote:
Hi Vijay,

in OData 4 you can access complex properties like normal properties directly via url:
e.g.: "~/odata.svc/ESCompComp(1)/PropertyComp”

and the media stream of a media resource via the $value option:
e.g.: “~/odata.svc/ESMedia(1)/$value"

The access for complex properties is supported in current Olingo 4.0.0-beta-01 but support for media resources via $value is missing.

In your example:
odata1.svc/ESCollAllPrim(1)/CollPropertyString

you try to access a collection of string instead of a complex property.
However in current SNAPSHOT this is also supported, hence the question: which version of Olingo do you use?

Kind regards,
Michael

More details and documentation can be found here:
http://docs.oasis-open.org/odata/odata/v4.0/errata01/os/complete/part2-url-conventions/odata-v4.0-errata01-os-part2-url-conventions-complete.html#_Toc395267106


On 20 Oct 2014, at 06:33, Vijay Kumar Rani <rv...@gmail.com>> wrote:

Hi,

I am using Olingo4, let me know how can I  access Complex and Media resource properties?
I downloaded the example in github

the below service is working fine
odata1.svc/ESCollAllPrim(1)

the above service has list of collections when I accessing as odata1.svc/ESCollAllPrim(1)/CollPropertyString   I am getting
{"error": {"code": null,"message": "The requested functionality has not been implemented (yet)."}}



Vijay








Re: Accessing media resource and complex proprty

Posted by Vijay Kumar Rani <rv...@gmail.com>.
In GITHUB example when I access any
property /odata1.svc/ESAllPrim(32767)/PropertyString - here PropertyString
is property name.I am getting the below issue.
is it right way to access properties?

{"error": {"code": null,"message": "The requested functionality has not
been implemented (yet)."}}

On Mon, Oct 20, 2014 at 6:44 PM, Ramesh Reddy <ra...@redhat.com> wrote:

> Yes, the property type will be binary, the content will base64 encoded.
>
> Ramesh..
>
> ------------------------------
>
> I am creating a JSONObject, if I set it to EdmBinary the property name is
> PropertyBinary, what will be the the ValueTtype? What will be the my URL
>
> Can I access like odata1.svc/ESCollAllPrim(1)/PropertyBinary ?
>
> On Mon, Oct 20, 2014 at 1:54 PM, Bolz, Michael <mi...@sap.com>
> wrote:
>
>>  Hi Vijay,
>>
>>  As I understand you the “Stream Property” fit for your use case (an
>> entity with several stream properties).
>> Unfortunately this is not yet supported in Olingo 4.0.0-beta-02-SNAPSHOT.
>> However contributions are welcome and we do our best to support everyone
>> to do so.
>>
>>  Currently for your use case you could use “EdmBinary” properties for
>> you image and file data.
>> But I would only recommend this if those data is not to big.
>>
>>  Kind regards,
>> Michael
>>
>>   From: Vijay Kumar Rani <rv...@gmail.com>
>> Reply-To: "user@olingo.apache.org" <us...@olingo.apache.org>
>> Date: Monday 20 October 2014 09:48
>>
>> To: "user@olingo.apache.org" <us...@olingo.apache.org>
>> Subject: Re: Accessing media resource and complex proprty
>>
>>   HI Michael ,
>> My Entity contains 3 media resources pointing to different media.
>>
>>
>>
>> On Mon, Oct 20, 2014 at 1:07 PM, Bolz, Michael <mi...@sap.com>
>> wrote:
>>
>>>  Hi Vijay,
>>>
>>>  Do you want an entity which contains the file and image as binary data
>>> (normal entity with according properties)
>>> or do you want a media resource which represents one media (e.g. File or
>>> image)?
>>>
>>>  In addition there is a new “Stream Property” introduced with Odata 4
>>> which could be what you want:
>>>
>>> http://docs.oasis-open.org/odata/odata-json-format/v4.0/errata01/os/odata-json-format-v4.0-errata01-os-complete.html#_Toc395698775
>>>
>>>
>>>  Kind regards,
>>> Michael
>>>
>>>  Media Entity documentation:
>>>
>>> http://docs.oasis-open.org/odata/odata-json-format/v4.0/errata01/os/odata-json-format-v4.0-errata01-os-complete.html#_Toc395698776
>>>
>>>   From: Vijay Kumar Rani <rv...@gmail.com>
>>> Reply-To: "user@olingo.apache.org" <us...@olingo.apache.org>
>>> Date: Monday 20 October 2014 09:24
>>> To: "user@olingo.apache.org" <us...@olingo.apache.org>
>>> Subject: Re: Accessing media resource and complex proprty
>>>
>>>   If I have multiple media resources in single entity  example is JSON,
>>> File and Image.
>>> How Can I declare them in single entity and how my request should be.
>>>
>>> On Mon, Oct 20, 2014 at 12:43 PM, Vijay Kumar Rani <rv...@gmail.com>
>>> wrote:
>>>
>>>> I am using Olingo 4.0.0-beta-01.
>>>>
>>>> On Mon, Oct 20, 2014 at 11:07 AM, Bolz, Michael <mi...@sap.com>
>>>> wrote:
>>>>
>>>>> Hi Vijay,
>>>>>
>>>>>  in OData 4 you can access complex properties like normal properties
>>>>> directly via url:
>>>>> e.g.: "~/odata.svc/ESCompComp(1)/PropertyComp”
>>>>>
>>>>>  and the media stream of a media resource via the $value option:
>>>>> e.g.: “~/odata.svc/ESMedia(1)/$value"
>>>>>
>>>>>  The access for complex properties is supported in current Olingo
>>>>> 4.0.0-beta-01 but support for media resources via $value is missing.
>>>>>
>>>>>  In your example:
>>>>>
>>>>> odata1.svc/ESCollAllPrim(1)/CollPropertyString
>>>>>
>>>>>
>>>>>  you try to access a collection of string instead of a complex
>>>>> property.
>>>>> However in current SNAPSHOT this is also supported, hence the
>>>>> question: which version of Olingo do you use?
>>>>>
>>>>>  Kind regards,
>>>>> Michael
>>>>>
>>>>>  More details and documentation can be found here:
>>>>>
>>>>> http://docs.oasis-open.org/odata/odata/v4.0/errata01/os/complete/part2-url-conventions/odata-v4.0-errata01-os-part2-url-conventions-complete.html#_Toc395267106
>>>>>
>>>>>
>>>>>  On 20 Oct 2014, at 06:33, Vijay Kumar Rani <rv...@gmail.com> wrote:
>>>>>
>>>>>  Hi,
>>>>>
>>>>>  I am using Olingo4, let me know how can I  access Complex and Media
>>>>> resource properties?
>>>>> I downloaded the example in github
>>>>>
>>>>>  the below service is working fine
>>>>> odata1.svc/ESCollAllPrim(1)
>>>>>
>>>>>  the above service has list of collections when I accessing
>>>>> as odata1.svc/ESCollAllPrim(1)/CollPropertyString   I am getting
>>>>> {"error": {"code": null,"message": "The requested functionality has
>>>>> not been implemented (yet)."}}
>>>>>
>>>>>
>>>>>
>>>>>  Vijay
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>
>

Re: Accessing media resource and complex proprty

Posted by Vijay Kumar Rani <rv...@gmail.com>.
Here is my code snippet

JSONObject obj = new JSONObject();

    obj.put("name", "foo");
    obj.put("num", new Integer(100));
    obj.put("balance", new Double(1000.21));
    InputStream in=null;
    try {
 in = IOUtils.toInputStream(obj.toString(), "UTF-8");
} catch (IOException e) {
logger.log("TODO in provicer")
}
    Base64.encodeBase64(obj.toString().getBytes());
    Base64InputStream base64InputStream =  new Base64InputStream(in);

    entity.addProperty(new PropertyImpl(null, "PT",ValueType.PRIMITIVE,
base64InputStream));

PT is type of Binary -->  new
Property().setName("PT").setType(EdmPrimitiveTypeKind.Binary.getFullQualifiedName());

when I access the PT I am getting the below issue,  what  is causing the
issue?

An inconsistency has been detected in the type definition of property


On Mon, Oct 20, 2014 at 6:44 PM, Ramesh Reddy <ra...@redhat.com> wrote:

> Yes, the property type will be binary, the content will base64 encoded.
>
> Ramesh..
>
> ------------------------------
>
> I am creating a JSONObject, if I set it to EdmBinary the property name is
> PropertyBinary, what will be the the ValueTtype? What will be the my URL
>
> Can I access like odata1.svc/ESCollAllPrim(1)/PropertyBinary ?
>
> On Mon, Oct 20, 2014 at 1:54 PM, Bolz, Michael <mi...@sap.com>
> wrote:
>
>>  Hi Vijay,
>>
>>  As I understand you the “Stream Property” fit for your use case (an
>> entity with several stream properties).
>> Unfortunately this is not yet supported in Olingo 4.0.0-beta-02-SNAPSHOT.
>> However contributions are welcome and we do our best to support everyone
>> to do so.
>>
>>  Currently for your use case you could use “EdmBinary” properties for
>> you image and file data.
>> But I would only recommend this if those data is not to big.
>>
>>  Kind regards,
>> Michael
>>
>>   From: Vijay Kumar Rani <rv...@gmail.com>
>> Reply-To: "user@olingo.apache.org" <us...@olingo.apache.org>
>> Date: Monday 20 October 2014 09:48
>>
>> To: "user@olingo.apache.org" <us...@olingo.apache.org>
>> Subject: Re: Accessing media resource and complex proprty
>>
>>   HI Michael ,
>> My Entity contains 3 media resources pointing to different media.
>>
>>
>>
>> On Mon, Oct 20, 2014 at 1:07 PM, Bolz, Michael <mi...@sap.com>
>> wrote:
>>
>>>  Hi Vijay,
>>>
>>>  Do you want an entity which contains the file and image as binary data
>>> (normal entity with according properties)
>>> or do you want a media resource which represents one media (e.g. File or
>>> image)?
>>>
>>>  In addition there is a new “Stream Property” introduced with Odata 4
>>> which could be what you want:
>>>
>>> http://docs.oasis-open.org/odata/odata-json-format/v4.0/errata01/os/odata-json-format-v4.0-errata01-os-complete.html#_Toc395698775
>>>
>>>
>>>  Kind regards,
>>> Michael
>>>
>>>  Media Entity documentation:
>>>
>>> http://docs.oasis-open.org/odata/odata-json-format/v4.0/errata01/os/odata-json-format-v4.0-errata01-os-complete.html#_Toc395698776
>>>
>>>   From: Vijay Kumar Rani <rv...@gmail.com>
>>> Reply-To: "user@olingo.apache.org" <us...@olingo.apache.org>
>>> Date: Monday 20 October 2014 09:24
>>> To: "user@olingo.apache.org" <us...@olingo.apache.org>
>>> Subject: Re: Accessing media resource and complex proprty
>>>
>>>   If I have multiple media resources in single entity  example is JSON,
>>> File and Image.
>>> How Can I declare them in single entity and how my request should be.
>>>
>>> On Mon, Oct 20, 2014 at 12:43 PM, Vijay Kumar Rani <rv...@gmail.com>
>>> wrote:
>>>
>>>> I am using Olingo 4.0.0-beta-01.
>>>>
>>>> On Mon, Oct 20, 2014 at 11:07 AM, Bolz, Michael <mi...@sap.com>
>>>> wrote:
>>>>
>>>>> Hi Vijay,
>>>>>
>>>>>  in OData 4 you can access complex properties like normal properties
>>>>> directly via url:
>>>>> e.g.: "~/odata.svc/ESCompComp(1)/PropertyComp”
>>>>>
>>>>>  and the media stream of a media resource via the $value option:
>>>>> e.g.: “~/odata.svc/ESMedia(1)/$value"
>>>>>
>>>>>  The access for complex properties is supported in current Olingo
>>>>> 4.0.0-beta-01 but support for media resources via $value is missing.
>>>>>
>>>>>  In your example:
>>>>>
>>>>> odata1.svc/ESCollAllPrim(1)/CollPropertyString
>>>>>
>>>>>
>>>>>  you try to access a collection of string instead of a complex
>>>>> property.
>>>>> However in current SNAPSHOT this is also supported, hence the
>>>>> question: which version of Olingo do you use?
>>>>>
>>>>>  Kind regards,
>>>>> Michael
>>>>>
>>>>>  More details and documentation can be found here:
>>>>>
>>>>> http://docs.oasis-open.org/odata/odata/v4.0/errata01/os/complete/part2-url-conventions/odata-v4.0-errata01-os-part2-url-conventions-complete.html#_Toc395267106
>>>>>
>>>>>
>>>>>  On 20 Oct 2014, at 06:33, Vijay Kumar Rani <rv...@gmail.com> wrote:
>>>>>
>>>>>  Hi,
>>>>>
>>>>>  I am using Olingo4, let me know how can I  access Complex and Media
>>>>> resource properties?
>>>>> I downloaded the example in github
>>>>>
>>>>>  the below service is working fine
>>>>> odata1.svc/ESCollAllPrim(1)
>>>>>
>>>>>  the above service has list of collections when I accessing
>>>>> as odata1.svc/ESCollAllPrim(1)/CollPropertyString   I am getting
>>>>> {"error": {"code": null,"message": "The requested functionality has
>>>>> not been implemented (yet)."}}
>>>>>
>>>>>
>>>>>
>>>>>  Vijay
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>
>

Re: Accessing media resource and complex proprty

Posted by Ramesh Reddy <ra...@redhat.com>.
Yes, the property type will be binary, the content will base64 encoded. 

Ramesh.. 

----- Original Message -----

> I am creating a JSONObject, if I set it to EdmBinary the property name is
> PropertyBinary, what will be the the ValueTtype? What will be the my URL

> Can I access like odata1.svc/ESCollAllPrim(1)/PropertyBinary ?

> On Mon, Oct 20, 2014 at 1:54 PM, Bolz, Michael < michael.bolz@sap.com >
> wrote:

> > Hi Vijay,
> 

> > As I understand you the “Stream Property” fit for your use case (an entity
> > with several stream properties).
> 
> > Unfortunately this is not yet supported in Olingo 4.0.0-beta-02-SNAPSHOT.
> 
> > However contributions are welcome and we do our best to support everyone to
> > do so.
> 

> > Currently for your use case you could use “EdmBinary” properties for you
> > image and file data.
> 
> > But I would only recommend this if those data is not to big.
> 

> > Kind regards,
> 
> > Michael
> 

> > From: Vijay Kumar Rani < rvkumar@gmail.com >
> 
> > Reply-To: " user@olingo.apache.org " < user@olingo.apache.org >
> 
> > Date: Monday 20 October 2014 09:48
> 

> > To: " user@olingo.apache.org " < user@olingo.apache.org >
> 
> > Subject: Re: Accessing media resource and complex proprty
> 

> > HI Michael ,
> 
> > My Entity contains 3 media resources pointing to different media.
> 

> > On Mon, Oct 20, 2014 at 1:07 PM, Bolz, Michael < michael.bolz@sap.com >
> > wrote:
> 

> > > Hi Vijay,
> > 
> 

> > > Do you want an entity which contains the file and image as binary data
> > > (normal entity with according properties)
> > 
> 
> > > or do you want a media resource which represents one media (e.g. File or
> > > image)?
> > 
> 

> > > In addition there is a new “Stream Property” introduced with Odata 4
> > > which
> > > could be what you want:
> > 
> 
> > > http://docs.oasis-open.org/odata/odata-json-format/v4.0/errata01/os/odata-json-format-v4.0-errata01-os-complete.html#_Toc395698775
> > 
> 

> > > Kind regards,
> > 
> 
> > > Michael
> > 
> 

> > > Media Entity documentation:
> > 
> 
> > > http://docs.oasis-open.org/odata/odata-json-format/v4.0/errata01/os/odata-json-format-v4.0-errata01-os-complete.html#_Toc395698776
> > 
> 

> > > From: Vijay Kumar Rani < rvkumar@gmail.com >
> > 
> 
> > > Reply-To: " user@olingo.apache.org " < user@olingo.apache.org >
> > 
> 
> > > Date: Monday 20 October 2014 09:24
> > 
> 
> > > To: " user@olingo.apache.org " < user@olingo.apache.org >
> > 
> 
> > > Subject: Re: Accessing media resource and complex proprty
> > 
> 

> > > If I have multiple media resources in single entity example is JSON, File
> > > and
> > > Image.
> > 
> 
> > > How Can I declare them in single entity and how my request should be.
> > 
> 

> > > On Mon, Oct 20, 2014 at 12:43 PM, Vijay Kumar Rani < rvkumar@gmail.com >
> > > wrote:
> > 
> 

> > > > I am using Olingo 4.0.0-beta-01.
> > > 
> > 
> 

> > > > On Mon, Oct 20, 2014 at 11:07 AM, Bolz, Michael < michael.bolz@sap.com
> > > > >
> > > > wrote:
> > > 
> > 
> 

> > > > > Hi Vijay,
> > > > 
> > > 
> > 
> 

> > > > > in OData 4 you can access complex properties like normal properties
> > > > > directly
> > > > > via url:
> > > > 
> > > 
> > 
> 
> > > > > e.g.: "~/odata.svc/ESCompComp(1)/PropertyComp”
> > > > 
> > > 
> > 
> 

> > > > > and the media stream of a media resource via the $value option:
> > > > 
> > > 
> > 
> 
> > > > > e.g.: “~/odata.svc/ESMedia(1)/$value"
> > > > 
> > > 
> > 
> 

> > > > > The access for complex properties is supported in current Olingo
> > > > > 4.0.0-beta-01 but support for media resources via $value is missing.
> > > > 
> > > 
> > 
> 

> > > > > In your example:
> > > > 
> > > 
> > 
> 

> > > > > > odata1.svc/ESCollAllPrim(1)/CollPropertyString
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > you try to access a collection of string instead of a complex
> > > > > property.
> > > > 
> > > 
> > 
> 
> > > > > However in current SNAPSHOT this is also supported, hence the
> > > > > question:
> > > > > which
> > > > > version of Olingo do you use?
> > > > 
> > > 
> > 
> 

> > > > > Kind regards,
> > > > 
> > > 
> > 
> 
> > > > > Michael
> > > > 
> > > 
> > 
> 

> > > > > More details and documentation can be found here:
> > > > 
> > > 
> > 
> 
> > > > > http://docs.oasis-open.org/odata/odata/v4.0/errata01/os/complete/part2-url-conventions/odata-v4.0-errata01-os-part2-url-conventions-complete.html#_Toc395267106
> > > > 
> > > 
> > 
> 

> > > > > On 20 Oct 2014, at 06:33, Vijay Kumar Rani < rvkumar@gmail.com >
> > > > > wrote:
> > > > 
> > > 
> > 
> 

> > > > > > Hi,
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > I am using Olingo4, let me know how can I access Complex and Media
> > > > > > resource
> > > > > > properties?
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > I downloaded the example in github
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > the below service is working fine
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > odata1.svc/ESCollAllPrim(1)
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > the above service has list of collections when I accessing as
> > > > > > odata1.svc/ESCollAllPrim(1)/CollPropertyString I am getting
> > > > > 
> > > > 
> > > 
> > 
> 
> > > > > > { " error ": { " code ": null , " message ": " The requested
> > > > > > functionality
> > > > > > has not been implemented (yet). " } }
> > > > > 
> > > > 
> > > 
> > 
> 

> > > > > > Vijay
> > > > > 
> > > > 
> > > 
> > 
> 

Re: Accessing media resource and complex proprty

Posted by Vijay Kumar Rani <rv...@gmail.com>.
I am creating a JSONObject, if I set it to EdmBinary the property name is
PropertyBinary, what will be the the ValueTtype? What will be the my URL

Can I access like odata1.svc/ESCollAllPrim(1)/PropertyBinary ?

On Mon, Oct 20, 2014 at 1:54 PM, Bolz, Michael <mi...@sap.com> wrote:

>  Hi Vijay,
>
>  As I understand you the “Stream Property” fit for your use case (an
> entity with several stream properties).
> Unfortunately this is not yet supported in Olingo 4.0.0-beta-02-SNAPSHOT.
> However contributions are welcome and we do our best to support everyone
> to do so.
>
>  Currently for your use case you could use “EdmBinary” properties for you
> image and file data.
> But I would only recommend this if those data is not to big.
>
>  Kind regards,
> Michael
>
>   From: Vijay Kumar Rani <rv...@gmail.com>
> Reply-To: "user@olingo.apache.org" <us...@olingo.apache.org>
> Date: Monday 20 October 2014 09:48
>
> To: "user@olingo.apache.org" <us...@olingo.apache.org>
> Subject: Re: Accessing media resource and complex proprty
>
>   HI Michael ,
> My Entity contains 3 media resources pointing to different media.
>
>
>
> On Mon, Oct 20, 2014 at 1:07 PM, Bolz, Michael <mi...@sap.com>
> wrote:
>
>>  Hi Vijay,
>>
>>  Do you want an entity which contains the file and image as binary data
>> (normal entity with according properties)
>> or do you want a media resource which represents one media (e.g. File or
>> image)?
>>
>>  In addition there is a new “Stream Property” introduced with Odata 4
>> which could be what you want:
>>
>> http://docs.oasis-open.org/odata/odata-json-format/v4.0/errata01/os/odata-json-format-v4.0-errata01-os-complete.html#_Toc395698775
>>
>>
>>  Kind regards,
>> Michael
>>
>>  Media Entity documentation:
>>
>> http://docs.oasis-open.org/odata/odata-json-format/v4.0/errata01/os/odata-json-format-v4.0-errata01-os-complete.html#_Toc395698776
>>
>>   From: Vijay Kumar Rani <rv...@gmail.com>
>> Reply-To: "user@olingo.apache.org" <us...@olingo.apache.org>
>> Date: Monday 20 October 2014 09:24
>> To: "user@olingo.apache.org" <us...@olingo.apache.org>
>> Subject: Re: Accessing media resource and complex proprty
>>
>>   If I have multiple media resources in single entity  example is JSON,
>> File and Image.
>> How Can I declare them in single entity and how my request should be.
>>
>> On Mon, Oct 20, 2014 at 12:43 PM, Vijay Kumar Rani <rv...@gmail.com>
>> wrote:
>>
>>> I am using Olingo 4.0.0-beta-01.
>>>
>>> On Mon, Oct 20, 2014 at 11:07 AM, Bolz, Michael <mi...@sap.com>
>>> wrote:
>>>
>>>> Hi Vijay,
>>>>
>>>>  in OData 4 you can access complex properties like normal properties
>>>> directly via url:
>>>> e.g.: "~/odata.svc/ESCompComp(1)/PropertyComp”
>>>>
>>>>  and the media stream of a media resource via the $value option:
>>>> e.g.: “~/odata.svc/ESMedia(1)/$value"
>>>>
>>>>  The access for complex properties is supported in current Olingo
>>>> 4.0.0-beta-01 but support for media resources via $value is missing.
>>>>
>>>>  In your example:
>>>>
>>>> odata1.svc/ESCollAllPrim(1)/CollPropertyString
>>>>
>>>>
>>>>  you try to access a collection of string instead of a complex
>>>> property.
>>>> However in current SNAPSHOT this is also supported, hence the question:
>>>> which version of Olingo do you use?
>>>>
>>>>  Kind regards,
>>>> Michael
>>>>
>>>>  More details and documentation can be found here:
>>>>
>>>> http://docs.oasis-open.org/odata/odata/v4.0/errata01/os/complete/part2-url-conventions/odata-v4.0-errata01-os-part2-url-conventions-complete.html#_Toc395267106
>>>>
>>>>
>>>>  On 20 Oct 2014, at 06:33, Vijay Kumar Rani <rv...@gmail.com> wrote:
>>>>
>>>>  Hi,
>>>>
>>>>  I am using Olingo4, let me know how can I  access Complex and Media
>>>> resource properties?
>>>> I downloaded the example in github
>>>>
>>>>  the below service is working fine
>>>> odata1.svc/ESCollAllPrim(1)
>>>>
>>>>  the above service has list of collections when I accessing
>>>> as odata1.svc/ESCollAllPrim(1)/CollPropertyString   I am getting
>>>> {"error": {"code": null,"message": "The requested functionality has
>>>> not been implemented (yet)."}}
>>>>
>>>>
>>>>
>>>>  Vijay
>>>>
>>>>
>>>>
>>>
>>
>

Re: Accessing media resource and complex proprty

Posted by "Bolz, Michael" <mi...@sap.com>.
Hi Vijay,

As I understand you the “Stream Property” fit for your use case (an entity with several stream properties).
Unfortunately this is not yet supported in Olingo 4.0.0-beta-02-SNAPSHOT.
However contributions are welcome and we do our best to support everyone to do so.

Currently for your use case you could use “EdmBinary” properties for you image and file data.
But I would only recommend this if those data is not to big.

Kind regards,
Michael

From: Vijay Kumar Rani <rv...@gmail.com>>
Reply-To: "user@olingo.apache.org<ma...@olingo.apache.org>" <us...@olingo.apache.org>>
Date: Monday 20 October 2014 09:48
To: "user@olingo.apache.org<ma...@olingo.apache.org>" <us...@olingo.apache.org>>
Subject: Re: Accessing media resource and complex proprty

HI Michael ,
My Entity contains 3 media resources pointing to different media.



On Mon, Oct 20, 2014 at 1:07 PM, Bolz, Michael <mi...@sap.com>> wrote:
Hi Vijay,

Do you want an entity which contains the file and image as binary data (normal entity with according properties)
or do you want a media resource which represents one media (e.g. File or image)?

In addition there is a new “Stream Property” introduced with Odata 4 which could be what you want:
http://docs.oasis-open.org/odata/odata-json-format/v4.0/errata01/os/odata-json-format-v4.0-errata01-os-complete.html#_Toc395698775

Kind regards,
Michael

Media Entity documentation:
http://docs.oasis-open.org/odata/odata-json-format/v4.0/errata01/os/odata-json-format-v4.0-errata01-os-complete.html#_Toc395698776

From: Vijay Kumar Rani <rv...@gmail.com>>
Reply-To: "user@olingo.apache.org<ma...@olingo.apache.org>" <us...@olingo.apache.org>>
Date: Monday 20 October 2014 09:24
To: "user@olingo.apache.org<ma...@olingo.apache.org>" <us...@olingo.apache.org>>
Subject: Re: Accessing media resource and complex proprty

If I have multiple media resources in single entity  example is JSON, File and Image.
How Can I declare them in single entity and how my request should be.

On Mon, Oct 20, 2014 at 12:43 PM, Vijay Kumar Rani <rv...@gmail.com>> wrote:
I am using Olingo 4.0.0-beta-01.

On Mon, Oct 20, 2014 at 11:07 AM, Bolz, Michael <mi...@sap.com>> wrote:
Hi Vijay,

in OData 4 you can access complex properties like normal properties directly via url:
e.g.: "~/odata.svc/ESCompComp(1)/PropertyComp”

and the media stream of a media resource via the $value option:
e.g.: “~/odata.svc/ESMedia(1)/$value"

The access for complex properties is supported in current Olingo 4.0.0-beta-01 but support for media resources via $value is missing.

In your example:
odata1.svc/ESCollAllPrim(1)/CollPropertyString

you try to access a collection of string instead of a complex property.
However in current SNAPSHOT this is also supported, hence the question: which version of Olingo do you use?

Kind regards,
Michael

More details and documentation can be found here:
http://docs.oasis-open.org/odata/odata/v4.0/errata01/os/complete/part2-url-conventions/odata-v4.0-errata01-os-part2-url-conventions-complete.html#_Toc395267106


On 20 Oct 2014, at 06:33, Vijay Kumar Rani <rv...@gmail.com>> wrote:

Hi,

I am using Olingo4, let me know how can I  access Complex and Media resource properties?
I downloaded the example in github

the below service is working fine
odata1.svc/ESCollAllPrim(1)

the above service has list of collections when I accessing as odata1.svc/ESCollAllPrim(1)/CollPropertyString   I am getting
{"error": {"code": null,"message": "The requested functionality has not been implemented (yet)."}}



Vijay





Re: Accessing media resource and complex proprty

Posted by Vijay Kumar Rani <rv...@gmail.com>.
HI Michael ,
My Entity contains 3 media resources pointing to different media.



On Mon, Oct 20, 2014 at 1:07 PM, Bolz, Michael <mi...@sap.com> wrote:

>  Hi Vijay,
>
>  Do you want an entity which contains the file and image as binary data
> (normal entity with according properties)
> or do you want a media resource which represents one media (e.g. File or
> image)?
>
>  In addition there is a new “Stream Property” introduced with Odata 4
> which could be what you want:
>
> http://docs.oasis-open.org/odata/odata-json-format/v4.0/errata01/os/odata-json-format-v4.0-errata01-os-complete.html#_Toc395698775
>
>
>  Kind regards,
> Michael
>
>  Media Entity documentation:
>
> http://docs.oasis-open.org/odata/odata-json-format/v4.0/errata01/os/odata-json-format-v4.0-errata01-os-complete.html#_Toc395698776
>
>   From: Vijay Kumar Rani <rv...@gmail.com>
> Reply-To: "user@olingo.apache.org" <us...@olingo.apache.org>
> Date: Monday 20 October 2014 09:24
> To: "user@olingo.apache.org" <us...@olingo.apache.org>
> Subject: Re: Accessing media resource and complex proprty
>
>   If I have multiple media resources in single entity  example is JSON,
> File and Image.
> How Can I declare them in single entity and how my request should be.
>
> On Mon, Oct 20, 2014 at 12:43 PM, Vijay Kumar Rani <rv...@gmail.com>
> wrote:
>
>> I am using Olingo 4.0.0-beta-01.
>>
>> On Mon, Oct 20, 2014 at 11:07 AM, Bolz, Michael <mi...@sap.com>
>> wrote:
>>
>>> Hi Vijay,
>>>
>>>  in OData 4 you can access complex properties like normal properties
>>> directly via url:
>>> e.g.: "~/odata.svc/ESCompComp(1)/PropertyComp”
>>>
>>>  and the media stream of a media resource via the $value option:
>>> e.g.: “~/odata.svc/ESMedia(1)/$value"
>>>
>>>  The access for complex properties is supported in current Olingo
>>> 4.0.0-beta-01 but support for media resources via $value is missing.
>>>
>>>  In your example:
>>>
>>> odata1.svc/ESCollAllPrim(1)/CollPropertyString
>>>
>>>
>>>  you try to access a collection of string instead of a complex property.
>>> However in current SNAPSHOT this is also supported, hence the question:
>>> which version of Olingo do you use?
>>>
>>>  Kind regards,
>>> Michael
>>>
>>>  More details and documentation can be found here:
>>>
>>> http://docs.oasis-open.org/odata/odata/v4.0/errata01/os/complete/part2-url-conventions/odata-v4.0-errata01-os-part2-url-conventions-complete.html#_Toc395267106
>>>
>>>
>>>  On 20 Oct 2014, at 06:33, Vijay Kumar Rani <rv...@gmail.com> wrote:
>>>
>>>  Hi,
>>>
>>>  I am using Olingo4, let me know how can I  access Complex and Media
>>> resource properties?
>>> I downloaded the example in github
>>>
>>>  the below service is working fine
>>> odata1.svc/ESCollAllPrim(1)
>>>
>>>  the above service has list of collections when I accessing
>>> as odata1.svc/ESCollAllPrim(1)/CollPropertyString   I am getting
>>> {"error": {"code": null,"message": "The requested functionality has not
>>> been implemented (yet)."}}
>>>
>>>
>>>
>>>  Vijay
>>>
>>>
>>>
>>
>

Re: Accessing media resource and complex proprty

Posted by "Bolz, Michael" <mi...@sap.com>.
Hi Vijay,

Do you want an entity which contains the file and image as binary data (normal entity with according properties)
or do you want a media resource which represents one media (e.g. File or image)?

In addition there is a new “Stream Property” introduced with Odata 4 which could be what you want:
http://docs.oasis-open.org/odata/odata-json-format/v4.0/errata01/os/odata-json-format-v4.0-errata01-os-complete.html#_Toc395698775

Kind regards,
Michael

Media Entity documentation:
http://docs.oasis-open.org/odata/odata-json-format/v4.0/errata01/os/odata-json-format-v4.0-errata01-os-complete.html#_Toc395698776

From: Vijay Kumar Rani <rv...@gmail.com>>
Reply-To: "user@olingo.apache.org<ma...@olingo.apache.org>" <us...@olingo.apache.org>>
Date: Monday 20 October 2014 09:24
To: "user@olingo.apache.org<ma...@olingo.apache.org>" <us...@olingo.apache.org>>
Subject: Re: Accessing media resource and complex proprty

If I have multiple media resources in single entity  example is JSON, File and Image.
How Can I declare them in single entity and how my request should be.

On Mon, Oct 20, 2014 at 12:43 PM, Vijay Kumar Rani <rv...@gmail.com>> wrote:
I am using Olingo 4.0.0-beta-01.

On Mon, Oct 20, 2014 at 11:07 AM, Bolz, Michael <mi...@sap.com>> wrote:
Hi Vijay,

in OData 4 you can access complex properties like normal properties directly via url:
e.g.: "~/odata.svc/ESCompComp(1)/PropertyComp”

and the media stream of a media resource via the $value option:
e.g.: “~/odata.svc/ESMedia(1)/$value"

The access for complex properties is supported in current Olingo 4.0.0-beta-01 but support for media resources via $value is missing.

In your example:
odata1.svc/ESCollAllPrim(1)/CollPropertyString

you try to access a collection of string instead of a complex property.
However in current SNAPSHOT this is also supported, hence the question: which version of Olingo do you use?

Kind regards,
Michael

More details and documentation can be found here:
http://docs.oasis-open.org/odata/odata/v4.0/errata01/os/complete/part2-url-conventions/odata-v4.0-errata01-os-part2-url-conventions-complete.html#_Toc395267106


On 20 Oct 2014, at 06:33, Vijay Kumar Rani <rv...@gmail.com>> wrote:

Hi,

I am using Olingo4, let me know how can I  access Complex and Media resource properties?
I downloaded the example in github

the below service is working fine
odata1.svc/ESCollAllPrim(1)

the above service has list of collections when I accessing as odata1.svc/ESCollAllPrim(1)/CollPropertyString   I am getting
{"error": {"code": null,"message": "The requested functionality has not been implemented (yet)."}}



Vijay




Re: Accessing media resource and complex proprty

Posted by Vijay Kumar Rani <rv...@gmail.com>.
If I have multiple media resources in single entity  example is JSON, File
and Image.
How Can I declare them in single entity and how my request should be.

On Mon, Oct 20, 2014 at 12:43 PM, Vijay Kumar Rani <rv...@gmail.com>
wrote:

> I am using Olingo 4.0.0-beta-01.
>
> On Mon, Oct 20, 2014 at 11:07 AM, Bolz, Michael <mi...@sap.com>
> wrote:
>
>> Hi Vijay,
>>
>> in OData 4 you can access complex properties like normal properties
>> directly via url:
>> e.g.: "~/odata.svc/ESCompComp(1)/PropertyComp”
>>
>> and the media stream of a media resource via the $value option:
>> e.g.: “~/odata.svc/ESMedia(1)/$value"
>>
>> The access for complex properties is supported in current Olingo
>> 4.0.0-beta-01 but support for media resources via $value is missing.
>>
>> In your example:
>>
>> odata1.svc/ESCollAllPrim(1)/CollPropertyString
>>
>>
>> you try to access a collection of string instead of a complex property.
>> However in current SNAPSHOT this is also supported, hence the question:
>> which version of Olingo do you use?
>>
>> Kind regards,
>> Michael
>>
>> More details and documentation can be found here:
>>
>> http://docs.oasis-open.org/odata/odata/v4.0/errata01/os/complete/part2-url-conventions/odata-v4.0-errata01-os-part2-url-conventions-complete.html#_Toc395267106
>>
>>
>> On 20 Oct 2014, at 06:33, Vijay Kumar Rani <rv...@gmail.com> wrote:
>>
>> Hi,
>>
>> I am using Olingo4, let me know how can I  access Complex and Media
>> resource properties?
>> I downloaded the example in github
>>
>> the below service is working fine
>> odata1.svc/ESCollAllPrim(1)
>>
>> the above service has list of collections when I accessing
>> as odata1.svc/ESCollAllPrim(1)/CollPropertyString   I am getting
>> {"error": {"code": null,"message": "The requested functionality has not
>> been implemented (yet)."}}
>>
>>
>>
>> Vijay
>>
>>
>>
>

Re: Accessing media resource and complex proprty

Posted by Vijay Kumar Rani <rv...@gmail.com>.
I am using Olingo 4.0.0-beta-01.

On Mon, Oct 20, 2014 at 11:07 AM, Bolz, Michael <mi...@sap.com>
wrote:

> Hi Vijay,
>
> in OData 4 you can access complex properties like normal properties
> directly via url:
> e.g.: "~/odata.svc/ESCompComp(1)/PropertyComp”
>
> and the media stream of a media resource via the $value option:
> e.g.: “~/odata.svc/ESMedia(1)/$value"
>
> The access for complex properties is supported in current Olingo
> 4.0.0-beta-01 but support for media resources via $value is missing.
>
> In your example:
>
> odata1.svc/ESCollAllPrim(1)/CollPropertyString
>
>
> you try to access a collection of string instead of a complex property.
> However in current SNAPSHOT this is also supported, hence the question:
> which version of Olingo do you use?
>
> Kind regards,
> Michael
>
> More details and documentation can be found here:
>
> http://docs.oasis-open.org/odata/odata/v4.0/errata01/os/complete/part2-url-conventions/odata-v4.0-errata01-os-part2-url-conventions-complete.html#_Toc395267106
>
>
> On 20 Oct 2014, at 06:33, Vijay Kumar Rani <rv...@gmail.com> wrote:
>
> Hi,
>
> I am using Olingo4, let me know how can I  access Complex and Media
> resource properties?
> I downloaded the example in github
>
> the below service is working fine
> odata1.svc/ESCollAllPrim(1)
>
> the above service has list of collections when I accessing
> as odata1.svc/ESCollAllPrim(1)/CollPropertyString   I am getting
> {"error": {"code": null,"message": "The requested functionality has not
> been implemented (yet)."}}
>
>
>
> Vijay
>
>
>

Re: Accessing media resource and complex proprty

Posted by "Bolz, Michael" <mi...@sap.com>.
Hi Vijay,

in OData 4 you can access complex properties like normal properties directly via url:
e.g.: "~/odata.svc/ESCompComp(1)/PropertyComp”

and the media stream of a media resource via the $value option:
e.g.: “~/odata.svc/ESMedia(1)/$value"

The access for complex properties is supported in current Olingo 4.0.0-beta-01 but support for media resources via $value is missing.

In your example:
> odata1.svc/ESCollAllPrim(1)/CollPropertyString


you try to access a collection of string instead of a complex property.
However in current SNAPSHOT this is also supported, hence the question: which version of Olingo do you use? 

Kind regards, 
Michael

More details and documentation can be found here:
http://docs.oasis-open.org/odata/odata/v4.0/errata01/os/complete/part2-url-conventions/odata-v4.0-errata01-os-part2-url-conventions-complete.html#_Toc395267106


On 20 Oct 2014, at 06:33, Vijay Kumar Rani <rv...@gmail.com> wrote:

> Hi,
> 
> I am using Olingo4, let me know how can I  access Complex and Media resource properties?
> I downloaded the example in github 
> 
> the below service is working fine
> odata1.svc/ESCollAllPrim(1)
> 
> the above service has list of collections when I accessing as odata1.svc/ESCollAllPrim(1)/CollPropertyString   I am getting 
> {
> "error": {
> "code": null,
> "message": "The requested functionality has not been implemented (yet)."
> }
> }
> 
> 
> 
> Vijay