softparsmap
Class SequenceDataXml

java.lang.Object
  extended byooc.LinkedTagInstance
      extended bysoftparsmap.AbstractSequenceData
          extended bysoftparsmap.SequenceDataXml
All Implemented Interfaces:
Dependencies, SequenceData

public class SequenceDataXml
extends AbstractSequenceData

This class is used by DataSourceXmlNcbiTaxonomy to extract sequence data from one file in XML-format. The format is flexible within limits, see the def.xml file for more information.


Constructor Summary
SequenceDataXml()
           
 
Method Summary
 int getGiNumber()
          Returns the GI number.
 int getIdNumber()
          Returns the identity number for this sequence.
 int getSequenceLength()
          Returns the length of the sequence.
 java.lang.String getSpeciesName()
          Returns the species name that harbor this sequence.
 boolean isCompleteSequence()
          Returns true if the sequence is complete, otherwise false.
 boolean moveNextSequence()
          Move to next sequence in file.
 FilePointerPart newFilePointerPartCurrent()
          Returns a new FilePointerPart on current position in the file.
 void parseSequence(java.io.RandomAccessFile raf, FilePointerPart fpp)
          Parse in a sequence given a the file and pointer.
 void setDatabaseFile(java.io.RandomAccessFile raf)
          Sets the file that contains the sequences.
 
Methods inherited from class softparsmap.AbstractSequenceData
getPropertyFile
 
Methods inherited from class ooc.LinkedTagInstance
containsKey, get, getAttribute, getAttributeBoolean, getAttributeDouble, getAttributeFloat, getAttributeInteger, getAttributeList, getAttributeRef, getAttributeShort, getAttributeString, getAttributeTag, getChildIterator, getChildIteratorByName, getContainer, getContainerTag, getFirstChildTagByName, getTag, getTagId, getTagInstance, getTagInstance, getTagRef, hasAttributeValue, hasChildTagByName, hasChildTags, hasTag, isMutable, keySet, put, remove, setTag, setupInstance
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SequenceDataXml

public SequenceDataXml()
Method Detail

setDatabaseFile

public void setDatabaseFile(java.io.RandomAccessFile raf)
Description copied from class: AbstractSequenceData
Sets the file that contains the sequences.

Specified by:
setDatabaseFile in class AbstractSequenceData
Parameters:
raf - is the file containing the sequences

moveNextSequence

public boolean moveNextSequence()
Description copied from class: AbstractSequenceData
Move to next sequence in file.

Specified by:
moveNextSequence in class AbstractSequenceData
Returns:
true if there is a next sequence and the current pointer is set to this sequence

newFilePointerPartCurrent

public FilePointerPart newFilePointerPartCurrent()
Description copied from class: AbstractSequenceData
Returns a new FilePointerPart on current position in the file.

Specified by:
newFilePointerPartCurrent in class AbstractSequenceData
Returns:
a FilePointerPart on current position in file

parseSequence

public void parseSequence(java.io.RandomAccessFile raf,
                          FilePointerPart fpp)
Description copied from class: AbstractSequenceData
Parse in a sequence given a the file and pointer.

Specified by:
parseSequence in class AbstractSequenceData
Parameters:
raf - is the file containing all the sequences
fpp - is the file pointer

getIdNumber

public int getIdNumber()
Description copied from interface: SequenceData
Returns the identity number for this sequence.

Returns:
the identity number for this sequence

isCompleteSequence

public boolean isCompleteSequence()
Description copied from interface: SequenceData
Returns true if the sequence is complete, otherwise false.

Returns:
true if sequence is complete

getGiNumber

public int getGiNumber()
Description copied from interface: SequenceData
Returns the GI number. For more information see NCBI . If the NCBI Taxonomy database is not used, let this method return -1.

Returns:
the GI number

getSequenceLength

public int getSequenceLength()
Description copied from interface: SequenceData
Returns the length of the sequence.

Returns:
the length of the sequence.

getSpeciesName

public java.lang.String getSpeciesName()
Description copied from interface: SequenceData
Returns the species name that harbor this sequence.

Returns:
the species name that harbor this sequence