You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@streampipes.apache.org by Johannes Tex <te...@apache.org> on 2020/03/06 12:59:41 UTC

[Help wanted] Jslod Serialization

Hello everyone,

the REST endpoint for receiving the information about the stored data in the data lake ("../datalake/info") is currently serializing the class 'DataLakeMeasure' (org.apache.streampipes.rest.impl.datalake.DataLakeMeasure) in JSON, but it should be JSONLD.

I tried to change the serialization, but it does not work. I always get the error:
 "No identifier was found for [org.apache.streampipes.model.datalake.DataLakeMeasure@3165a907]!  The instance should implement Identifiable, have one or more properties annotated with @RdfId, or have an id function provided to the mapper.". 
The 'DataLakeMeasure' extends the 'UnnamedStreamPipesEntity' (org.apache.streampipes.model.base.UnnamedStreamPipesEntity), which has a propertety annotated with @RdfId.

Someone has an idea, what could be the problem? See Branch [STREAMPIPES-79]


Regards
Johannes


Re: [Help wanted] Jslod Serialization

Posted by Johannes Tex <te...@apache.org>.
Thank you! :)

Johannes

On 2020/03/06 16:15:01, Philipp Zehnder <ze...@apache.org> wrote: 
> Hi Johannes,
> 
> I just fixed it. 
> The problem was that the REST call returned and Array of DataLakeMeasure as JSON-LD.
> To do that you have to add asContainer:
> 
> public Response getAllInfos() {
>   List<DataLakeMeasure> result = this.dataLakeManagement.getInfos();
> 
>   return ok(asContainer(result));
> }
> I’ll continue to work on the new data explorer and push the latest version later.
> 
> Philipp
> 
> 
> 
> > On 6. Mar 2020, at 17:02, Dominik Riemer <ri...@apache.org> wrote:
> > 
> > Hi Johannes,
> > 
> > did you try to call the constructor defined in UnnamedStreamPipesEntity (just call the empty contructor with super() in all constructors of DataLakeMeasure)?
> > 
> > Dominik
> > 
> > -----Original Message-----
> > From: Johannes Tex <te...@apache.org> 
> > Sent: Friday, March 6, 2020 2:00 PM
> > To: dev@streampipes.apache.org
> > Subject: [Help wanted] Jslod Serialization
> > 
> > Hello everyone,
> > 
> > the REST endpoint for receiving the information about the stored data in the data lake ("../datalake/info") is currently serializing the class 'DataLakeMeasure' (org.apache.streampipes.rest.impl.datalake.DataLakeMeasure) in JSON, but it should be JSONLD.
> > 
> > I tried to change the serialization, but it does not work. I always get the error:
> > "No identifier was found for [org.apache.streampipes.model.datalake.DataLakeMeasure@3165a907]!  The instance should implement Identifiable, have one or more properties annotated with @RdfId, or have an id function provided to the mapper.". 
> > The 'DataLakeMeasure' extends the 'UnnamedStreamPipesEntity' (org.apache.streampipes.model.base.UnnamedStreamPipesEntity), which has a propertety annotated with @RdfId.
> > 
> > Someone has an idea, what could be the problem? See Branch [STREAMPIPES-79]
> > 
> > 
> > Regards
> > Johannes
> > 
> > 
> 
> 
> 

Re: [Help wanted] Jslod Serialization

Posted by Philipp Zehnder <ze...@apache.org>.
Hi Johannes,

I just fixed it. 
The problem was that the REST call returned and Array of DataLakeMeasure as JSON-LD.
To do that you have to add asContainer:

public Response getAllInfos() {
  List<DataLakeMeasure> result = this.dataLakeManagement.getInfos();

  return ok(asContainer(result));
}
I’ll continue to work on the new data explorer and push the latest version later.

Philipp



> On 6. Mar 2020, at 17:02, Dominik Riemer <ri...@apache.org> wrote:
> 
> Hi Johannes,
> 
> did you try to call the constructor defined in UnnamedStreamPipesEntity (just call the empty contructor with super() in all constructors of DataLakeMeasure)?
> 
> Dominik
> 
> -----Original Message-----
> From: Johannes Tex <te...@apache.org> 
> Sent: Friday, March 6, 2020 2:00 PM
> To: dev@streampipes.apache.org
> Subject: [Help wanted] Jslod Serialization
> 
> Hello everyone,
> 
> the REST endpoint for receiving the information about the stored data in the data lake ("../datalake/info") is currently serializing the class 'DataLakeMeasure' (org.apache.streampipes.rest.impl.datalake.DataLakeMeasure) in JSON, but it should be JSONLD.
> 
> I tried to change the serialization, but it does not work. I always get the error:
> "No identifier was found for [org.apache.streampipes.model.datalake.DataLakeMeasure@3165a907]!  The instance should implement Identifiable, have one or more properties annotated with @RdfId, or have an id function provided to the mapper.". 
> The 'DataLakeMeasure' extends the 'UnnamedStreamPipesEntity' (org.apache.streampipes.model.base.UnnamedStreamPipesEntity), which has a propertety annotated with @RdfId.
> 
> Someone has an idea, what could be the problem? See Branch [STREAMPIPES-79]
> 
> 
> Regards
> Johannes
> 
> 



RE: [Help wanted] Jslod Serialization

Posted by Dominik Riemer <ri...@apache.org>.
Hi Johannes,

did you try to call the constructor defined in UnnamedStreamPipesEntity (just call the empty contructor with super() in all constructors of DataLakeMeasure)?

Dominik

-----Original Message-----
From: Johannes Tex <te...@apache.org> 
Sent: Friday, March 6, 2020 2:00 PM
To: dev@streampipes.apache.org
Subject: [Help wanted] Jslod Serialization

Hello everyone,

the REST endpoint for receiving the information about the stored data in the data lake ("../datalake/info") is currently serializing the class 'DataLakeMeasure' (org.apache.streampipes.rest.impl.datalake.DataLakeMeasure) in JSON, but it should be JSONLD.

I tried to change the serialization, but it does not work. I always get the error:
 "No identifier was found for [org.apache.streampipes.model.datalake.DataLakeMeasure@3165a907]!  The instance should implement Identifiable, have one or more properties annotated with @RdfId, or have an id function provided to the mapper.". 
The 'DataLakeMeasure' extends the 'UnnamedStreamPipesEntity' (org.apache.streampipes.model.base.UnnamedStreamPipesEntity), which has a propertety annotated with @RdfId.

Someone has an idea, what could be the problem? See Branch [STREAMPIPES-79]


Regards
Johannes