X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fhttp_getter%2Fhttp_getter.pl.in;h=0acf0ca348df80d45be4121810a657d0b02d8822;hb=7e755543523fd1dc050e062b277996b0c9f4752e;hp=f3484d68845d38099360016ebb4e29aec508b74b;hpb=fe80ede918357f2f3c27133d27319bf026d71163;p=helm.git
diff --git a/helm/http_getter/http_getter.pl.in b/helm/http_getter/http_getter.pl.in
index f3484d688..0acf0ca34 100755
--- a/helm/http_getter/http_getter.pl.in
+++ b/helm/http_getter/http_getter.pl.in
@@ -313,7 +313,20 @@ while (my $c = $d->accept) {
print " done\n";
html_nice_answer($c,"Update done");
- # "/ls" does not work with rdf uris
+ # "/getalluris" does not work with rdf uris
+ } elsif ($http_method eq 'GET' and $http_path eq "/getalluris") {
+ # 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
+ print "BASEURI $baseuri, FORMAT $outype\n";
+ $cont = getallrdfuris();
+ answer($c,$cont,"text/xml","");
+
} elsif ($http_method eq 'GET' and $http_path eq "/ls") {
# send back keys that begin with a given uri
my ($uritype,$uripattern,$uriprefix);
@@ -443,6 +456,42 @@ sub resolve { # resolve an uri in a url, work both with standard cic: or theory:
}
}
+sub getalluris { # get all the keys whose prefix is cic
+ my $content = "";
+ my ($uri);
+ my $debug=1; # for debug
+
+ $content .= '' . "\n";
+ $content .= "" . "\n\n";
+ $content .= "\n";
+ foreach $uri (sort (keys(%xml_map))) { # select matching uris
+ if ($uri =~ /^cic:/ && not $uri =~ /.types$/) {
+ print "GETALLURI: $uri\n" if defined($debug);
+ $content .= "\t\n";
+ }
+ }
+ $content .= "\n";
+ return $content;
+}
+
+sub getallrdfuris {
+ my $content = "";
+ my ($uri);
+ my $debug=1; # for debug
+
+ $content .= '' . "\n";
+ $content .= "" . "\n\n";
+ $content .= "\n";
+ foreach $uri (sort (keys(%rdf_map))) {
+ 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 = "";