Author: earle Date: 2005-11-29 07:18:17 +0000 (Tue, 29 Nov 2005) New Revision: 721
Modified: trunk/lib/OpenGuides/RDF.pm trunk/t/21_rdf.t Log: fixes #51
Modified: trunk/lib/OpenGuides/RDF.pm =================================================================== --- trunk/lib/OpenGuides/RDF.pm 2005-11-29 07:09:54 UTC (rev 720) +++ trunk/lib/OpenGuides/RDF.pm 2005-11-29 07:18:17 UTC (rev 721) @@ -95,7 +95,7 @@
my ($is_geospatial, $objType);
- if ($os_x || $os_y || $latitude || $longitude || $address || $postcode || @locales) { + if ($os_x || $os_y || $latitude || $longitude || $address || $postcode || @locales || $opening_hours_text) { $is_geospatial = 1; $objType = 'geo:SpatialThing'; } else { @@ -114,7 +114,6 @@
my $url = $self->{make_node_url}->( $node_name, $version ); my $version_indpt_url = $self->{make_node_url}->( $node_name ); - my $rdf = qq{<?xml version="1.0"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
Modified: trunk/t/21_rdf.t =================================================================== --- trunk/t/21_rdf.t 2005-11-29 07:09:54 UTC (rev 720) +++ trunk/t/21_rdf.t 2005-11-29 07:18:17 UTC (rev 721) @@ -5,7 +5,7 @@ use OpenGuides::Utils; use OpenGuides::Test; use URI::Escape; -use Test::More tests => 26; +use Test::More tests => 27;
eval { require DBD::SQLite; }; my $have_sqlite = $@ ? 0 : 1; @@ -140,4 +140,19 @@ like( $redirect_rdf, qr|<owl:sameAs rdf:resource="/?id=Calthorpe_Arms;format=rdf#obj" />|, "redirecting node gets owl:sameAs to target" );
+ $wiki->write_node( "Nonesuch Stores", + "A metaphysical wonderland", + undef, + { + comment => "Yup.", + username => "Nobody", + opening_hours_text => "Open All Hours", + } + ); + + my $rdfxml = $rdf_writer->emit_rdfxml( node => "Nonesuch Stores" ); + + like( $rdfxml, qr|<geo:SpatialThing rdf:ID="obj" dc:title="Nonesuch Stores">|, + "having opening hours marks node as geospatial" ); + }
openguides-commits@lists.openguides.org