Skip to content

chore(template): use the ntemplate terms nanopub-java already declares - #711

Merged
ashleycaselli merged 1 commit into
masterfrom
chore/use-upstream-ntemplate-terms
Sep 14, 2026
Merged

ashleycaselli merged 1 commit into
masterfrom
chore/use-upstream-ntemplate-terms

Conversation

@ashleycaselli

Copy link
Copy Markdown
Member

Template spelled out five nt: IRIs locally, under this note:

// TODO Move these to the other ntemplate vocabulary terms in nanopub-java:

The note turned out to be mostly stale. Three of the five are already declared in NTEMPLATE, with identical IRIs, so those local copies were simply redundant:

Term Where
AdvancedStatement already in NTEMPLATE
LanguageTaggedLiteralPlaceholder already in NTEMPLATE
possibleLanguageTag already in NTEMPLATE
TransientTemplate added upstream in Nanopublication/nanopub-java#156
NewUriPlaceholder added upstream in Nanopublication/nanopub-java#156

This PR takes the three from NTEMPLATE and deletes the duplicates. TransientTemplate stays declared here until the nanopub-java release carrying #156 is picked up, and the TODO is narrowed to it and says what it is waiting for. (NewUriPlaceholder is introduced by #669 and is not on this branch.)

Verification

The tests that exercise these terms build templates with the constant and then parse them back through Template, so they would pass even if both sides had moved together to a different IRI. That is not the property that matters here: these IRIs appear in templates already published in the network, so a rename upstream would quietly stop Nanodash from recognising them.

TemplateVocabularyIrisTest therefore pins the literal strings. It is what actually shows the terms now taken from NTEMPLATE are byte-identical to the ones that were hard-coded, and it keeps a future upstream rename from being a silent failure.

Full suite: 1416 tests, 0 failures.

Merge note

#669 touches the same declaration block — it adds NEW_URI_PLACEHOLDER next to the constants removed here. Whichever lands second will need a small conflict resolution in that block; nothing else overlaps.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NnGpEQkFqCaf4AEQwwhFFn

Template spelled out five ntemplate IRIs locally, under a note to move them to
nanopub-java. Three of them are already declared there with identical IRIs:
AdvancedStatement, LanguageTaggedLiteralPlaceholder and possibleLanguageTag.
Those local copies were simply redundant, so the terms now come from NTEMPLATE
and the duplicates are gone.

TransientTemplate stays for now. It was only added to nanopub-java in
Nanopublication/nanopub-java#156, so it has to wait for that release; the note
is narrowed to it and says what it is waiting for.

The IRIs are the ones already published in templates out in the network, so a
rename upstream would quietly stop Nanodash from recognising templates that use
them. TemplateVocabularyIrisTest pins the four strings to keep that from being
silent -- and, for this commit, is what shows the terms taken from NTEMPLATE are
the same ones that were hard-coded here.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NnGpEQkFqCaf4AEQwwhFFn
@ashleycaselli
ashleycaselli merged commit fde06a0 into master Sep 14, 2026
8 checks passed
@ashleycaselli
ashleycaselli deleted the chore/use-upstream-ntemplate-terms branch September 14, 2026 17:07
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