[MOBY-l] Understanding MOBY Object Inheritence

Mark Wilkinson markw at illuminae.com
Mon Jul 14 16:09:10 UTC 2003


On Mon, 2003-07-14 at 09:59, Rebecca Ernst wrote:

> In your service that takes a NCBI_Acc and gives back a GenericSequence I 
> get as output Namespace, Id, Length, Sequence.
> But as I understood the GenericSequence object only hasa String. I can't 
> see how this integer (length) comes into it.

Okay, this is how MOBY inheritence should be interpreted:

If you look at the object definitions on
http://mobycentral.cbr.nrc.ca/cgi-bin/types/Objects

you will see that the definition of a GenericSequence is:

GenericSequence	urn:lsid:biomoby.org:objectrelation:isa	VirtualSequence
GenericSequence	urn:lsid:biomoby.org:objectrelation:hasa  String 

So, GenericSequence ISA VirtualSequence - meaning that it contains
everything that VirtualSequence contains, in exactly the same structure
(i.e. you could receive a GenericSequence and parse it in exactly the
same way that you could parse a VirtualSequence, and get the same
result.  This is what the MOBY Object hierarchy promises for ISA
relationships).

GenericSequence also HASA String

So GenericSequence has all of the structure of VirtualSequence, and
extends VirtualSequence by adding a new element (a String with
articleName "SequenceString")

That's how GenericSequence gets it's length object.

M

-- 
Mark Wilkinson <markw at illuminae.com>
Illuminae




More information about the moby-l mailing list