FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

@type is written as expanded IRI when using a class declared in the dataset · Issue #329 · jsonld-java/jsonld-java · GitHub

@type is written as expanded IRI when using a class declared in the dataset #329

Description

Via eclipse-rdf4j/rdf4j#3643

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


    Back | FazBrowse Home | New Git URL