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

fix!: transform valueHasUri values from node to string type (DEV-1047) #2094

Merged

Conversation

mpro7
Copy link
Collaborator

@mpro7 mpro7 commented Jul 11, 2022

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

Issue Number: DEV-1047

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@mpro7 mpro7 self-assigned this Jul 11, 2022
@mpro7 mpro7 changed the title add test data fix!: transform valueHasUri property values - node to string type (DEV-1047) Jul 12, 2022
@mpro7 mpro7 marked this pull request as ready for review July 12, 2022 15:30
Copy link
Collaborator

@BalduinLandolt BalduinLandolt left a comment

Choose a reason for hiding this comment

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

looks good: you missed some println(), and one question regarding the test. But otherwise should be ok

knora-base:standoffTagHasStartIndex 2 ;
knora-base:standoffTagHasStartParent <http://rdfh.ch/0103/5LE8P57nROClWUxEPJhiug/values/fEbt5NzaSe6GnCqKoF4Nhg/standoff/1> ;
knora-base:standoffTagHasUUID "dd2e785b-041e-4bcb-a77d-570efe8a068c" ;
knora-base:valueHasUri <http://www.maison-george-sand.fr/> .
Copy link
Collaborator

Choose a reason for hiding this comment

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

not sure if that makes much sense... but you could consider testing also the case where a URI should not be converted to a string?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This plugin is very specific and picks only the node values in type IriNode. IMO as with the PR2079 plugin this is enough.

Copy link

@irinaschubert irinaschubert left a comment

Choose a reason for hiding this comment

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

LGTM, spotted just one typo. I assume you've tested it with real standoff data, meaning testing it locally and checking if the app can handle it etc.?

Copy link
Collaborator

@subotic subotic left a comment

Choose a reason for hiding this comment

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

LGTM! you really like to deploy major versions ;-)

@mpro7
Copy link
Collaborator Author

mpro7 commented Jul 13, 2022

@irinaschubert I double checked that and valueHasUri value should be represented by the typed string, no matter if it's simple link or standoff link, like below in freshly created value:

<http://rdfh.ch/0001/qN1igiDRSAemBBktbRHn6g/values/D1WBxuH9SFKuh9ACgHwBaw/standoff/9>
        rdf:type                        knora-base:StandoffUriTag ;
        knora-base:standoffTagHasEnd    65 ;
        knora-base:standoffTagHasStart  59 ;
        knora-base:standoffTagHasStartIndex
                9 ;
        knora-base:standoffTagHasStartParent
                <http://rdfh.ch/0001/qN1igiDRSAemBBktbRHn6g/values/D1WBxuH9SFKuh9ACgHwBaw/standoff/8> ;
        knora-base:standoffTagHasUUID   "gjmHSDLTS4Ss-Nqqi_tJ_w" ;
        knora-base:valueHasUri          "http://www.string.ch"^^xsd:anyURI .

@mpro7 mpro7 changed the title fix!: transform valueHasUri property values - node to string type (DEV-1047) fix!: transform valueHasUri values from node to string type (DEV-1047) Jul 13, 2022
@sonarcloud
Copy link

sonarcloud bot commented Jul 13, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@mpro7 mpro7 merged commit e1d8d95 into main Jul 13, 2022
@mpro7 mpro7 deleted the DEV-1047-dsp-api-value-has-uri-property-has-node-as-a-value branch July 13, 2022 08:38
@daschbot daschbot mentioned this pull request Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants