StylesheetResolver: let Saxon resolve local xsl:import/include again#87
Open
namedgraph wants to merge 7 commits into
Open
StylesheetResolver: let Saxon resolve local xsl:import/include again#87namedgraph wants to merge 7 commits into
namedgraph wants to merge 7 commits into
Conversation
Return null for non-HTTP locations so Saxon's default resolver opens file:/jar:/classpath stylesheet imports directly, instead of routing them through the RIOT StreamManager. All stylesheet imports are relative and resolve against a file:/jar: base with no location mapping, so the StreamManager hop added nothing but debug noise. HTTP imports still go through the GraphStoreClient; the repository is still used for URI->location mapping. Drops the now-unused logger and TypedInputStream. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…Client Restore the pre-ont-api XsltResolver design: the resolver takes a plain SSL-configured JAX-RS Client and fetches http(s) stylesheet imports with Accept: text/xsl, returning null for local (file:/jar:/classpath) so Saxon's default resolver opens them. A Graph Store Protocol client has no business fetching XSLT, and stylesheet URIs are never location-mapped, so PrefixGraphRepository is dropped too. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ConstructForClass: an unreachable ontology or owl:import now degrades to an empty construct result with a warning, as OntDocumentManager used to, instead of failing the whole transform — repository loads throw unchecked Jersey/RIOT exceptions that the previous catch (IOException) missed. PrefixGraphRepository: the inherited DocumentGraphRepository store is a plain HashMap but the repository is shared across request threads (document() resolution, ontology loading, proxy caching), so concurrent first-loads could corrupt the map. Store access is now synchronized; get() double-checks so that load I/O stays outside the lock, and ids()/loadedGraphs() return snapshots taken under it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The store keyed graphs by URI, so an actor minting distinct URIs under a mapped prefix (e.g. http://xmlns.com/foaf/0.1/<n>) grew it without bound — each URI cached its own copy of the same bundled ontology. Bundled (non-HTTP mapped) documents are now cached by their resolved location, so every URI in a namespace shares one graph and the cache is bounded by the number of bundled files. Also require the prefix match to land on a URI boundary (/ or #) so an unrelated URI can't resolve to a mapped location. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The param was accepted by the Application constructor but never stored or used — preemptive HTTP Basic auth has no place in the post-ont-api stack (delegation filters handle authenticated dereferencing). Follows the removal of the flag from Core. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Back the URI-keyed (dynamically loaded) graphs with a map from a protected createStore() factory instead of the inherited DocumentGraphRepository store. The default is an unbounded HashMap, so behavior is unchanged here — but subclasses can now supply a bounded/evicting map without Web-Client taking on any eviction logic or dependency. The location-keyed bundled-document cache stays separate and unbounded (bounded by file count). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Return null for non-HTTP locations so Saxon's default resolver opens file:/jar:/classpath stylesheet imports directly, instead of routing them through the RIOT StreamManager. All stylesheet imports are relative and resolve against a file:/jar: base with no location mapping, so the StreamManager hop added nothing but debug noise. HTTP imports still go through the GraphStoreClient; the repository is still used for URI->location mapping. Drops the now-unused logger and TypedInputStream.