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
0 answers

Clearing a named graph in GraphDB free is slow

Clearing a named graph with many triples through rdf4j with clear(context) function is slow. Even, manually deleting a named graph through the graphdb interface http://localhost:7200/graphs is slow. I tried to play with the JVM memory according to…
zoe vas
  • 281
  • 9
  • 25
1
vote
1 answer

RDF4J SPARQL query to JSON

I am trying to move data from a SPARQL endpoint to a JSONObject. Using RDF4J. RDF4J documentation does not address this directly (some info about using endpoints, less about converting to JSON, and nothing where these two cases meet up). Sofar I…
Rob G
  • 123
  • 3
  • 15
1
vote
1 answer

GraphDB dots in repository ID?

I noticed that GraphDB, in contrast to RDF4J, does not allow dots in repository IDs. We have versioned repositories containing some taxonomies. The version number is used in repository ID, so for example: taxonomy-0.1.3. While this works fine in…
kidney
  • 2,663
  • 17
  • 23
1
vote
1 answer

RDF4J SAIL API implementation

I am trying to build a federated RDF application based on rdf4j and FedX. What I need is to be able to: Optimize the querying plan and joining strategies. To expose different and heterogeneous databases (A timeseries or a relational DB for example)…
M.Taki_Eddine
  • 160
  • 2
  • 11
1
vote
1 answer

SPARQL query formation

I have RDF data and I want to form a SPARQL query to fetch records that match with a particular organism name. Just FYI, I used RDF4J to generate RDF records using JSONLD data available. I am having problem in fetching records that match any…
1
vote
1 answer

Performing a SHACL valdiation on a GraphDB repository using RDF4J

We are trying to run a full SHACL valdiation on a GraphDB 9.1 (free version) repository (as part of a comparative analysis). For this we try to use RDF4J (3.0.3) as mentioned in the beginning of the…
D. Proksch
  • 11
  • 1
1
vote
1 answer

rdf4j construct query fails

I'm trying to execute a construct query over Wikidata using the following code snippet: construct = "CONSTRUCT { " + " ?s ?wikipedia ." + "} where { " + " OPTIONAL{ " + " …
D063520
  • 113
  • 6
1
vote
1 answer

How to get a path between IRIs or between two nodes of certain rdf:type using a SPARQL query?

Trying to execute a query using rdf4j console against a sparql endpoint to find the path between 2 nodes using property wildcards but no luck. The first query gives an error as Malformed query: Not a valid (absolute) IRI: The second query crashes…
elixir
  • 173
  • 2
  • 13
1
vote
1 answer

SPARQL Create Graph if does not exist already

I am trying to formulate a SPARQL query that will create a new graph with ID if does not already exist. If it does exist, the query should return "Graph Exist". I am using RDF4J with SPARQL queries. PREFIX app: …
1
vote
1 answer

RDF4j ParsedQuery or TupleExpr to String Represenation

I have a SPARQL query and I want to replace some of the URIs it contains based on a dictionary. I constructed a AbstractQueryModelVisitor that does that, i.e., it substitutes the URIs I want. But once they are substituted, I'm not sure how to get…
D063520
  • 113
  • 6
1
vote
1 answer

RDF4j v3.0.0 Export graph without inferred triples in it

in version 3.0.0, since inferred triples are added into an actual graph (not into the default as before), is it somehow possible to export/fetch an actual graph without the inferred triples? Thanks a lot.
Marko.V.
  • 11
  • 1
1
vote
1 answer

RDF4J: "Failed to get server protocol" error on EC2 but not locally

I'm getting the following error while running a query from Java with RDF4J on an EC2 server (it works fine locally). java_1 | 30-Aug-2019 13:51:50.511 SEVERE [http-nio-8080-exec-1]…
KevLoughrey
  • 281
  • 1
  • 9
1
vote
1 answer

RDF4J not filtering TreeModel in expected way

I have a TTL with something like ex:isDataProperty rdf:type owl:DatatypeProperty . ex:Article a owl:Class ; owl:hasKey ( ex:isDataProperty ) . And when I load the model with RDF4J (as a TreeModel) then try to filter to extract the…
1
vote
0 answers

When is using VALUES in SPARQL not equivalent to replacing directly the variable with a URI in the query itself?

Following the question at Difference in performance between using VALUES keyword and using directly the URI in the query?, I learned that using a VALUES clause at the end of the query is not always equivalent in terms of performance and query…
ThomasFrancart
  • 470
  • 3
  • 13
1
vote
0 answers

SPARQL performance in property path query Sesame / rdf4j

Let's say I want to find all subjects which are connected with objects via property path. The connection could be represented: Subject - prop 1 -> A - prop 2 -> B - prop 3 -> Object This could be achieved by quite simple SPARQL query: SELECT ?s…