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

java.lang.Object
  extended bygov.nih.nlm.umls.meta.impl.ComponentHistoryImpl
All Implemented Interfaces:
Comparable, ComponentHistory, ConceptElement, ContentViewElement, SourceElement

public class ComponentHistoryImpl
extends Object
implements ComponentHistory

Default implementation of ComponentHistory.

Author:
Brian Carlsen, Deborah Shapiro

Nested Class Summary
 
Nested classes inherited from class gov.nih.nlm.umls.meta.SourceElement
SourceElement.BySourceComparator, SourceElement.BySourceRestrictor
 
Constructor Summary
ComponentHistoryImpl()
          Instantiates an empty ComponentHistory.
ComponentHistoryImpl(ComponentHistory co)
          Instantiates a ComponentHistory from the specified ComponentHistory.
 
Method Summary
 int compareTo(Object o)
          Compares this ComponentHistory to another one.
 boolean equals(Object o)
          Returns true if the specified object is equal to this object.
 String getChangeKey()
          Returns the change key which identifies what changed (CHANGEKEY).
 String getChangeType()
          Returns the change type which identifies what changed (CHANGETYPE).
 String getChangeValue()
          Returns the new value for what changed (CHANGEVALUE).
 Concept getConcept()
          Returns the Concept that holds this ComponentHistory.
 ContentView getContentView()
          Returns tbe ContentView definition for this Locator (CVF).
 ContentView getCvf()
          Shorthand for getContentView().
 String getIdentifier()
          Returns the unique identifier (UI).
 String getKeyFields()
          Returns a String key which can be used by equals, compareTo, and hashCode methods.
 String getReason()
          Returns the reason for the change (REASON).
 Source getSource()
          Returns the source for this ComponentHistory.
 String getSver()
          Shorthand for getVersion().
 String getUi()
          Shorthand for getIdentifier().
 String getVersion()
          Returns the release date or version number of a source (SVER).
 int hashCode()
          Return a hash code based on key fields.
 void setChangeKey(String changekey)
          Sets the change key to identify what changed (CHANGEKEY).
 void setChangeType(String changetype)
          Sets the change type to identify what changed (CHANGETYPE).
 void setChangeValue(String changeval)
          Sets the new value for what changed (CHANGEVALUE).
 void setConcept(Concept concept)
          Sets the Concept that holds this ComponentHistory.
 void setContentView(ContentView cvf)
          Sets tbe ContentView definition for this Locator (CVF).
 void setCvf(ContentView cvf)
          Shorthand for setContentView(ContentView).
 void setIdentifier(String ui)
          Sets the unique identifier (UI).
 void setReason(String reason)
          Sets the reason for the change (REASON).
 void setSource(Source source)
          Sets the source for this ComponentHistory.
 void setSver(String sver)
          Shorthand for setVersion(String).
 void setUi(String ui)
          Shorthand for setIdentifier(String).
 void setVersion(String sver)
          Sets the release date or version number of a source (SVER).
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentHistoryImpl

public ComponentHistoryImpl()
Instantiates an empty ComponentHistory.


ComponentHistoryImpl

public ComponentHistoryImpl(ComponentHistory co)
Instantiates a ComponentHistory from the specified ComponentHistory.

Parameters:
co - the ComponentHistory to be copied
Method Detail

getVersion

public String getVersion()
Returns the release date or version number of a source (SVER).

Specified by:
getVersion in interface ComponentHistory
Returns:
the release date or version number of a source

getSver

public String getSver()
Shorthand for getVersion().

Specified by:
getSver in interface ComponentHistory
Returns:
the result of getVersion()

setVersion

public void setVersion(String sver)
Sets the release date or version number of a source (SVER).

Specified by:
setVersion in interface ComponentHistory
Parameters:
sver - the release date or version number of a source

setSver

public void setSver(String sver)
Shorthand for setVersion(String).

Specified by:
setSver in interface ComponentHistory
Parameters:
sver - the release date or version number of a source

getChangeKey

public String getChangeKey()
Returns the change key which identifies what changed (CHANGEKEY).

Specified by:
getChangeKey in interface ComponentHistory
Returns:
the change key

setChangeKey

public void setChangeKey(String changekey)
Sets the change key to identify what changed (CHANGEKEY).

Specified by:
setChangeKey in interface ComponentHistory
Parameters:
changekey - the change key

getChangeType

public String getChangeType()
Returns the change type which identifies what changed (CHANGETYPE).

Specified by:
getChangeType in interface ComponentHistory
Returns:
the change type

setChangeType

public void setChangeType(String changetype)
Sets the change type to identify what changed (CHANGETYPE).

Specified by:
setChangeType in interface ComponentHistory
Parameters:
changetype - the change type

getChangeValue

public String getChangeValue()
Returns the new value for what changed (CHANGEVALUE).

Specified by:
getChangeValue in interface ComponentHistory
Returns:
the change value

setChangeValue

public void setChangeValue(String changeval)
Sets the new value for what changed (CHANGEVALUE).

Specified by:
setChangeValue in interface ComponentHistory
Parameters:
changeval - the change value

getReason

public String getReason()
Returns the reason for the change (REASON).

Specified by:
getReason in interface ComponentHistory
Returns:
the reason

setReason

public void setReason(String reason)
Sets the reason for the change (REASON).

Specified by:
setReason in interface ComponentHistory
Parameters:
reason - reason for the changed

getConcept

public Concept getConcept()
Returns the Concept that holds this ComponentHistory.

Specified by:
getConcept in interface ConceptElement
Returns:
the Concept that holds this ComponentHistory

setConcept

public void setConcept(Concept concept)
Sets the Concept that holds this ComponentHistory.

Specified by:
setConcept in interface ConceptElement
Parameters:
concept - the Concept that holds this ComponentHistory

getSource

public Source getSource()
Returns the source for this ComponentHistory.

Specified by:
getSource in interface SourceElement
Returns:
Source

setSource

public void setSource(Source source)
Sets the source for this ComponentHistory.

Specified by:
setSource in interface SourceElement
Parameters:
source - Source

getUi

public String getUi()
Shorthand for getIdentifier().

Specified by:
getUi in interface ComponentHistory
Returns:
the result of getIdentifier()

getIdentifier

public String getIdentifier()
Returns the unique identifier (UI).

Specified by:
getIdentifier in interface ComponentHistory
Returns:
the unique identifier

setIdentifier

public void setIdentifier(String ui)
Sets the unique identifier (UI).

Specified by:
setIdentifier in interface ComponentHistory
Parameters:
ui - the new value

setUi

public void setUi(String ui)
Shorthand for setIdentifier(String).

Specified by:
setUi in interface ComponentHistory
Parameters:
ui - the new value

getContentView

public ContentView getContentView()
Returns tbe ContentView definition for this Locator (CVF).

Specified by:
getContentView in interface ContentViewElement
Returns:
tbe ContentView definition

setContentView

public void setContentView(ContentView cvf)
Sets tbe ContentView definition for this Locator (CVF).

Specified by:
setContentView in interface ContentViewElement
Parameters:
cvf - the ContentView definition

getCvf

public ContentView getCvf()
Shorthand for getContentView().

Specified by:
getCvf in interface ContentViewElement
Returns:
tbe ContentView definition

setCvf

public void setCvf(ContentView cvf)
Shorthand for setContentView(ContentView).

Specified by:
setCvf in interface ContentViewElement
Parameters:
cvf - the ContentView definition

hashCode

public int hashCode()
Return a hash code based on key fields.

Returns:
a hash code based on key fields

equals

public boolean equals(Object o)
Returns true if the specified object is equal to this object. The specified object must be a ComponentHistory 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 ComponentHistory 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 ComponentHistory
Returns:
a String composed from the ui, change, newval, and description.


Copyright ©2005