Skip to content

What if TermWrapper extends Term?#21

Draft
langsamu wants to merge 1 commit intomainfrom
wrapper_as_term
Draft

What if TermWrapper extends Term?#21
langsamu wants to merge 1 commit intomainfrom
wrapper_as_term

Conversation

@langsamu
Copy link
Collaborator

@langsamu langsamu commented Feb 22, 2026

In other versions of this library that I had written, the equivalent of TermWrapper is the equivalent of Term.
In this library though, the wrapper has a term.

  • .NET: GraphWrapperNodeWrapperNodeIUriNodeIRefNodeINode
  • Jena: WrapperResourceResourceImplEnhNodeResourceRDFNode
  • Commons RDF: WrapperBlankNodeOrIRIBlankNodeOrIRIRDFTerm

Given how the RDF/JS types are modelled, there is no way to extend Term or implement Term.

This change introduces an interface that is isomorphic with the superset of RDF/JS terms, so instances of TermWrapper can have the shape of any Term and be cast to it.

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