pldn / LDWizard

🧙 LDWizard: A generic framework for simplifying the creation of linked data. Supported by the PLDN community.
European Union Public License 1.2
13 stars 7 forks source link

`keepOriginalValue`'s `customPredicateIRI` + property IRI not working as expected #163

Closed philipperenzen closed 9 months ago

philipperenzen commented 10 months ago

When using keepOriginalValue's customPredicateIRI (for example <https://www.example123.com/example>) + property URI under Property Configuration (for example <https://schema.org/identifier>), both the original and transformed values will get this <https://schema.org/identifier> property:

# current behavior
<https://w3id.org/my-wizard/b7ecbe/id/1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Resource> .
<https://w3id.org/my-wizard/b7ecbe/id/1> <https://schema.org/identifier> <https://w3id.org/my-wizard/b7ecbe/def/Red> .
<https://w3id.org/my-wizard/b7ecbe/id/1> <https://schema.org/identifier> <https://w3id.org/my-wizard/b7ecbe/def/Red-copy> .

This issue proposes the change to give the original value the given property IRI, but when customPredicateIRI is set, it will over rule the refined transformation's predicate, not using the property URI from Property Configuration, but the customPredicateIRI instead.

# with keepValue == true and customPredicateIRI defined
<https://w3id.org/my-wizard/b7ecbe/id/1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Resource> .
<https://w3id.org/my-wizard/b7ecbe/id/1> <https://schema.org/identifier> <https://w3id.org/my-wizard/b7ecbe/def/Red> .
<https://w3id.org/my-wizard/b7ecbe/id/1> <https://www.example123.com/example> <https://w3id.org/my-wizard/b7ecbe/def/Red-copy> .
# with keepValue == true and customPredicateIRI undefined
<https://w3id.org/my-wizard/b7ecbe/id/1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Resource> .
<https://w3id.org/my-wizard/b7ecbe/id/1> <https://schema.org/identifier> <https://w3id.org/my-wizard/b7ecbe/def/Red> .
<https://w3id.org/my-wizard/b7ecbe/id/1> <https://w3id.org/my-wizard/b7ecbe/def/Colors> <https://w3id.org/my-wizard/b7ecbe/def/Red-copy> .