gov.nih.nlm.umls.meta
Interface Relationship

All Superinterfaces:
Comparable, ConceptElement, ContentViewElement, RelatedConceptElement, RelatedSourceIdentifierElement, SourceElement, SourceIdentifierElement, SuppressibleElement
All Known Subinterfaces:
AtomRelationship
All Known Implementing Classes:
AtomRelationshipImpl, RelationshipImpl

public interface Relationship
extends Comparable, ConceptElement, ContentViewElement, RelatedConceptElement, RelatedSourceIdentifierElement, SourceElement, SourceIdentifierElement, SuppressibleElement

Represents a relationship between two Concepts or two Atoms.

Following is a UML Class diagram showing the neighborhood around Relationship

All data in a row of the MRREL file is represented here.

Author:
Brian Carlsen, Deborah Shapiro

Nested Class Summary
 
Nested classes inherited from class gov.nih.nlm.umls.meta.SourceElement
SourceElement.BySourceComparator, SourceElement.BySourceRestrictor
 
Method Summary
 void addAttribute(RelationshipAttribute att)
          Adds the specified RelationshipAttribute.
 void clearAttributes()
          Remove all RelationshipAttributes.
 AdditionalRelationshipLabel getAdditionalRelationshipLabel()
          Returns the AdditionalRelationshipLabel (RELA).
 RelationshipAttribute[] getAttributes()
          Returns the RelationshipAttributes.
 RelationshipAttribute[] getAttributes(Restrictor restrictor)
          Returns a subset of this Relationship's RelationshipAttributes.
 List getAttributesAsList()
          Returns the RelationshipAttributes as a List.
 String getDir()
          Returns the directionality value (DIR).
 String getKeyFields()
          Returns a String key which can be used by equals, compareTo, and hashCode methods.
 RelationshipLabel getRel()
          Returns the RelationshipLabel (REL).
 AdditionalRelationshipLabel getRela()
          Returns the AdditionalRelationshipLabel (RELA).
 String getRelationshipGroup()
          Returns the relationship group (RG).
 String getRelationshipIdentifier()
          Returns the Relationship unique identifier (RUI) related to this Relationship.
 RelationshipLabel getRelationshipLabel()
          Returns the RelationshipLabel (REL).
 String getRg()
          Returns the relationship group (RG).
 String getRui()
          Shorthand for getRelationshipIdentifier().
 Source getSl()
          Returns the source of the relationship label (SL).
 Source getSourceOfLabel()
          Returns the source of the relationship label (SL).
 String getSourceRelationshipIdentifier()
          Returns the source asserted relationship identifier (SRUI).
 String getSrui()
          Returns the source asserted relationship identifier (SRUI).
 boolean isAssertedDirection()
          Indicates the directionality of this Relationship.
 void removeAttribute(RelationshipAttribute att)
          Removes the specified RelationshipAttribute.
 void setAdditionalRelationshipLabel(AdditionalRelationshipLabel rela)
          Sets the AdditionalRelationshipLabel (RELA).
 void setAttributes(List atts)
          Replace RelationshipAttributes with the ones in the specified List.
 void setAttributes(RelationshipAttribute[] atts)
          Replace RelationshipAttributes with the ones in the specified array.
 void setDir(String dir)
          Sets the directionality value (DIR).
 void setIsAssertedDirection(boolean dir)
          Sets the flag indicating the directionality of the Relationship.
 void setRel(RelationshipLabel rel)
          Sets the RelationshipLabel (REL).
 void setRela(AdditionalRelationshipLabel rela)
          Sets the AdditionalRelationshipLabel (RELA).
 void setRelationshipGroup(String rg)
          Sets the relationship group (RG).
 void setRelationshipIdentifier(String rui)
          Sets the Relationship unique identifier (RUI) related to this Relationship.
 void setRelationshipLabel(RelationshipLabel rel)
          Sets the RelationshipLabel (REL).
 void setRg(String rg)
          Sets the relationship group (RG).
 void setRui(String rui)
          Shorthand for setRelationshipIdentifier(String).
 void setSl(Source sl)
          Sets the source of the relationship label (SL).
 void setSourceOfLabel(Source sl)
          Sets the source of the relationship label (SL).
 void setSourceRelationshipIdentifier(String srui)
          Sets the source asserted relationship identifier (SRUI).
 void setSrui(String srui)
          Sets the source asserted relationship identifier (SRUI).
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface gov.nih.nlm.umls.meta.ConceptElement
getConcept, setConcept
 
Methods inherited from interface gov.nih.nlm.umls.meta.ContentViewElement
getContentView, getCvf, setContentView, setCvf
 
Methods inherited from interface gov.nih.nlm.umls.meta.RelatedConceptElement
getRelatedConcept, setRelatedConcept
 
Methods inherited from interface gov.nih.nlm.umls.meta.RelatedSourceIdentifierElement
getRelatedSourceIdentifierType, setRelatedSourceIdentifierType
 
Methods inherited from interface gov.nih.nlm.umls.meta.SourceElement
getSource, setSource
 
Methods inherited from interface gov.nih.nlm.umls.meta.SourceIdentifierElement
getSourceIdentifierType, setSourceIdentifierType
 
Methods inherited from interface gov.nih.nlm.umls.meta.SuppressibleElement
getSuppress, isObsolete, isSuppressible, setSuppress
 

Method Detail

getRelationshipLabel

public RelationshipLabel getRelationshipLabel()
Returns the RelationshipLabel (REL).

Returns:
the RelationshipLabel

getRel

public RelationshipLabel getRel()
Returns the RelationshipLabel (REL). This is shorthand for getRelationshipLabel().

Returns:
the RelationshipLabel

setRelationshipLabel

public void setRelationshipLabel(RelationshipLabel rel)
Sets the RelationshipLabel (REL).

Parameters:
rel - the RelationshipLabel

setRel

public void setRel(RelationshipLabel rel)
Sets the RelationshipLabel (REL). This is shorthand for setRelationshipLabel(RelationshipLabel).

Parameters:
rel - the RelationshipLabel

getAdditionalRelationshipLabel

public AdditionalRelationshipLabel getAdditionalRelationshipLabel()
Returns the AdditionalRelationshipLabel (RELA).

Returns:
the AdditionalRelationshipLabel

getRela

public AdditionalRelationshipLabel getRela()
Returns the AdditionalRelationshipLabel (RELA). This is shorthand for getAdditionalRelationshipLabel().

Returns:
the AdditionalRelationshipLabel

setAdditionalRelationshipLabel

public void setAdditionalRelationshipLabel(AdditionalRelationshipLabel rela)
Sets the AdditionalRelationshipLabel (RELA).

Parameters:
rela - the AdditionalRelationshipLabel

setRela

public void setRela(AdditionalRelationshipLabel rela)
Sets the AdditionalRelationshipLabel (RELA). This is shorthand for setAdditionalRelationshipLabel(AdditionalRelationshipLabel).

Parameters:
rela - the AdditionalRelationshipLabel

getSourceRelationshipIdentifier

public String getSourceRelationshipIdentifier()
Returns the source asserted relationship identifier (SRUI).

Returns:
the source asserted relationship identifier

getSrui

public String getSrui()
Returns the source asserted relationship identifier (SRUI). This is shorthand for getSourceRelationshipIdentifier().

Returns:
the source asserted relationship identifier

setSourceRelationshipIdentifier

public void setSourceRelationshipIdentifier(String srui)
Sets the source asserted relationship identifier (SRUI).

Parameters:
srui - the source asserted relationship identifier

setSrui

public void setSrui(String srui)
Sets the source asserted relationship identifier (SRUI). This is shorthand for setSourceRelationshipIdentifier(String).

Parameters:
srui - the source asserted relationship identifier

getSourceOfLabel

public Source getSourceOfLabel()
Returns the source of the relationship label (SL).

Returns:
the source of the relationship label

getSl

public Source getSl()
Returns the source of the relationship label (SL). This is shorthand for getSourceOfLabel().

Returns:
the source of the relationship label

setSourceOfLabel

public void setSourceOfLabel(Source sl)
Sets the source of the relationship label (SL).

Parameters:
sl - the source of the relationship label

setSl

public void setSl(Source sl)
Sets the source of the relationship label (SL). This is shorthand for setSourceOfLabel(Source).

Parameters:
sl - the source of the relationship label

getRelationshipGroup

public String getRelationshipGroup()
Returns the relationship group (RG).

Returns:
the relationship group

getRg

public String getRg()
Returns the relationship group (RG). This is shorthand for getRelationshipGroup().

Returns:
the relationship group

setRelationshipGroup

public void setRelationshipGroup(String rg)
Sets the relationship group (RG).

Parameters:
rg - the relationship group

setRg

public void setRg(String rg)
Sets the relationship group (RG). This is shorthand for getRelationshipGroup().

Parameters:
rg - the relationship group

setDir

public void setDir(String dir)
Sets the directionality value (DIR).

Parameters:
dir - the directionality value

getDir

public String getDir()
Returns the directionality value (DIR).

Returns:
the directionality value

isAssertedDirection

public boolean isAssertedDirection()
Indicates the directionality of this Relationship.

Returns:
true if directionality is in order read, false if directionality is reversed

setIsAssertedDirection

public void setIsAssertedDirection(boolean dir)
Sets the flag indicating the directionality of the Relationship.

Parameters:
dir - true if directionality is in order read, false if directionality is reversed

getRui

public String getRui()
Shorthand for getRelationshipIdentifier().

Returns:
the RUI

setRui

public void setRui(String rui)
Shorthand for setRelationshipIdentifier(String).

Parameters:
rui - the RUI

getRelationshipIdentifier

public String getRelationshipIdentifier()
Returns the Relationship unique identifier (RUI) related to this Relationship.

Returns:
the RUI

setRelationshipIdentifier

public void setRelationshipIdentifier(String rui)
Sets the Relationship unique identifier (RUI) related to this Relationship.

Parameters:
rui - the RUI

getKeyFields

public String getKeyFields()
Returns a String key which can be used by equals, compareTo, and hashCode methods.

Returns:
a String composed from key Relationship fields

getAttributes

public RelationshipAttribute[] getAttributes()
Returns the RelationshipAttributes.

Returns:
a RelationshipAttribute []

getAttributesAsList

public List getAttributesAsList()
Returns the RelationshipAttributes as a List.

Returns:
the RelationshipAttributes as a List

addAttribute

public void addAttribute(RelationshipAttribute att)
Adds the specified RelationshipAttribute.

Parameters:
att - the RelationshipAttribute to be added

removeAttribute

public void removeAttribute(RelationshipAttribute att)
Removes the specified RelationshipAttribute.

Parameters:
att - the RelationshipAttribute to be removed

clearAttributes

public void clearAttributes()
Remove all RelationshipAttributes.


setAttributes

public void setAttributes(RelationshipAttribute[] atts)
Replace RelationshipAttributes with the ones in the specified array.

Parameters:
atts - an RelationshipAttribute []

setAttributes

public void setAttributes(List atts)
Replace RelationshipAttributes with the ones in the specified List.

Parameters:
atts - a List of RelationshipAttributes

getAttributes

public RelationshipAttribute[] getAttributes(Restrictor restrictor)
Returns a subset of this Relationship's RelationshipAttributes. Restricts the return based on the given Restrictor.

Parameters:
restrictor - Restrictor
Returns:
RelationshipAttribute[]


Copyright ©2005