[MOBY-guts] biomoby commit

Mark Wilkinson mwilkinson at pub.open-bio.org
Mon Feb 23 21:31:53 UTC 2004


mwilkinson
Mon Feb 23 16:31:53 EST 2004
Update of /home/repository/moby/moby-live/Perl/scripts/Services
In directory pub.open-bio.org:/tmp/cvs-serv7531/Services

Modified Files:
	LocalServices.pm 
Log Message:
updating my services to remove illegal whitespace from objects that inherit from a primitive.  Will send a note about this to the mailing list with further comment

moby-live/Perl/scripts/Services LocalServices.pm,1.61,1.62
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/scripts/Services/LocalServices.pm,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -r1.61 -r1.62
--- /home/repository/moby/moby-live/Perl/scripts/Services/LocalServices.pm	2004/02/10 01:17:04	1.61
+++ /home/repository/moby/moby-live/Perl/scripts/Services/LocalServices.pm	2004/02/23 21:31:53	1.62
@@ -92,10 +92,10 @@
     my ($caller, $data) = @_;
     my $MOBY_RESPONSE;
     my (@inputs)= genericServiceInputParser($data); # ([SIMPLE, $queryID, $simple],...)
-    return SOAP::Data->type('base64' => responseHeader("illuminae.com") . responseFooter()) unless (scalar(@inputs));
+    return SOAP::Data->type('base64' => responseHeader("illuminae.com") . responseFooter()) unless (scalar(@inputs)); # invalid - return empty
 
     my ($validNS) = validateNamespaces("taxon");  # ONLY do this if you are intending to be namespace aware!
-    return SOAP::Data->type('base64' => (responseHeader("illuminae.com") . responseFooter)) unless $validNS;
+    return SOAP::Data->type('base64' => (responseHeader("illuminae.com") . responseFooter)) unless $validNS; # invalid - return empty
 
     foreach (@inputs){
         my ($articleType, $qID, $input) = @{$_};
@@ -118,7 +118,6 @@
 			$MOBY_RESPONSE .= collectionResponse(\@simples, "", $qID);
         }
     }
-	print STDERR responseHeader("illuminae.com") . $MOBY_RESPONSE . responseFooter;
     return SOAP::Data->type('base64' => (responseHeader("illuminae.com") . $MOBY_RESPONSE . responseFooter));    
 }
 
@@ -153,7 +152,6 @@
 			$MOBY_RESPONSE .= collectionResponse(\@simples, "", $qID);
         }
     }
-	print STDERR responseHeader("illuminae.com") . $MOBY_RESPONSE . responseFooter;
     return SOAP::Data->type('base64' => (responseHeader("illuminae.com") . $MOBY_RESPONSE . responseFooter));    
 }
 
@@ -187,7 +185,6 @@
 			$MOBY_RESPONSE .= collectionResponse(\@simples, "", $qID);
         }
     }
-	print STDERR responseHeader("illuminae.com") . $MOBY_RESPONSE . responseFooter;
     return SOAP::Data->type('base64' => (responseHeader("illuminae.com") . $MOBY_RESPONSE . responseFooter));    
 }
 
@@ -222,7 +219,6 @@
 			$MOBY_RESPONSE .= collectionResponse(\@simples, "", $qID);
         }
     }
-	print STDERR responseHeader("illuminae.com") . $MOBY_RESPONSE . responseFooter;
     return SOAP::Data->type('base64' => (responseHeader("illuminae.com") . $MOBY_RESPONSE . responseFooter));    
 }
 
@@ -257,7 +253,6 @@
 			$MOBY_RESPONSE .= collectionResponse(\@simples, "", $qID);
         }
     }
-	print STDERR responseHeader("illuminae.com") . $MOBY_RESPONSE . responseFooter;
     return SOAP::Data->type('base64' => (responseHeader("illuminae.com") . $MOBY_RESPONSE . responseFooter));    
 }
 
@@ -295,7 +290,6 @@
 			$MOBY_RESPONSE .= collectionResponse(\@simples, "", $qID);
         }
     }
-	print STDERR responseHeader("illuminae.com") . $MOBY_RESPONSE . responseFooter;
     return SOAP::Data->type('base64' => (responseHeader("illuminae.com") . $MOBY_RESPONSE . responseFooter));    
 }
 
@@ -333,7 +327,6 @@
 			$MOBY_RESPONSE .= collectionResponse(\@simples, "", $qID);
         }
     }
-	print STDERR responseHeader("illuminae.com") . $MOBY_RESPONSE . responseFooter;
     return SOAP::Data->type('base64' => (responseHeader("illuminae.com") . $MOBY_RESPONSE . responseFooter));    
 }
 
@@ -367,7 +360,6 @@
 			$MOBY_RESPONSE .= collectionResponse(\@simples, "", $qID);
         }
     }
-	print STDERR responseHeader("illuminae.com") . $MOBY_RESPONSE . responseFooter;
     return SOAP::Data->type('base64' => (responseHeader("illuminae.com") . $MOBY_RESPONSE . responseFooter));    
 }
 
@@ -401,7 +393,6 @@
 			$MOBY_RESPONSE .= collectionResponse(\@simples, "", $qID);
         }
     }
-	print STDERR responseHeader("illuminae.com") . $MOBY_RESPONSE . responseFooter;
     return SOAP::Data->type('base64' => (responseHeader("illuminae.com") . $MOBY_RESPONSE . responseFooter));    
 }
 
@@ -428,7 +419,6 @@
 			$parent && ($MOBY_RESPONSE .= simpleResponse("<Object namespace='taxon' id='$parent'/>", "", $qID));
         }
     }
-	print STDERR responseHeader("illuminae.com") . $MOBY_RESPONSE . responseFooter;
     return SOAP::Data->type('base64' => (responseHeader("illuminae.com") . $MOBY_RESPONSE . responseFooter));    
 }
 
@@ -453,13 +443,12 @@
             (($MOBY_RESPONSE .= simpleResponse("", "", $qID)) && next) unless ($namespace eq $validNS);
 			my $name = SHoundGetTaxNameFromTaxID($identifier);
             (($MOBY_RESPONSE .= simpleResponse("", "", $qID)) && next) unless ($name);
-			$name && ($MOBY_RESPONSE .= simpleResponse("<String namespace='taxon' id='$identifier'>
-													   <CrossReference>
-													   <Object namespace='Global_Keyword' id='$name'/>
-													   </CrossReference>$name</String>", "", $qID));
+			$name && ($MOBY_RESPONSE .= simpleResponse("<String namespace='taxon' id='$identifier'>".
+													   "<CrossReference>".
+													   "<Object namespace='Global_Keyword' id='$name'/>".
+													   "</CrossReference>$name</String>", "", $qID));
         }
     }
-	print STDERR responseHeader("illuminae.com") . $MOBY_RESPONSE . responseFooter;
     return SOAP::Data->type('base64' => (responseHeader("illuminae.com") . $MOBY_RESPONSE . responseFooter));    
 }
 
@@ -668,22 +657,22 @@
 				(($MOBY_RESPONSE .= simpleResponse("", "", $qID)) && next) unless $gi;
 				my $gb = SHoundGetGenBankff($gi);
 	            (($MOBY_RESPONSE .= simpleResponse("", "", $qID)) && next) unless $gb;
-				$MOBY_RESPONSE .= simpleResponse("<genbank-flatfile namespace='NCBI_gi' id='$gi'>
-					<CrossReference>
-						<Object namespace='$ns' id='$identifier'/>
-					</CrossReference>
-					<![CDATA[$gb]]></genbank-flatfile>",
+				$MOBY_RESPONSE .= simpleResponse("<genbank-flatfile namespace='NCBI_gi' id='$gi'>".
+					"<CrossReference>".
+						"<Object namespace='$ns' id='$identifier'/>".
+					"</CrossReference>".
+					"<![CDATA[$gb]]></genbank-flatfile>",
 					"", $qID);
 			} else {
 				my $gi = SHoundFindName($identifier);
 				(($MOBY_RESPONSE .= simpleResponse("", "", $qID)) && next) unless $gi;
 				my $gb = SHoundGetGenBankff($gi);
 	            (($MOBY_RESPONSE .= simpleResponse("", "", $qID)) && next) unless $gb;
-				$MOBY_RESPONSE .= simpleResponse("<genbank-flatfile namespace='NCBI_gi' id='$gi'>
-					<CrossReference>
-						<Object namespace='$ns' id='$identifier'/>
-					</CrossReference>
-					<![CDATA[$gb]]></genbank-flatfile>",
+				$MOBY_RESPONSE .= simpleResponse("<genbank-flatfile namespace='NCBI_gi' id='$gi'>".
+					"<CrossReference>".
+						"<Object namespace='$ns' id='$identifier'/>".
+					"</CrossReference>".
+					"<![CDATA[$gb]]></genbank-flatfile>",
 					"", $qID);
 			}
 		}
@@ -916,22 +905,22 @@
 				(($MOBY_RESPONSE .= simpleResponse("", "", $qID)) && next) unless $gi;
 				my $gb = SHoundGetFasta($gi);
 	            (($MOBY_RESPONSE .= simpleResponse("", "", $qID)) && next) unless $gb;
-				$MOBY_RESPONSE .= simpleResponse("<FASTA namespace='NCBI_gi' id='$gi'>
-					<CrossReference>
-						<Object namespace='$ns' id='$identifier'/>
-					</CrossReference>
-					<![CDATA[$gb]]></FASTA>",
+				$MOBY_RESPONSE .= simpleResponse("<FASTA namespace='NCBI_gi' id='$gi'>".
+					"<CrossReference>".
+						"<Object namespace='$ns' id='$identifier'/>".
+					"</CrossReference>".
+					"<![CDATA[$gb]]></FASTA>",
 					"", $qID);
 			} else {
 				my $gi = SHoundFindName($identifier);
 				(($MOBY_RESPONSE .= simpleResponse("", "", $qID)) && next) unless $gi;
 				my $gb = SHoundGetFasta($gi);
 	            (($MOBY_RESPONSE .= simpleResponse("", "", $qID)) && next) unless $gb;
-				$MOBY_RESPONSE .= simpleResponse("<FASTA namespace='NCBI_gi' id='$gi'>
-					<CrossReference>
-						<Object namespace='$ns' id='$identifier'/>
-					</CrossReference>
-					<![CDATA[$gb]]></FASTA>",
+				$MOBY_RESPONSE .= simpleResponse("<FASTA namespace='NCBI_gi' id='$gi'>".
+					"<CrossReference>".
+						"<Object namespace='$ns' id='$identifier'/>".
+					"</CrossReference>".
+					"<![CDATA[$gb]]></FASTA>",
 					"", $qID);
 			}
 		}
@@ -991,11 +980,11 @@
 					if ($res->is_success) {  # if successful, then base64 encide the data
 						my $image_data = encode_base64($res->content);  # and create the simple image object
 	#					push @simples, "<moby:b64_encoded_jpeg namespace='$namespace_LSID' id='$Allele'>$image_data</moby:b64_encoded_jpeg>";  # push it onto the collection list
-						push @simples, qq{<SimpleAnnotatedJPEGImage namespace="DragonDB_Allele" id="$identifier">
-										  <CrossReference>
-										  <Object namespace="DragonDB_Gene" id="$Locus"/>
-										  </CrossReference>$image_data<String namespace="" id="" articleName="Description">$picdesc</String>
-										  </SimpleAnnotatedJPEGImage>};
+						push @simples, "<SimpleAnnotatedJPEGImage namespace='DragonDB_Allele' id='$identifier'>".
+										  "<CrossReference>".
+										  "<Object namespace='DragonDB_Gene' id='$Locus'/>".
+										  "</CrossReference>$image_data<String namespace='' id='' articleName='Description'>$picdesc</String>".
+										  "</SimpleAnnotatedJPEGImage>";
 					} # no else
 				}
 			}




More information about the MOBY-guts mailing list