-
Notifications
You must be signed in to change notification settings - Fork 153
Open
Description
Using 0.13.4, when I have a RDFDataset that has a statement declaring a Class and another statement declaring an individual of that class, the individual has the incorrect rdf:type.
JsonLdOptions opts = new JsonLdOptions();
opts.setUseRdfType(Boolean.FALSE);
RDFDataset rdf = new RDFDataset();
rdf.addTriple(
"http://test.com/ontology#Class1",
"http://www.w3.org/1999/02/22-rdf-syntax-ns#type",
"http://www.w3.org/2002/07/owl#Class");
rdf.addTriple(
"http://test.com/ontology#Individual1",
"http://www.w3.org/1999/02/22-rdf-syntax-ns#type",
"http://test.com/ontology#Class1");
System.out.println(JsonUtils.toPrettyString(new JsonLdApi(opts).fromRDF(rdf)));
produces:
[ {
"@id" : "http://test.com/ontology#Class1",
"@type" : [ "http://www.w3.org/2002/07/owl#Class" ]
}, {
"@id" : "http://test.com/ontology#Individual1",
"http://www.w3.org/1999/02/22-rdf-syntax-ns#type" : [ {
"@id" : "http://test.com/ontology#Class1"
} ]
} ]
I would expect the format of the individual to be:
{
"@id" : "http://test.com/ontologyIndividual1",
"@type" : [ "http://test.com/ontology#Class1" ]
}
Metadata
Metadata
Assignees
Labels
No labels