[MOBY-guts] biomoby commit
Mark Wilkinson
mwilkinson at pub.open-bio.org
Sat Nov 1 09:06:35 EST 2003
mwilkinson
Sat Nov 1 09:06:35 EST 2003
Update of /home/repository/moby/moby-live/Perl/lsid/authority
In directory pub.open-bio.org:/tmp/cvs-serv31179
Modified Files:
PredicateResolver.pm metadata.pl
Log Message:
fixing the class LSID resolver and making more useful error messages
moby-live/Perl/lsid/authority PredicateResolver.pm,1.1,1.2 metadata.pl,1.5,1.6
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/lsid/authority/PredicateResolver.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Perl/lsid/authority/PredicateResolver.pm 2003/11/01 14:00:57 1.1
+++ /home/repository/moby/moby-live/Perl/lsid/authority/PredicateResolver.pm 2003/11/01 14:06:35 1.2
@@ -18,7 +18,7 @@
};
sub resolve_mobyPredicate {
- my ($class_db_params, $ls) = @_;
+ my ($ls) = @_;
my $lsid= LS::ID->new($ls)->canonical;
unless ($lsid) {
_die('Malformed LSID', 200);
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/lsid/authority/metadata.pl,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- /home/repository/moby/moby-live/Perl/lsid/authority/metadata.pl 2003/11/01 13:35:12 1.5
+++ /home/repository/moby/moby-live/Perl/lsid/authority/metadata.pl 2003/11/01 14:06:35 1.6
@@ -24,6 +24,7 @@
use ClassResolver qw(:all);
use ServiceResolver qw(:all);
use RelationshipResolver qw(:all);
+use PredicateResolver qw(:all);
my %known_types = ( # switch on/off various LSID-namespace resolvers.
'namespacetype' => 1,
@@ -32,6 +33,7 @@
'servicerelation' => 1,
'objectrelation' => 1,
'serviceinstance' => 0,
+ 'rdfpredicates' => 1,
);
MetaData();
@@ -65,7 +67,7 @@
_die('Malformed LSID', 200);
}
unless ($known_types{$1}){
- _die("unknown LSID namespace $1 : $known_types{$1}; known types are ".(keys %known_types)."\n", 404);
+ _die("unknown LSID namespace $1; known types are ".(join ",", (keys %known_types))."\n", 404);
}
return resolve_namespacetype($namespacedb,$lsid) if $1 eq "namespacetype";
@@ -73,6 +75,7 @@
return resolve_servicetype($servicedb,$lsid) if $1 eq "servicetype";
return resolve_relationshiptype($relationshipdb,$lsid) if $1 eq "objectrelation";
return resolve_relationshiptype($relationshipdb,$lsid) if $1 eq "servicerelation";
+ return resolve_mobyPredicate($lsid) if $1 eq "rdfpredicates";
}
More information about the MOBY-guts
mailing list