[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 => '<a href="http://mobycentral.cbr.nrc.ca/cgi-bin/MOBY-Central.pl">http://mobycentral.cbr.nrc.ca/cgi-bin/MOBY-Central.pl</a>',
- URI => '<a href="http://mobycentral.cbr.nrc.ca/MOBY/Central">http://mobycentral.cbr.nrc.ca/MOBY/Central</a>'}
- }
+ URL => '<a href="http://mobycentral.cbr.nrc.ca/cgi-bin/MOBY-Central.pl">http://mobycentral.cbr.nrc.ca/cgi-bin/MOBY-Central.pl</a>',
+ URI => '<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 => "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]]}</pre>
+ Relationships => {
+ relationshipType1 => [
+ [Object1, articleName],
+ [Object2, articleName]],
+ relationshipType2 => [
+ [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 => $serviceType
description => "human readable description"
Relationships => [[$relationshipType1, \@services],
- [$relationshipType2, \@services]]
+ [$relationshipType2, \@services]]
contactEmail => "your at email.address.here"
authURI => "your.authority.info"</pre>
<p>
@@ -212,33 +212,35 @@
URL => $URL_TO_SERVICE</pre>
<pre>
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
- ]</pre>
+ input =>[
+ [articleName1,[objType1 => \@namespaces]], # Simple
+ [articleName2, [[objType2 => \@namespaces]]], # collection of one object type
+ [articleName3,[[objType3 => \@namespaces],
+ [objType4 => \@namespaces]]] # collection of multiple object types
+ ]</pre>
<pre>
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]}
- }</pre>
+ 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]}
+ }</pre>
<p>
</p>
<h2><a name="registerservicewsdl">registerServiceWSDL</a></h2>
@@ -265,103 +267,29 @@
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
- }</pre>
-<pre>
- 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</pre>
-<p>sub findService {</p>
-<pre>
- my ($self, %a) = @_;
- my $id = $a{'serviceID'};
- my $servicename = $a{'servicename'}; $servicename |="";
- my $authoritative = $a{'authoritative'}; $authoritative |= 0;
- my $serviceType = $a{'serviceType'}; $serviceType |= "";
- my $authURI = $a{'authURI'}; $authURI |="";
- my $category = $a{'category'}; $category |= "moby" ;
- my $exObj = $a{'expandObjects'}; $exObj |=0;
- my $exServ = $a{'expandServices'}; $exServ |= 0;
- my $kw = $a{'keywords'};
- ref($kw) =~ /array/i || return $self->errorRegXML("invalid structure of keywords. Expected arrayref");
- my @kw = @{$kw};
-
- my $message = "<findService>
-<authoritative>$authoritative</authoritative>
-<Category>$category</Category>
-<serviceType>$serviceType</serviceType>
-<serviceName>$servicename</serviceName>
-<authURI>$authURI</authURI>;
-<expandObjects>$exObj</expandObjects>
-<expandServices>$exServ</expandServices>
-<keywords>\n";
- foreach (@kw){
- $message .="<keyword>$kw</keyword>\n";
- }
- $message .="</keywords>\n";</pre>
-<pre>
- my %IN = %{$a{input}};
- my %OUT = %{$a{output}};
- my %funkyhash = ( Input => \%IN, Output => \%OUT);
- while (my ($inout, $param) = each %funkyhash){
- my $inout_lc = lc ($inout);
- my %PARAM = %{$param};
- $message .= "<${inout_lc}Objects><${inout}>\n";
- while (my ($articleName, $def) = each %PARAM){
- my @Objects; #
- unless (ref($def) =~ /array/i){return $self->errorRegXML("invalid structure of $inout objects, expected arrayref for article $articleName")}
- my @objectdefs;
- if ((ref $def->[0]) =~ /array/i){ # collection
- # def= [[objType2 => [ns3, ns4...]], ...]
- $message .="<Collection>\n";
- @objectdefs = @{$def};
- } else { # Nipple
- @objectdefs = ($def);
- # def = [objType1 => [ns1, ns2...]],
- }
-
- foreach my $objectdef(@objectdefs){
- $message .="<Simple articleName='$articleName'>\n";
- my ($type, $Namespaces) = @{$objectdef};
- $message .="<objectType>$type</objectType>\n";
- unless (ref($Namespaces) =~ /array/i){return $self->errorRegXML("invalid structure of $inout namespaces for object $type in article $articleName; expected arrayref")}
- foreach my $ns(@{$Namespaces}){
- $message .="<Namespace>$ns</Namespace>\n";
- }
- $message .="</Simple>\n";
- }
- if ((ref($def->[0])) =~ /array/i){
- $message .="</Collection>\n";
- }
- }
- $message .= "</${inout}></${inout_lc}Objects>\n";
- }
- $message .= "</findService>\n";
-
- my $return = $self->SOAP_connection->call(findService => ($message))->paramsall;
- return ($self->parseRegXML($return));</pre>
-<p>}</p>
+ 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
+ }</pre>
+<pre>
+ 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
+ }</pre>
<p>
</p>
<h2><a name="retrieveservice">retrieveService</a></h2>
<pre>
- NOT YET IMPLEMENTED
Title : retrieveService
Usage : $WSDL = $MOBY->retrieveService(%args)
Function : get the WSDL definition of the service with this name/authority URI
@@ -438,204 +366,7 @@
Usage : $objects = $MOBY->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->default_MOBY_servername;
- return undef unless ($self->SOAP_connection($reg));
- my $return = $self->SOAP_connection($reg)->call('DUMP')->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><ISA>
-<tr><td><td> <objectType>$obj</objectType>
-<tr><td><td></ISA>'';</table></p>
-<pre>
- $reg =$reg?$reg:$self->default_MOBY_servername;
- return undef unless ($self->SOAP_connection($reg));
- my $return = $self->SOAP_connection($reg)->call('ISA' => ($message))->paramsall;
- #<Relationships>
- # <objectType>QueryObject</objectType>
- # <ISA>
- # <objectType>ParentObject</objectType>
- # ...
- # ...
- # </ISA>
- # <HASA>
- # <objectType>ContainedObject</objectType>
- # ...
- # ...
- # </HASA>
- #</Relationships>
- my $parser = new XML::DOM::Parser;
- my $doc = $parser->parse($return);
- my $root = $doc->getDocumentElement;
- my @ISAs = &_nodeArrayContent($doc, "ISA");
- my @HASA = &_nodeArrayContent($doc, "HASA");
- return (\@ISAs, \@HASA);
-}</pre>
-<p>sub _parseServices {
- my ($self, $Registry, $XML) = @_;
- my $Parser = new XML::DOM::Parser;
- my $doc = $Parser->parse($XML);
- my $Object = $doc->getDocumentElement();
- my $Services = $Object->getElementsByTagName(``Service'');
- my $num = $Services->getLength;
- my @Services;
- for (my $x = 0; $x < $num; $x++){
- my $Service = $Services->item($x);
- my $AuthURI = $Service->getAttributeNode('authURI')->getValue;
- my $servicename = $Service->getAttributeNode('serviceName')->getValue;
- my $Type = &_nodeTextContent($Service, 'serviceType');
- my $Output = &_nodeTextContent($Service, 'outputObject');
- my $Description = &_nodeTextContent($Service, 'Description');
- my $cat = &_nodeTextContent($Service, 'Category');
-</p>
-<pre>
-
- my $Instance = MOBY::Client::ServiceInstance->new(
- authority => $AuthURI,
- name => $servicename,
- type => $Type,
- category => $cat,
- output => $Output,
- description => $Description,
- registry => $Registry,
- );
- push @Services, $Instance;
- }
- return @Services;
-}</pre>
-<p><table cellspacing="0" cellpadding="0"><tr><td>sub parseRegXML {
-<tr><td><td>#<MOBYRegistration>
-<tr><td><td>#<td><id>$id</id>
-<tr><td><td>#<td><success>$success</success>
-<tr><td><td>#<td><message><![CDATA[$message]]></message>
-<tr><td><td>#</MOBYRegistration>
-<tr><td><td>my ($self, $xml) = @_;
-<tr><td><td>my $Parser = new XML::DOM::Parser;
-</table></p>
-<pre>
-
- my $doc = $Parser->parse($xml);
- my $Object = $doc->getDocumentElement();
- my $obj = $Object->getTagName;
- return undef unless ($obj eq 'MOBYRegistration');
- my $id = &_nodeTextContent($Object, 'id');
- my $success = &_nodeTextContent($Object, 'success');
- my $message = &_nodeTextContent($Object, 'message');
- my $reg = MOBY::Client::Registration->new(
- success => $success,
- message => $message,
- registration_id => $id,);
- return $reg;
-}</pre>
-<p>sub errorRegXML {
- my ($self, $message) = @_;
- my $reg = MOBY::Client::Registration->new(
- success => 0,
- error_message => $message,
- registration_id => -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->getElementsByTagName($node);
- unless ($x->item(0)){print ``no child nodes for $node in \n'',$DOM->toString,``\n''};
- my @child = $x->item(0)->getChildNodes;
- my $content;
- foreach (@child){
- #print $_->getNodeTypeName, ``\t'', $_->toString,``\n'';
- next unless $_->getNodeType == TEXT_NODE;
- $content = $_->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 && &_LOG(``_nodeArrayContext received DOM: '', $DOM->toString,``\nsearching for node $node\n'');
- my @result;
- my $x = $DOM->getElementsByTagName($node);
- my @child = $x->item(0)->getChildNodes;
- foreach (@child){
- next unless $_->getNodeType == ELEMENT_NODE;
- my @child2 = $_->getChildNodes;
- foreach (@child2){
- #print $_->getNodeTypeName, ``\t'', $_->toString,``\n'';
- next unless $_->getNodeType == TEXT_NODE;
- push @result, $_->toString;
- }
- }
- return @result;
-}</p>
-<p>sub AUTOLOAD {
- no strict ``refs'';
- my ($self, $newval) = @_;</p>
-<pre>
- $AUTOLOAD =~ /.*::(\w+)/;</pre>
-<pre>
- my $attr=$1;
- if ($self->_accessible($attr,'write')) {
-
-</pre>
-<pre>
- *{$AUTOLOAD} = sub {
- if (defined $_[1]) { $_[0]->{$attr} = $_[1] }
- return $_[0]->{$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->{$attr} = $newval
-<tr><td><td>}
-<tr><td><td>return $self->{$attr};
-<tr><td>
-</table></p>
-<pre>
- } elsif ($self->_accessible($attr,'read')) {
-
-</pre>
-<pre>
- *{$AUTOLOAD} = sub {
- return $_[0]->{$attr} }; ### end of created subroutine
- return $self->{$attr} }
-
-</pre>
-<pre>
- # Must have been a mistake then...
- croak "No such method: $AUTOLOAD";
-}
-
-</pre>
-<p>sub DESTROY {}
-
-</p>
-<p>sub _LOG {
- return unless $debug;
- open LOG, ``>>/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->registerService(%args);
+ if ($reg->success){
+ print "registered successfully ",$reg->registration_id,"\n";
+ } else {
+ print "registration failed ",$reg->message,"\n";
+ }</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->new(%args)
+ Function :
+ Returns : MOBY::Client::Registration object
+ Args : registration_id => $id
+ message => $message
+ success => $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