Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to serialize individuals in unmapped properties #30

Closed
cristianolongo opened this issue Dec 18, 2020 · 1 comment
Closed

Unable to serialize individuals in unmapped properties #30

cristianolongo opened this issue Dec 18, 2020 · 1 comment
Assignees
Labels

Comments

@cristianolongo
Copy link

I created a Class annotated with the OWLClass annotation. This class has a field properties annotated with the @Properties JOPA annotation. Following javadoc, my properties field has tipe Map<String, Set<Object>>. Infact, I need to specify an object unmapped property here. Thus, for analogy with @OWLObjectProperty, I put in this map a singleton with an object of type URI. I would expect that, when serializing, this URI is used to construct the property target as an individual with this URI as @Id. However, instead the property is interpreted as a datatype property and the URI as a string literal.

I tried also with using an object of another class annotated as @OWLClass instead of a URI. In this case the string literal produced in serialization is the class name. I suppose that in both cases just the toString method of the object is used to generate the literal.

With debugging, I saw that fields annotated with @Property annotation are processed by the cmethod cz.cvut.kbss.jsonld.serialization.PropertyFieldSerializer.serializePropertyValues which I assume works only for literals.

@ledsoft
Copy link
Contributor

ledsoft commented Jan 1, 2021

Should be fixed in 0.8.3.

@ledsoft ledsoft closed this as completed Jan 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants