jadex.swing.sequence
Class SequenceXMLFetcher

java.lang.Object
  |
  +--jadex.swing.sequence.SequenceXMLFetcher
All Implemented Interfaces:
SequenceFetcher

public class SequenceXMLFetcher
extends java.lang.Object
implements SequenceFetcher

A subclass SequenceFetcher to get data from a XML document.


Constructor Summary
SequenceXMLFetcher()
          Default constructor
SequenceXMLFetcher(java.io.InputStream input)
          Third constructor: more general than the second one
SequenceXMLFetcher(java.io.InputStream input, java.lang.String saxdriver)
          Fourth constructor
SequenceXMLFetcher(java.lang.String file)
          Second constructor
 
Method Summary
 org.jdom.Document getDocument()
          Get the XML document containing all Sequence element information.
 org.jdom.Namespace getNamespace()
          The namespace of the root if any.
 org.jdom.Element getRoot()
          Get the root of the chromosome XML document.
 void setDocument(org.jdom.Document doc)
          Set the XML document containing all sequence element information.
 void setSource(java.io.InputStream input)
          Create a xml document based on an input stream.
 void setSource(java.io.InputStream input, java.lang.String saxdriver)
          Overloaded method to set the source of xml.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SequenceXMLFetcher

public SequenceXMLFetcher()
Default constructor

SequenceXMLFetcher

public SequenceXMLFetcher(java.lang.String file)
Second constructor
Parameters:
file - input file name

SequenceXMLFetcher

public SequenceXMLFetcher(java.io.InputStream input)
Third constructor: more general than the second one
Parameters:
input - the source input stream

SequenceXMLFetcher

public SequenceXMLFetcher(java.io.InputStream input,
                          java.lang.String saxdriver)
Fourth constructor
Parameters:
input - the data source & @param saxdriver the name of saxdriver
Method Detail

setSource

public void setSource(java.io.InputStream input)
Create a xml document based on an input stream. All xml processing activities take place here. Pay specical attention here for the furture improvement. Now the defautl SAX parser, the Apache Xerces, is used based on the default setting in JDOM.
Parameters:
input - document cource

setSource

public void setSource(java.io.InputStream input,
                      java.lang.String saxdriver)
Overloaded method to set the source of xml.
Parameters:
input - the source for the XML document.
saxdriver - the SAX driver used for XML parser.

getRoot

public org.jdom.Element getRoot()
Get the root of the chromosome XML document.
Specified by:
getRoot in interface SequenceFetcher
Returns:
the topmose element, i.e., Chromosome element

getDocument

public org.jdom.Document getDocument()
Get the XML document containing all Sequence element information.
Specified by:
getDocument in interface SequenceFetcher
Returns:
document the xml document.

getNamespace

public org.jdom.Namespace getNamespace()
The namespace of the root if any.
Specified by:
getNamespace in interface SequenceFetcher
Following copied from interface: jadex.swing.sequence.SequenceFetcher
Returns:
the namespace for the root.

setDocument

public void setDocument(org.jdom.Document doc)
Set the XML document containing all sequence element information.
Parameters:
doc - the XML document containing all sequence information.