gov.nih.nlm.umls.meta.impl
Class ConceptMappingImpl

java.lang.Object
  extended bygov.nih.nlm.umls.meta.impl.ConceptMappingImpl
All Implemented Interfaces:
Comparable, ConceptMapping

public class ConceptMappingImpl
extends Object
implements ConceptMapping

Default implementation of the ConceptMapping interface.

Author:
Brian Carlsen, Deborah Shapiro

Constructor Summary
ConceptMappingImpl()
          Instantiates an empty ConceptMapping.
ConceptMappingImpl(ConceptMapping cm)
          Instantiates a ConceptMapping from the specified ConceptMapping.
 
Method Summary
 int compareTo(Object o)
          Compares this ConceptMapping to another one.
 boolean equals(Object o)
          Returns true if the specified object is equal to this object.
 AdditionalRelationshipLabel getAdditionalRelationshipLabel()
          Returns the AdditionalRelationshipLabel (RELA).
 String getConceptIdentifier()
          Returns the concept identifier for the first concept (CUI1).
 String getCui1()
          Shorthand for getConceptIdentifier().
 String getCui2()
          Shorthand for getRelativeConceptIdentifier().
 String getKeyFields()
          Returns a String key which can be used by equals, compareTo, and hashCode methods.
 String getLastReleaseVersion()
          Returns the last release version in which the CUI1 was valid (VER).
 String getMapin()
          Returns the "in current subset" value (MAPIN).
 String getMapReason()
          Returns the reason for this ConceptMapping (MAPREASON).
 String getReason()
          Return the reason for this ConceptMapping.
 RelationshipLabel getRel()
          Shorthand for getRelationship().
 AdditionalRelationshipLabel getRela()
          Shorthand for getAdditionalRelationshipLabel()).
 RelationshipLabel getRelationship()
          Returns the relationship between the two concepts (REL).
 String getRelativeConceptIdentifier()
          Returns the concept identifier for the second concept (CUI2).
 String getVer()
          Shorthand for getLastReleaseVersion().
 int hashCode()
          Returns a hash code based on all fields.
 boolean inCurrentSubset()
          Indicates whether or not this ConceptMapping is in the current subset (MAPIN).
 void setAdditionalRelationshipLabel(AdditionalRelationshipLabel rela)
          Sets the AdditionalRelationshipLabel (RELA).
 void setConceptIdentifier(String cui1)
          Sets the concept identifier for the first concept (CUI1).
 void setCui1(String cui1)
          Shorthand for setConceptIdentifier(String).
 void setCui2(String cui2)
          Shorthand for setRelativeConceptIdentifier(String).
 void setInCurrentSubset(boolean mapin)
          Sets the flag indicating whether or not this ConceptMapping is in the current subset (MAPIN).
 void setLastReleaseVersion(String ver)
          Sets the last release version in which the CUI1 was valid (VER).
 void setMapin(String mapin)
          Sets the "in current subset" value (MAPIN).
 void setMapReason(String reason)
          Sets the reason for this ConceptMapping (MAPREASON).
 void setReason(String reason)
          Set the reason for this ConceptMapping.
 void setRel(RelationshipLabel rel)
          Shorthand for setRelationship(RelationshipLabel).
 void setRela(AdditionalRelationshipLabel rela)
          Shorthand for setAdditionalRelationshipLabel(AdditionalRelationshipLabel).
 void setRelationship(RelationshipLabel rel)
          Sets the relationship between the two concepts (REL).
 void setRelativeConceptIdentifier(String cui2)
          Sets the concept identifier for the second concept (CUI2).
 void setVer(String ver)
          Shorthand for setLastReleaseVersion(String)
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConceptMappingImpl

public ConceptMappingImpl()
Instantiates an empty ConceptMapping.


ConceptMappingImpl

public ConceptMappingImpl(ConceptMapping cm)
Instantiates a ConceptMapping from the specified ConceptMapping.

Parameters:
cm - ConceptMapping to be copied
Method Detail

getConceptIdentifier

public String getConceptIdentifier()
Returns the concept identifier for the first concept (CUI1).

Specified by:
getConceptIdentifier in interface ConceptMapping
Returns:
the concept identifier for the first concept

getCui1

public String getCui1()
Shorthand for getConceptIdentifier().

Specified by:
getCui1 in interface ConceptMapping
Returns:
the result of getConceptIdentifier()

setConceptIdentifier

public void setConceptIdentifier(String cui1)
Sets the concept identifier for the first concept (CUI1).

Specified by:
setConceptIdentifier in interface ConceptMapping
Parameters:
cui1 - the concept identifier for the first concept

setCui1

public void setCui1(String cui1)
Shorthand for setConceptIdentifier(String).

Specified by:
setCui1 in interface ConceptMapping
Parameters:
cui1 - the concept identifier for the first concept

getLastReleaseVersion

public String getLastReleaseVersion()
Returns the last release version in which the CUI1 was valid (VER).

Specified by:
getLastReleaseVersion in interface ConceptMapping
Returns:
the last release version in which the CUI1 was valid

getVer

public String getVer()
Shorthand for getLastReleaseVersion().

Specified by:
getVer in interface ConceptMapping
Returns:
the result of getLastReleaseVersion()

setLastReleaseVersion

public void setLastReleaseVersion(String ver)
Sets the last release version in which the CUI1 was valid (VER).

Specified by:
setLastReleaseVersion in interface ConceptMapping
Parameters:
ver - the last release version in which the CUI1 was valid

setVer

public void setVer(String ver)
Shorthand for setLastReleaseVersion(String)

Specified by:
setVer in interface ConceptMapping
Parameters:
ver - the last release version in which the CUI1 was valid

getRelationship

public RelationshipLabel getRelationship()
Returns the relationship between the two concepts (REL).

Specified by:
getRelationship in interface ConceptMapping
Returns:
the relationship between the two concepts

getRel

public RelationshipLabel getRel()
Shorthand for getRelationship().

Specified by:
getRel in interface ConceptMapping
Returns:
the result of getRelationship()

setRelationship

public void setRelationship(RelationshipLabel rel)
Sets the relationship between the two concepts (REL).

Specified by:
setRelationship in interface ConceptMapping
Parameters:
rel - the relationship between the two concepts

setRel

public void setRel(RelationshipLabel rel)
Shorthand for setRelationship(RelationshipLabel).

Specified by:
setRel in interface ConceptMapping
Parameters:
rel - the relationship between the two concepts

getAdditionalRelationshipLabel

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

Specified by:
getAdditionalRelationshipLabel in interface ConceptMapping
Returns:
the AdditionalRelationshipLabel

getRela

public AdditionalRelationshipLabel getRela()
Shorthand for getAdditionalRelationshipLabel()).

Specified by:
getRela in interface ConceptMapping
Returns:
the result of getAdditionalRelationshipLabel()

setAdditionalRelationshipLabel

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

Specified by:
setAdditionalRelationshipLabel in interface ConceptMapping
Parameters:
rela - the AdditionalRelationshipLabel

setRela

public void setRela(AdditionalRelationshipLabel rela)
Shorthand for setAdditionalRelationshipLabel(AdditionalRelationshipLabel).

Specified by:
setRela in interface ConceptMapping
Parameters:
rela - the AdditionalRelationshipLabel

getRelativeConceptIdentifier

public String getRelativeConceptIdentifier()
Returns the concept identifier for the second concept (CUI2).

Specified by:
getRelativeConceptIdentifier in interface ConceptMapping
Returns:
the concept identifier for the second concept

getCui2

public String getCui2()
Shorthand for getRelativeConceptIdentifier().

Specified by:
getCui2 in interface ConceptMapping
Returns:
the result of getRelativeConceptIdentifier()

setRelativeConceptIdentifier

public void setRelativeConceptIdentifier(String cui2)
Sets the concept identifier for the second concept (CUI2).

Specified by:
setRelativeConceptIdentifier in interface ConceptMapping
Parameters:
cui2 - the concept identifier for the second concept

setCui2

public void setCui2(String cui2)
Shorthand for setRelativeConceptIdentifier(String).

Specified by:
setCui2 in interface ConceptMapping
Parameters:
cui2 - the concept identifier for the second concept

getMapReason

public String getMapReason()
Returns the reason for this ConceptMapping (MAPREASON).

Specified by:
getMapReason in interface ConceptMapping
Returns:
the reason for this ConceptMapping

setMapReason

public void setMapReason(String reason)
Sets the reason for this ConceptMapping (MAPREASON).

Specified by:
setMapReason in interface ConceptMapping
Parameters:
reason - the reason for this ConceptMapping

getMapin

public String getMapin()
Returns the "in current subset" value (MAPIN).

Specified by:
getMapin in interface ConceptMapping
Returns:
the "in current subset" value

inCurrentSubset

public boolean inCurrentSubset()
Indicates whether or not this ConceptMapping is in the current subset (MAPIN).

Specified by:
inCurrentSubset in interface ConceptMapping
Returns:
boolean true if in current subset, boolean false if not in current subset

setMapin

public void setMapin(String mapin)
Sets the "in current subset" value (MAPIN).

Specified by:
setMapin in interface ConceptMapping
Parameters:
mapin - the "in current subset" value

setInCurrentSubset

public void setInCurrentSubset(boolean mapin)
Sets the flag indicating whether or not this ConceptMapping is in the current subset (MAPIN).

Specified by:
setInCurrentSubset in interface ConceptMapping
Parameters:
mapin - boolean true if in current subset, boolean false if not in current subset

getReason

public String getReason()
Return the reason for this ConceptMapping.

Specified by:
getReason in interface ConceptMapping
Returns:
reason

setReason

public void setReason(String reason)
Set the reason for this ConceptMapping.

Specified by:
setReason in interface ConceptMapping
Parameters:
reason - the reason for the mapping

hashCode

public int hashCode()
Returns a hash code based on all fields.

Returns:
a hash code based on all fields

equals

public boolean equals(Object o)
Returns true if the specified object is equal to this object. The specified object must be a ConceptMapping with matching key fields.

Parameters:
o - an Object to compare against
Returns:
boolean true if Object o is equal, false otherwise

compareTo

public int compareTo(Object o)
Compares this ConceptMapping to another one. Results are indeterminate if the specified parameter is not of the same class.

Specified by:
compareTo in interface Comparable
Parameters:
o - the Object to compare to
Returns:
int representing the relative ordering of this and the compare-to object

getKeyFields

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

Specified by:
getKeyFields in interface ConceptMapping
Returns:
a String composed from the cui1, ver, rel, rela, mapreason, cui2, and mapin.


Copyright ©2005