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

java.lang.Object
  extended bygov.nih.nlm.umls.meta.impl.LocatorImpl
All Implemented Interfaces:
AtomElement, AttributeElement, Comparable, ConceptElement, ContentViewElement, Locator, SourceElement

public class LocatorImpl
extends Object
implements Locator

Default implementation of the Locator interface.

Author:
Brian Carlsen, Deborah Shapiro

Nested Class Summary
 
Nested classes inherited from class gov.nih.nlm.umls.meta.AtomElement
AtomElement.ByLanguageRestrictor, AtomElement.BySourceRestrictor
 
Nested classes inherited from class gov.nih.nlm.umls.meta.SourceElement
SourceElement.BySourceComparator, SourceElement.BySourceRestrictor
 
Constructor Summary
LocatorImpl()
          Instantiates an empty Locator.
LocatorImpl(Locator loc)
          Instantiates a Locator from the specified Locator.
 
Method Summary
 int compareTo(Object o)
          Compares this Locator to another one.
 boolean equals(Object o)
          Returns true if the specified object is equal to this object.
 Atom getAtom()
          Returns the Atom related to this Locator.
 String getAttributeIdentifier()
          Returns the unique identifier (ATUI).
 String getAtui()
          Shorthand for getAttributeIdentifier().
 Concept getConcept()
          Returns the Concept that holds this Locator.
 ContentView getContentView()
          Returns tbe ContentView definition for this Locator (CVF).
 ContentView getCvf()
          Shorthand for getContentView().
 String getExternalName()
          Returns the actual name that occurs in the information source (SNA) if not otherwise present in the Metathesaurus.
 int getFr()
          Shorthand for getFrequency().
 int getFrequency()
          Returns the frequency (FR).
 String getFrequencyMeaning()
          Returns the meaning of the frequency (UN), if the frequency is set.
 String getKeyFields()
          Returns a String key which can be used by equals, compareTo, and hashCode methods.
 String getRecordIdentifier()
          Returns the record identifier (SOUI) corresponding to this Locator in the actual information source.
 String getSatui()
          Shorthand for getSourceAttributeIdentifier().
 String getSna()
          Shorthand for getExternalName().
 String getSoui()
          Shorthand for getRecordIdentifier().
 Source getSource()
          Returns the source for this Locator.
 String getSourceAttributeIdentifier()
          Returns the source asserted attribute identifier (SATUI).
 String getStringIdentifier()
          Return the string identifier (SUI).
 String getSui()
          Shorthand for getStringIdentifier().
 String getUn()
          Shorthand for getFrequencyMeaning().
 int hashCode()
          Return a hash code based on key fields.
 void setAtom(Atom atom)
          Sets the Atom related to this Locator.
 void setAttributeIdentifier(String atui)
          Sets the unique identifier (ATUI).
 void setAtui(String atui)
          Shorthand for setAttributeIdentifier(String).
 void setConcept(Concept concept)
          Sets the Concept that holds this Locator.
 void setContentView(ContentView cvf)
          Sets tbe ContentView definition for this Locator (CVF).
 void setCvf(ContentView cvf)
          Shorthand for setContentView(ContentView).
 void setExternalName(String sna)
          Sets the actual name that occurs in the information source (SNA) if not otherwise present in the Metathesaurus.
 void setFr(int fr)
          Shorthand for setFrequency(int).
 void setFrequency(int fr)
          Sets the frequency (FR).
 void setFrequencyMeaning(String un)
          Returns the meaning of the frequency (UN), if the frequency is set.
 void setRecordIdentifier(String soui)
          Sets the record identifier (SOUI) corresponding to this Locator in the actual information source.
 void setSatui(String satui)
          Shorthand for setSourceAttributeIdentifier(String).
 void setSna(String sna)
          Shorthand for setExternalName(String).
 void setSoui(String soui)
          Shorthand for setRecordIdentifier(String).
 void setSource(Source source)
          Sets the source for this Locator.
 void setSourceAttributeIdentifier(String satui)
          Sets the source asserted attribute identifier (SATUI).
 void setStringIdentifier(String sui)
          Sets the string identifier (SUI).
 void setSui(String sui)
          Shorthand for setStringIdentifier(String).
 void setUn(String un)
          Shorthand for setFrequencyMeaning(String).
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocatorImpl

public LocatorImpl()
Instantiates an empty Locator.


LocatorImpl

public LocatorImpl(Locator loc)
Instantiates a Locator from the specified Locator.

Parameters:
loc - Locator to be copied
Method Detail

getAtom

public Atom getAtom()
Returns the Atom related to this Locator.

Specified by:
getAtom in interface AtomElement
Returns:
the Atom related to this Locator

setAtom

public void setAtom(Atom atom)
Sets the Atom related to this Locator.

Specified by:
setAtom in interface AtomElement
Parameters:
atom - the Atom related to this Locator

getAttributeIdentifier

public String getAttributeIdentifier()
Returns the unique identifier (ATUI).

Specified by:
getAttributeIdentifier in interface AttributeElement
Returns:
the ATUI

getAtui

public String getAtui()
Shorthand for getAttributeIdentifier().

Specified by:
getAtui in interface AttributeElement
Returns:
the ATUI

setAttributeIdentifier

public void setAttributeIdentifier(String atui)
Sets the unique identifier (ATUI).

Specified by:
setAttributeIdentifier in interface AttributeElement
Parameters:
atui - the ATUI

setAtui

public void setAtui(String atui)
Shorthand for setAttributeIdentifier(String).

Specified by:
setAtui in interface AttributeElement
Parameters:
atui - the ATUI

getSourceAttributeIdentifier

public String getSourceAttributeIdentifier()
Returns the source asserted attribute identifier (SATUI).

Specified by:
getSourceAttributeIdentifier in interface AttributeElement
Returns:
the SATUI

getSatui

public String getSatui()
Shorthand for getSourceAttributeIdentifier().

Specified by:
getSatui in interface AttributeElement
Returns:
the SATUI

setSourceAttributeIdentifier

public void setSourceAttributeIdentifier(String satui)
Sets the source asserted attribute identifier (SATUI).

Specified by:
setSourceAttributeIdentifier in interface AttributeElement
Parameters:
satui - the SATUI

setSatui

public void setSatui(String satui)
Shorthand for setSourceAttributeIdentifier(String).

Specified by:
setSatui in interface AttributeElement
Parameters:
satui - the SATUI

getConcept

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

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

setConcept

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

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

getFrequency

public int getFrequency()
Returns the frequency (FR).

Specified by:
getFrequency in interface Locator
Returns:
the frequency
See Also:
getFrequencyMeaning()

getFr

public int getFr()
Shorthand for getFrequency().

Specified by:
getFr in interface Locator
Returns:
the frequency

setFrequency

public void setFrequency(int fr)
Sets the frequency (FR).

Specified by:
setFrequency in interface Locator
Parameters:
fr - the frequency

setFr

public void setFr(int fr)
Shorthand for setFrequency(int).

Specified by:
setFr in interface Locator
Parameters:
fr - the frequency

getUn

public String getUn()
Shorthand for getFrequencyMeaning().

Specified by:
getUn in interface Locator
Returns:
the meaning of the frequency, if the frequency is set.

getFrequencyMeaning

public String getFrequencyMeaning()
Returns the meaning of the frequency (UN), if the frequency is set.

Specified by:
getFrequencyMeaning in interface Locator
Returns:
the meaning of the frequency, if the frequency is set.

setUn

public void setUn(String un)
Shorthand for setFrequencyMeaning(String).

Specified by:
setUn in interface Locator
Parameters:
un - the meaning of the frequency, if the frequency is set.

setFrequencyMeaning

public void setFrequencyMeaning(String un)
Returns the meaning of the frequency (UN), if the frequency is set.

Specified by:
setFrequencyMeaning in interface Locator
Parameters:
un - the meaning of the frequency, if the frequency is set.

getExternalName

public String getExternalName()
Returns the actual name that occurs in the information source (SNA) if not otherwise present in the Metathesaurus.

Specified by:
getExternalName in interface Locator
Returns:
the actual name that occurs in the information source

getSna

public String getSna()
Shorthand for getExternalName().

Specified by:
getSna in interface Locator
Returns:
the actual name that occurs in the information source

setExternalName

public void setExternalName(String sna)
Sets the actual name that occurs in the information source (SNA) if not otherwise present in the Metathesaurus.

Specified by:
setExternalName in interface Locator
Parameters:
sna - the actual name that occurs in the information source

setSna

public void setSna(String sna)
Shorthand for setExternalName(String).

Specified by:
setSna in interface Locator
Parameters:
sna - the actual name that occurs in the information source

getSoui

public String getSoui()
Shorthand for getRecordIdentifier().

Specified by:
getSoui in interface Locator
Returns:
the record identifier

getRecordIdentifier

public String getRecordIdentifier()
Returns the record identifier (SOUI) corresponding to this Locator in the actual information source.

Specified by:
getRecordIdentifier in interface Locator
Returns:
the record identifier

setSoui

public void setSoui(String soui)
Shorthand for setRecordIdentifier(String).

Specified by:
setSoui in interface Locator
Parameters:
soui - the record identifier

setRecordIdentifier

public void setRecordIdentifier(String soui)
Sets the record identifier (SOUI) corresponding to this Locator in the actual information source.

Specified by:
setRecordIdentifier in interface Locator
Parameters:
soui - the record identifier

getSource

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

Specified by:
getSource in interface SourceElement
Returns:
Source

setSource

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

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

getSui

public String getSui()
Shorthand for getStringIdentifier().

Specified by:
getSui in interface Locator
Returns:
the SUI

setSui

public void setSui(String sui)
Shorthand for setStringIdentifier(String).

Specified by:
setSui in interface Locator
Parameters:
sui - the SUI

getStringIdentifier

public String getStringIdentifier()
Return the string identifier (SUI).

Specified by:
getStringIdentifier in interface Locator
Returns:
the SUI

setStringIdentifier

public void setStringIdentifier(String sui)
Sets the string identifier (SUI).

Specified by:
setStringIdentifier in interface Locator
Parameters:
sui - the SUI

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

getKeyFields

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

Specified by:
getKeyFields in interface Locator
Returns:
a String composed from the cui, aui, versioned source, fr, un, sui, sna, and soui.

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 Locator 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 Locator 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


Copyright ©2005