Closed juliapampus closed 3 years ago
Hi @juliapampus, thanks for reporting this. Regarding 2) I see that some values of the "@id" fields are not URIs. This makes Jena fail to retrieve information via SPARQL from the RDF graph. Could you please make sure that all id fields are proper, distinct URIs, and try again? I will need to take a closer look at 3)
Adding to my previous comment: In the third example, the context is missing. Adding a context made my local serializer work just fine. We improved the context generation a while back, fixing some bugs where the context would be missing. Did you create these examples manually, or could you provide a reproducible example that creates such a policy with a missing context?
Hi, you are right. If you add the context to example 3 the serializer will work.
But there are still open questions with this:
@context
?Hi, that is correct - it should be included automatically. If it isn't and you are on the latest release, please send us a reproducible example.
Hi,
found some missing toRdf
in our code. I guess that the builder class itself has nothing to do with the context?
Maybe this problem could have been prevented with #3, thus making usage of the lib less errorprone?
Thank you for your help!
Hi, it should not be a builder-related issue. If the context is missing, we need to look at the serializer. Was your issue resolved in the meantime, or can we assist you here?
Hi, the problem should resolved. Thank you! (I cannot close the issue ^^)
When updating the Infomodel and Infomodel Serializer version in the Dataspace Connector to v4.0.8, we noticed some misbehavior for object deserialization. This causes test fails and avoids upgrading to this version, as we rely on proper deserialization for functionality as it used to work with older versions.
I provided three examples. In all of them, I use the builder classes and
toRdf()
method to create IDS objects. Then, I try to convert exactly these strings back to IDS objects using theSerializer.deserialize(String serialization, Class<T> valueType)
method.1. ConnectorEndpoint: everything works fine
IDS object (as RDF):
IDS object after deserialization (from IntelliJ debug console):
2. ConfigurationModel: error
IDS object (as RDF):
IDS object after deserialization (from IntelliJ debug console): We don't get that far, an error is thrown during deserilization.
Stack trace snippet:
3. Rule: missing attributes
IDS object (as RDF):
and/or
IDS object after deserialization (from IntelliJ debug console):
Can you help us with this problem? @maboeckmann @sebbader