chore(template): use the ntemplate terms nanopub-java already declares - #711
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Templatespelled out fivent: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:AdvancedStatementNTEMPLATELanguageTaggedLiteralPlaceholderNTEMPLATEpossibleLanguageTagNTEMPLATETransientTemplateNewUriPlaceholderThis PR takes the three from
NTEMPLATEand deletes the duplicates.TransientTemplatestays declared here until the nanopub-java release carrying #156 is picked up, and theTODOis narrowed to it and says what it is waiting for. (NewUriPlaceholderis 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.TemplateVocabularyIrisTesttherefore pins the literal strings. It is what actually shows the terms now taken fromNTEMPLATEare 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_PLACEHOLDERnext 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