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 — Added fix for wrong rdf:type to @type conversion by umbreak · Pull Request #245 · jsonld-java/jsonld-java

Conversation

@umbreak

@umbreak umbreak commented Nov 7, 2018

Copy link
Copy Markdown
Contributor

Fixes #242

As described on the issue, from the following triples

<http://example.com/Subj1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Type> .
<http://example.com/Type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#label> "myLabel" .

the following json should be created (event when useRdfType = false):

{
   "@id": "http://example.com/Subj1",
   "http://www.w3.org/1999/02/22-rdf-syntax-ns#type": {
      "http://www.w3.org/1999/02/22-rdf-syntax-ns#label": "myLabel"
   }
}

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@umbreak
Added fix for wrong rdf:type to @type conversion
9396d1f
@coveralls

coveralls commented Nov 7, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.09%) to 89.201% when pulling df42648 on umbreak:fixType into a1c138b on jsonld-java:master.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ansell
ansell requested changes Nov 7, 2018
View reviewed changes

@ansell ansell left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just two minor optimisations to use Map.computeIfAbsent then I will merge it.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread core/src/main/java/com/github/jsonldjava/core/JsonLdApi.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread core/src/main/java/com/github/jsonldjava/core/JsonLdApi.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

@umbreak
Added optimization with computeIfAbsent
df42648
@ansell
ansell merged commit df42648 into jsonld-java:master Nov 7, 2018
@ansell

ansell commented Nov 7, 2018

Copy link
Copy Markdown
Member

Thanks, I optimised a few other cases of get/put/get to use computeIfAbsent also and merged it in.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@umbreak
umbreak deleted the fixType branch November 9, 2018 10:48
This was referenced Dec 10, 2020
JSON-LD Writer Does Not Write @type when Subject is owl:Class eclipse-rdf4j/rdf4j#2707
Closed
Issue with @type when subject and object are the same #301
Closed
@umbreak umbreak mentioned this pull request Feb 1, 2021
rdfToJson edge case when object = subject and predicate = rdf:type #306
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ansell ansell ansell requested changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@umbreak @coveralls @ansell
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.