org.proteinshader.structure.visitor.demos
Class VisitorDemo

java.lang.Object
  extended by org.proteinshader.structure.visitor.demos.VisitorDemo

public class VisitorDemo
extends Object

For testing the traversal logic of the Visitor class.

Creates a Structure object by using the PDBStructureReader class and then tests the ability of the Visitor to traverse all Visitable objects and print each objects ID.

USAGE: java -cp . path/VisitorDemo filename

where path = edu/harvard/fas/jrweber/molecular/structure/visitor


Field Summary
static String PATH
           
static String usageMessage
           
 
Constructor Summary
VisitorDemo()
          Constructs a VisitorDemo.
 
Method Summary
static void main(String[] args)
          Uses a StructureReader to read a PDB file and create a Structure, and then tests the ability of a Visitor to traverse the Structure.
 void printBadLines(List<String> badLines)
          Prints the bad lines from the PDB file.
 void testVisitor(Structure structure)
          Creates a Visitor and tests it by activating debug mode so that it will print the ID of each object in the Structure.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PATH

public static final String PATH
See Also:
Constant Field Values

usageMessage

public static final String usageMessage
See Also:
Constant Field Values
Constructor Detail

VisitorDemo

public VisitorDemo()
Constructs a VisitorDemo.

Method Detail

testVisitor

public void testVisitor(Structure structure)
                 throws VisitorException
Creates a Visitor and tests it by activating debug mode so that it will print the ID of each object in the Structure.

All ResidueMode restrictions are tested.

Parameters:
structure - the Structure to test the Visitor on.
Throws:
VisitorException

printBadLines

public void printBadLines(List<String> badLines)
Prints the bad lines from the PDB file.

Parameters:
badLines - the bad lines to print.

main

public static void main(String[] args)
Uses a StructureReader to read a PDB file and create a Structure, and then tests the ability of a Visitor to traverse the Structure.



Copyright © 2007-2008