[MOBY-dev] jMoby add a parameter into a message

Dmitry Repchevsky dmitry.repchevski at bsc.es
Thu Jun 7 08:52:11 UTC 2007


Hello,

I'm making an xslt converter from jMoby ontology object to Perl ontology 
objects.
The idea is to convert moby XML message to Perl dumped format directly 
through xslt.

looking into jMoby code I found different basic moby types (i.e. 
MobyDataBoolean and MobyBoolean), but can't find a way to construct a 
message:

here is the code snip I have:

**************************************************
            MobyJob mj =  new MobyJob("sip_1_");
           
            AminoAcidSequence seq = new AminoAcidSequence();
            seq.setId("id");
            seq.setName("sequence");
            //seq.setNamespace();
            seq.set_SequenceString("aaaaaaaaaaaaaaaaaaaaa");
            seq.set_Length(new MobyInteger(20));
           
            mj.addData(seq);
           
            //mj.addDataElement(new )

            StringWriter writer = new StringWriter();
            XMLOutputter xo = new XMLOutputter();
            xo.setFormat(Format.getPrettyFormat());
            xo.output(mj.toXML(), writer);

**************************************************
Sure it's easy, but...

Thank you in advance,

Dmitry



More information about the MOBY-dev mailing list