All Projects β†’ linked-solutions β†’ jarql

linked-solutions / jarql

Licence: other
SPARQL for JSON: Turn JSON into RDF using SPARQL syntax

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to jarql

Rdf Ext
RDF library for NodeJS and the Browsers
Stars: ✭ 97 (+410.53%)
Mutual labels:  linked-data, sparql, rdf
Nspm
πŸ€– Neural SPARQL Machines for Knowledge Graph Question Answering.
Stars: ✭ 156 (+721.05%)
Mutual labels:  linked-data, sparql, rdf
Hypergraphql
GraphQL interface for querying and serving linked data on the Web.
Stars: ✭ 112 (+489.47%)
Mutual labels:  linked-data, sparql, rdf
sparql-micro-service
SPARQL micro-services: A lightweight approach to query Web APIs with SPARQL
Stars: ✭ 22 (+15.79%)
Mutual labels:  linked-data, sparql, rdf
matcha
🍡 SPARQL-like DSL for querying in memory Linked Data Models
Stars: ✭ 18 (-5.26%)
Mutual labels:  linked-data, sparql, rdf
Semanticmediawiki
πŸ”— Semantic MediaWiki turns MediaWiki into a knowledge management platform with query and export capabilities
Stars: ✭ 359 (+1789.47%)
Mutual labels:  linked-data, sparql, rdf
CSV2RDF
Streaming, transforming, SPARQL-based CSV to RDF converter. Apache license.
Stars: ✭ 48 (+152.63%)
Mutual labels:  linked-data, sparql, rdf
Hypergraphql
GraphQL interface for querying and serving linked data on the Web.
Stars: ✭ 120 (+531.58%)
Mutual labels:  linked-data, sparql, rdf
Processor
Ontology-driven Linked Data processor and server for SPARQL backends. Apache License.
Stars: ✭ 54 (+184.21%)
Mutual labels:  linked-data, sparql, rdf
LD-Connect
LD Connect is a Linked Data portal for IOS Press in collaboration with the STKO Lab at UC Santa Barbara.
Stars: ✭ 0 (-100%)
Mutual labels:  linked-data, sparql, rdf
rdf2x
RDF2X converts big RDF datasets to the relational database model, CSV, JSON and ElasticSearch.
Stars: ✭ 43 (+126.32%)
Mutual labels:  linked-data, sparql, rdf
semagrow
A SPARQL query federator of heterogeneous data sources
Stars: ✭ 27 (+42.11%)
Mutual labels:  linked-data, sparql, rdf
Rdf4j
Eclipse RDF4J: scalable RDF for Java
Stars: ✭ 242 (+1173.68%)
Mutual labels:  linked-data, sparql, rdf
viziquer
Tool for Search in Structured Semantic Data
Stars: ✭ 12 (-36.84%)
Mutual labels:  linked-data, sparql, rdf
LinkedDataHub
The Knowledge Graph notebook. Apache license.
Stars: ✭ 150 (+689.47%)
Mutual labels:  linked-data, sparql, rdf
awesome-ontology
A curated list of ontology things
Stars: ✭ 73 (+284.21%)
Mutual labels:  linked-data, rdf
sirene-ld
Transformation du rΓ©pertoire SIRENE (CSV) au format RDF pour publication en Linked Data
Stars: ✭ 31 (+63.16%)
Mutual labels:  linked-data, rdf
ont-api
ONT-API (OWL-API over Apache Jena)
Stars: ✭ 20 (+5.26%)
Mutual labels:  sparql, rdf
rdfa-streaming-parser.js
A fast and lightweight streaming RDFa parser for JavaScript
Stars: ✭ 15 (-21.05%)
Mutual labels:  linked-data, rdf
SEPA
Get notifications about changes in your SPARQL endpoint.
Stars: ✭ 21 (+10.53%)
Mutual labels:  sparql, rdf

Build Status

JARQL

SPARQL construct queries on JSON files

JARQL allows to execute SPARQL Construct Queries against JSON files. The project was inspired by Tarql which provides similar functionality for CSV files. With JARQL you can easily transform JSON Documents to RDF.

Build

Instead of building yourself you can download it from the release page.

In order to create an executable .jar containing all the dependencies just run:

mvn package -Pexecutable

Usage

java -jar jarql-<version>.jar <JSON-File> <Query-File>

For example if you have a file called paperino.json with the following content:

{
        "parent": [{
                "name": "Paperino",
                "children": ["Qui", "Quo", "Qua"],
                "fiance": {"name": "Paperina"}
        }, {
                "name": "Topolino",
                "children": ["Tip", "Tap", "Top"],
                "fiance": {"name": "Minnie"}
        }]
}

And a file called paperino.query with the following content:

PREFIX : <http://example.com/>
PREFIX jarql: <http://jarql.com/>

CONSTRUCT { 
    ?p :name ?n; 
       :child [:name ?cn].
}
WHERE {
    jarql:root jarql:parent ?p.
    ?p jarql:name ?n.
    ?p jarql:children ?cn.
}

Invoking jarql-1.0-pre1.jar as follows:

java -jar jarql-1.0-pre1.jar paperino.json paperino.query

will output the following RDF:

[ <http://example.com/child>  [ <http://example.com/name>
                    "Qui"^^<http://www.w3.org/2001/XMLSchema#string> ] ;
  <http://example.com/child>  [ <http://example.com/name>
                    "Qua"^^<http://www.w3.org/2001/XMLSchema#string> ] ;
  <http://example.com/child>  [ <http://example.com/name>
                    "Quo"^^<http://www.w3.org/2001/XMLSchema#string> ] ;
  <http://example.com/name>   "Paperino"^^<http://www.w3.org/2001/XMLSchema#string>
] .

[ <http://example.com/child>  [ <http://example.com/name>
                    "Top"^^<http://www.w3.org/2001/XMLSchema#string> ] ;
  <http://example.com/child>  [ <http://example.com/name>
                    "Tap"^^<http://www.w3.org/2001/XMLSchema#string> ] ;
  <http://example.com/child>  [ <http://example.com/name>
                    "Tip"^^<http://www.w3.org/2001/XMLSchema#string> ] ;
  <http://example.com/name>   "Topolino"^^<http://www.w3.org/2001/XMLSchema#string>
] .

Advanced usage

Add all metadata you want using BIND combined with SPARQL 1.1 functions!

Create URI...

BIND (URI(CONCAT('http://example.com/ns#', ?var)) AS ?uri)

...add language tags...

BIND (STRLANG(?string, 'en') AS ?with_language_tag)

...or datatypes!

BIND (STRDT(?num, xsd:integer) AS ?int)

Current limitations

  • Nested arrays in JSON are not supported
  • The order of JSon Arrays is irrelevant

Similar Projects

  • JSON2RDF provides streaming conversion from JSON to RDF.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].