summaryrefslogtreecommitdiff
path: root/bin/rdf2hours
diff options
context:
space:
mode:
authorJonas <dr@jones.dk>2013-06-01 14:09:00 +0200
committerJonas <dr@jones.dk>2013-06-01 14:09:00 +0200
commitb8b600d081fb4b2c96dee344348bfad475a6cda6 (patch)
treecaa64b38e28a6f838544f018b9197770a7778bb3 /bin/rdf2hours
parent8bee3d8e43b15619327694fa47ba6050e5bd91cd (diff)
Support categories as URIs (not only literals).
Diffstat (limited to 'bin/rdf2hours')
-rwxr-xr-xbin/rdf2hours5
1 files changed, 4 insertions, 1 deletions
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;