From: Claudio Sacerdoti Coen Date: Wed, 24 Oct 2001 10:35:32 +0000 (+0000) Subject: The cache now supports different RDF URI schema at the same time. X-Git-Tag: v0_1_3~56 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=529448c8bb647bad602f320248c1b7268c5f946f;p=helm.git The cache now supports different RDF URI schema at the same time. --- diff --git a/helm/http_getter/http_getter.pl.in b/helm/http_getter/http_getter.pl.in index 6c6a7340e..fd88194bf 100755 --- a/helm/http_getter/http_getter.pl.in +++ b/helm/http_getter/http_getter.pl.in @@ -144,12 +144,20 @@ while (my $c = $d->accept) { } my $filename = $inputuri; + my $prefix; if (not isRdfUri($inputuri)) { # standad cic: or theory: uri $filename =~ s/^cic:(.*)/$1/; $filename =~ s/^theory:(.*)/$1/; } else { # rdf uri + # The "helm:rdf/<<...>>//cic:" prefix is kept, but quoted + # (so that a "helm:rdf/<<...>>//cic:" dir is created + $prefix = $filename; $filename =~ s/^(.*)\/\/cic:(.*)/$2/; $filename =~ s/^(.*)\/\/theory:(.*)/$2/; + $prefix =~ s/\Q$filename\E//; + $prefix =~ s/_/__/g; + $prefix =~ s/\//_/g; + $filename = $prefix.$filename; } my $url = resolve ($inputuri); # resolve uri in url @@ -170,7 +178,7 @@ while (my $c = $d->accept) { if (not isRdfUri ($inputuri)) { # save in uri std cache dir $filename = $helm_dir.$filename.$extension; } else { # save in rdf metadata cache dir - $filename = $helm_rdf_dir.$filename.$extension; + $filename = $helm_rdf_dir."/".$filename.$extension; } print_request($inputuri,$url,$filename); @@ -734,6 +742,7 @@ sub helm_wget { } sub update { +# retie dbs untie %map; tie(%map, 'DB_File', $uris_dbm.".db", O_RDWR, 0664); untie %rdf_map; @@ -819,3 +828,6 @@ sub update_dbs { tie(%rdf_map, 'DB_File', $rdf_dbm.".db", O_RDWR, 0664); } # update_dbs +# vim modline: do not remove! +# vim: set ft=perl: +