edu.sdsc.mbt
Class Structure

java.lang.Object
  extended byedu.sdsc.mbt.Structure
All Implemented Interfaces:
java.io.Serializable

public abstract class Structure
extends java.lang.Object
implements java.io.Serializable

This class provides the primary interface for a molecular structure object.

Note that since there are currently no "set" methods in this class, there are also currently no StructureComponentEvent handling methods.

Author:
John L. Moreland
See Also:
StructureComponentEvent,

, Serialized Form


Constructor Summary
Structure()
           
 
Method Summary
 StructureComponentIterator createStructureComponentIterator(StructureComponentFilter filter)
          Given a StructureComponentFilter, create and return an iterator which will selectively return a subset of structure components.
abstract  StructureComponent getStructureComponentByIndex(java.lang.String structureComponentType, int index)
          Get the values for any StructureSomponent subclass by its type-specific index.
abstract  int getStructureComponentCount(java.lang.String scType)
          Counts components of the specified type that exist in the structure.
 StructureComponentIterator getStructureComponentRelations(java.lang.String relation_name, StructureComponent structureComponent)
          Given a StructureComponentRelation name and a StructureComponent, create and return a StructureComponentIterator which will selectively return the related subset of StructureComponent objects.
 StructureMap getStructureMap()
          Return the StructureMap object that describes the derived (implied) hierarchy of primary and secondary structure data for the Structure.
abstract  java.lang.String getUrlString()
          This method returns a string which represents the URL from which the structure instance was produced.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Structure

public Structure()
Method Detail

getUrlString

public abstract java.lang.String getUrlString()
This method returns a string which represents the URL from which the structure instance was produced. Examples: file://c:/myFiles/5ebx.pdb // a local PDB file file://c:/myFiles/5ebx.mmCIF // a local mmCIF file ftp://ftp.rcsb.org/2cpk.pdb // a remote pdb file ftp://ftp.rcsb.org/4hhb.mmCIF // a remote mmCIF file iiop://corba.sdsc.edu/2cpk // an openMMS reference This URL can be handed back to the StructureFactory in order to re-load the structure.


getStructureComponentCount

public abstract int getStructureComponentCount(java.lang.String scType)
Counts components of the specified type that exist in the structure. TYPE values are defined in the StructureComponentRegistry class.


createStructureComponentIterator

public StructureComponentIterator createStructureComponentIterator(StructureComponentFilter filter)
Given a StructureComponentFilter, create and return an iterator which will selectively return a subset of structure components.


getStructureComponentRelations

public StructureComponentIterator getStructureComponentRelations(java.lang.String relation_name,
                                                                 StructureComponent structureComponent)
                                                          throws java.lang.IllegalArgumentException
Given a StructureComponentRelation name and a StructureComponent, create and return a StructureComponentIterator which will selectively return the related subset of StructureComponent objects. This is acheaved by creating a RelationFilter with relation name and StructureComponent parameters then simply calling the createStructureComponentIterator method with that filter.

Throws:
java.lang.IllegalArgumentException

getStructureComponentByIndex

public abstract StructureComponent getStructureComponentByIndex(java.lang.String structureComponentType,
                                                                int index)
                                                         throws java.lang.IndexOutOfBoundsException,
                                                                java.lang.IllegalArgumentException
Get the values for any StructureSomponent subclass by its type-specific index. For example: Atom, Residue, Conformation, etc.

Note that it is the caller's responsibility to cast the returned object to the corresponding StructureComponent sublcass type. For example, an application might do something like this: