public class SwissprotFileFormer extends Object implements SeqFileFormer
| Modifier | Constructor and Description |
|---|---|
protected |
SwissprotFileFormer()
Deprecated.
Creates a new
SwissprotFileFormer using
System.out stream. |
protected |
SwissprotFileFormer(PrintStream theStream)
Deprecated.
Creates a new
SwissprotFileFormer using the
specified stream. |
| Modifier and Type | Method and Description |
|---|---|
void |
addFeatureProperty(Object key,
Object value)
Deprecated.
Null implementation
|
void |
addSequenceProperty(Object key,
Object value)
Deprecated.
Notify the listener of a sequence-wide property.
|
void |
addSymbols(Alphabet theAlphabet,
Symbol[] theSymbols,
int theStart,
int theLength)
Deprecated.
Prints out the sequences properties in order.
|
protected List |
breakSymbolArray(Alphabet theAlphabet,
Symbol[] theSymbols,
int theStart,
int theLength)
Deprecated.
Converts the symbol list passed in into an array of strings.
|
void |
endFeature()
Deprecated.
Null implementation.
|
void |
endSequence()
Deprecated.
Notify the listener that processing of the sequence is complete.
|
protected void |
fillBuffer(StringBuffer theBuffer,
int theLength)
Deprecated.
Simple method that adds spaces onto the buffer passed in.
|
String |
formatLocation(Feature theFeature)
Deprecated.
Creates a string representation of the location of a feature
|
String |
formatLocation(Location loc,
StrandedFeature.Strand strand)
formatLocation creates an EMBL/Genbank style
representation of a Location. |
StringBuffer |
formatLocation(StringBuffer theBuffer,
Location theLocation)
Deprecated.
formatLocation creates a String representation of
a Location. |
StringBuffer |
formatLocation(StringBuffer theBuffer,
Location theLocation,
StrandedFeature.Strand theStrand)
Deprecated.
formatLocation creates a String representation of
a Location. |
protected StringBuffer |
formatPoint(int theMinIndex,
int theMaxIndex,
boolean isFuzzy)
Deprecated.
Formats the points from fuzzy locations.
|
PrintStream |
getPrintStream()
Deprecated.
getPrintStream returns the
PrintStream to which an instance of SwissprotFileFormer
will write the formatted data. |
protected void |
printOutSequenceHeaderLine(Alphabet theAlphabet,
Symbol[] theSymbols,
int theStart,
int theLength)
Deprecated.
Prints out sequence header with only length data.
|
void |
setName(String theName)
Deprecated.
The name is printed out as part of the identifier line.
|
void |
setPrintStream(PrintStream theStream)
Deprecated.
setPrintStream informs an instance which
PrintStream to use. |
void |
setURI(String theURI)
Deprecated.
Null implementation.
|
void |
startFeature(Feature.Template templ)
Deprecated.
Null implementation.
|
void |
startSequence()
Deprecated.
Start the processing of a sequence.
|
protected SwissprotFileFormer()
SwissprotFileFormer using
System.out stream.protected SwissprotFileFormer(PrintStream theStream)
SwissprotFileFormer using the
specified stream.theStream - a PrintStream object.public void startSequence() throws ParseException
startSequence in interface SeqIOListenerParseExceptionpublic void endSequence() throws ParseException
endSequence in interface SeqIOListenerParseExceptionpublic void setName(String theName) throws ParseException
setName in interface SeqIOListenertheName - the String that should be returned by getName for the sequence
being parsedParseExceptionpublic void setURI(String theURI) throws ParseException
setURI in interface SeqIOListenertheURI - the new URI of the sequenceParseExceptionpublic void addSymbols(Alphabet theAlphabet, Symbol[] theSymbols, int theStart, int theLength) throws IllegalAlphabetException
addSymbols in interface SeqIOListenertheAlphabet - The alphabet of the symbol datatheSymbols - An array containing symbolstheStart - The start offset of valid data within the arraytheLength - The number of valid symbols in the arrayIllegalAlphabetException - if we can't cope with this
alphabet.public void addSequenceProperty(Object key, Object value) throws ParseException
addSequenceProperty in interface SeqIOListenerkey - Key the property will be stored undervalue - Value stored under the keyParseExceptionpublic void startFeature(Feature.Template templ) throws ParseException
startFeature in interface SeqIOListenertempl - The template for this new feature objectParseExceptionpublic void endFeature() throws ParseException
endFeature in interface SeqIOListenerParseExceptionpublic void addFeatureProperty(Object key, Object value) throws ParseException
addFeatureProperty in interface SeqIOListenerkey - Key the property will be stored undervalue - Value stored under the keyParseExceptionpublic PrintStream getPrintStream()
getPrintStream returns the
PrintStream to which an instance of SwissprotFileFormer
will write the formatted data. The default is System.outgetPrintStream in interface SeqFileFormerPrintStream which will be written to.public void setPrintStream(PrintStream theStream)
setPrintStream informs an instance which
PrintStream to use.setPrintStream in interface SeqFileFormertheStream - a PrintStream to write to.public StringBuffer formatLocation(StringBuffer theBuffer, Location theLocation, StrandedFeature.Strand theStrand)
formatLocation creates a String representation of
a Location. Strand information is ignored, as Swissprot
files represent proteins. An alternative form of this function does not
take a Strand; that form is available only on SwissprotFileFormer; it
is not part of the SeqFileFormer interface.formatLocation in interface SeqFileFormertheBuffer - a StringBuffer to append the location
to.theLocation - a Location to format.theStrand - a StrandedFeature.Strand indicating nothing
of relevanceStringBuffer with the location appended.public String formatLocation(Feature theFeature)
formatLocation in interface SeqFileFormertheFeature - The feature with the location to formatpublic StringBuffer formatLocation(StringBuffer theBuffer, Location theLocation)
formatLocation creates a String representation of
a Location. The stringbuffer returned represents columns
15-27 of the Swissprot feature table entry. An alternative form of this
function takes a Strand; that form is part of the SeqFileFormer
interface.theBuffer - a StringBuffer to append the location
to.theLocation - a Location to format.StringBuffer with the location appended.protected void printOutSequenceHeaderLine(Alphabet theAlphabet, Symbol[] theSymbols, int theStart, int theLength) throws IllegalAlphabetException
theAlphabet - The alphabet of the symbol datatheSymbols - An array containing symbolstheStart - The start offset of valid data within the arraytheLength - The number of valid symbols in the arrayIllegalAlphabetException - if we can't cope with this
alphabet.protected List breakSymbolArray(Alphabet theAlphabet, Symbol[] theSymbols, int theStart, int theLength) throws IllegalAlphabetException
theAlphabet - The alphabet of the symbol datatheSymbols - An array containing symbolstheStart - The start offset of valid data within the arraytheLength - The number of valid symbols in the arrayIllegalAlphabetException - if we can't cope with this
alphabet.protected void fillBuffer(StringBuffer theBuffer, int theLength)
theBuffer - Buffer to append whitespace to.theLength - Ammount of whitespace to append.protected StringBuffer formatPoint(int theMinIndex, int theMaxIndex, boolean isFuzzy)
theMaxIndex - Inner index of the fuzzy pointtheMinIndex - Outer index of the fuzzy pointisFuzzy - Indicates if this point is fuzzypublic String formatLocation(Location loc, StrandedFeature.Strand strand)
formatLocation creates an EMBL/Genbank style
representation of a Location. This is a
convenience method only. The version which has a
StringBuffer parameter (and returns the
StringBuffer) is preferred. If a compound location is
formatted using this method, it is returned as a join-type location
rather than an order-type.loc - a Location to format.strand - a StrandedFeature.Strand
indicating the Location's strand.StringBuffer.Copyright © 2014 BioJava. All rights reserved.