W3C home > Mailing lists > Public > public-rdf-ruby@w3.org > January 2011

Spira - Collections

From: Stephen Pope <stephen.pope@eduserv.org.uk>
Date: Thu, 6 Jan 2011 10:00:09 +0000
Message-ID: <4D2592A9.2080206@eduserv.org.uk>
To: <public-rdf-ruby@w3.org>
Hi all,

I am using Spira to process ordanance survey RDF data and I had a quick 
question about collections..

I have defined a simple class for my test .. but :touches has 4 
references .. currently this code just returns the first URI .. is there 
a way or concept of a collection within the Spira object so it would 
return all 4 URI's as an array ?

Hope that makes sense. This is a really great way for creating and 
processing RDF.




class OsArea
   include Spira::Resource

   base_uri "http://data.ordnancesurvey.co.uk/id"

   property :id, :predicate =>  
RDF::URI("http://data.ordnancesurvey.co.uk/ontology/admingeo/hasUnitID"), :type 
=> Integer
   property :label, :predicate => RDFS.label, :type => String
   property :preflabel, :predicate => SKOS.prefLabel, :type => String
   property :touches, :predicate => 
:type => String


repo = 
Spira.add_repository(:default, repo)

area = 
puts area.id
puts area.label
puts area.preflabel
puts area.touches

Received on Thursday, 6 January 2011 11:42:25 UTC

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