Skip to content

Fix #256: add customProps parameter to tag all imported nodes with custom properties#359

Open
jexp wants to merge 1 commit into
2026.01from
feat-256-custom-import-props
Open

Fix #256: add customProps parameter to tag all imported nodes with custom properties#359
jexp wants to merge 1 commit into
2026.01from
feat-256-custom-import-props

Conversation

@jexp

@jexp jexp commented May 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds a customProps map parameter to all RDF/ontology import procedures. Any key-value pairs in this map are applied to every node created or updated during import, after the RDF-derived properties.

  • n10s.rdf.import.inline, n10s.rdf.import.fetch, n10s.onto.import.inline, n10s.onto.import.fetch, n10s.skos.import.inline, n10s.skos.import.fetch, and the quadRDF variants all support customProps
  • The uri key is excluded from customProps to prevent accidental overwrite of the node's URI identifier
  • customProps is echoed in the config summary returned by the procedure

Closes #256

Test plan

  • testImportWithCustomProps — verifies custom properties are set on imported nodes
  • testImportWithoutCustomProps — regression: normal import unaffected
  • testImportCustomPropsDoNotOverwriteUri — uri key in customProps is silently ignored
  • testImportFetchWithCustomProps — same behaviour via fetch variant

Docs

Added [[custom-node-properties]] section to docs/modules/ROOT/pages/import.adoc with usage example.

…stom properties

All n10s.rdf.import.* and n10s.onto.import.* procedures now accept a
customProps map in their params argument. Every node created or updated
during the import gets those key-value pairs written as properties after
RDF-derived properties, so custom metadata (importId, version, source)
can be attached per-call. The reserved 'uri' key is silently skipped.
Adds 4 tests and documentation section with example.
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.

1 participant