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

68 questions
16
votes
2 answers

How to write SPARQL query that efficiently matches string literals while ignoring case

I am using Jena ARQ to write a SPARQL query against a large ontology being read from Jena TDB in order to find the types associated with concepts based on rdfs label: SELECT DISTINCT ?type WHERE { ?x
lmsurprenant
  • 1,236
  • 1
  • 9
  • 20
10
votes
2 answers

DBpedia SPARQL Querying for a specific rdfs:label

Basically I have a query (shown below) which works efficiently. However, I want my search to be more precise where the label is the actual string 'yago' rather than containing the string 'yago'. I want to try to do it without filters if possible as…
Sam
  • 1,231
  • 2
  • 12
  • 16
6
votes
2 answers

Querying with Spaces Sparql

Say if I want to return the result "having fun" of the triple. I don't know how to account for the space in between the words. Below is a query I tried but it didn't work. Let me know if anyone can spot what I doing wrong
Sam
  • 1,231
  • 2
  • 12
  • 16
6
votes
1 answer

How to reduce the size of the TDB-backed Jena Dataset?

I am working with a simple Jena dataset, which only has a single ~30 MB RDF file imported. As a part of the application, I am trying to let users query the default graph (or a named graph) and insert the resulting triples from the query into a new…
paul
  • 641
  • 1
  • 5
  • 12
5
votes
2 answers

ARQ Making a Query from Scratch

I have a problem in building the query from scratch syntactically or in algebra, based on https://jena.apache.org/documentation/query/manipulating_sparql_using_arq.html For example I have the below query SELECT (count(?instance) AS ?count) WHERE …
Ajshk
  • 51
  • 1
5
votes
1 answer

Escape special characters in SPARQL queries

I'm trying to query dpbedia to get the categories of some wikipedia articles using Jena and ARQ For example: select ?category { dbpedia:ARTICLE_NAME dcterms:subject ?category } Here is an example of a working query SPARQL results The problem is…
paskun
  • 79
  • 1
  • 6
5
votes
1 answer

tbloader vs SPARQL INSERT - Why different behaviour with named graphs?

There is a strange behaviour in the connection of the commandline tools of ARQ, TDB and Named Graphs. If importing data via tdbloader in a named graph it can not be queried via GRAPH clause in a SPARQL SELECT query. However, this query is possible…
mgraube
  • 380
  • 1
  • 14
4
votes
1 answer

SPARQL: BIND of same variable outside and inside a group

Is the use of BIND valid? # Query 1 SELECT * { BIND ( as ?p) { BIND ( as ?p) ?s ?p ?o } } When run on turtle data: @prefix h: . h:s1 h:p1 h:o1 . h:s2 h:p2 h:o2 . arq 3.11.0 gives as…
zut
  • 796
  • 4
  • 12
3
votes
1 answer

NoSuchMethod when trying to create a SPARQL query with jena

I am trying to make some SPARQL queries using vc-db-1.rdf and q1.rq from ARQ examples. Here is my java code: import com.hp.hpl.jena.rdf.model.*; import com.hp.hpl.jena.util.FileManager; import com.hp.hpl.jena.query.* ; import…
twonegatives
  • 3,050
  • 15
  • 29
3
votes
1 answer

SPARQL Querying Transitive different versions of arq

Basically I got a SPARQL query below which works with the arq 2.8.8 but doesn't work with arq2.8.4 as it doesnt recognise the + symbol. I really want a query which can work on the arq 2.8.4 version which is similar to the one I posted. The query I…
Sam
  • 1,231
  • 2
  • 12
  • 16
3
votes
3 answers

Can't PREFIX hierarchies with SPARQL

I have a need to represent a hierarchy in my URL's like this: http://www.me.org/ -----------------root1/ -----------------------level1/ ------------------------------level2/etc I want to define PREFIX's and used them in a SPARQL query like…
Interition
  • 381
  • 2
  • 15
3
votes
1 answer

How to generate uniform bindings for rename operation

I have a dataset wherein I'm attempting to replace an individual that matches certain criteria with another individual. In the minimal example provided, I am looking to replace x-data://old with x-data://new. Example input dataset:
Rob Hall
  • 2,318
  • 12
  • 19
3
votes
2 answers

Jena/Arq: Query Processing get stuck

if have a problem with the following SPARQL-query: PREFIX rdf: PREFIX owl: PREFIX xsd: PREFIX rdfs:…
dawagna
  • 33
  • 3
3
votes
1 answer

UNION and intersection using SPARQL queries

I am converting user-defined-queries into SPARQL. For example, when user says, "abc", it means give me all nodes of a given type which have some attribute named "abc". As an extension of this, if user says, "abc or (pqr and lmn)", I need to find…
Ksh Padalkar
  • 241
  • 2
  • 7
2
votes
1 answer

Is there a way to create several indexes in LARQ and execute SPARQL on them

I want to index two different OntModel and execute sparql queries on them. For example: String query = "PREFIX fise: \n" + "PREFIX pf: \n" …
suat
  • 3,979
  • 2
  • 24
  • 45
1
2 3 4 5