org.proteinshader.structure
Class Loop

java.lang.Object
  extended by org.proteinshader.structure.Region
      extended by org.proteinshader.structure.Loop
All Implemented Interfaces:
IDTest, Visitable

public class Loop
extends Region

This concrete subclass of Region holds information on the general "loop" regions found between well-defined regions of secondary structure (helices and beta-strands).


Constructor Summary
Loop(String loopID, String startResidueID, String endResidueID, Chain chain)
          Constructs a Loop.
 
Method Summary
 void accept(Visitor visitor)
          Accepts a Visitor and does a callback.
 String getLoopID()
          Returns the Loop ID.
 String toString()
          Returns the Loop ID.
 
Methods inherited from class org.proteinshader.structure.Region
createSegments, getAminoAcidAfterRegion, getAminoAcidBeforeRegion, getChainID, getEndResidueID, getModelID, getSegment, getStartResidueID, getStructureID, iteratorAminoAcids, iteratorSegments, markAminoAcids, numberOfAminoAcids, numberOfSegments, processID, setSegmentAlpha, setSegmentAlphaToDefault, setSegmentRGB, setSegmentRGBToDefault, setSegmentsToAminoAcidColors, setSegmentsToRegionColor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Loop

public Loop(String loopID,
            String startResidueID,
            String endResidueID,
            Chain chain)
     throws InvalidRegionException,
            InvalidIDException
Constructs a Loop.

Any leading or trailing whitespace will be trimmed from the loopID. The ancestor IDs (Chain, Model, and Structure) will be stored after they are obtained from the Chain given as an argument.

Parameters:
loopID - should be "Loop 1", "Loop 2", "Loop 3", etc.
Throws:
InvalidRegionException - if the sequence of AminoAcids (with at least two Residues) cannot be found on the Chain.
InvalidIDException - if the loopID is null or does not have at least one non-whitespace character.
Method Detail

accept

public void accept(Visitor visitor)
            throws VisitorException
Accepts a Visitor and does a callback.

Specified by:
accept in interface Visitable
Specified by:
accept in class Region
Parameters:
visitor - the Visitor to do a callback with.
Throws:
VisitorException - if an error occurs while an object is being visited.

getLoopID

public String getLoopID()
Returns the Loop ID. The String returned cannot be null or empty, because the constructor checks that this read-only attribute has at least one character.

Returns:
The Loop ID as a String.

toString

public String toString()
Returns the Loop ID. The String returned cannot be null or empty, because the constructor checks that this read-only attribute has at least one character.

Overrides:
toString in class Object
Returns:
The Loop ID as a String.


Copyright © 2007-2008