From b8b600d081fb4b2c96dee344348bfad475a6cda6 Mon Sep 17 00:00:00 2001 From: Jonas Date: Sat, 1 Jun 2013 14:09:00 +0200 Subject: Support categories as URIs (not only literals). --- bin/rdf2hours | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/rdf2hours b/bin/rdf2hours index dea675a..6fe6472 100755 --- a/bin/rdf2hours +++ b/bin/rdf2hours @@ -121,12 +121,15 @@ SPARQL my %data; my $iterator = $query->execute($model); while ( my $row = $iterator->next ) { - my $category = $row->{category}->literal_value; + my $category = $row->{category}->as_string; my $name = $row->{name}->literal_value; my $locationcomment = $row->{locationcomment} ? $row->{locationcomment}->literal_value : ''; my $speclabel = $row->{speclabel} ? $row->{speclabel}->literal_value : ''; + # Strip surrounding quotes + $category =~ s/^"(.*)"$/$1/; + # merge identically named locations, tying varying descriptions to spec instead # my $name_key = titledescribe( $name, $locationcomment ); # my $specbundle_key = $speclabel; -- cgit v1.2.3