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

Class IRI configuration does not work #37

Closed wouterbeek closed 1 year ago

wouterbeek commented 2 years ago

Observed

The the Configure step, if I enter/select <https://schema.org/Person> in the class IRI field and click on Next and download my data as RDF, the data contains class IRI <Person> and not sdo:Person.

Expected

The configured class IRI to be used i.o. a relative IRI.

Steps to reproduce

  1. Run the GeoData Wizard https://labs.kadaster.nl/demonstrators/geodatawizard with the example CSV.
  2. Enter/select https://schema.org/Person in the class IRI field.
  3. Click Next.
  4. Click Download as RDF.
  5. Open the N-Triples file in a text editor; observe that the class IRI is <Person>.
hekl commented 2 years ago

Same here. Expected: https://schema.org/Place as IRI class. Observed: <https://myplace/id/NL12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <plac> .

mightymax commented 2 years ago

I was able to reproduce and pinpoint to where the bug is introduced in code, but fixing needs a React developer. My findings: This bug is purely frontend related and is in src/containers/Configure/ClassField.tsx. To me it looks like some form of racing condition where the Iri is set (a string) in the React state classValue and then copied to transformationConfig.resourceClass, but the value set to this last state is never in sync with the actual value of classValue. This can be checked by logging the value of classValue before line 28.

The actual value being used in the transformed RDF is not even the name of the Class of the Iri, it can actually be the value of your search string. So if you search "pErSon" and select https://schema.org/Person as Iri, the classname used in the transformed Rdf will be "pErSon" not "Person" or "person".

GerwinBosch commented 2 years ago

@wouterbeek I've released a new version that should have fixed this issue, could you check it?

wouterbeek commented 2 years ago

@mightymax Let's test to see whether this was fixed.

philipperenzen commented 1 year ago

@wouterbeek I was able to test this locally and the issue seems to be resolved, I will close the issue for now.