W3C home > Mailing lists > Public > public-rdf-ruby@w3.org > December 2013

Querying a dataset with inconsistent properties

From: Misty De Meo <mistydemeo@gmail.com>
Date: Thu, 19 Dec 2013 20:08:42 -0800
Message-ID: <CAGLuM17-LsYNfGviGQUKr+UjFjdFGt8Uv2=HiExF9zsDO9Wp_g@mail.gmail.com>
To: public-rdf-ruby@w3.org

I'm constructing a query to fetch SKOS concepts from a set of
concepts. I'm looking to return each concept with all of its
statements, e.g. prefLabel, altLabel, etc. I was using the following
query, specifying the symbol mapping:

RDF::Query.new concept: {
  RDF.type => RDF::SKOS.Concept,
  RDF::SKOS.prefLabel => :prefLabel,
  RDF::SKOS.altLabel => :altLabel,
  RDF::SKOS.broader => :broader,
  RDF::SKOS.related => :related,
  RDF::SKOS.scopeNote => :scopeNote

However, this only returns concepts which have *each* of those
properties - it ignores, for example, concepts which have no `related`
predicates. What would be the best query to use to fetch all concepts
and their properties?

Misty De Meo
Received on Friday, 20 December 2013 10:45:44 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:02:16 UTC