sparqling v1.3.12
sparqling
Point and click SPARQL query builder based on Grapholscape. Build SPARQL queries interacting directly with the ontology graphical specification.
Standalone
Check standalone releases in order to get the ready to use application: https://github.com/obdasystems/sparqling-standalone
Installation
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.
HTML Environment
If you are using a HTML Environment (without a building system) you can:
- link
./dist/sparqling.min.jsin a<script>tag in yourhtmlfile:
<script src="./sparqling.min.js" type="text/javascript" ></script>- import sparqling as a ES6 module:
<script type="module">
import * as Sparqling from "./sparqling.esm.min.js";
</script>NPM
If you want to install it via npm: npm install sparqling.
Initialisation
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)API
The Sparqling core object expose the following API:
functionstart(): void: initialise the UI components and activate sparqling's engine.propertyonStart: () => void: onStart callback to perform actions every time sparqling is started.Example:
sparqlingCore.onStart = function() { console.log('Sparqling has been started') }functionstop(): void: stop sparqling's engine and hide UI components.propertyonStop: () => void: onStop callback to perform actions every time sparqling is stopped.Example:
sparqlingCore.onStop = function() { console.log('Sparqling has been stopped') }functiongetQueryBody(): QueryGraph: returns the actual QueryGraphpropertyonQueryRun: (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}`) }
Repository npm targets
start: build for development/debugging and serve the application atlocalhost:8000watching for changeswatch: watch for changes in development environmentbuild: build for productionserve: serve the./publicfolder atlocalhost:8000apigen: generate api code from swaggerinject-grapholscape: copy./node_modules/grapholscape/dist/grapholscape.min.jsbuild into./public/jsfor the web-app to workclean: clean generated sparqling files in./distand./public/jsversion: build and tag a new release versionsnapshot: build a snapshot prerelease version to be published with tagsnapshotfor testing
Release a new version
- Be sure to have a clean working tree (i.e. commit/stash your changes).
- Use standard
npm versioncommand to tag a new version:npm version [new-version].\ this will generate a new git tag, updatepackage.jsonand perform the builds. - Then review the generated builds and test the app using:
npm run serve. - Push the new release:
git push && git push --tags" - Publish to npm
Release a snapshot test version
- Use
npm run snapshot - Publish using snapshot tag
npm publish --tag snapshotTo install latest snapshot version use
npm i sparqling@snapshot
Swagger
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
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago