Repository navigation
feat(yasqe): always include the SPARQL Anything vocabularies - #242
Merged
Merged
Conversation
Adds the SPARQL Anything namespaces xyz (http://sparql.xyz/facade-x/data/), fx (http://sparql.xyz/facade-x/ns/) and fxe (http://sparql.xyz/facade-x/engine/) to ALWAYS_INCLUDED. SPARQL Anything publishes no RDF files, so the fx magic property, class and functions and the fxe options are listed there. - fetchPrefixData.js adds the prefixes of ALWAYS_INCLUDED to the prefix.cc data, so xyz, fx, fxe (and railml) survive the refresh at build time. - The bundled terms get an optional fifth list of functions, suggested by a new function autocompleter where an expression can start.
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.
Requested by Mathias · project thread
The three SPARQL Anything namespaces are now always available, as prefixes and as autocomplete vocabulary:
xyz:http://sparql.xyz/facade-x/data/fx:http://sparql.xyz/facade-x/ns/fxe:http://sparql.xyz/facade-x/engine/(the Façade-X Engine vocabulary, used by SPARQL Anything for SERVICE options:fxe:properties fxe:location "…")Changes
fetchLovData.js:ALWAYS_INCLUDEDgets the three namespaces. SPARQL Anything publishes no RDF files, so the terms are listed in a newtermsfield. They were taken from the SPARQL Anything docs and the Façade-X specs:fx::Root(class),anySlot,slot-keyand the audit properties (properties), and the 44 functions (entity,literal,bnode,serial,cardinal,String.*,WordUtils.*,DigestUtils.*, the distances,URLEncoder.encode...).fxe:: all the general, HTTP, S3 and format options (location,media-type,csv.headers,json.path,xml.path,html.selector...).xyz:has no fixed terms, so it is only a prefix.fetchPrefixData.js: adds the prefixes ofALWAYS_INCLUDEDto the prefix.cc data, both when the fetch works and when it falls back to the committed file, soxyz/fx/fxe(and alsorailml, which was missing) survivenpm run build. The committedprefixes.jsongetsfxeandrailml.fxandxyzwere already there.lov-terms.jsonwas updated in place from the existing bundle, keeping the generated date. The least used namespace (voag) drops out to stay within the size budget.functionautocompleter: on Ctrl+Space, it suggests the bundled functions wherever an expression can start (BIND(,FILTER(, SELECT expressions). It matches on the prefixed name or on the local name (substr→fx:String.substring) and declares the missingPREFIX. Functions are not offered as properties.docs/user-guide.mdcovers the always-present prefixes and has a SPARQL Anything section with an example. There is also a changeset (yasqe minor).Tests
test/run.ts(SPARQL Anything autocompletion). The full puppeteer suite passes: 73 tests.Generated by Claude Code