edu.sdsc.mbt
Class StructureComponentRelation

java.lang.Object
  extended byedu.sdsc.mbt.StructureComponentRelation
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Relation_Conformation_Atom

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

A class used to store a single relationship description between two StructureComponent types (much like a relational link between tables in a database). This class is used by the StructureComponentRegistry to define the relationship model for StructureComponent objects.

For example, the Conformation type relates to Atom type by means of an implied reference between the Conformation class's start_residue and end_residue fields, and the Atom class's residue_id field. A Conformation object therfore "relates" to a set of Atom values.

Author:
John L. Moreland
See Also:
Serialized Form

Constructor Summary
StructureComponentRelation(java.lang.String name, java.lang.String subject_type, java.lang.String object_type)
          Constructor.
 
Method Summary
 java.lang.String getName()
          Returns the name of this StructureComponentRelation object.
 java.lang.String getObjectType()
          Returns the object type of this StructureComponentRelation object.
 java.lang.String getSubjectType()
          Returns the subject type of this StructureComponentRelation object.
 boolean isRelated(StructureComponent subject, StructureComponent object)
          Tests to see if one StructureComponent instance is related to another.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StructureComponentRelation

public StructureComponentRelation(java.lang.String name,
                                  java.lang.String subject_type,
                                  java.lang.String object_type)
Constructor.

Method Detail

getName

public final java.lang.String getName()
Returns the name of this StructureComponentRelation object.


getSubjectType

public final java.lang.String getSubjectType()
Returns the subject type of this StructureComponentRelation object.


getObjectType

public final java.lang.String getObjectType()
Returns the object type of this StructureComponentRelation object.


isRelated

public final boolean isRelated(StructureComponent subject,
                               StructureComponent object)
Tests to see if one StructureComponent instance is related to another. This method first checks to see if the subject and object types have a defined relation. Then a specific comparision to see if the instances are directly linked is performed by calling the abstract "isLinked" method.