[MOBY-guts] biomoby commit

Mark Wilkinson mwilkinson at pub.open-bio.org
Mon Sep 22 13:27:47 EDT 2003


mwilkinson
Mon Sep 22 12:27:46 EDT 2003
Update of /home/repository/moby/moby-live/Perl/MOBY
In directory pub.open-bio.org:/tmp/cvs-serv20754/Perl/MOBY

Modified Files:
	CommonSubs.html 
Log Message:
updating online docs

moby-live/Perl/MOBY CommonSubs.html,1.3,1.4
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/CommonSubs.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- /home/repository/moby/moby-live/Perl/MOBY/CommonSubs.html	2003/07/14 16:00:28	1.3
+++ /home/repository/moby/moby-live/Perl/MOBY/CommonSubs.html	2003/09/22 16:27:46	1.4
@@ -24,10 +24,15 @@
 		<li><a href="#getsimplearticleids">getSimpleArticleIDs</a></li>
 		<li><a href="#getsimplearticlenamespaceuri">getSimpleArticleNamespaceURI</a></li>
 		<li><a href="#simpleresponse">simpleResponse</a></li>
+		<li><a href="#collectionresponse">collectionResponse</a></li>
 		<li><a href="#responseheader">responseHeader</a></li>
 		<li><a href="#responsefooter">responseFooter</a></li>
 		<li><a href="#getinputarticles">getInputArticles</a></li>
+		<li><a href="#issimplearticle">isSimpleArticle</a></li>
+		<li><a href="#iscollectionarticle">isCollectionArticle</a></li>
 		<li><a href="#getnodecontentwitharticle">getNodeContentWithArticle</a></li>
+		<li><a href="#validatenamespaces">validateNamespaces</a></li>
+		<li><a href="#extractresponsearticles">extractResponseArticles</a></li>
 	</ul>
 
 </ul>
@@ -130,6 +135,19 @@
             response by calling &amp;simpleResponse() with no arguments.</pre>
 <p>
 </p>
+<h2><a name="collectionresponse">collectionResponse</a></h2>
+<pre>
+ name     : collectionResponse
+ function : wraps a set of articles in the appropriate queryResponse structure
+ usage    : return responseHeader . &amp;collectionResponse(\@objects, 'MyArticleName') . responseFooter;
+ args     : (in order)
+            \@objects - (optional) a listref of MOBY Objects as raw XML
+            $article  - (optional) an articeName for this article
+ notes    : as required by the API you must return a response for every input.
+            If one of the inputs was invalid, you return a valid (empty) MOBY
+            response by calling &amp;collectionResponse() with no arguments.</pre>
+<p>
+</p>
 <h2><a name="responseheader">responseHeader</a></h2>
 <pre>
  name     : responseHeader
@@ -167,8 +185,9 @@
             and/or Collection articles.  These are provided as XML::DOM nodes.
             
             i.e.:  @queries = ([$SIMPLE_DOM_NODE], [$SIMPLE_DOM_NODE2])
+            or  :  @queries = ([$COLLECTION_DOM_NODE], [$COLLECTION_DOM_NODE2])
             
-            is generated from the XML
+            the former is generated from the following XML:
             
                 ...
               &lt;moby:Query&gt;
@@ -182,7 +201,30 @@
                       &lt;Object namespace=blah id=blah/&gt;
                     &lt;/Simple&gt;
                 &lt;/queryInput&gt;
-              &lt;/moby:Query&gt;</pre>
+              &lt;/moby:Query&gt;
+                 ...
+ note     : This subroutine enforces valid message structure
+            in that you may only have one Simple OR one Collection
+            article per queryInput!  if you have more, only the first
+            is read.</pre>
+<p>
+</p>
+<h2><a name="issimplearticle">isSimpleArticle</a></h2>
+<pre>
+ name     : isSimpleArticle
+ function : tests XML (text) or an XML DOM node to see if it represents a Simple article
+ usage    : if (isSimpleArticle($node)){do something to it}
+ input    : an XML::DOM node, an XML::DOM::Document or straight XML
+ returns  : boolean</pre>
+<p>
+</p>
+<h2><a name="iscollectionarticle">isCollectionArticle</a></h2>
+<pre>
+ name     : isCollectionArticle
+ function : tests XML (text) or an XML DOM node to see if it represents a Collection article
+ usage    : if (isCollectionArticle($node)){do something to it}
+ input    : an XML::DOM node, an XML::DOM::Document or straight XML
+ returns  : boolean</pre>
 <p>
 </p>
 <h2><a name="getnodecontentwitharticle">getNodeContentWithArticle</a></h2>
@@ -225,6 +267,27 @@
                      print &quot;Sequence was &quot;.(join &quot;&quot;, @sequence).&quot;\n&quot;; # join all lines of string
                  }   
               }</pre>
+<p>
+</p>
+<h2><a name="validatenamespaces">validateNamespaces</a></h2>
+<pre>
+ name     : validateNamespaces
+ function : checks the namespace ontology for the namespace lsid
+ usage    : @LSIDs = validateNamespaces(@namespaces)
+ args     : ordered list of either human-readable or lsid presumptive namespaces
+ returns  : ordered list of the LSID's corresponding to those
+            presumptive namespaces; undef for each namespace that was invalid</pre>
+<p>
+</p>
+<h2><a name="extractresponsearticles">extractResponseArticles</a></h2>
+<pre>
+ name     : extractResponseArticles
+ function : get the DOM nodes corresponding to individual
+            Simple or Collection outputs from a MOBY Response
+ usage    : ($collections, $simples) = extractResponseArticles($node)
+ args     : $node - either raw XML or an XML::DOM::Document to be searched            
+ returns  : an array-ref of Collection article XML::DOM::Node's
+            an array-ref of Simple article XML::DOM::Node's</pre>
 
 </body>
 



More information about the MOBY-guts mailing list