[MOBY-guts] biomoby commit

Mark Wilkinson mwilkinson at pub.open-bio.org
Fri Jun 6 00:45:47 UTC 2003


mwilkinson
Thu Jun  5 20:45:47 EDT 2003
Update of /home/repository/moby/moby-live/Perl/MOBY/Client
In directory pub.open-bio.org:/tmp/cvs-serv2184/Client

Modified Files:
	Central.html Central.pm Registration.html Registration.pm 
Log Message:
updating and cleaning up pod documentation.  Committing new HTML documentation.  Will update website right away.  Can now retrieve a WSDL file for a service which is sufficient for 'stubbing', but it doesn't contain an object definition (XSD).

moby-live/Perl/MOBY/Client Central.html,1.1,1.2 Central.pm,1.28,1.29 Registration.html,1.1,1.2 Registration.pm,1.3,1.4
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Client/Central.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Perl/MOBY/Client/Central.html	2003/06/05 19:08:19	1.1
+++ /home/repository/moby/moby-live/Perl/MOBY/Client/Central.html	2003/06/06 00:45:47	1.2
@@ -93,17 +93,17 @@
  Args      :    Registries - optional.
                            - takes the form
                               {$NAME1 => {
-                                                                  URL => $URL,
-                                                                  URI => $URI},
-                                                           $NAME2 => {
-                                                                  URL => $URL,
-                                                                  URI => $URI},
-                               }
+                                    URL => $URL,
+                                    URI => $URI},
+                               $NAME2 => {
+                                    URL => $URL,
+                                    URI => $URI},
+                                }
                             - by default this becomes
                             {MOBY_Central => {
-                                                                URL =&gt; '<a href="http://mobycentral.cbr.nrc.ca/cgi-bin/MOBY-Central.pl">http://mobycentral.cbr.nrc.ca/cgi-bin/MOBY-Central.pl</a>',
-                                                                URI =&gt; '<a href="http://mobycentral.cbr.nrc.ca/MOBY/Central">http://mobycentral.cbr.nrc.ca/MOBY/Central</a>'}
-                            }
+                                 URL =&gt; '<a href="http://mobycentral.cbr.nrc.ca/cgi-bin/MOBY-Central.pl">http://mobycentral.cbr.nrc.ca/cgi-bin/MOBY-Central.pl</a>',
+                                 URI =&gt; '<a href="http://mobycentral.cbr.nrc.ca/MOBY/Central">http://mobycentral.cbr.nrc.ca/MOBY/Central</a>'}
+                             }
  Discussion:    Each registry must have a different
                 NAME.  If you have more than one
                 registry with the same NAME, only
@@ -131,14 +131,14 @@
  Returns   :    MOBY::Registration object
  Args      :    objectType =&gt; &quot;the name of the Object&quot;
                 description =&gt; &quot;a human-readable description of the object&quot;
-                                contactEmail =&gt; &quot;your at email.address&quot;
+                contactEmail =&gt; &quot;your at email.address&quot;
                 authURI =&gt; &quot;URI of the registrar of this object&quot;
-                            Relationships =&gt; {
-                                        relationshipType1 =&gt; [
-                                                [Object1, articleName],
-                                                [Object2, articleName]],
-                                        relationshipType2 =&gt; [
-                                                [Object1, articleName]]}</pre>
+                Relationships =&gt; {
+                    relationshipType1 =&gt; [
+                        [Object1, articleName],
+                        [Object2, articleName]],
+                    relationshipType2 =&gt; [
+                        [Object1, articleName]]}</pre>
 <p>
 </p>
 <h2><a name="deregisterobject_a.k.a._deregisterobjectclass">deregisterObject a.k.a. deregisterObjectClass</a></h2>
@@ -160,7 +160,7 @@
  Args      :    serviceType        =&gt; $serviceType
                 description =&gt; &quot;human readable description&quot;
                 Relationships =&gt; [[$relationshipType1, \@services],
-                                [$relationshipType2, \@services]]
+                                  [$relationshipType2, \@services]]
                 contactEmail =&gt; &quot;your at email.address.here&quot;
                 authURI =&gt; &quot;your.authority.info&quot;</pre>
 <p>
@@ -212,33 +212,35 @@
      URL    =&gt;  $URL_TO_SERVICE</pre>
 <pre>
     input:      listref; (articleName may be undef) 
-                input =&gt;[
-                                        [articleName1,[objType1 =&gt; \@namespaces]], # Simple
-                    [articleName2,       [[objType2 =&gt; \@namespaces]]], # collection of one object type
-                    [articleName3,[[objType3 =&gt; \@namespaces],
-                                                                  [objType4 =&gt; \@namespaces]]] # collection of multiple object types
-                 ]</pre>
+            input =&gt;[
+                     [articleName1,[objType1 =&gt; \@namespaces]], # Simple
+                     [articleName2,       [[objType2 =&gt; \@namespaces]]], # collection of one object type
+                     [articleName3,[[objType3 =&gt; \@namespaces],
+                                    [objType4 =&gt; \@namespaces]]] # collection of multiple object types
+                    ]</pre>
 <pre>
     output:  listref; (articleName may be undef)
-                output =&gt;[
-                                        [articleName1,[objType1 =&gt; \@namespaces]], # Simple
-                    [articleName2,[[objType2 =&gt; \@namespaces]]], # collection of one object type
-                    [articleName3,[[objType3 =&gt; \@namespaces],
-                                                                  [objType4 =&gt; \@namespaces]]] # collection of multiple object types
-                 ]
+            output =&gt;[
+                 [articleName1,[objType1 =&gt; \@namespaces]], # Simple
+                 [articleName2,[[objType2 =&gt; \@namespaces]]], # collection of one object type
+                 [articleName3,[[objType3 =&gt; \@namespaces],
+                                [objType4 =&gt; \@namespaces]]] # collection of multiple object types
+                  ]
             
     secondary: hashref
-                secondary =&gt; {parametername1 =&gt; {datatype =&gt; TYPE,
-                                                                                default =&gt; DEFAULT,
-                                                                                max =&gt; MAX,
-                                                                                min =&gt; MIN,
-                                                                                enum =&gt; [one, two]},
-                                        parametername2 =&gt; {datatype =&gt; TYPE,
-                                                                                default =&gt; DEFAULT,
-                                                                                max =&gt; MAX,
-                                                                                min =&gt; MIN,
-                                                                                enum =&gt; [one, two]}
-                                          }</pre>
+            secondary =&gt; {parametername1 =&gt; {
+                            datatype =&gt; TYPE,
+                            default =&gt; DEFAULT,
+                            max =&gt; MAX,
+                            min =&gt; MIN,
+                            enum =&gt; [one, two]},
+                          parametername2 =&gt; {
+                            datatype =&gt; TYPE,
+                            default =&gt; DEFAULT,
+                            max =&gt; MAX,
+                            min =&gt; MIN,
+                            enum =&gt; [one, two]}
+                          }</pre>
 <p>
 </p>
 <h2><a name="registerservicewsdl">registerServiceWSDL</a></h2>
@@ -265,103 +267,29 @@
  Args      :    
      serviceName  =&gt; $serviceName,  
      serviceType  =&gt; $serviceType,  
-     authURI      =&gt; $authURI,      
-         authoritative =&gt; 1,
+     authURI      =&gt; $authURI,
+     authoritative =&gt; 1,
      category  =&gt;  &quot;moby&quot; | &quot;cgi&quot; | &quot;soap&quot; (currently only moby supported)
-         expandObjects =&gt; 1,
-         expandServices =&gt; 1,
-     URL    =&gt;  $U'RL_TO_SERVICE
-         keywords =&gt; [kw1, kw2, kw3]
-                
-                input =&gt;{
-                                        articleName1 =&gt; [objType1 =&gt; [ns1, ns2...]], # Simple
-                    articleName2 =&gt; [[objType2 =&gt; [ns3, ns4...]]], # collection of one object type
-                    articleName3 =&gt; [[objType3 =&gt; [ns3, ns4...]], [objType4 =&gt; [ns5, ns6]]], # collection of multiple object types
-               }</pre>
-<pre>
-                output =&gt;{
-                                        articleName1 =&gt; [objType1 =&gt; [ns1, ns2...]], # Simple
-                    articleName2 =&gt; [[objType2 =&gt; [ns3, ns4...]]], # collection of one object type
-                    articleName3 =&gt; [[objType3 =&gt; [ns3, ns4...]], [objType4 =&gt; [ns5, ns6]]], # collection of multiple object types
-               }
-  
-=cut</pre>
-<p>sub findService {</p>
-<pre>
-        my ($self, %a) = @_;
-        my $id = $a{'serviceID'};
-    my $servicename = $a{'servicename'}; $servicename |=&quot;&quot;;
-        my $authoritative = $a{'authoritative'}; $authoritative |= 0;
-        my $serviceType  = $a{'serviceType'}; $serviceType |= &quot;&quot;;
-    my $authURI = $a{'authURI'}; $authURI |=&quot;&quot;;
-    my $category  = $a{'category'}; $category |=  &quot;moby&quot; ;
-    my $exObj = $a{'expandObjects'}; $exObj |=0;
-        my $exServ = $a{'expandServices'}; $exServ |= 0;
-        my $kw = $a{'keywords'};
-        ref($kw) =~ /array/i || return $self-&gt;errorRegXML(&quot;invalid structure of keywords.  Expected arrayref&quot;);
-        my @kw = @{$kw};
-        
-        my $message = &quot;&lt;findService&gt;
-&lt;authoritative&gt;$authoritative&lt;/authoritative&gt;
-&lt;Category&gt;$category&lt;/Category&gt;
-&lt;serviceType&gt;$serviceType&lt;/serviceType&gt;
-&lt;serviceName&gt;$servicename&lt;/serviceName&gt;
-&lt;authURI&gt;$authURI&lt;/authURI&gt;;
-&lt;expandObjects&gt;$exObj&lt;/expandObjects&gt; 
-&lt;expandServices&gt;$exServ&lt;/expandServices&gt;
-&lt;keywords&gt;\n&quot;;
-        foreach (@kw){
-         $message .=&quot;&lt;keyword&gt;$kw&lt;/keyword&gt;\n&quot;;
-        }
-        $message .=&quot;&lt;/keywords&gt;\n&quot;;</pre>
-<pre>
-        my %IN = %{$a{input}}; 
-        my %OUT = %{$a{output}};
-        my %funkyhash = ( Input =&gt; \%IN, Output =&gt; \%OUT);
-        while (my ($inout, $param) = each %funkyhash){
-                my $inout_lc = lc ($inout);
-                my %PARAM = %{$param};
-                $message .= &quot;&lt;${inout_lc}Objects&gt;&lt;${inout}&gt;\n&quot;;
-                while (my ($articleName, $def) = each %PARAM){
-                        my @Objects; #
-                        unless (ref($def) =~ /array/i){return $self-&gt;errorRegXML(&quot;invalid structure of $inout objects, expected arrayref for article $articleName&quot;)}
-                        my @objectdefs;                 
-                        if ((ref $def-&gt;[0]) =~ /array/i){ # collection
-                                # def= [[objType2 =&gt; [ns3, ns4...]], ...]
-                                $message .=&quot;&lt;Collection&gt;\n&quot;;
-                                @objectdefs = @{$def};                                  
-                        } else {  # Nipple
-                                @objectdefs = ($def);
-                                # def = [objType1 =&gt; [ns1, ns2...]],
-                        }
-                        
-                        foreach my $objectdef(@objectdefs){
-                                $message .=&quot;&lt;Simple articleName='$articleName'&gt;\n&quot;;
-                                my ($type, $Namespaces) = @{$objectdef};
-                                $message .=&quot;&lt;objectType&gt;$type&lt;/objectType&gt;\n&quot;;
-                                unless (ref($Namespaces) =~ /array/i){return $self-&gt;errorRegXML(&quot;invalid structure of $inout namespaces for object $type in article $articleName; expected arrayref&quot;)}
-                                foreach my $ns(@{$Namespaces}){
-                                        $message .=&quot;&lt;Namespace&gt;$ns&lt;/Namespace&gt;\n&quot;;
-                                }
-                                $message .=&quot;&lt;/Simple&gt;\n&quot;;
-                        }
-                        if ((ref($def-&gt;[0])) =~ /array/i){
-                                $message .=&quot;&lt;/Collection&gt;\n&quot;;
-                        }
-                }
-                $message .= &quot;&lt;/${inout}&gt;&lt;/${inout_lc}Objects&gt;\n&quot;;
-        }
-        $message .= &quot;&lt;/findService&gt;\n&quot;;
-        
-        my $return = $self-&gt;SOAP_connection-&gt;call(findService =&gt; ($message))-&gt;paramsall;    
-        return ($self-&gt;parseRegXML($return));</pre>
-<p>}</p>
+     expandObjects =&gt; 1,
+     expandServices =&gt; 1,
+     URL    =&gt;  $URL_TO_SERVICE
+     keywords =&gt; [kw1, kw2, kw3]
+     input =&gt;{
+              articleName1 =&gt; [objType1 =&gt; [ns1, ns2...]], # Simple
+              articleName2 =&gt; [[objType2 =&gt; [ns3, ns4...]]], # collection of one object type
+              articleName3 =&gt; [[objType3 =&gt; [ns3, ns4...]], [objType4 =&gt; [ns5, ns6]]], # collection of multiple object types
+             }</pre>
+<pre>
+     output =&gt;{
+              articleName1 =&gt; [objType1 =&gt; [ns1, ns2...]], # Simple
+              articleName2 =&gt; [[objType2 =&gt; [ns3, ns4...]]], # collection of one object type
+              articleName3 =&gt; [[objType3 =&gt; [ns3, ns4...]], [objType4 =&gt; [ns5, ns6]]], # collection of multiple object types
+             }</pre>
 <p>
 </p>
 <h2><a name="retrieveservice">retrieveService</a></h2>
 <pre>
 
- NOT YET IMPLEMENTED
  Title     :    retrieveService  
  Usage     :    $WSDL = $MOBY-&gt;retrieveService(%args)
  Function  :    get the WSDL definition of the service with this name/authority URI
@@ -438,204 +366,7 @@
  Usage     :    $objects = $MOBY-&gt;DUMP(['registry'])
  Function  :    DUMP the mysql for the current MOBY Central database
  Returns   :    text
- Args      :    $reg - name of MOBY Central you want to use if not default
-                
-=cut</pre>
-<p><table cellspacing="0" cellpadding="0"><tr><td>sub DUMP {
-<tr><td><td>my ($self)= shift;
-<tr><td><td>my ($reg) = shift;
-<tr><td><td>my $type = shift;</table></p>
-<pre>
-        $reg =$reg?$reg:$self-&gt;default_MOBY_servername;
-        return undef unless ($self-&gt;SOAP_connection($reg));
-        my $return = $self-&gt;SOAP_connection($reg)-&gt;call('DUMP')-&gt;paramsall;     
-    return $return;    
-}</pre>
-<p><table cellspacing="0" cellpadding="0"><tr><td>sub ISA {
-<tr><td><td>my ($self)= shift;
-<tr><td><td>my ($obj) = shift;
-<tr><td><td>my ($reg) = shift;
-<tr><td><td>return undef unless $obj;
-<tr><td><td>my $message = ``
-<tr><td><td>&lt;ISA&gt;
-<tr><td><td> &lt;objectType&gt;$obj&lt;/objectType&gt;
-<tr><td><td>&lt;/ISA&gt;'';</table></p>
-<pre>
-        $reg =$reg?$reg:$self-&gt;default_MOBY_servername;
-        return undef unless ($self-&gt;SOAP_connection($reg));
-        my $return = $self-&gt;SOAP_connection($reg)-&gt;call('ISA' =&gt; ($message))-&gt;paramsall;
-        #&lt;Relationships&gt;
-        #   &lt;objectType&gt;QueryObject&lt;/objectType&gt;
-        #   &lt;ISA&gt;
-        #         &lt;objectType&gt;ParentObject&lt;/objectType&gt;
-        #         ...
-        #         ...
-        #    &lt;/ISA&gt;
-        #       &lt;HASA&gt;
-        #         &lt;objectType&gt;ContainedObject&lt;/objectType&gt;
-        #         ...
-        #         ...
-        #       &lt;/HASA&gt;
-        #&lt;/Relationships&gt;
-    my $parser = new XML::DOM::Parser;
-    my $doc = $parser-&gt;parse($return);
-    my $root = $doc-&gt;getDocumentElement;
-        my @ISAs = &amp;_nodeArrayContent($doc, &quot;ISA&quot;);
-        my @HASA = &amp;_nodeArrayContent($doc, &quot;HASA&quot;);
-    return (\@ISAs, \@HASA);
-}</pre>
-<p>sub _parseServices {
-    my ($self, $Registry, $XML) = @_;
-    my $Parser = new XML::DOM::Parser;
-    my $doc = $Parser-&gt;parse($XML);
-    my $Object = $doc-&gt;getDocumentElement();
-	my $Services = $Object-&gt;getElementsByTagName(``Service'');
-    my $num = $Services-&gt;getLength;
-    my @Services;
-    for (my $x = 0; $x &lt; $num; $x++){
-        my $Service = $Services-&gt;item($x);
-        my $AuthURI = $Service-&gt;getAttributeNode('authURI')-&gt;getValue;
-        my $servicename = $Service-&gt;getAttributeNode('serviceName')-&gt;getValue;
-        my $Type = &amp;_nodeTextContent($Service, 'serviceType');
-        my $Output = &amp;_nodeTextContent($Service, 'outputObject');
-        my $Description = &amp;_nodeTextContent($Service, 'Description');
-        my $cat = &amp;_nodeTextContent($Service, 'Category');
-</p>
-<pre>
-
-        my $Instance = MOBY::Client::ServiceInstance-&gt;new(
-            authority =&gt; $AuthURI,
-            name =&gt; $servicename,
-            type =&gt; $Type,
-            category =&gt; $cat,
-            output =&gt; $Output,
-            description =&gt; $Description,
-                        registry        =&gt; $Registry,
-                                                         );
-        push @Services, $Instance;
-    }
-    return @Services;
-}</pre>
-<p><table cellspacing="0" cellpadding="0"><tr><td>sub parseRegXML {
-<tr><td><td>#&lt;MOBYRegistration&gt;
-<tr><td><td>#<td>&lt;id&gt;$id&lt;/id&gt;
-<tr><td><td>#<td>&lt;success&gt;$success&lt;/success&gt;
-<tr><td><td>#<td>&lt;message&gt;&lt;![CDATA[$message]]&gt;&lt;/message&gt;
-<tr><td><td>#&lt;/MOBYRegistration&gt;
-<tr><td><td>my ($self, $xml) = @_;
-<tr><td><td>my $Parser = new XML::DOM::Parser;
-</table></p>
-<pre>
-
-        my $doc = $Parser-&gt;parse($xml);
-        my $Object = $doc-&gt;getDocumentElement();
-        my $obj = $Object-&gt;getTagName;
-        return undef unless ($obj eq 'MOBYRegistration');
-        my $id = &amp;_nodeTextContent($Object, 'id');
-        my $success = &amp;_nodeTextContent($Object, 'success');
-        my $message = &amp;_nodeTextContent($Object, 'message');
-        my $reg = MOBY::Client::Registration-&gt;new(
-                success         =&gt; $success,
-                message         =&gt; $message,
-                registration_id =&gt; $id,);
-        return $reg;    
-}</pre>
-<p>sub errorRegXML {
-	my ($self, $message) = @_;
-	my $reg = MOBY::Client::Registration-&gt;new(
-		success		=&gt; 0,
-		error_message 	=&gt; $message,
-		registration_id	=&gt; -1,);
-	return $reg;	
-}</p>
-<p>sub _nodeTextContent {
-	# will get text of **all** child $node from the given $DOM
-	# regardless of their depth!!
-    my ($DOM, $node) = @_;
-    my $x = $DOM-&gt;getElementsByTagName($node);
-	unless ($x-&gt;item(0)){print ``no child nodes for $node in \n'',$DOM-&gt;toString,``\n''};
-    my @child = $x-&gt;item(0)-&gt;getChildNodes;
-    my $content;
-    foreach (@child){
-        #print $_-&gt;getNodeTypeName, ``\t'', $_-&gt;toString,``\n'';
-        next unless $_-&gt;getNodeType == TEXT_NODE;
-        $content = $_-&gt;toString;
-    }
-    return $content;
-}</p>
-<p>sub _nodeArrayContent {
-	# will get array content of all child $node from given $DOM
-	# regardless of depth!
-    my ($DOM, $node) = @_;
-	$debug &amp;&amp; &amp;_LOG(``_nodeArrayContext received DOM:  '', $DOM-&gt;toString,``\nsearching for node $node\n'');
-    my @result;
-    my $x = $DOM-&gt;getElementsByTagName($node);
-    my @child = $x-&gt;item(0)-&gt;getChildNodes;
-    foreach (@child){
-        next unless $_-&gt;getNodeType == ELEMENT_NODE;
-        my @child2 = $_-&gt;getChildNodes;
-        foreach (@child2){
-            #print $_-&gt;getNodeTypeName, ``\t'', $_-&gt;toString,``\n'';
-            next unless $_-&gt;getNodeType == TEXT_NODE;
-            push @result, $_-&gt;toString;
-        }
-    }
-    return @result;
-}</p>
-<p>sub AUTOLOAD {
-    no strict ``refs'';
-    my ($self, $newval) = @_;</p>
-<pre>
-    $AUTOLOAD =~ /.*::(\w+)/;</pre>
-<pre>
-    my $attr=$1;
-    if ($self-&gt;_accessible($attr,'write')) {
-
-</pre>
-<pre>
-        *{$AUTOLOAD} = sub {
-            if (defined $_[1]) { $_[0]-&gt;{$attr} = $_[1] }
-            return $_[0]-&gt;{$attr};
-        };    ### end of created subroutine
-
-</pre>
-<p><table cellspacing="0" cellpadding="0"><tr><td>###  this is called first time only
-<tr><td><td>if (defined $newval) {
-<tr><td><td>    $self-&gt;{$attr} = $newval
-<tr><td><td>}
-<tr><td><td>return $self-&gt;{$attr};
-<tr><td>
-</table></p>
-<pre>
-    } elsif ($self-&gt;_accessible($attr,'read')) {
-
-</pre>
-<pre>
-        *{$AUTOLOAD} = sub {
-            return $_[0]-&gt;{$attr} }; ### end of created subroutine
-        return $self-&gt;{$attr}  }
-
-</pre>
-<pre>
-    # Must have been a mistake then...
-    croak &quot;No such method: $AUTOLOAD&quot;;
-}
-
-</pre>
-<p>sub DESTROY {}
-
-</p>
-<p>sub _LOG {
-	return unless $debug;
-	open LOG, ``&gt;&gt;/tmp/CentralLogOut.txt'' or die ``can't open logfile $!\n'';
-	print LOG join ``\n'', @_;
-	print LOG ``\n---\n'';
-	close LOG;
-}
-
-</p>
-<p>1;
-</p>
+ Args      :    $reg - name of MOBY Central you want to use if not default</pre>
 
 </body>
 

===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Client/Central.pm,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- /home/repository/moby/moby-live/Perl/MOBY/Client/Central.pm	2003/06/03 15:44:59	1.28
+++ /home/repository/moby/moby-live/Perl/MOBY/Client/Central.pm	2003/06/06 00:45:47	1.29
@@ -64,17 +64,17 @@
  Args      :    Registries - optional.
                            - takes the form
                               {$NAME1 => {
-								  URL => $URL,
-								  URI => $URI},
-							   $NAME2 => {
-								  URL => $URL,
-								  URI => $URI},
-                               }
+                                    URL => $URL,
+                                    URI => $URI},
+                               $NAME2 => {
+                                    URL => $URL,
+                                    URI => $URI},
+                                }
                             - by default this becomes
                             {MOBY_Central => {
-								URL => 'http://mobycentral.cbr.nrc.ca/cgi-bin/MOBY-Central.pl',
-								URI => 'http://mobycentral.cbr.nrc.ca/MOBY/Central'}
-                            }
+                                 URL => 'http://mobycentral.cbr.nrc.ca/cgi-bin/MOBY-Central.pl',
+                                 URI => 'http://mobycentral.cbr.nrc.ca/MOBY/Central'}
+                             }
  Discussion:    Each registry must have a different
                 NAME.  If you have more than one
                 registry with the same NAME, only
@@ -221,14 +221,14 @@
  Returns   :	MOBY::Registration object
  Args      :	objectType => "the name of the Object"
                 description => "a human-readable description of the object"
-				contactEmail => "your at email.address"
+                contactEmail => "your at email.address"
                 authURI => "URI of the registrar of this object"
-			    Relationships => {
-					relationshipType1 => [
-						[Object1, articleName],
-						[Object2, articleName]],
-					relationshipType2 => [
-						[Object1, articleName]]}
+                Relationships => {
+                    relationshipType1 => [
+                        [Object1, articleName],
+                        [Object2, articleName]],
+                    relationshipType2 => [
+                        [Object1, articleName]]}
 
 =cut
 
@@ -314,7 +314,7 @@
  Args      :	serviceType        => $serviceType
                 description => "human readable description"
                 Relationships => [[$relationshipType1, \@services],
-                                [$relationshipType2, \@services]]
+                                  [$relationshipType2, \@services]]
                 contactEmail => "your at email.address.here"
                 authURI => "your.authority.info"
 
@@ -460,34 +460,36 @@
      URL    =>  $URL_TO_SERVICE
 
     input:	listref; (articleName may be undef) 
-		input =>[
-					[articleName1,[objType1 => \@namespaces]], # Simple
-                    [articleName2,       [[objType2 => \@namespaces]]], # collection of one object type
-                    [articleName3,[[objType3 => \@namespaces],
-								  [objType4 => \@namespaces]]] # collection of multiple object types
-                 ]
+            input =>[
+                     [articleName1,[objType1 => \@namespaces]], # Simple
+                     [articleName2,       [[objType2 => \@namespaces]]], # collection of one object type
+                     [articleName3,[[objType3 => \@namespaces],
+                                    [objType4 => \@namespaces]]] # collection of multiple object types
+                    ]
    
 
     output:  listref; (articleName may be undef)
-		output =>[
-					[articleName1,[objType1 => \@namespaces]], # Simple
-                    [articleName2,[[objType2 => \@namespaces]]], # collection of one object type
-                    [articleName3,[[objType3 => \@namespaces],
-								  [objType4 => \@namespaces]]] # collection of multiple object types
-                 ]
+            output =>[
+                 [articleName1,[objType1 => \@namespaces]], # Simple
+                 [articleName2,[[objType2 => \@namespaces]]], # collection of one object type
+                 [articleName3,[[objType3 => \@namespaces],
+                                [objType4 => \@namespaces]]] # collection of multiple object types
+                  ]
             
     secondary: hashref
-		secondary => {parametername1 => {datatype => TYPE,
-										default => DEFAULT,
-										max => MAX,
-										min => MIN,
-										enum => [one, two]},
-					parametername2 => {datatype => TYPE,
-										default => DEFAULT,
-										max => MAX,
-										min => MIN,
-										enum => [one, two]}
-					  }
+            secondary => {parametername1 => {
+                            datatype => TYPE,
+                            default => DEFAULT,
+                            max => MAX,
+                            min => MIN,
+                            enum => [one, two]},
+                          parametername2 => {
+                            datatype => TYPE,
+                            default => DEFAULT,
+                            max => MAX,
+                            min => MIN,
+                            enum => [one, two]}
+                          }
 		
 
 
@@ -696,27 +698,26 @@
  Args      :	
      serviceName  => $serviceName,  
      serviceType  => $serviceType,  
-     authURI      => $authURI,      
-	 authoritative => 1,
+     authURI      => $authURI,
+     authoritative => 1,
      category  =>  "moby" | "cgi" | "soap" (currently only moby supported)
-	 expandObjects => 1,
-	 expandServices => 1,
-     URL    =>  $U'RL_TO_SERVICE
-	 keywords => [kw1, kw2, kw3]
-		
-		input =>{
-					articleName1 => [objType1 => [ns1, ns2...]], # Simple
-                    articleName2 => [[objType2 => [ns3, ns4...]]], # collection of one object type
-                    articleName3 => [[objType3 => [ns3, ns4...]], [objType4 => [ns5, ns6]]], # collection of multiple object types
-               }
+     expandObjects => 1,
+     expandServices => 1,
+     URL    =>  $URL_TO_SERVICE
+     keywords => [kw1, kw2, kw3]
+     input =>{
+              articleName1 => [objType1 => [ns1, ns2...]], # Simple
+              articleName2 => [[objType2 => [ns3, ns4...]]], # collection of one object type
+              articleName3 => [[objType3 => [ns3, ns4...]], [objType4 => [ns5, ns6]]], # collection of multiple object types
+             }
    
 
-		output =>{
-					articleName1 => [objType1 => [ns1, ns2...]], # Simple
-                    articleName2 => [[objType2 => [ns3, ns4...]]], # collection of one object type
-                    articleName3 => [[objType3 => [ns3, ns4...]], [objType4 => [ns5, ns6]]], # collection of multiple object types
-               }
-  
+     output =>{
+              articleName1 => [objType1 => [ns1, ns2...]], # Simple
+              articleName2 => [[objType2 => [ns3, ns4...]]], # collection of one object type
+              articleName3 => [[objType3 => [ns3, ns4...]], [objType4 => [ns5, ns6]]], # collection of multiple object types
+             }
+
 =cut
 
 sub findService {
@@ -794,7 +795,6 @@
 
 =head2 retrieveService
  
- NOT YET IMPLEMENTED
  Title     :	retrieveService  
  Usage     :	$WSDL = $MOBY->retrieveService(%args)
  Function  :	get the WSDL definition of the service with this name/authority URI
@@ -819,8 +819,7 @@
 	
 	my $message = "
 	<retrieveService>
-		<authURI>$auth</authURI>
-		<serviceName>$name</serviceName>
+		<Service authURI='$auth' serviceName='$name'/>
 	</retrieveService>";
 
 	my $conn = 	
@@ -1077,7 +1076,8 @@
  Function  :	DUMP the mysql for the current MOBY Central database
  Returns   :	text
  Args      :	$reg - name of MOBY Central you want to use if not default
-                
+
+
 =cut
 
 

===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Client/Registration.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Perl/MOBY/Client/Registration.html	2003/06/05 19:08:19	1.1
+++ /home/repository/moby/moby-live/Perl/MOBY/Client/Registration.html	2003/06/06 00:45:47	1.2
@@ -1,7 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-<title>Registration.pm</title>
+<title>MOBY::Client::Registration - an object to wrap the registration XML from MOBY Central</title>
 <link rev="made" href="mailto:markw at illuminae.(none)" />
 </head>
 
@@ -9,8 +9,84 @@
 
 <p><a name="__index__"></a></p>
 <!-- INDEX BEGIN -->
+
+<ul>
+
+	<li><a href="#name">NAME</a></li>
+	<li><a href="#synopsis">SYNOPSIS</a></li>
+	<li><a href="#description">DESCRIPTION</a></li>
+	<li><a href="#authors">AUTHORS</a></li>
+	<li><a href="#methods">METHODS</a></li>
+	<ul>
+
+		<li><a href="#new">new</a></li>
+		<li><a href="#success">success</a></li>
+		<li><a href="#registration_id">registration_id</a></li>
+		<li><a href="#id_(same_as_registration_id)">id (same as registration_id)</a></li>
+		<li><a href="#message">message</a></li>
+	</ul>
+
+</ul>
 <!-- INDEX END -->
 
+<hr />
+<p>
+</p>
+<h1><a name="name">NAME</a></h1>
+<p>MOBY::Client::Registration - an object to wrap the registration XML from MOBY Central</p>
+<p>
+</p>
+<hr />
+<h1><a name="synopsis">SYNOPSIS</a></h1>
+<pre>
+ my $reg = $Central-&gt;registerService(%args);
+ if ($reg-&gt;success){
+         print &quot;registered successfully &quot;,$reg-&gt;registration_id,&quot;\n&quot;;
+ } else {
+         print &quot;registration failed &quot;,$reg-&gt;message,&quot;\n&quot;;
+ }</pre>
+<p>
+</p>
+<hr />
+<h1><a name="description">DESCRIPTION</a></h1>
+<p>simply turns the registration XML into a hash</p>
+<p>
+</p>
+<hr />
+<h1><a name="authors">AUTHORS</a></h1>
+<p>Mark Wilkinson (<a href="mailto:markw at illuminae.com">markw at illuminae.com</a>)</p>
+<p>BioMOBY Project:  <a href="http://www.biomoby.org">http://www.biomoby.org</a></p>
+<p>
+</p>
+<hr />
+<h1><a name="methods">METHODS</a></h1>
+<p>
+</p>
+<h2><a name="new">new</a></h2>
+<pre>
+ Title     :    new
+ Usage     :    my $MOBY = MOBY::Client::Registration-&gt;new(%args)
+ Function  :
+ Returns   :    MOBY::Client::Registration object
+ Args      :    registration_id =&gt; $id
+                message =&gt; $message
+                success =&gt; $success</pre>
+<p>
+</p>
+<h2><a name="success">success</a></h2>
+<p>get/set the value</p>
+<p>
+</p>
+<h2><a name="registration_id">registration_id</a></h2>
+<p>get/set the value</p>
+<p>
+</p>
+<h2><a name="id_(same_as_registration_id)">id (same as registration_id)</a></h2>
+<p>get/set the value</p>
+<p>
+</p>
+<h2><a name="message">message</a></h2>
+<p>get/set the value</p>
 
 </body>
 

===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Client/Registration.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- /home/repository/moby/moby-live/Perl/MOBY/Client/Registration.pm	2003/05/26 02:01:43	1.3
+++ /home/repository/moby/moby-live/Perl/MOBY/Client/Registration.pm	2003/06/06 00:45:47	1.4
@@ -1,5 +1,70 @@
 #$Id$
 
+
+=head1 NAME
+
+MOBY::Client::Registration - an object to wrap the registration XML from MOBY Central
+
+=cut
+
+
+=head1 SYNOPSIS
+
+ my $reg = $Central->registerService(%args);
+ if ($reg->success){
+	 print "registered successfully ",$reg->registration_id,"\n";
+ } else {
+	 print "registration failed ",$reg->message,"\n";
+ }
+
+=cut
+
+=head1 DESCRIPTION
+
+simply turns the registration XML into a hash
+
+=head1 AUTHORS
+
+Mark Wilkinson (markw at illuminae.com)
+
+BioMOBY Project:  http://www.biomoby.org
+
+
+=cut
+
+=head1 METHODS
+
+=head2 new
+
+ Title     :	new
+ Usage     :	my $MOBY = MOBY::Client::Registration->new(%args)
+ Function  :
+ Returns   :	MOBY::Client::Registration object
+ Args      :    registration_id => $id
+                message => $message
+                success => $success
+
+=cut
+
+=head2 success
+
+get/set the value
+
+=head2 registration_id
+
+get/set the value
+
+=head2 id (same as registration_id)
+
+get/set the value
+
+=head2 message
+
+get/set the value
+
+=cut
+
+
 package MOBY::Client::Registration;
 
 use strict;
@@ -41,6 +106,12 @@
 
 }
 
+sub id {
+	my ($self, $val) =@_;
+	$self->registration_id($val) if defined $val;
+	return $self->registration_id;
+}
+
 sub new {
 	my ($caller, %args) = @_;
 	




More information about the MOBY-guts mailing list