You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@olingo.apache.org by Frédéric SOUCHU <Fr...@ingenico.com> on 2015/06/02 14:49:53 UTC

Server-side annotation output?

I am trying to produce the following JSON payload with annotations:
{
                "ID":123456,
                "status":"on",
                "@mycompany.com.status.display":"The user is 'active'.",
                "@mycompany.com.status.code":2,
                ...
}
with the following JAVA code to populate entity properties:

       private Property createEnum(final String type, final String name, final int value) {
              Property p = new Property(type, name, ValueType.ENUM, value);
              Annotation note =  new Annotation();
              note.setTerm("company.com." + name + ".label");
              note.setValue(ValueType.PRIMITIVE, value);
              p.getAnnotations().add(note);
              return p;
       }

So far, I see zero annotation in the JSON output :[

Looking at the code, I see a whole lot of Annotation code (support for expression and such) but I fail to see any serializer code that produces such annotation.
Is it part of the 'not yet supported' Olingo feature?

For information, the EDM looks like:
<EnumType Name="Status">
<Member Name="unknown" Value="0" />
<Member Name="on" Value="1" />
       <Member Name="off" Value="2" />
</EnumType>
<EntityType Name="User">
<Property Name="status" Type="company.com.Status">
<Annotation Term="company.com.status.label" String="enum label" />
<Annotation Term="company.com.status.code" Int="2" />
</Property>
...
</EntityType>

Cheers,
Frederic



RE: Server-side annotation output?

Posted by "Amend, Christian" <ch...@sap.com>.
Hi Frederic,

unfortunately there is no such list right now. We plan to make such a list for the first stable release.

A rough overview is:

Supported:
Json metadata=minimal format
OData Annotations like odata.etag (metadata=minimal scope)
Processor interfaces for all return types
URI parsing and dispatching for all return types
Serialization for all return types except $ref (upcomming)
Deserialization for all return types except $ref (upcomming)

Not Supported:
$ref support (upcomming)
Custom annotations
Metadata= none
Metadata=full
Navigation in Complex Types

Best Regards,
Christian

From: Frédéric SOUCHU [mailto:Frederic.SOUCHU@ingenico.com]
Sent: Dienstag, 2. Juni 2015 16:02
To: user@olingo.apache.org
Subject: RE: Server-side annotation output?

Thanks - Is there an OData compliance matrix or roadmap for Olingo?
At least, to know what is supported/what's not before launching the debugger!

From: Amend, Christian [mailto:christian.amend@sap.com]
Sent: 02 June 2015 16:01
To: user@olingo.apache.org<ma...@olingo.apache.org>
Subject: RE: Server-side annotation output?

Hi Frederic,

we are still developing annotation and metadata=full support on server side. Both are currently missing.

Best Regards,
Christian

From: Frédéric SOUCHU [mailto:Frederic.SOUCHU@ingenico.com]
Sent: Dienstag, 2. Juni 2015 14:59
To: user@olingo.apache.org<ma...@olingo.apache.org>
Subject: RE: Server-side annotation output?

Note: defining the annotation outside the property element does not change the (missing) output:
<EntityType Name="User">
<Property Name="status" Type="company.com.Status"/>
<Annotation Term="company.com.status.label" String="enum label" />
<Annotation Term="company.com.status.code" Int="2" />
...
</EntityType>


From: Frédéric SOUCHU [mailto:Frederic.SOUCHU@ingenico.com]
Sent: 02 June 2015 14:50
To: user@olingo.apache.org<ma...@olingo.apache.org>
Subject: Server-side annotation output?

I am trying to produce the following JSON payload with annotations:
{
                "ID":123456,
                "status":"on",
                "@mycompany.com.status.display":"The user is 'active'.",
                "@mycompany.com.status.code":2,
                ...
}
with the following JAVA code to populate entity properties:

       private Property createEnum(final String type, final String name, final int value) {
              Property p = new Property(type, name, ValueType.ENUM, value);
              Annotation note =  new Annotation();
              note.setTerm("company.com." + name + ".label");
              note.setValue(ValueType.PRIMITIVE, value);
              p.getAnnotations().add(note);
              return p;
       }

So far, I see zero annotation in the JSON output :[

Looking at the code, I see a whole lot of Annotation code (support for expression and such) but I fail to see any serializer code that produces such annotation.
Is it part of the 'not yet supported' Olingo feature?

For information, the EDM looks like:
<EnumType Name="Status">
<Member Name="unknown" Value="0" />
<Member Name="on" Value="1" />
       <Member Name="off" Value="2" />
</EnumType>
<EntityType Name="User">
<Property Name="status" Type="company.com.Status">
<Annotation Term="company.com.status.label" String="enum label" />
<Annotation Term="company.com.status.code" Int="2" />
</Property>
...
</EntityType>

Cheers,
Frederic



RE: Server-side annotation output?

Posted by Frédéric SOUCHU <Fr...@ingenico.com>.
Thanks - Is there an OData compliance matrix or roadmap for Olingo?
At least, to know what is supported/what's not before launching the debugger!

From: Amend, Christian [mailto:christian.amend@sap.com]
Sent: 02 June 2015 16:01
To: user@olingo.apache.org
Subject: RE: Server-side annotation output?

Hi Frederic,

we are still developing annotation and metadata=full support on server side. Both are currently missing.

Best Regards,
Christian

From: Frédéric SOUCHU [mailto:Frederic.SOUCHU@ingenico.com]
Sent: Dienstag, 2. Juni 2015 14:59
To: user@olingo.apache.org<ma...@olingo.apache.org>
Subject: RE: Server-side annotation output?

Note: defining the annotation outside the property element does not change the (missing) output:
<EntityType Name="User">
<Property Name="status" Type="company.com.Status"/>
<Annotation Term="company.com.status.label" String="enum label" />
<Annotation Term="company.com.status.code" Int="2" />
...
</EntityType>


From: Frédéric SOUCHU [mailto:Frederic.SOUCHU@ingenico.com]
Sent: 02 June 2015 14:50
To: user@olingo.apache.org<ma...@olingo.apache.org>
Subject: Server-side annotation output?

I am trying to produce the following JSON payload with annotations:
{
                "ID":123456,
                "status":"on",
                "@mycompany.com.status.display":"The user is 'active'.",
                "@mycompany.com.status.code":2,
                ...
}
with the following JAVA code to populate entity properties:

       private Property createEnum(final String type, final String name, final int value) {
              Property p = new Property(type, name, ValueType.ENUM, value);
              Annotation note =  new Annotation();
              note.setTerm("company.com." + name + ".label");
              note.setValue(ValueType.PRIMITIVE, value);
              p.getAnnotations().add(note);
              return p;
       }

So far, I see zero annotation in the JSON output :[

Looking at the code, I see a whole lot of Annotation code (support for expression and such) but I fail to see any serializer code that produces such annotation.
Is it part of the 'not yet supported' Olingo feature?

For information, the EDM looks like:
<EnumType Name="Status">
<Member Name="unknown" Value="0" />
<Member Name="on" Value="1" />
       <Member Name="off" Value="2" />
</EnumType>
<EntityType Name="User">
<Property Name="status" Type="company.com.Status">
<Annotation Term="company.com.status.label" String="enum label" />
<Annotation Term="company.com.status.code" Int="2" />
</Property>
...
</EntityType>

Cheers,
Frederic



RE: Server-side annotation output?

Posted by "Amend, Christian" <ch...@sap.com>.
Hi Erming,

at some point we will support server side annotations but I cannot predict when we will get to that. If you have an implementation ready we can have a look at it. Maybe you can contribute to Olingo.

Best Regards,
Christian

From: Tuo, Erming [mailto:erming.tuo@sap.com]
Sent: Dienstag, 2. Juni 2015 16:09
To: user@olingo.apache.org
Subject: RE: Server-side annotation output?

Christian,

Oh, I thought you won't support server side annotation at all. When it is going to be available based on the roadmap? We already developed an in-house annotation, maybe it is a good idea to switch to yours?

Thx

Erming

From: Amend, Christian [mailto:christian.amend@sap.com]
Sent: Tuesday, June 02, 2015 10:01 AM
To: user@olingo.apache.org<ma...@olingo.apache.org>
Subject: RE: Server-side annotation output?

Hi Frederic,

we are still developing annotation and metadata=full support on server side. Both are currently missing.

Best Regards,
Christian

From: Frédéric SOUCHU [mailto:Frederic.SOUCHU@ingenico.com]
Sent: Dienstag, 2. Juni 2015 14:59
To: user@olingo.apache.org<ma...@olingo.apache.org>
Subject: RE: Server-side annotation output?

Note: defining the annotation outside the property element does not change the (missing) output:
<EntityType Name="User">
<Property Name="status" Type="company.com.Status"/>
<Annotation Term="company.com.status.label" String="enum label" />
<Annotation Term="company.com.status.code" Int="2" />
...
</EntityType>


From: Frédéric SOUCHU [mailto:Frederic.SOUCHU@ingenico.com]
Sent: 02 June 2015 14:50
To: user@olingo.apache.org<ma...@olingo.apache.org>
Subject: Server-side annotation output?

I am trying to produce the following JSON payload with annotations:
{
                "ID":123456,
                "status":"on",
                "@mycompany.com.status.display":"The user is 'active'.",
                "@mycompany.com.status.code":2,
                ...
}
with the following JAVA code to populate entity properties:

       private Property createEnum(final String type, final String name, final int value) {
              Property p = new Property(type, name, ValueType.ENUM, value);
              Annotation note =  new Annotation();
              note.setTerm("company.com." + name + ".label");
              note.setValue(ValueType.PRIMITIVE, value);
              p.getAnnotations().add(note);
              return p;
       }

So far, I see zero annotation in the JSON output :[

Looking at the code, I see a whole lot of Annotation code (support for expression and such) but I fail to see any serializer code that produces such annotation.
Is it part of the 'not yet supported' Olingo feature?

For information, the EDM looks like:
<EnumType Name="Status">
<Member Name="unknown" Value="0" />
<Member Name="on" Value="1" />
       <Member Name="off" Value="2" />
</EnumType>
<EntityType Name="User">
<Property Name="status" Type="company.com.Status">
<Annotation Term="company.com.status.label" String="enum label" />
<Annotation Term="company.com.status.code" Int="2" />
</Property>
...
</EntityType>

Cheers,
Frederic



RE: Server-side annotation output?

Posted by "Tuo, Erming" <er...@sap.com>.
Christian,

Oh, I thought you won't support server side annotation at all. When it is going to be available based on the roadmap? We already developed an in-house annotation, maybe it is a good idea to switch to yours?

Thx

Erming

From: Amend, Christian [mailto:christian.amend@sap.com]
Sent: Tuesday, June 02, 2015 10:01 AM
To: user@olingo.apache.org
Subject: RE: Server-side annotation output?

Hi Frederic,

we are still developing annotation and metadata=full support on server side. Both are currently missing.

Best Regards,
Christian

From: Frédéric SOUCHU [mailto:Frederic.SOUCHU@ingenico.com]
Sent: Dienstag, 2. Juni 2015 14:59
To: user@olingo.apache.org<ma...@olingo.apache.org>
Subject: RE: Server-side annotation output?

Note: defining the annotation outside the property element does not change the (missing) output:
<EntityType Name="User">
<Property Name="status" Type="company.com.Status"/>
<Annotation Term="company.com.status.label" String="enum label" />
<Annotation Term="company.com.status.code" Int="2" />
...
</EntityType>


From: Frédéric SOUCHU [mailto:Frederic.SOUCHU@ingenico.com]
Sent: 02 June 2015 14:50
To: user@olingo.apache.org<ma...@olingo.apache.org>
Subject: Server-side annotation output?

I am trying to produce the following JSON payload with annotations:
{
                "ID":123456,
                "status":"on",
                "@mycompany.com.status.display":"The user is 'active'.",
                "@mycompany.com.status.code":2,
                ...
}
with the following JAVA code to populate entity properties:

       private Property createEnum(final String type, final String name, final int value) {
              Property p = new Property(type, name, ValueType.ENUM, value);
              Annotation note =  new Annotation();
              note.setTerm("company.com." + name + ".label");
              note.setValue(ValueType.PRIMITIVE, value);
              p.getAnnotations().add(note);
              return p;
       }

So far, I see zero annotation in the JSON output :[

Looking at the code, I see a whole lot of Annotation code (support for expression and such) but I fail to see any serializer code that produces such annotation.
Is it part of the 'not yet supported' Olingo feature?

For information, the EDM looks like:
<EnumType Name="Status">
<Member Name="unknown" Value="0" />
<Member Name="on" Value="1" />
       <Member Name="off" Value="2" />
</EnumType>
<EntityType Name="User">
<Property Name="status" Type="company.com.Status">
<Annotation Term="company.com.status.label" String="enum label" />
<Annotation Term="company.com.status.code" Int="2" />
</Property>
...
</EntityType>

Cheers,
Frederic



RE: Server-side annotation output?

Posted by "Amend, Christian" <ch...@sap.com>.
Hi Frederic,

we are still developing annotation and metadata=full support on server side. Both are currently missing.

Best Regards,
Christian

From: Frédéric SOUCHU [mailto:Frederic.SOUCHU@ingenico.com]
Sent: Dienstag, 2. Juni 2015 14:59
To: user@olingo.apache.org
Subject: RE: Server-side annotation output?

Note: defining the annotation outside the property element does not change the (missing) output:
<EntityType Name="User">
<Property Name="status" Type="company.com.Status"/>
<Annotation Term="company.com.status.label" String="enum label" />
<Annotation Term="company.com.status.code" Int="2" />
...
</EntityType>


From: Frédéric SOUCHU [mailto:Frederic.SOUCHU@ingenico.com]
Sent: 02 June 2015 14:50
To: user@olingo.apache.org<ma...@olingo.apache.org>
Subject: Server-side annotation output?

I am trying to produce the following JSON payload with annotations:
{
                "ID":123456,
                "status":"on",
                "@mycompany.com.status.display":"The user is 'active'.",
                "@mycompany.com.status.code":2,
                ...
}
with the following JAVA code to populate entity properties:

       private Property createEnum(final String type, final String name, final int value) {
              Property p = new Property(type, name, ValueType.ENUM, value);
              Annotation note =  new Annotation();
              note.setTerm("company.com." + name + ".label");
              note.setValue(ValueType.PRIMITIVE, value);
              p.getAnnotations().add(note);
              return p;
       }

So far, I see zero annotation in the JSON output :[

Looking at the code, I see a whole lot of Annotation code (support for expression and such) but I fail to see any serializer code that produces such annotation.
Is it part of the 'not yet supported' Olingo feature?

For information, the EDM looks like:
<EnumType Name="Status">
<Member Name="unknown" Value="0" />
<Member Name="on" Value="1" />
       <Member Name="off" Value="2" />
</EnumType>
<EntityType Name="User">
<Property Name="status" Type="company.com.Status">
<Annotation Term="company.com.status.label" String="enum label" />
<Annotation Term="company.com.status.code" Int="2" />
</Property>
...
</EntityType>

Cheers,
Frederic



RE: Server-side annotation output?

Posted by Frédéric SOUCHU <Fr...@ingenico.com>.
Note: defining the annotation outside the property element does not change the (missing) output:
<EntityType Name="User">
<Property Name="status" Type="company.com.Status"/>
<Annotation Term="company.com.status.label" String="enum label" />
<Annotation Term="company.com.status.code" Int="2" />
...
</EntityType>


From: Frédéric SOUCHU [mailto:Frederic.SOUCHU@ingenico.com]
Sent: 02 June 2015 14:50
To: user@olingo.apache.org
Subject: Server-side annotation output?

I am trying to produce the following JSON payload with annotations:
{
                "ID":123456,
                "status":"on",
                "@mycompany.com.status.display":"The user is 'active'.",
                "@mycompany.com.status.code":2,
                ...
}
with the following JAVA code to populate entity properties:

       private Property createEnum(final String type, final String name, final int value) {
              Property p = new Property(type, name, ValueType.ENUM, value);
              Annotation note =  new Annotation();
              note.setTerm("company.com." + name + ".label");
              note.setValue(ValueType.PRIMITIVE, value);
              p.getAnnotations().add(note);
              return p;
       }

So far, I see zero annotation in the JSON output :[

Looking at the code, I see a whole lot of Annotation code (support for expression and such) but I fail to see any serializer code that produces such annotation.
Is it part of the 'not yet supported' Olingo feature?

For information, the EDM looks like:
<EnumType Name="Status">
<Member Name="unknown" Value="0" />
<Member Name="on" Value="1" />
       <Member Name="off" Value="2" />
</EnumType>
<EntityType Name="User">
<Property Name="status" Type="company.com.Status">
<Annotation Term="company.com.status.label" String="enum label" />
<Annotation Term="company.com.status.code" Int="2" />
</Property>
...
</EntityType>

Cheers,
Frederic