edu.sdsc.mbt
Class Fragment

java.lang.Object
  extended byedu.sdsc.mbt.StructureComponent
      extended byedu.sdsc.mbt.Fragment
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class Fragment
extends StructureComponent
implements java.lang.Cloneable, java.io.Serializable

Implements a StructureComponent container for secondary structure fragment information. This consists of Residue range and the secondary structure type.

See the "PROGRAMMING NOTE" section of the StructureComponent class.

Author:
John L. Moreland
See Also:
StructureComponent,

, Serialized Form


Field Summary
 
Fields inherited from class edu.sdsc.mbt.StructureComponent
structure
 
Constructor Summary
Fragment()
          Constructor variant used when there will likely be an atom list.
Fragment(int startResidueIndex, int endResidueIndex, java.lang.String conformationType)
          Construct a Fragment for the given start Residue index, end Residue index, and conformation type.
 
Method Summary
 java.lang.Object clone()
          Clone this object.
 void copy(StructureComponent structureComponent)
          Copy all of the field values from the parameter object into "this".
 boolean equals(java.lang.Object o)
          One Fragment is equal to another Fragment if the indexes are equal.
 Chain getChain()
          Get the chain to which this Fragment belongs.
static java.lang.String getClassName()
          This method returns the fully qualified name of this class.
 java.lang.String getConformationType()
          Get the Conformation type for this Fragment.
 int getEndResidueIndex()
          Get the end Reisude index for this Fragment.
 Residue getResidue(int index)
           
 int getResidueCount()
           
 int getResidueIndex(Residue residue)
           
 int getResidueIndexInChain(Residue residue)
           
 java.util.Vector getResidues()
           
 int getStartResidueIndex()
          Get the start Reisude index for this Fragment.
 java.lang.String getStructureComponentType()
          This method returns the fully qualified name of this class.
 int hashCode()
          Return the hashCode for the Fragment.
 boolean isVisible()
           
 void setConformationType(java.lang.String conformationType)
          Set the Conformation type for this Fragment.
 void setEndResidueIndex(int endResidueIndex)
          Set the end Reisude index for this Fragment.
 void setResidues(java.util.Vector residues)
           
 void setStartResidueIndex(int startResidueIndex)
          Set the start Reisude index for this Fragment.
 
Methods inherited from class edu.sdsc.mbt.StructureComponent
getStructure, setStructure
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Fragment

public Fragment(int startResidueIndex,
                int endResidueIndex,
                java.lang.String conformationType)
Construct a Fragment for the given start Residue index, end Residue index, and conformation type. The Residue index is a Chain-level index (not a Structure-level index).


Fragment

public Fragment()
Constructor variant used when there will likely be an atom list.

Method Detail

getChain

public Chain getChain()
Get the chain to which this Fragment belongs.


copy

public void copy(StructureComponent structureComponent)
Copy all of the field values from the parameter object into "this".

Specified by:
copy in class StructureComponent

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Clone this object.

Overrides:
clone in class StructureComponent
Throws:
java.lang.CloneNotSupportedException

getClassName

public static java.lang.String getClassName()
This method returns the fully qualified name of this class.

This name is used by the StructureComponentRegistry class to enable dynamic registration and discovery of new StructureComponent sub-classes/types. The name is also used to create a unique integer indentifier for each type in order to make run-time type comparisons fast.


getStructureComponentType

public java.lang.String getStructureComponentType()
This method returns the fully qualified name of this class.

Specified by:
getStructureComponentType in class StructureComponent

hashCode

public int hashCode()
Return the hashCode for the Fragment. This enables Fragment objects that share the same Chain and indexes to be concidered the "same" Fragment.


equals

public boolean equals(java.lang.Object o)
One Fragment is equal to another Fragment if the indexes are equal.


setStartResidueIndex

public void setStartResidueIndex(int startResidueIndex)
Set the start Reisude index for this Fragment. The Residue index is a Chain-level index (not a Structure-level index).


getStartResidueIndex

public int getStartResidueIndex()
Get the start Reisude index for this Fragment. The Residue index is a Chain-level index (not a Structure-level index).


setEndResidueIndex

public void setEndResidueIndex(int endResidueIndex)
Set the end Reisude index for this Fragment. The Residue index is a Chain-level index (not a Structure-level index).


getEndResidueIndex

public int getEndResidueIndex()
Get the end Reisude index for this Fragment. The Residue index is a Chain-level index (not a Structure-level index).


setConformationType

public void setConformationType(java.lang.String conformationType)
Set the Conformation type for this Fragment.


getConformationType

public java.lang.String getConformationType()
Get the Conformation type for this Fragment.


setResidues

public void setResidues(java.util.Vector residues)

getResidues

public java.util.Vector getResidues()

getResidueCount

public int getResidueCount()

getResidue

public Residue getResidue(int index)

getResidueIndex

public int getResidueIndex(Residue residue)

getResidueIndexInChain

public int getResidueIndexInChain(Residue residue)

isVisible

public boolean isVisible()
Specified by:
isVisible in class StructureComponent