diff options
author | Jonas <dr@jones.dk> | 2013-06-01 14:09:00 +0200 |
---|---|---|
committer | Jonas <dr@jones.dk> | 2013-06-01 14:09:00 +0200 |
commit | b8b600d081fb4b2c96dee344348bfad475a6cda6 (patch) | |
tree | caa64b38e28a6f838544f018b9197770a7778bb3 /bin | |
parent | 8bee3d8e43b15619327694fa47ba6050e5bd91cd (diff) |
Support categories as URIs (not only literals).
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/rdf2hours | 5 |
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; |