Questions tagged [arq]

A query engine for Jena that supports the SPARQL RDF Query language

A query engine for Jena that supports the SPARQL RDF Query language.

Features

  • Standard SPARQL
  • Free text search via Lucene
  • SPARQL/Update
  • Access and extension of the SPARQL algebra
  • Support for custom filter functions
  • Property functions for custom processing of semantic relationships
  • Aggregation, GROUP BY and assignment as SPARQL extensions
  • Support for federated query
  • Support for extension to other storage systems
  • Client-support for remote access to any SPARQL endpoint

Documentation

74 questions
1
vote
0 answers

Element Transform Apache Jena

I have a query like this: SELECT ?r ?r1 ?r2 ?r3 ?r4 WHERE { ?r ?r1 ?r2 ; ?r3 ?r4 } I want to transform every triple with a optional element like: SELECT ?r ?r1 ?r2 ?r3 ?r4 ?r5 WHERE { {?r ?r1 ?r2 .} OPTIONAL {?r ?r1 ?r5 .} …
Adrika
  • 51
  • 2
1
vote
1 answer

Issue with binding values from sub selection in Jena ARQ

I want to run the following simple testing query: PREFIX rdf: PREFIX vcard: SELECT ?givenName ?name_count ?temp WHERE { BIND(if(( ?name_count = 2 ), "just…
Zorz Bronze
  • 31
  • 1
  • 4
1
vote
0 answers

Remove triple Apache Jena

I would like to remove a triple which its object is a literal I am trying the following but I am getting the error that the object has to be an RDFNode which in my graph it isn't model.remove(myDeeds.get(i), LOCAH + "/associatedWith",…
Martha
  • 111
  • 7
1
vote
2 answers

How to match an exact word through SPARQL

My application needs to match the correct word i.e. say C or C++ with SPARQL. I have the following SPARQL query String prolog = "PREFIX kb: <" + VBOOK.getURI() + ">"; String queryString = prolog + "\n" + "SELECT * " + "WHERE {?x kb:Price ?price.…
Archana
  • 237
  • 3
  • 9
  • 17
1
vote
1 answer

Jena TDB physical query plan with multiple FROM clauses

I am trying to figure out how Jena TDB handles SPARQL queries with multiple FROM clauses on the physical query plan level. I would like to know how Jena TDB handles executing a query over different graphs. I have made some small experiments and…
1
vote
1 answer

Custom SPARQL Construct with enumeration

Is it possible to execute SPARQL construct while adding information outside the scope of query? e.g., I want to execute SPARQL construct while defining enumeration information like this: PREFIX skos: construct…
FJE
  • 319
  • 1
  • 3
  • 11
1
vote
0 answers

want to find java files from source code of Apache-Jena that implements triple(rdf) to graph construction

I have downloaded the source code of Apache-Jena. Now I want to analyse graph construction in Apache-Jena. I searched a lot. But unable to find the java files that convert triples (subject, predicate and object) into graphs. Since I know rdf…
Abhishek Raj
  • 478
  • 7
  • 17
1
vote
1 answer

How to set a property path in Jena's Sparql API?

I would like to avoid passing SPARQL queries around as Strings. Therefore I use Jena's API for creating my queries. Now I need a PropertyPath in my query, but I can't find any Java class supporting this. Can you give me a hint? Here's some example…
Andreas
  • 303
  • 1
  • 17
1
vote
1 answer

property function extension sparql

I want to write a property function extension sparql with arq jena, how can I write? Request: SELECT * WHERE {?Person f:Next(name) ?x.} my function code: import java.io.BufferedInputStream; import java.io.FileInputStream; import…
1
vote
1 answer

Handle more than one OWL files in a same JENA application

I am making an application which may require about 2-3 OWL files to work with, in order to serve different task for the same application. I am using Jena as my semantic web framework. My question is: How do we organize/setup these owl files? Should…
1
vote
3 answers

Using a bound variable to refer to a GRAPH in SPARQL

I have used bound variables of Uri from triple patterns as GRAPH arguments before but when I use the result of the BIND/URI/CONCAT shown below it is not behaving as expected: it is not matching any known graph. I have checked the ?graph variable is…
Interition
  • 381
  • 2
  • 15
1
vote
1 answer

Jena ARQ/TDB Query Optimization

I have a rather small graph containing roughly 500k triples. I've also generated the stats.opt file and running my code on a rather fast computer (quad core, 16gb ram, ssd drive.) But for the query I'm building with the help of the OP interface, it…
Daniel Gerber
  • 3,226
  • 3
  • 25
  • 32
1
vote
2 answers

SPARQL Update query over local files

I am trying to update local rdf files with SPARQL Update queries using jena arq. Following is the code GraphStore graphstore = GraphStoreFactory.create(); UpdateRequest req = UpdateFactory.create(); req.add(" PREFIX : myprefixuri INSERT DATA {…
1
vote
1 answer

Jena StmtIterator and database

I have my model stored in a triple store(persistence). I want to select all individuals related by some document name. I can do it in 2 ways 1) SPARQL request: PREFIX base: select ?s2 ?p2 ?o2 where { {?doc…
GML-VS
  • 1,101
  • 1
  • 9
  • 34
0
votes
2 answers

Can't use ODM beanie API inside celery/arq task

When there are operations on beanie documents in the task code, the beanie.exceptions.CollectionWasNotInitialized error is thrown. And everything works well if the same functions are called as ordinary functions, not tasks. There are probably some…