Overview
I am using ARQ in order to query local RDF
files. The query is applied on 5 files which are:
- a_m.nt, description.nt, labels.nt, links.nt, literals.nt
Information is modeled as a set of triples:
- subject predicate object
Algorithm
First I want to select specific topics from a_m.nt file. Second I want to select the labels and descriptions of the selected topics from description.nt and labels.nt. In another way, search description.nt and labels.nt for the descriptions and labels that have the same topic as the one that was extract from a_m.nt. Finally I want to extract the rest of properties from links.nt and literals.nt.
Query
PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
select ?x ?y ?p ?o
where {
?topic rdf:type music.
?topic rdf:description ?x.
?topic rdf:label ?y.
?topic ?p ?o.
}
Command line
sparql --data a_m.nt --data description.nt --data label.nt --data links.nt --data literals.nt --query query_sparql
questions
By using this query, first I select a topic that have the type music
then I select its description, label and other properties. Is that correct?