# "/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") {
}
sub getallrdfuris {
+ my $class = $_[0];
my $content = "";
my ($uri);
my $debug=1; # for debug
$content .= "\"$myownurl/getdtd?uri=alluris.dtd\">" . "\n\n";
$content .= "<allrdfuris>\n";
foreach $uri (sort (keys(%rdf_map))) {
- print "GETALLRDFURI: $uri\n" if defined($debug);
- $content .= "\t<uri value=\"$uri\"/>\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<uri value=\"$uri\"/>\n";
+ }
}
$content .= "</allrdfuris>\n";
return $content;