|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.proteinshader.structure.visitor.Visitor
org.proteinshader.structure.visitor.SFWriterVisitor
public class SFWriterVisitor
A simple file writer subclass of Visitor that writes to a file all of the data from each Model in a Structure. This class is intended to be useful for development and debugging. The output is a simple object dump that announces each object, writes its attributes, and then traverses the objects associations so that they can be written.
| Field Summary | |
|---|---|
static int |
CHAR_PER_LINE
|
static int |
INDENTATION_FACTOR
|
| Constructor Summary | |
|---|---|
SFWriterVisitor()
Constructs a SFWriterVisitor. |
|
SFWriterVisitor(String outputFile)
Constructs a SFWriterVisitor that will write to the output file given as an argument. |
|
| Method Summary | |
|---|---|
void |
closeOutputFile()
This method flushes the output buffer to make sure that all data is written before closing the output file. |
void |
flush()
This method forces the writer to immediately write all data in its buffer. |
void |
openOutputFile(String outputFile)
Opens a buffered writer using the filename given as an argument. |
void |
visit(AminoAcid aminoAcid)
Writes all information held by an AminoAcid. |
void |
visit(Atom atom)
Writes all information held by an Atom. |
void |
visit(BetaStrand betaStrand)
Writes all information held by a BetaStrand. |
void |
visit(Bond bond)
Writes all information held by a Bond. |
void |
visit(Chain chain)
Writes all information held by a Chain. |
void |
visit(Helix helix)
Writes all information held by a Helix. |
void |
visit(Heterogen heterogen)
Writes all information held by a Heterogen. |
void |
visit(Loop loop)
Writes all information held by a Loop. |
void |
visit(Model model)
Writes all information held by a Model. |
void |
visit(Segment segment)
Writes information on a Segment. |
void |
visit(Structure structure)
Writes a Structure's data to a simple text file. |
void |
visit(Water water)
Writes all information held by a Water. |
void |
writeDescription(Description description)
writeDescription() - writes all information on a Description. |
| Methods inherited from class org.proteinshader.structure.visitor.Visitor |
|---|
clear, includeAAHetAndWater, setDebug, setMode, setMode, setMode, setMode, setMode, setMode, setVisitSegments |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int CHAR_PER_LINE
public static final int INDENTATION_FACTOR
| Constructor Detail |
|---|
public SFWriterVisitor()
public SFWriterVisitor(String outputFile)
throws VisitorException
outputFile - the name of the file to write to.
VisitorException - if an IO error occurs.| Method Detail |
|---|
public void openOutputFile(String outputFile)
throws VisitorException
outputFile - the name of the file to write to.
VisitorException - if an IO error occurs.
public void flush()
throws VisitorException
VisitorException - if an IO error occurs.
public void closeOutputFile()
throws VisitorException
VisitorException - if an IO error occurs.
public void visit(Structure structure)
throws VisitorException
visit in class Visitorstructure - the Structure to write.
VisitorException - if an IO error occurs.
public void visit(Model model)
throws VisitorException
visit in class Visitormodel - the Model to write.
VisitorException - if a problem occurs while writing.
public void visit(Chain chain)
throws VisitorException
visit in class Visitorchain - the Chain to write.
VisitorException - if an IO error occurs.
public void visit(Loop loop)
throws VisitorException
visit in class Visitorloop - the Loop to write.
VisitorException - if an IO error occurs.
public void visit(Helix helix)
throws VisitorException
visit in class Visitorhelix - the Helix to write.
VisitorException - if an IO error occurs.
public void visit(BetaStrand betaStrand)
throws VisitorException
visit in class VisitorbetaStrand - the BetaStrand to write.
VisitorException - if an IO error occurs.
public void visit(Segment segment)
throws VisitorException
visit in class Visitorsegment - the Segment to write.
VisitorException - if an IO error occurs.
public void visit(AminoAcid aminoAcid)
throws VisitorException
visit in class VisitoraminoAcid - the AminoAcid to write.
VisitorException - if an IO error occurs.
public void visit(Heterogen heterogen)
throws VisitorException
visit in class Visitorheterogen - the Heterogen to write.
VisitorException - if an IO error occurs.
public void visit(Water water)
throws VisitorException
visit in class Visitorwater - the Water to write.
VisitorException - if an IO error occurs.
public void visit(Atom atom)
throws VisitorException
visit in class Visitoratom - the Atom to write.
VisitorException - if an IO error occurs.
public void visit(Bond bond)
throws VisitorException
visit in class Visitorbond - the Bond to write.
VisitorException - if an IO error occurs.
public void writeDescription(Description description)
throws WriterVisitorException
description - the Description to write.
WriterVisitorException - if an IO error occurs.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||