[MOBY-l] Re: namespace

Lincoln Stein lstein at cshl.edu
Mon Feb 2 12:45:11 UTC 2004


When you search MOBY central, can you tell it that you're just 
interested in objects from a particular namesspace?  This would 
really help for sharpening the search.

Lincoln

On Wednesday 28 January 2004 07:07 pm, Ken Steube wrote:
> I'm not sure I understand the question...I'll try to answer and you
> can reply for more info.
>
> An object belongs to a particular namespace
> <Object namespace=AGI_LocusCode id=At3g19100/>
> belongs to AGI_LocusCode. Sometimes you might see the namespace
> might being left blank if it's not important (such as for the
> Integer object inside a GenericSequence).
>
> I wouldn't really say a service belongs to a namespace, rather we
> say it accepts objects from particular namespaces. Or a service
> might accept objects of a certain type from any namespace if the
> namespace isn't important (such as BLAST: can accept a DNA seq from
> any namespace so the namespace isn't generally critical info for
> BLAST).
>
> Ken
>
> On Wed, 28 Jan 2004, Ardavan Kanani wrote:
> > Ken,
> >
> > Thanks for responding to my question.  My question is more about
> > an object belonging to a namespace or services belonging to a
> > namespace and not accepting or outputting objects from a
> > particular namespace. Do objects belong to particular namespaces?
> >  If that's the case where in the object registration should I
> > declare its namespace?  Since services are, sort of, objects too,
> > where do I specify what namespace they belong to.  I am trying to
> > create all my objects and services under a namespace called
> > "haplotyping_study"  I might be totally confused as how the
> > namespaces work on MOBY.  I am coming from an object oriented
> > world.  So when I see the disjoint between objects and services
> > in MOBY I get confused.
> >
> > Thanks, Ardavan Kanani
> >
> > On Jan 28, 2004, at 11:36 AM, Ken Steube wrote:
> > > On Wed, 28 Jan 2004, Ardavan Kanani wrote:
> > >> Mark,
> > >> How would I register an object or a service under a particular
> > >> namespace?  I looked at the API doc and the signature for
> > >> registerObjectClass and registerServiceName/Type does not
> > >> include a namespace parameter.
> > >
> > > Here is the script that registers my plantspGetProtein service
> > > to accept an Object from any of the namespaces
> > > ['AGI_LocusCode', 'NCBI_gi', 'SDSC_fg'].
> > >
> > > Ken
> > >
> > >
> > >
> > >
> > >
> > > #!/usr/local/bin/perl5.6.1
> > > use warnings 'all';	# Issue warnings about suspicious
> > > programming use strict;		# Must declare and initialize all
> > > variables
> > >
> > > ###############################################################
> > >######## ##
> > > # This script will register the plantspGetProtein MOBY service
> > > ###############################################################
> > >######## ##
> > >
> > > use MOBY::Client::Central;
> > > use MOBY::Client::Service;
> > >
> > > my $Central = MOBY::Client::Central->new();
> > >
> > > my $reg = $Central->registerService(
> > >   serviceName  => 'plantspGetProtein',
> > >   authURI      => 'www.sdsc.edu',
> > >   contactEmail => 'steube at sdsc.edu',
> > >   description  => "Retrieves a protein sequence from the
> > > PlantsP database (proteins related to phosphorylation,
> > > transporters and ubiquitin)",
> > >   URL          =>
> > > 'http://plantsp.sdsc.edu/cgi-bin/MOBY/PlantsP_dispatcher.cgi',
> > >   input        => [ ['', ["Object" => ['AGI_LocusCode',
> > > 'NCBI_gi', 'SDSC_fg']]], ],
> > >   output       => [ ['', ["AminoAcidSequence" => []]], ],
> > >   category     => "moby",
> > >   serviceType  => "Retrieval",
> > > );
> > > die "Bad return value from registerService" unless $reg;
> > > if ($reg->success == 1){
> > >   print "Registration successful\n\n";
> > > }
> > > else {
> > >   print "Registration failed: ", $reg->message, "\n";
> > > }
> > >
> > >
> > > --
> > > --
> > > --
> > > Ken Steube
> > > San Diego Supercomputer Center
> > > University of California, San Diego
> > > Mail code 0537, CRB room 207
> > > 9500 Gilman Drive
> > > San Diego, California, 92093-0537  USA
> > > FAX (858) 822-3610

-- 
Lincoln D. Stein
Cold Spring Harbor Laboratory
1 Bungtown Road
Cold Spring Harbor, NY 11724



More information about the moby-l mailing list