Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
sparqling
Advanced tools
Readme
Point and click SPARQL query builder based on Grapholscape. Build SPARQL queries interacting directly with the ontology graphical specification.
Check standalone releases in order to get the ready to use application: https://github.com/obdasystems/sparqling-standalone
Sparqling works on top of Grapholscape that is a peer dependecy, hence you need to install it before proceding.
Once Grapholscape is ready and working you can proceed importing sparqling.
If you are using a HTML Environment (without a building system) you can:
./dist/sparqling.min.js
in a <script>
tag in your html
file:<script src="./sparqling.min.js" type="text/javascript" ></script>
<script type="module">
import * as Sparqling from "./sparqling.esm.min.js";
</script>
If you want to install it via npm: npm install sparqling
.
Sparqling offers two intialising functions:
sparqlingStandalone
: for the standalone versionsparqling
: meant to be used within other OBDA Systems' products.You need to pass it the grapholscape instance and the Graphol ontology file which can be a string
or a Blob
.
The initialising function will return the core object, check the API.
import * as Sparqling from 'sparqling'
// or import * as Sparqling from './sparqling.esm.min.js'
// or <script ...>
const grapholscape = ... // init grapholscape
const sparqlingCore = Sparqling.sparqlingStandalone(grapholscape, grapholFile)
The Sparqling core object expose the following API:
function
start(): void
: initialise the UI components and activate sparqling's engine.property
onStart: () => void
: onStart callback to perform actions every time sparqling is started.
Example:
sparqlingCore.onStart = function() { console.log('Sparqling has been started') }
function
stop(): void
: stop sparqling's engine and hide UI components.property
onStop: () => void
: onStop callback to perform actions every time sparqling is stopped.
Example:
sparqlingCore.onStop = function() { console.log('Sparqling has been stopped') }
function
getQueryBody(): QueryGraph
: returns the actual QueryGraphproperty
onQueryRun: (sparqlQuery: string) => void
: onQueryRun callback to perform actions every time the user click on the run query button.
Example:
sparqlingCore.onQueryRun = function(sparqlQuery) { console.log(`Please run this query: ${sparqlQuery}`) }
start
: build for development/debugging and serve the application at localhost:8000
watching for changeswatch
: watch for changes in development environmentbuild
: build for productionserve
: serve the ./public
folder at localhost:8000
apigen
: generate api code from swaggerinject-grapholscape
: copy ./node_modules/grapholscape/dist/grapholscape.min.js
build into ./public/js
for the web-app to workclean
: clean generated sparqling files in ./dist
and ./public/js
version
: build and tag a new release versionsnapshot
: build a snapshot prerelease version to be published with tag snapshot
for testingnpm version
command to tag a new version: npm version [new-version]
.package.json
and perform the builds.npm run serve
.git push && git push --tags"
npm run snapshot
npm publish --tag snapshot
To install latest snapshot version use
npm i sparqling@snapshot
https://app.swaggerhub.com/apis/OBDASystems/swagger-sparqling_ws/1.0.0
In order to generate client/server model and api use swagger.editor.io
FAQs
Point and click SPARQL query builder based on [Grapholscape](https://github.com/obdasystems/grapholscape). Build SPARQL queries interacting directly with the ontology graphical specification.
The npm package sparqling receives a total of 2 weekly downloads. As such, sparqling popularity was classified as not popular.
We found that sparqling demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.