Prerequisites
- Install Java SE from Oracle. See Apache Jena documentation for minimum version requirements.
Install the Apache Jena Fuseki web application
Apache Jena Fuseki is an open source SPARQL server that runs as a Java web application to support linked data, RDF/XML, and Web Ontology Language (OWL). You can use the Apache Jena Fuseki web application to upload RDF/XML files, view N-Triples, and run SPARQL queries.
Windows installation steps:
Download the apache-jena-fuseki zip file (e.g. apache-jena-fuseki-4.1.0.zip).
Extract the zip file contents to a folder on your hard drive.
In that folder, run fuseki-server.bat to start the Apache Jena Fuseki web application.
Open a browser, and go to the URL
localhost:3030
to launch the web application:
Run a SPARQL query in Apache Jena Fuseki
The following steps describe how to upload triples and run queries in the web application:
Select Add one on the web page to create a new dataset:
Enter a dataset name and select create dataset:
Prepare a sample RDF format file, such as the following RDF/XML file (sample_author.xml):
Select upload data:
Click select files to upload an RDF format file (e.g. RDF/XML or Turtle):
Click the empty SPARQL query box to auto-generate a default query to view all triples, then click the run arrow:
Scroll down to Query results to view the triples:
Run your own SPARQL query
For example, to get the name of the author, run the query:
|
|
This returns Rudyard Kipling
Next steps
- Explore W3C RDF primer