SmartDataAnalytics / RdfProcessingToolkit

Command line interface based RDF processing toolkit to run sequences of SPARQL statements ad-hoc on RDF datasets, streams of bindings and streams of named graphs with support for processing JSON, CSV and XML using function extensions
https://smartdataanalytics.github.io/RdfProcessingToolkit/
Other
39 stars 3 forks source link

Non-deterministic Output Formatting #46

Open Aklakan opened 11 months ago

Aklakan commented 11 months ago

It seems that the output itself is fine, but there seems to be a race condition when configuring the output writer. An alternative reason could be that writer configuration still uses a reflection hack for configuration which might break. Needs investigation.

Running rpt integrate /tmp/data.jsonld spo.rq --out-format turtle gives output with different formatting such as:

Variant A:

@prefix geo:  <http://www.opengis.net/ont/geosparql#> .
@prefix owl:  <http://www.w3.org/2002/07/owl#> .
@prefix rdf:  <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix xsd:  <http://www.w3.org/2001/XMLSchema#> .

<https://data.coypu.org/country/DEU>
        rdf:type                        <https://schema.coypu.org/global#Country>;
        rdfs:label                      "Germany"@en;

Variant B:

@prefix geo: <http://www.opengis.net/ont/geosparql#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
<https://data.coypu.org/country/DEU> rdfs:label "Germany"@en .
<https://data.coypu.org/country/DEU> rdf:type <https://schema.coypu.org/global#Country> .