[MOBY-guts] biomoby commit

Mark Wilkinson mwilkinson at pub.open-bio.org
Thu Jul 10 20:43:09 UTC 2003


mwilkinson
Thu Jul 10 16:43:09 EDT 2003
Update of /home/repository/moby/moby-live/Perl/MOBY
In directory pub.open-bio.org:/tmp/cvs-serv6261/MOBY

Modified Files:
	OntologyServer.pm 
Log Message:
All sorts of changes to make the LSID vs. common name flexibility bulletproof (so long as you are working within a moby: namespace).

moby-live/Perl/MOBY OntologyServer.pm,1.25,1.26
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/OntologyServer.pm,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- /home/repository/moby/moby-live/Perl/MOBY/OntologyServer.pm	2003/07/10 19:41:38	1.25
+++ /home/repository/moby/moby-live/Perl/MOBY/OntologyServer.pm	2003/07/10 20:43:09	1.26
@@ -170,6 +170,8 @@
 sub objectExists{
     my ($self, %args) = @_;
     my $term = $args{term};
+    $term =~ s/^moby://;   # if the term is namespaced, then remove that
+
     return (0, "WRONG ONTOLOGY!",'') unless ($self->ontology eq 'object');
     my $sth;
     if ($term =~ /^urn\:lsid/){
@@ -306,6 +308,8 @@
     return (0, "WRONG ONTOLOGY!",'') unless ($self->ontology eq 'relationship');
 
     my $term = lc($args{term});
+    $term =~ s/^moby://;   # if the term is namespaced, then remove that
+
     my $ont = $args{ontology};
     return (0, "requires both term and ontology arguments\n",'') unless (defined($term) && defined($ont));
     my $sth;    
@@ -409,6 +413,7 @@
     my ($self, %args) = @_;
     return (0, "WRONG ONTOLOGY!",'') unless ($self->ontology eq 'service');
     my $term = $args{term};
+    $term =~ s/^moby://;   # if the term is namespaced, then remove that
 
     my $sth;
     if ($term =~ /^urn\:lsid/){
@@ -506,6 +511,8 @@
     my ($self, %args) = @_;
     return (0, "WRONG ONTOLOGY!",'') unless ($self->ontology eq 'namespace');
     my $term = $args{term};
+    $term =~ s/^moby://;   # if the term is namespaced, then remove that
+
     my $sth;
     if ($term =~ /^urn\:lsid/){
         $sth = $self->dbh->prepare("select namespace_id, namespace_type, namespace_lsid,description, authority, contact_email from namespace where namespace_lsid = ?");




More information about the MOBY-guts mailing list