[MOBY-guts] biomoby commit
Mark Wilkinson
mwilkinson at pub.open-bio.org
Mon Jul 14 16:00:18 UTC 2003
mwilkinson
Mon Jul 14 12:00:18 EDT 2003
Update of /home/repository/moby/moby-live/Perl/MOBY
In directory pub.open-bio.org:/tmp/cvs-serv842/MOBY
Modified Files:
CommonSubs.pm
Log Message:
Added an example of a complete MOBY service to act as a template. THIS HAS NOT YET BEEN TESTED
moby-live/Perl/MOBY CommonSubs.pm,1.3,1.4
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/CommonSubs.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- /home/repository/moby/moby-live/Perl/MOBY/CommonSubs.pm 2003/07/14 15:52:14 1.3
+++ /home/repository/moby/moby-live/Perl/MOBY/CommonSubs.pm 2003/07/14 16:00:18 1.4
@@ -16,6 +16,27 @@
my $ns = getSimpleArticleNamespaceURI($SimpleArticle);
+A COMPLETE EXAMPLE OF A SIMPLE MOBY SERVICE
+
+ sub myServiceName {
+ my ($caller, $query) = @_; # get the incoming MOBY query XML
+ my @queries = getInputArticles($query); # returns DOM nodes
+ my $MOBY_RESPONSE = ""; # set empty response
+
+ foreach (@queries){
+ my @inputs = @{$_}; #(may be more than one Simple/Collection input per query)
+ foreach my $input(@inputs){
+ @sequence = getNodeContentWithArticle($_, "String", "SequenceString");
+ my $sequence = join "", @sequence; # join all lines of string
+ # print STDERR "Analyzing $sequence\n";
+ my $result = &_AnalyzeString($sequence); # do your analysis
+ $MOBY_RESPONSE .= simpleResponse($result, "outputArticlename");
+ }
+ }
+ return responseHeader . $MOBY_RESPONSE . responseFooter;
+ }
+
+
=head1 DESCRIPTION
Used to do various transactions with MOBY-Central registry, including registering
More information about the MOBY-guts
mailing list