X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fhttp_getter%2Fhttp_getter.pl.in;h=f4c11e172a94d466f5395242afaf292ba6fdc634;hb=8f89cdd08d9ee0a243cf84201bf42e5503759ee3;hp=c9cac35f2904741994c5b3cc67bdbb34738c7324;hpb=c2ad6c9e76a929cca23276aa0e9dbbfdd1ca469b;p=helm.git diff --git a/helm/http_getter/http_getter.pl.in b/helm/http_getter/http_getter.pl.in index c9cac35f2..f4c11e172 100755 --- a/helm/http_getter/http_getter.pl.in +++ b/helm/http_getter/http_getter.pl.in @@ -318,6 +318,14 @@ while (my $c = $d->accept) { # send back all the keys in xml print "BASEURI $baseuri, FORMAT $outype\n"; $cont = getalluris(); + answer($c,$cont,"text/xml",""); + + # "/getallrdfuris" + } elsif ($http_method eq 'GET' and $http_path eq "/getallrdfuris") { + # send back all the keys in xml + 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") { @@ -468,6 +476,30 @@ sub getalluris { # get all the keys whose prefix is cic return $content; } +sub getallrdfuris { + my $class = $_[0]; + my $content = ""; + my ($uri); + my $debug=1; # for debug + + $content .= '' . "\n"; + $content .= "" . "\n\n"; + $content .= "\n"; + foreach $uri (sort (keys(%rdf_map))) { + 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; +} + sub finduris { # find uris for cic and theory trees generation my ($uritype,$uripattern,$format) = @_; my $content = "";