Re: retrieve a list of all distinct/unique resources in a store/repo

Try Enumerable#terms (or similar): http://www.rubydoc.info/github/ruby-rdf/rdf/RDF/Enumerable#terms-instance_method

Gregg Kellogg
Sent from my iPhone

> On Nov 20, 2017, at 11:47 AM, Anthony Durity <a.durity@umail.ucc.ie> wrote:
> 
> Replying to self:
> 
> If using
>     repo = RDF::DataObjects::Repository.new uri: 'sqlite3:./db/development.sqlite3'
> Is it as simple as
>     repo.terms
> ?
> 
> What about the SPARQL-y route?
> 
>> On 20 November 2017 at 16:42, Anthony Durity <a.durity@umail.ucc.ie> wrote:
>> Hi all,
>> 
>> Trying to get a one dimensional array of all unique/distinct resources in local store regardless be the resource a subject, predicate or object.
>> 
>> To emphasize. I don't want distinct triples, I want distinct resources (excluding literals and blank nodes).
>> 
>> Both SPARQL-y and non SPARQL-y (Ruby RDF) answers welcome.
>> 
>> Thanks!
>> 
>> 
> 

Received on Monday, 20 November 2017 23:53:42 UTC