Author: earle Date: 2008-01-18 21:19:16 +0000 (Fri, 18 Jan 2008) New Revision: 1133
Modified: trunk/lib/OpenGuides/RDF.pm trunk/templates/node_rdf.tt Log: Add map link to RDF output. Closes #26.
Modified: trunk/lib/OpenGuides/RDF.pm =================================================================== --- trunk/lib/OpenGuides/RDF.pm 2008-01-17 00:30:25 UTC (rev 1132) +++ trunk/lib/OpenGuides/RDF.pm 2008-01-18 21:19:16 UTC (rev 1133) @@ -83,7 +83,7 @@
foreach my $var ( qw( phone fax website opening_hours_text address postcode city country latitude longitude - os_x os_y summary ) ) { + os_x os_y map_link summary ) ) { my $val = $metadata{$var}[0] || $defaults{$var} || ""; $tt_vars{$var} = $val; } @@ -105,7 +105,7 @@ # Check for geospatialness and define container object as appropriate. my $is_geospatial; foreach my $var ( qw( os_x os_y latitude longitude address postcode - opening_hours_text ) ) { + opening_hours_text map_link ) ) { $is_geospatial = 1 if $tt_vars{$var}; }
Modified: trunk/templates/node_rdf.tt =================================================================== --- trunk/templates/node_rdf.tt 2008-01-17 00:30:25 UTC (rev 1132) +++ trunk/templates/node_rdf.tt 2008-01-18 21:19:16 UTC (rev 1133) @@ -10,6 +10,7 @@ xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:os="http://downlode.org/Code/RDF/Ordnance_Survey/schema/1#" xmlns:owl="http://www.w3.org/2002/07/owl#" + xmlns:map="http://www.daml.org/2001/06/map/map-ont#" xmlns="http://www.w3.org/2000/10/swap/pim/contact#"
@@ -61,6 +62,12 @@ <country>[% country %]</country> [% END %]
+ [% IF map_link %] + foaf:page + <map:Map rdf:about="[% map_link %]" /> + </foaf:page> + [% END %] + [% FOREACH locale = locales %] foaf:based_near <wn:Neighborhood rdf:ID="[% locale.id %]">
openguides-commits@lists.openguides.org