edu.sdsc.mbt
Class StructureComponent

java.lang.Object
  extended byedu.sdsc.mbt.StructureComponent
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable
Direct Known Subclasses:
Atom, Bond, Chain, Conformation, Fragment, Residue, StructureInfo, Symmetry

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

Defines the abstract base class for a StructureComponent data container. Each subclass instance represents a raw "record" from its source Structure. Using the Structure class directly is useful if an application simply wishes to walk the raw records of a data set. For a more structured "map" (hierarchical view) of derived data, see the StructureMap class.

PROGRAMMING NOTE:

Here is an example of the Atom sub-class which demonstrates a typical use case for all StructureComponent sub-classes:

      int atomCount = structure.getStructureComponentCount(
         StructureComponentRegistry.TYPE_ATOM );
      for ( int i=0; i
  

See Also:
Structure, StructureMap, Serialized Form

Field Summary
 Structure structure
          The Structure to which a StructureComponent instance belongs.
 
Constructor Summary
StructureComponent()
           
 
Method Summary
 java.lang.Object clone()
          Clone this object.
abstract  void copy(StructureComponent structureComponent)
          Copy all of the field values from the parameter object into "this".
static java.lang.String getClassName()
          This method returns the fully qualified name of this class.
 Structure getStructure()
          Get the Structure to which a StructureComponent instance belongs.
abstract  java.lang.String getStructureComponentType()
          This method returns the fully qualified name of this class.
abstract  boolean isVisible()
           
 void setStructure(Structure structure)
          Set the Structure to which a StructureComponent instance belongs.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

structure

public Structure structure
The Structure to which a StructureComponent instance belongs.

Constructor Detail

StructureComponent

public StructureComponent()
Method Detail

clone

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

Throws:
java.lang.CloneNotSupportedException

copy

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


getClassName

public static java.lang.String getClassName()
                                     throws java.lang.UnsupportedOperationException
This method returns the fully qualified name of this class. Sub-classes must override this method (This method should really be declared abstract, but unfortunately Java does not allow a method to be both static AND abstract). Instead, this base class implementation will through an UnsupportedOperationException.

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 instances of any sublcass dynamically from this name.

Throws:
java.lang.UnsupportedOperationException

getStructureComponentType

public abstract java.lang.String getStructureComponentType()
This method returns the fully qualified name of this class. Sub-classes must override this method. Unfortunately Java does not allow a method to be both static AND abstract). Instead, this base class implementation will through an UnsupportedOperationException.

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 instances of any sublcass dynamically from this name.


setStructure

public final void setStructure(Structure structure)
Set the Structure to which a StructureComponent instance belongs.


getStructure

public final Structure getStructure()
Get the Structure to which a StructureComponent instance belongs.


isVisible

public abstract boolean isVisible()