[Bioperl-guts-l] [16577] bioperl-dev/branches/eutils-soap-run/lib/Bio/Tools/Run: pod tweak

Mark Allen Jensen maj at dev.open-bio.org
Sat Jan 2 19:01:34 EST 2010


Revision: 16577
Author:   maj
Date:     2010-01-02 19:01:34 -0500 (Sat, 02 Jan 2010)
Log Message:
-----------
pod tweak

Modified Paths:
--------------
    bioperl-dev/branches/eutils-soap-run/lib/Bio/Tools/Run/ESoap/WSDL.pm
    bioperl-dev/branches/eutils-soap-run/lib/Bio/Tools/Run/ESoap.pm

Modified: bioperl-dev/branches/eutils-soap-run/lib/Bio/Tools/Run/ESoap/WSDL.pm
===================================================================
--- bioperl-dev/branches/eutils-soap-run/lib/Bio/Tools/Run/ESoap/WSDL.pm	2010-01-02 23:07:34 UTC (rev 16576)
+++ bioperl-dev/branches/eutils-soap-run/lib/Bio/Tools/Run/ESoap/WSDL.pm	2010-01-03 00:01:34 UTC (rev 16577)
@@ -36,7 +36,7 @@
 
 This module is a lightweight parser and container for WSDL XML files
 associated with the NCBI EUtilities SOAP server. XML facilities are
-based on L<XML::Twig>.
+provided by L<XML::Twig>.
 
 The following accessors provide names and structures useful for
 creating SOAP messages using L<SOAP::Lite> (e.g.):
@@ -64,7 +64,16 @@
 
  $wsdl->clear_cache;
 
+The globals C<$NCBI_BASEURL>, C<$NCBI_ADAPTOR>, and C<%WSDL> are exported.
 
+ $NCBI_ADAPTOR : the soap service cgi
+ 
+To construct a URL for a WSDL:
+
+ $wsdl_eutils = $NCBI_BASEURL.$WSDL{'eutils'}
+ $wsdl_efetch_omim = $NCBI_BASEURL.$WSDL{'f_omim'}
+ # etc.
+
 =head1 FEEDBACK
 
 =head2 Mailing Lists
@@ -99,12 +108,6 @@
 
 Email maj -at- fortinbras -dot- us
 
-Describe contact details here
-
-=head1 CONTRIBUTORS
-
-Additional contributors names and emails here
-
 =head1 APPENDIX
 
 The rest of the documentation details each of the object methods.
@@ -112,20 +115,33 @@
 
 =cut
 
-# Let the code begin...
-
-
 package Bio::Tools::Run::ESoap::WSDL;
 use strict;
 
-# Object preamble - inherits from Bio::Root::Root
-
 use Bio::Root::Root;
 use XML::Twig;
 use LWP::Simple;
 
-use base qw(Bio::Root::Root );
+use base qw(Bio::Root::Root Exporter);
 
+our @EXPORT = qw( $NCBI_BASEURL $NCBI_ADAPTOR %WSDL );
+
+our $NCBI_BASEURL = "http://www.ncbi.nlm.nih.gov/entrez/eutils/soap/v2.0/";
+our $NCBI_ADAPTOR = "http://eutils.ncbi.nlm.nih.gov/entrez/eutils/soap/v2.0/soap_adapter_2_0.cgi";
+
+our %WSDL = (
+    'eutils' => 'eutils.wsdl',
+    'f_pubmed' => 'efetch_pubmed.wsdl',
+    'f_pmc' => 'efetch_pmc.wsdl',
+    'f_nlmc' => 'efetch_nlmc.wsdl',
+    'f_journals' => 'efetch_journals.wsdl',
+    'f_omim' => 'efetch_omim.wsdl',
+    'f_taxon' => 'efetch_taxon.wsdl',
+    'f_snp' => 'efetch_snp.wsdl',
+    'f_gene' => 'efetch_gene.wsdl',
+    'f_seq' => 'efetch_seq.wsdl'
+    );
+
 =head2 new
 
  Title   : new
@@ -288,6 +304,46 @@
 
 sub response_parameters { shift->result_parameters( @_ ) }
 
+=head2 operations()
+
+ Title   : operations
+ Usage   : @opns = $wsdl->operations;
+ Function: get a hashref with elts ( $operation_name => $soapAction )
+           for all operations defined by this WSDL 
+ Returns : array of scalar strings
+ Args    : none
+
+=cut
+
+sub operations {
+    my $self = shift;
+    return $self->_cache('operations') if $self->_cache('operations');
+    my %opns;
+    foreach (@{$self->_parse->_operation_elts}) {
+	$opns{$_->att('name')} = 
+	    ($_->descendants('soap:operation'))[0]->att('soapAction');
+    }
+    return $self->_cache('operations', \%opns);
+}
+
+=head2 service()
+
+ Title   : service
+ Usage   : $wsdl->service
+ Function: gets the SOAP service url associated with this WSDL
+ Returns : scalar string
+ Args    : none
+
+=cut
+
+sub service {
+    my $self = shift;
+    return $self->_cache('service') || 
+	$self->_cache('service', ($self->_parse->_service_elt->descendants('soap:address'))[0]->att('location'));
+}
+
+=head1 Internals
+
 =head2 _operation_bookmarks()
 
  Title   : _operation_bookmarks
@@ -355,44 +411,6 @@
     
 }
 
-=head2 operations()
-
- Title   : operations
- Usage   : @opns = $wsdl->operations;
- Function: get a hashref with elts ( $operation_name => $soapAction )
-           for all operations defined by this WSDL 
- Returns : array of scalar strings
- Args    : none
-
-=cut
-
-sub operations {
-    my $self = shift;
-    return $self->_cache('operations') if $self->_cache('operations');
-    my %opns;
-    foreach (@{$self->_parse->_operation_elts}) {
-	$opns{$_->att('name')} = 
-	    ($_->descendants('soap:operation'))[0]->att('soapAction');
-    }
-    return $self->_cache('operations', \%opns);
-}
-
-=head2 service()
-
- Title   : service
- Usage   : $wsdl->service
- Function: gets the SOAP service url associated with this WSDL
- Returns : scalar string
- Args    : none
-
-=cut
-
-sub service {
-    my $self = shift;
-    return $self->_cache('service') || 
-	$self->_cache('service', ($self->_parse->_service_elt->descendants('soap:address'))[0]->att('location'));
-}
-
 =head2 _parse()
 
  Title   : _parse

Modified: bioperl-dev/branches/eutils-soap-run/lib/Bio/Tools/Run/ESoap.pm
===================================================================
--- bioperl-dev/branches/eutils-soap-run/lib/Bio/Tools/Run/ESoap.pm	2010-01-02 23:07:34 UTC (rev 16576)
+++ bioperl-dev/branches/eutils-soap-run/lib/Bio/Tools/Run/ESoap.pm	2010-01-03 00:01:34 UTC (rev 16577)
@@ -14,7 +14,7 @@
 
 =head1 NAME
 
-Bio::Tools::Run::ESoap - Client for the Entrez EUtilities SOAP server>
+Bio::Tools::Run::ESoap - Client for the NCBI Entrez EUtilities SOAP server
 
 =head1 SYNOPSIS
 
@@ -58,12 +58,6 @@
 
 Email maj -at- fortinbras -dot- us
 
-Describe contact details here
-
-=head1 CONTRIBUTORS
-
-Additional contributors names and emails here
-
 =head1 APPENDIX
 
 The rest of the documentation details each of the object methods.
@@ -76,19 +70,19 @@
 
 package Bio::Tools::Run::ESoap;
 use strict;
+use warnings;
 
-# Object preamble - inherits from Bio::Root::Root
-
+use lib '../../..'; # remove later
 use Bio::Root::Root;
+use Bio::Tools::Run::ESoap::WSDL;
 
-
 use base qw(Bio::Root::Root );
 
 =head2 new
 
  Title   : new
  Usage   : my $obj = new Bio::Tools::Run::ESoap();
- Function: Builds a new Bio::Tools::Run::ESoap object
+ Function: Builds a new Bio::Tools::Run::ESoap factory
  Returns : an instance of Bio::Tools::Run::ESoap
  Args    :
 



More information about the Bioperl-guts-l mailing list