GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Issue with @type when subject and object are the same · Issue #301 · jsonld-java/jsonld-java

Issue with @type when subject and object are the same #301

New issue
Copy link
New issue
Copy link
Closed
#306
Closed
Issue with @type when subject and object are the same#301
#306
Copy link

Description

@barthanssens
barthanssens
opened on Dec 11, 2020
Issue body actions

Via eclipse-rdf4j/rdf4j#2707

Looks like the change in jsonld-java 0.12.3 (#245) has a side effect when the subject and object are exactly the same: in that case rdf:type is always serialized as a full URI instead of just @type

Example code:

		JsonLdOptions opts = new JsonLdOptions();
		opts.setUseRdfType(Boolean.FALSE);
		
		RDFDataset rdf = new RDFDataset();
		rdf.addTriple(
			"http://www.w3.org/2002/07/owl#Class",
			"http://www.w3.org/1999/02/22-rdf-syntax-ns#type",
			"http://www.w3.org/2002/07/owl#Class");
	
		System.out.println(JsonUtils.toPrettyString(new JsonLdApi(opts).fromRDF(rdf)));
		
		RDFDataset rdf2 = new RDFDataset();
		rdf2.addTriple(
			"http://www.w3.org/2002/07/owl#",
			"http://www.w3.org/1999/02/22-rdf-syntax-ns#type",
			"http://www.w3.org/2002/07/owl#Class");
	
		System.out.println(JsonUtils.toPrettyString(new JsonLdApi(opts).fromRDF(rdf2)));

Activity

  1. dr0i
    closed this as completedin #306on Feb 10, 2021
  2. dr0i commented on Feb 10, 2021

    @dr0i
    dr0i
    on Feb 10, 2021
    Member
    More actions

    Should be fixed with #306. You may want to check this @barthanssens .
    Closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.