[MOBY] [MOBY-l] collection articles

Mark Wilkinson markw at illuminae.com
Thu Feb 5 20:53:11 UTC 2004


On Thu, 2004-02-05 at 09:15, Rebecca Ernst wrote:

> We couldn't imagine a scenario that made a collection article necessary. 
> As far as I saw in your (Mark's) services (which give collections back) 
> you could have also taken simples instead.

Well... not really.  If I knew at registration-time exactly how many
simples I was going to pass back in response, then I could register my
service as returning that many simples.  However, in the case of all of
my services that return Collections, I do not know a priori how many
individual responses there will be to the query, so I have to use a
collection.

The service signature is very strict in that regard.  If I say that I
return 'Simple', then I return EXACTLY ONE 'Simple'.  If I return a
defined number of simples, for example 3, then I can register my service
as returning <Simple/><Simple/><Simple/> if the meaning of each Simple
is implicit, or <Simple articleName1/><Simple articleName2/><Simple
articleName3/> if the meaning of each Simple component of the response
has to be clarified.  However, if I am returning an undefined number of
Simples, then I must register it as a Collection.  Moreover, you use
Collections when part of your response is to be considered as a single
unit.  For example, in the following (C = Collection, S = Simple):

<C articleName=alignments>
	<S>
		<align1/>
	</S>
	<S>
		<align2/>
	<S>
		<align3/>
	</S>
</Collection>
<S>
	<align4>
</S>
<S>
	<Annotated GIF>
</S>
<S>
	<Consensus>
</S>

In this case, your input results in a [set of alignments], a [GIF
image], and a [Consensus] - three parts, not six :-)  Moreover, the
number of alignments in the Collection probably wasn't predictable,
since it would depend on the number of sequences passed into the service
(probably also as a Collection input).
 
Hi from my new office!!

Mark

-- 
Mark Wilkinson, Assistant Professor (Bioinformatics)
Dept. of Medical Genetics, University of British Columbia
James Hogg iCAPTURE Centre for Cardiovascular and Pulmonary Research
166 - 1081 Burrard St., Vancouver, BC, Canada, V6Z 1Y6

------------------------------------------------------------------------
It just goes to show you that SOAP::Lite is more intuitive than you might 
think, if you know enough Perl and have the patience to dive into the 
source code.
		-Byrne Reese
		-http://builder.com.com/5100-6389_14-1045078-2.html
------------------------------------------------------------------------



More information about the moby-l mailing list