|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.proteinshader.structure.io.demos.SegmentDemo
public class SegmentDemo
Prints Segment data for troubleshooting. USAGE: java -cp . path/SegmentDemo inputFilename outputFilename where path = edu/harvard/fas/jrweber/molecular/structure/io After reading 'inputFilename' and creating a Structure, the Structure will be written as an object dump to a file named 'outputFilename.out'. Any bad lines found while parsing the Structure will be printed to standard error. On Unix, output to standard error can be redirected to a file by placing ' 2> error_filename' as the last thing on the command line used to invoke the program.
Field Summary | |
---|---|
static String |
PATH
|
static String |
usageMessage
|
Constructor Summary | |
---|---|
SegmentDemo()
Constructs a SegmentDemo. |
Method Summary | |
---|---|
String |
getFilenameOrDie(String[] cmdLineArgs,
int index)
Returns the requested command line argument if it is present. |
static void |
main(String[] args)
Uses a PDBStructureReader to read a PDB file and create a Structure, and then uses a WriterVisitor to write the contents of the Structure to an output file. |
void |
printBadLines(List<String> badLines)
Prints the bad lines from the PDB file to standard out. |
void |
writeStructure(Structure structure,
String filename)
Writes a Structure to a file by using a SFWriterVisitor. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String PATH
public static final String usageMessage
Constructor Detail |
---|
public SegmentDemo()
Method Detail |
---|
public void writeStructure(Structure structure, String filename) throws VisitorException
structure
- the Structure to write.filename
- the name of the file to write to.
VisitorException
- if an IO error occurs.public void printBadLines(List<String> badLines)
badLines
- the bad lines to print.public String getFilenameOrDie(String[] cmdLineArgs, int index)
cmdLineArgs
- the command line arguments.index
- the index position to get the filename from.public static void main(String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |