Skip to content

Named graph IRI and treatment subject IRI differ by scheme (https:// vs http://) #12

Description

@retog

The named graph a treatment is loaded into and the treatment's own subject IRI use different URI schemes. The graph is https://, the subject is http://.

Example — the largest treatment graph in the store:

  • graph name: https://treatment.plazi.org/id/8E33E30FFFD9FFCC4AD302B2FFB04209
  • treatment subject: http://treatment.plazi.org/id/8E33E30FFFD9FFCC4AD302B2FFB04209

This is systematic, not a one-off. Measured against https://qlever.ld.plazi.org/sparql on 2026-07-10:

PREFIX trt: <http://plazi.org/vocab/treatment#>
SELECT (SUM(IF(STRSTARTS(STR(?s), "https://"), 1, 0)) AS ?https)
       (SUM(IF(STRSTARTS(STR(?s), "http://"), 1, 0)) AS ?http)
WHERE { ?s a trt:Treatment }

→ https = 0, http = 852755. Meanwhile all 852,756 named graphs carry the https:// prefix.

Why it matters

The obvious way to join a treatment to its own provenance graph is:

SELECT * WHERE { GRAPH ?g { ?g ?p ?o } }

This returns nothing. Every newcomer writing their first integrative query against the Plazi store will hit this, and the failure is silent — an empty result set, not an error. We are currently discussing exactly such cross-store queries with GBIF/SIB (linking GBIF and NCBI taxon identifiers to Plazi treatments), so this will bite people outside Plazi soon.

Suggested fix

Make https:// canonical for both graph names and resource IRIs, and keep graphUriPrefix as it is. All Plazi hosts already serve https, so the canonical IRI should be the one that resolves. The change belongs upstream in gg2rdf, which must emit https:// subjects: see plazi/gg2rdf#33.

Note the existing comment on graphUriPrefix here — "do not change this prefix, removing the previous version depends on this not changing". Leaving the prefix untouched is therefore the safer path, but this store still needs a full reload once the subject IRIs are rewritten.

Companion issue for the QLever side: plazi/turtle-hook-nq#5.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions