Questions tagged [rdf4j]

Eclipse RDF4J is a Java framework for working with RDF, SPARQL, and OWL. It offers a set of libraries and APIs for parsing, writing, scalable storage and reasoning, as well as a Workbench and Server application for deployment of RDF databases. This tag should be used for all questions regarding use of the RDF4J libraries and tools.

Eclipse RDF4J is a Java framework for parsing, writing, storing, querying and reasoning with RDF, SPARQL, and OWL. It offers a set of libraries and APIs for parsing, writing, scalable storage and reasoning, as well as a Workbench and Server application for deployment of RDF databases.

Eclipse RDF4J is the successor of the OpenRDF Sesame project.

For more information see the RDF4J community website.

155 questions
8
votes
1 answer

How to convert RDF to pretty nested JSON using java rdf4j

I have a simple RDF file and want to convert it to nice nested JSON. _:b0 a ; "Semantic Web Primer (First Edition)" ; _:b1 ;
jschnasse
  • 8,526
  • 6
  • 32
  • 72
7
votes
1 answer

Most efficient way to clear a named graph?

I am working with an instance of Ontotext GraphDB and often want to clear a named graph with a large number of triples. Currently, my technique involves issuing a SPARQL command to the graph server, which searches and matches a triple pattern of…
hayfreed
  • 525
  • 7
  • 21
4
votes
0 answers

Generating SPARQL Query from SHACL

I have a specific situation where I need to automatically generate SPARQL queries based on the SHACL schemas of the incoming data. I wonder if Jena or any other semantic tool/library can help do that? I saw something on the Jena code based but…
MaatDeamon
  • 9,532
  • 9
  • 60
  • 127
3
votes
1 answer

Determine rdf mime-types in bash

I am writing a bash script, that needs to check the different mime-types of different files. The files should support rdf4j REST API (http://docs.rdf4j.org/rest-api/#_content_types). Normally, using file --mime-type provides the correct mime…
user10639761
3
votes
1 answer

How to enable scripting in Tomcat 8 for RDF4J Workbench 2.2.4?

In order to create an RDFstore I have installed RDF4J server and RDF4J-Workbench 2.2.4 in Tomcat 8 (in Tomcat 8 I have deployed the relatives .war files of eclipse-rdf4j-2.2.4-sdk) in WIN10. I have already configured Tomcat 8 by enabling the CGI and…
STheo
  • 31
  • 1
3
votes
1 answer

OpenDaylight OSGi not able to find RDF4J classes even after installing RDF4J bundles

If I use RDF4J with just Maven (no OSGi container), I'm able to utilize all the classes provided by RDF4J. But when I use RDF4J with OpenDaylight, the bundle in which I have used RDF4J classes does not start because of unsatisfied requirements. I'm…
Nitin
  • 86
  • 7
3
votes
2 answers

RDF4J RIO UnsupportedRDFormatException when adding data to an HTTPRepository using a stand-alone application

I have an HTTPRepository initialised with a the URL to the repository. I use a RepositoryConnection to retrieve and add (weather) data to the repository. The data is retrieved from a web service, then transformed into RDF statements, and added to…
Dieudonné
  • 543
  • 1
  • 4
  • 16
3
votes
2 answers

GraphDB sparql endpoint unavailable via sesame / rdf4j SPARQLRepository interface

We are using the RDF4J (formerly sesame) framework to run sparql queries to a remote GraphDB triple store. This works successfully through the rdf4j HTTPRepository interface, which takes the Graphdb server's URL and the repository ID, but fails when…
3
votes
1 answer

Loading big RDF file into Sesame

I'm trying to create a SPARQL endpoint based on Sesame. I installed Tomcat, PostgreSQL, and deployed a Sesame's web application. I created a repository based on PostgreSQL RDF store. Now i need to load a big ttl file (540M triples, file size is…
Dilshod
  • 65
  • 3
2
votes
0 answers

Efficient SPARQL query for specifically typed paths

I've got a function that takes in an arbitrary list of semantic types, and I need to generate a SPARQL query that finds a path containing those types, starting from a start node. Currently I'm writing a pretty naive function, but I'm hoping that it…
Matt McMinn
  • 15,983
  • 17
  • 62
  • 77
2
votes
1 answer

How can I translate a TupleExpr or a ParsedTupleQuery into the Query String?

I want to parse a query using rdf4j's SPARQLParser, modify the underlying query tree (=TupleExpr) and translate it back into a query string. Is there a way to do that with rdf4j? I tried the following but it didn't work SPARQLParser parser = new…
Greenfish
  • 358
  • 2
  • 5
  • 19
2
votes
1 answer

How to configure RDFWriter to explicit write data type in literals?

I'm saving a TTL file using RDFWriter. How can I explicitly save literals with their data type? For example, I want "5.36289"^^xsd:float but I get 5.36289E0 instead. I had the same problem with strings, but I found the…
2
votes
0 answers

How to construct rdf4j Model from oslc4j Domains using rdf4j?

I constructed org.eclipse.lyo.oslc.domains.qm.TestCase and want to transform it into rdf4j Model. Is there a way using rdf4j library? It should be equivalent to JenaModelHelper.createJenaModel(objects);
2
votes
1 answer

Constructing a sparql query using rdf4j

I'm trying to construct a SPARQL query using the rdf4j documentation: https://rdf4j.org/documentation/tutorials/sparqlbuilder/ I am a newbie to java (and stackoverflow, apologies if this is poorly written), but I think I have included the right…
vaishalir
  • 55
  • 3
2
votes
1 answer

How to display distinct pair of students?

How can I display distinct pair of students if I have a relation in my graph like this: :ST1 :read :BOOK1,:BOOK2,:BOOK3. :ST2 :read :BOOK1,:BOOK2. :ST3 :read :BOOK2. And in my select I have something like this: SELECT DISTINCT ?x ?book ?y { ?x…
user1234SI.
  • 1,812
  • 1
  • 8
  • 22
1
2 3
10 11