[MOBY-guts] biomoby commit

Mark Wilkinson mwilkinson at pub.open-bio.org
Tue Jul 1 15:00:48 UTC 2003


mwilkinson
Tue Jul  1 11:00:48 EDT 2003
Update of /home/repository/moby/moby-live/Perl/scripts
In directory pub.open-bio.org:/tmp/cvs-serv18230/scripts

Modified Files:
	MOBY-Client05.cgi 
Log Message:
ServiceInstance now returns one of two new object types - Simple and Collection article objects (see documentation) rather than strings in response to the ->input and ->ouptut method calls.  Client is updated to read this properly (I hope).  This should make it much easier to determine the inputs and outputs of a service... no XML parsing required :-)

moby-live/Perl/scripts MOBY-Client05.cgi,1.2,1.3
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/scripts/MOBY-Client05.cgi,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- /home/repository/moby/moby-live/Perl/scripts/MOBY-Client05.cgi	2003/06/25 21:10:05	1.2
+++ /home/repository/moby/moby-live/Perl/scripts/MOBY-Client05.cgi	2003/07/01 15:00:48	1.3
@@ -452,10 +452,25 @@
             my ($URI) = $_->authority;
             my ($name) = $_->name;
             my ($type) = $_->type;
-            my $obj = $_->output;
+            my $objs = $_->output;
+            my $output = "(";
+            foreach (@{$objs}){
+                if ($_->isSimple){
+                    $output .= "Simple:".($_->objectType)." ,";
+                } else {
+                    $output .= "Collection:[";
+                    foreach my $simp(@{$_->Simples}){
+                        $output .= ($simp->objectType).",";
+                    }
+                    chop $output;
+                    $output .="],";
+                }
+            }
+            chop $output;
+            $output .=") ";
             my $desc = $_->description;
-            $URI ||=""; $name ||=""; $type ||=""; $obj ||=""; $desc ||="";  # set default for next print statement or we choke!
-            $popup_services{"$URI#$name"} = "$type returns $obj  @"."$URI : $desc";
+            $URI ||=""; $name ||=""; $type ||=""; $output ||=""; $desc ||="";  # set default for next print statement or we choke!
+            $popup_services{"$URI#$name"} = "$type returns $output  @"."$URI : $desc";
         }
     }
     $response .= popup_menu(-name => 'SelectedService',




More information about the MOBY-guts mailing list