Spira - Collections

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.

Regards

Stephen

-----------------------

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 => 
RDF::URI("http://data.ordnancesurvey.co.uk/ontology/spatialrelations/touches"), 
:type => String

end

repo = 
RDF::Repository.load("http://data.ordnancesurvey.co.uk/doc/7000000000011103.rdf")
Spira.add_repository(:default, repo)

area = 
OsArea.for(RDF::URI.new('http://data.ordnancesurvey.co.uk/id/7000000000011103'))
puts area.id
puts area.label
puts area.preflabel
puts area.touches

-----------------------

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