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
1
vote
1 answer

Keep prefixes in loading and writing TTL file with RDF4J

I need to load a Turtle TTL file, add some triples, then save it again. The original TTL file has a big header containing the prefixes for some namespaces. @prefix biro: . @prefix c4o:
1
vote
0 answers

Does RDF4J's AST allow for SPARQL Query Rewriting?

According to a couple answers here and here, it seems that it might be possible to use the AST produced by RDF4J's SyntaxTreeBuilder to modify a parsed SPARQL query in memory and then serialize it back to a SPARQL string. However, I have not found…
Blake Regalia
  • 2,677
  • 2
  • 20
  • 29
1
vote
1 answer

RDF4J Ontotext GraphDB: prepareUpdate big Sparql-Update String-> Unsupported MIME type: application/x-www-form-urlencoded

Im trying to send a big Sparql-Update String to GraphDB by using RDF4J. It works for small Sparql-Update Strings, but for a big String (ca. 8000 INSERT DATA-Statements) it fails with the…
Only X
  • 37
  • 1
  • 6
1
vote
1 answer

How to configure RDF4J Rio writer to write IRIs with special characters?

I want to write an rdf4j.model.Model with the rdf/turtle format. The model should contain IRIs with the characters {}. When I try to write the RDF model with rdf4j.rio.Rio, the {} characters are written as %7B%7D. Is there a way to overcome this?…
stln
  • 23
  • 4
1
vote
1 answer

Is it possible to retrieve the update statements of an RDF4J transaction?

I am trying to support "dry run" functionality on SPARQL update queries using RDF4J. I want to inform the user of the statements that will be inserted/deleted, ideally by getting the statements from the current transaction. I'm thinking something…
B. Smith
  • 1,063
  • 4
  • 14
  • 23
1
vote
1 answer

How to use the MONTH() function from SPARQL to extract the month of a date in rdf4j?

How do I replicate the following filter from SPARQL in java using rd4j? FILTER(?endDate > NOW() && ?startDate < NOW() && MONTH(?endDate) = MONTH(NOW())) I have initialised expressions for MONTH() and NOW() as follows, and a graph pattern pattern,…
vaishalir
  • 55
  • 3
1
vote
1 answer

GeoSparql functions not working as expected in RDF4J's repository

Colleagues and I are working with RDF dataset and RDF4J's in-Memory repository and we are trying to execute GeoSparql queries while using geometry data in WKT format, as shown below: @prefix geo: . @prefix sf:…
RedCrusaderJr
  • 350
  • 1
  • 12
1
vote
1 answer

How can I decrypt the Triplestore files of an RDF4J database?

I am currently trying to read the files of an RDF4J triplestore from the universAAL platform and put them into an InfluxDB to merge the data from different smart living systems. However, I have noticed that the individual index files of the Native…
1
vote
0 answers

Can GraphDB workbench be used against an existing RDF4J server?

Its not clear whether GraphDB-workbench (https://github.com/Ontotext-AD/graphdb-workbench) can be used against an existing RDF4J install.
1
vote
1 answer

Is there a possibility to batch a select-query with SPARQL and RDF4J?

I am working with a quite large dataset (around 500Mio-Triples) stored in graphDB Free and running on my local developer machine. I want to do some operations with the dataset with RDF4J and have to SELECT more or less the whole dataset. To do a…
onew4y
  • 83
  • 6
1
vote
1 answer

Clearing the internal string cache in rdf4j with sparql

To avoid a possible "XY problem", let me explain my real goal: I am trying to change the capitalization of language tags in an rdf4j repo, using sparql. But although rdf4j stores language tags as written when they were defined, it knows enough to…
alexis
  • 48,685
  • 16
  • 101
  • 161
1
vote
1 answer

imported .owl files have #'s in prefixes vs original rdf4j triplestore

When I import the dump "PathwayCommons12.All.BIOPAX.owl.gz" (linked from this page) of this Virtuoso triplestore, I've noticed that there are "#"s inserted after the prefix of various URIs. In particular, the following query runs on the original…
mkk
  • 879
  • 6
  • 19
1
vote
2 answers

graphDB User/PW proxy settings lead to statuscode 407

I'm trying to run following SPARQL-query on my local graphDB-Instance (GraphDB Free 9.4.1 on Windows). PREFIX wd: PREFIX wdt: PREFIX rdfs:…
onew4y
  • 83
  • 6
1
vote
1 answer

GraphDB or RDF4J bug? BOUND() yields wrong value

There seems to be a problem with the BOUND() function either in Ontotext GraphDB or in RDF4J SPARQL evaluation. The latter is less likely as I cannot reproduce the bug with an in-memory SAIL. Versions: Graphdb Free 9.4.1 (and some earlier versions:…
fkleedorfer
  • 525
  • 4
  • 8
1
vote
1 answer

How to increase max header size for GraphDB standalone server?

I have started graphdb with the following call: /usr/local/graphdb-free-9.4.0/bin/graphdb -Xms60g -Xmx60g -Dgraphdb.connector.port=7200 -s When accessing over HTTP, some of the longer queries generate 400 errors: Type Exception Report Message…
mkk
  • 879
  • 6
  • 19