[MOBY-guts] biomoby commit
Mark Wilkinson
mwilkinson at pub.open-bio.org
Fri Jul 11 22:22:35 UTC 2003
mwilkinson
Fri Jul 11 18:22:35 EDT 2003
Update of /home/repository/moby/moby-live/Perl/MOBY
In directory pub.open-bio.org:/tmp/cvs-serv14957/MOBY
Modified Files:
Central.pm
Log Message:
still skipping services that don't care about namespaces. This should squash that bug once and for all
moby-live/Perl/MOBY Central.pm,1.97,1.98
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Central.pm,v
retrieving revision 1.97
retrieving revision 1.98
diff -u -r1.97 -r1.98
--- /home/repository/moby/moby-live/Perl/MOBY/Central.pm 2003/07/11 22:16:40 1.97
+++ /home/repository/moby/moby-live/Perl/MOBY/Central.pm 2003/07/11 22:22:35 1.98
@@ -1649,7 +1649,9 @@
my $sth = $dbh->prepare($query);
$sth->execute;
while (my ($id, $nss) = $sth->fetchrow_array){ # get the service instance ID and the namespaces that matched
- if (scalar @{$namespaceURIs}){ # if namespaces were specified, then validate the discovered service against this list
+ if ($nss && scalar @{$namespaceURIs}){ # if this service cares about namespaces at all,
+ # and if namespaces were specified in the query,
+ # then validate the discovered service against this list
my @ns = split ",", $nss; # because of the database structure we have to re-test for *identity*, not just like%% similarity
my %nshash = map {($_, 1)} @ns,@{$namespaceURIs}; #we're going to test identity by building a hash of namespaces as keys
if (scalar(keys %nshash) < scalar(@ns)+scalar(@{$namespaceURIs})){ # if the number of keys is less than the sum of the number of keys goign into the hash, then one of them was identical
@@ -1700,7 +1702,9 @@
my $sth = $dbh->prepare($query);
$sth->execute;
while (my ($id, $nss) = $sth->fetchrow_array){ # get the service instance ID and the namespaces that matched
- if (scalar @{$namespaceURIs}){ # if namespaces were specified, then validate the discovered service against this list
+ if ($nss && scalar @{$namespaceURIs}){ # if this service cares about namespaces at all,
+ # and if namespaces were specified in the query,
+ # then validate the discovered service against this list
my @ns = split ",", $nss; # because of the database structure we have to re-test for *identity*, not just like%% similarity
my %nshash = map {($_, 1)} @ns,@{$namespaceURIs}; #we're going to test identity by building a hash of namespaces as keys
if (scalar(keys %nshash) < scalar(@ns)+scalar(@{$namespaceURIs})){ # if the number of keys is less than the sum of the number of keys goign into the hash, then one of them was identical
More information about the MOBY-guts
mailing list