[MOBY-l] Data objects to XML CGI

Ken Steube steube at sdsc.edu
Mon Nov 3 09:18:51 EST 2003


I registered a couple fairly complicated data objects and the CGI created
the XML for them really well, except for the lower case business.

BTW I have registered a FASTA object. It ISA text-formatted. This puts it
at the same level as embl-flatfile.

Let me ask you about this method:

  $Central->retrieveObjectDefinition('GenericSequence')

It's supposed to "retrieve the $XML that was used to register an object
and its relationships." Shouldn't it return the name as it was registered
(GenericSequence) instead of the lower-case LSID? If so then I could
continue to use retrieveObjectDefinition.

Maybe the LSID data should be returned by another method?

Ken

On Mon, 3 Nov 2003, Mark Wilkinson wrote:

> (This message is complete, the last one is unfinished...)
>
> Wow, that tool **FANTASTIC** and so badly needed!
>
> I have only one concern - it looks like you are constructing the XML
> element names by taking the last element of the LSID.  This is fine,
> except that the case of the LSID element name does not reflect the case
> of the human readable name (e.g. the human readable tag is
> "GenericSequence", while the LSID is '...:genericsequence'), so in fact,
> the XML that is produced by that script is not guaranteed to successfully
> execute a service since XML parsers are case sensitive.
>
> I'm not sure how best to fix that problem... I think there are three
> alternatives:
>
> 1) you could either query the MOBY database directly (using DBD::mysql)
> to get the human-readable name.
>
> 2) you could use the MOBY::OntologyServer module to get an API into the
> ontology (setting up the OntologyServer is not well documented as it is
> still in early stages of development... you need to set the same
> environment variables as you set when you install a local copy of MOBY
> Central in order to tell it where the database is and how to connect to
> it).
>
> 3)  You could output your XML as follows:
> <?xml version='1.0'?>
> <SampleObject xmlns:lsid='urn:lsid:biomoby.org:objectclass:'>
> <lsid:genericsequence namespace='' id='' articleName=''>
>   <lsid:string namespace='' id='' articleName='SequenceString'>
>   </lsid:string>
>   <lsid:integer namespace='' id='' articleName='Length'>
>   </lsid:integer>
> </lsid:genericsequence>
> </SampleObject>
>
> I think the latter solution is just confusing (though valid :-) ), so perhaps the
> first or second option is better... but it is a serious enough problem that
> it really does need to be fixed before people start building their objects
> using invalid tags...
>
> Nevertheless, that is a **fantastic** tool, and I am going to
> start using that URL to link from some of my other scripts and web-pages, if
> that is okay with you.
>
> Cheers Ken!!
>
> Mark
>
> On Sat, 2003-11-01 at 10:09, Ken Steube wrote:
> > Hey all, I just finished a new CGI that displays the XML required to
> > represent any MOBY data object such as GenericSequence.  One reason this
> > is useful is because some objects required named items (for example
> > GenericSequence) and you don't know without something like this CGI.
> >
> > Try it out by going first to my CGI that lists all services and their
> > inputs/outputs:
> >
> > http://plantsp.sdsc.edu/plantsp/cgi-bin/MOBY/list.services.cgi
> >
> > The names of the inputs/outputs are now links to the new CGI. Click to see
> > the XML for that object.
> >
> > list.services.cgi still doesn't deal with collections...shouldn't be hard
> > to do but haven't gotten to it yet.
> >
> > Ken
> >
> > -------------------------------------
> > Ken Steube            steube at sdsc.edu
> > San Diego Supercomputer Center @ UCSD
> > San Diego, California             USA
> >
> > _______________________________________________
> > moby-l mailing list
> > moby-l at biomoby.org
> > http://biomoby.org/mailman/listinfo/moby-l
>

-- 
-------------------------------------
Ken Steube            steube at sdsc.edu
San Diego Supercomputer Center @ UCSD
San Diego, California             USA



More information about the moby-l mailing list