From 0f333ccc50c5b6c3adb817f8b237a010e86db498 Mon Sep 17 00:00:00 2001 From: Claudio Sacerdoti Coen Date: Mon, 24 Jun 2002 17:11:49 +0000 Subject: [PATCH] class parameter added to the getallrdfuris method. Values may be forward or backward. --- helm/http_getter/http_getter.pl.in | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/helm/http_getter/http_getter.pl.in b/helm/http_getter/http_getter.pl.in index 0acf0ca34..f4c11e172 100755 --- a/helm/http_getter/http_getter.pl.in +++ b/helm/http_getter/http_getter.pl.in @@ -323,8 +323,9 @@ while (my $c = $d->accept) { # "/getallrdfuris" } elsif ($http_method eq 'GET' and $http_path eq "/getallrdfuris") { # send back all the keys in xml - print "BASEURI $baseuri, FORMAT $outype\n"; - $cont = getallrdfuris(); + my $class = $cgi->param('class'); + print "BASEURI $baseuri, FORMAT $outype, CLASS $class\n"; + $cont = getallrdfuris($class); answer($c,$cont,"text/xml",""); } elsif ($http_method eq 'GET' and $http_path eq "/ls") { @@ -476,6 +477,7 @@ sub getalluris { # get all the keys whose prefix is cic } sub getallrdfuris { + my $class = $_[0]; my $content = ""; my ($uri); my $debug=1; # for debug @@ -485,8 +487,14 @@ sub getallrdfuris { $content .= "\"$myownurl/getdtd?uri=alluris.dtd\">" . "\n\n"; $content .= "\n"; foreach $uri (sort (keys(%rdf_map))) { - print "GETALLRDFURI: $uri\n" if defined($debug); - $content .= "\t\n"; + if ($class eq "forward" && + $uri =~ /^helm:rdf:www.cs.unibo.it\/helm\/rdf\/forward/ + || + $class eq "backward" && + $uri =~ /^helm:rdf:www.cs.unibo.it\/helm\/rdf\/backward/) { + print "GETALLRDFURI: $uri\n" if defined($debug); + $content .= "\t\n"; + } } $content .= "\n"; return $content; -- 2.39.2