[Biojava-l] Help with Stax and AGAVE xml

Schreiber, Mark mark.schreiber@agresearch.co.nz
Fri, 26 Apr 2002 12:08:55 +1200


Hi -

I have been using the following snippet of code to read files from xembl
that are in AGAVE format. Features seem to be added to the constructed
sequence object ok but annotations seem to go missing.

Do I need to add some sort of listener somewhere? I'm a bit concerned
about using the SeqIOAdapter as a SeqIOListener as it doesn't do
anything, however there doesn't seem to be an appropriate implementation
to use.

Any advice?


    final AGAVEHandler handler = new AGAVEHandler();
    
    SeqIOListener siol = new SeqIOAdapter();
    handler.setFeatureListener(siol);


    SAX2StAXAdaptor adaptor = new SAX2StAXAdaptor(handler);
    XMLReader xmlReader = new SAXParser();
    FileReader fr = new FileReader(args[0]);
    InputSource is = new InputSource(fr);

    xmlReader.setContentHandler(adaptor);
    xmlReader.parse(is);


Mark Schreiber
Bioinformatics
AgResearch Invermay
PO Box 50034
Mosgiel
New Zealand
 
PH:   +64 3 489 9175
FAX:  +64 3 489 3739


=======================================================================
Attention: The information contained in this message and/or attachments
from AgResearch Limited is intended only for the persons or entities
to which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipients is prohibited by AgResearch
Limited. If you have received this message in error, please notify the
sender immediately.
=======================================================================