Security News
Combatting Alert Fatigue by Prioritizing Malicious Intent
In 2023, data breaches surged 78% from zero-day and supply chain attacks, but developers are still buried under alerts that are unable to prevent these threats.
sparnatural
Advanced tools
Visual client-side SPARQL query builder and knowledge graph exploration tool
Sparnatural is a visual client-side SPARQL query builder for exploring and navigating RDF Knowledge Graphs. It is written in Typescript.
It supports the creation of basic graph patterns with the selection of values with autocomplete search or dropdown lists, or other widgets. It can be configured through an OWL or SHACL configuration file that defines the classes and properties to be presented in the component.
You can play with online demos at http://sparnatural.eu#demos.
To get started :
Select the type of entity to search...
... then select the type of the related entity.
In this case there is only one possible type of relation that can connect the 2 entities, so it gets selected automatically. Then select a value for the related entity, in this case in a dropdown list :
Congratulations, your first SPARQL query criteria is complete !
Now you can fetch the generated SPARQL query :
This enables to navigate the graph :
Combine criterias :
Select multiple values for a criteria :
(UNIONs are not supported)
Sparnatural offers currently 9 ways of selecting a value for a criteria :
This is useful when a type a of entity is used only to navigate the graph, but without the ability to select an instance of these entities.
Sparnatural is multilingual and supports displaying labels of classes and properties in multiple languages.
Sparnatural supports the OPTIONAL
and FILTER NOT EXISTS {}
keywords applied to a whole "branch" of the query.
See here how to search for French Museums and the name of Italian painters they display, if any :
There is currently an experimental support for the SERVICE keyword for federated querying.
Since version 9.0.0, Sparnatural supports COUNT
queries and other aggregation functions.
Sparnatural does not support the creation of UNION, BIND
To send SPARQL queries to a service that is not hosted on the same domain name as the web page in which Sparnatural is included, the SPARQL endpoint needs to allow Cross-Origin Resource Sharing (CORS). But we have a SPARQL proxy for those who are not, don't worry ;-)
Since 9.0.0, the preferred way to configure Sparnatural is with a SHACL specification. Look at the supported SHACL features in the documentation.
The component is also configurable using a an OWL configuration file editable in Protégé. Look at the specification files of the demos to get an idea.
:Museum rdf:type owl:Class ;
rdfs:subClassOf core:SparnaturalClass ;
core:faIcon "fad fa-university" ;
core:sparqlString "<http://dbpedia.org/ontology/Museum>" ;
core:tooltip "A <b>DBPedia Museum</b>"@en ,
"Un <b>Musée DBPedia</b>"@fr ;
rdfs:label "Museum"@en ,
"Musée"@fr .
:displayedAt rdf:type owl:ObjectProperty ;
rdfs:subPropertyOf core:AutocompleteProperty ;
owl:inverseOf :displays ;
rdfs:domain :Artwork ;
rdfs:range :Museum ;
core:sparqlString "<http://dbpedia.org/ontology/museum>" ;
datasources:datasource datasources:search_rdfslabel_bifcontains ;
rdfs:label "displayed at"@en ,
"exposée à"@fr .
It is possible to directly reference an icon class from font-awesome if you embed them in your application :
:Person rdf:type owl:Class ;
core:faIcon "fad fa-male" ;
The OWL file to use is different from your knowledge graph ontology definition. You should create a different OWL file. You can refer to the documentation page for more details.
Classes or properties in the config can either:
core:sparqlString
annotation.Here is an example of a simple property in a Sparnatural configuration that is mapped to a property path in the underlying knowledge graph:
:bornIn rdf:type owl:ObjectProperty ;
rdfs:subPropertyOf core:ListProperty ;
rdfs:domain :Person ;
rdfs:range :Country ;
core:sparqlString "<http://dbpedia.org/ontology/birthPlace>/<http://dbpedia.org/ontology/country>" ;
FAQs
Visual client-side SPARQL query builder and knowledge graph exploration tool
The npm package sparnatural receives a total of 10 weekly downloads. As such, sparnatural popularity was classified as not popular.
We found that sparnatural demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.
Security News
In 2023, data breaches surged 78% from zero-day and supply chain attacks, but developers are still buried under alerts that are unable to prevent these threats.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.