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

java.lang.Object
  extended bygov.nih.nlm.umls.meta.impl.AttributeImpl
All Implemented Interfaces:
Attribute, AttributeElement, Comparable, ConceptElement, ContentViewElement, SourceElement, SourceIdentifierElement, SuppressibleElement
Direct Known Subclasses:
AtomAttributeImpl, RelationshipAttributeImpl

public class AttributeImpl
extends Object
implements Attribute

Default implementation of the Attribute interface.

Author:
Brian Carlsen, Deborah Shapiro

Nested Class Summary
 
Nested classes inherited from class gov.nih.nlm.umls.meta.SourceElement
SourceElement.BySourceComparator, SourceElement.BySourceRestrictor
 
Field Summary
protected  String key_fields
           
protected  boolean key_fields_flag
           
 
Constructor Summary
AttributeImpl()
          Instantiate an empty Attribute.
AttributeImpl(Attribute att)
          This is a copy constructor for Attribute.
 
Method Summary
 int compareTo(Object o)
          Compares this Attribute to another one.
 boolean equals(Object o)
          Returns true if the specified object is equal to this object.
 AttributeName getAtn()
          Shorthand for getAttributeName().
 String getAttributeIdentifier()
          Returns the unique identifier (ATUI).
 AttributeName getAttributeName()
          Returns the AttributeName (ATN).
 String getAttributeValue()
          Returns the attribute value (ATV).
 String getAtui()
          Returns the unique identifier (ATUI).
 String getAtv()
          Shorthand for getAttributeValue().
 Concept getConcept()
          Returns the Concept that holds this Attribute.
 ContentView getContentView()
          Returns tbe ContentView definition for this Attribute (CVF).
 ContentView getCvf()
          Shorthand for getContentView().
 String getKeyFields()
          Returns a String key which can be used by equals, compareTo, and hashCode methods.
 String getSatui()
          Shorthand for getSourceAttributeIdentifier().
 Source getSource()
          Returns the source for this Attribute.
 String getSourceAttributeIdentifier()
          Returns the source asserted attribute identifier (SATUI).
 SourceIdentifierType getSourceIdentifierType()
          Returns the SourceIdentifierType to which this element is connected.
 Suppressible getSuppress()
          Returns the suppressibility value (SUPPRESS).
 int hashCode()
          Return a hash code based on key fields.
 boolean isObsolete()
          Indicates whether or not this AttributeImpl is obsolete.
 boolean isSuppressible()
          Indicates whether or not this Attribute is suppressible.
 void setAtn(AttributeName atn)
          Shorthand for setAttributeName(AttributeName).
 void setAttributeIdentifier(String atui)
          Sets the unique identifier (ATUI).
 void setAttributeName(AttributeName atn)
          Sets the AttributeName (ATN).
 void setAttributeValue(String atv)
          Sets the attribute value (ATV).
 void setAtui(String atui)
          Shorthand for setAttributeIdentifier(String).
 void setAtv(String atv)
          Shorthand for setAttributeValue(String).
 void setConcept(Concept concept)
          Sets the Concept that holds this Attribute.
 void setContentView(ContentView cvf)
          Sets tbe ContentView definition for this Attribute (CVF).
 void setCvf(ContentView cvf)
          Shorthand for setContentView(ContentView).
 void setSatui(String satui)
          Shorthand for setSourceAttributeIdentifier(String).
 void setSource(Source source)
          Sets the source for this Attribute.
 void setSourceAttributeIdentifier(String satui)
          Sets the source asserted attribute identifier (SATUI).
 void setSourceIdentifierType(SourceIdentifierType sit)
          Sets the SourceIdentifierType to which this element is connected.
 void setSuppress(Suppressible suppress)
          Sets the suppressibility value (SUPPRESS).
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

key_fields_flag

protected boolean key_fields_flag

key_fields

protected String key_fields
Constructor Detail

AttributeImpl

public AttributeImpl()
Instantiate an empty Attribute.


AttributeImpl

public AttributeImpl(Attribute att)
This is a copy constructor for Attribute.

Parameters:
att - Attribute to be copied
Method Detail

getSourceIdentifierType

public SourceIdentifierType getSourceIdentifierType()
Returns the SourceIdentifierType to which this element is connected.

Specified by:
getSourceIdentifierType in interface SourceIdentifierElement
Returns:
the SourceIdentifierType to which this element is connected

setSourceIdentifierType

public void setSourceIdentifierType(SourceIdentifierType sit)
Sets the SourceIdentifierType to which this element is connected.

Specified by:
setSourceIdentifierType in interface SourceIdentifierElement
Parameters:
sit - the SourceIdentifierType to which this element is connected.

getAttributeIdentifier

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

Specified by:
getAttributeIdentifier in interface AttributeElement
Returns:
the ATUI

getAtui

public String getAtui()
Returns the unique identifier (ATUI). This is 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 Attribute.

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

setConcept

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

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

getSource

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

Specified by:
getSource in interface SourceElement
Returns:
Source

setSource

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

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

getContentView

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

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

setContentView

public void setContentView(ContentView cvf)
Sets tbe ContentView definition for this Attribute (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

getAttributeName

public AttributeName getAttributeName()
Returns the AttributeName (ATN).

Specified by:
getAttributeName in interface Attribute
Returns:
the AttributeName

getAtn

public AttributeName getAtn()
Shorthand for getAttributeName().

Specified by:
getAtn in interface Attribute
Returns:
the AttributeName

setAttributeName

public void setAttributeName(AttributeName atn)
Sets the AttributeName (ATN).

Specified by:
setAttributeName in interface Attribute
Parameters:
atn - the AttributeName

setAtn

public void setAtn(AttributeName atn)
Shorthand for setAttributeName(AttributeName).

Specified by:
setAtn in interface Attribute
Parameters:
atn - the AttributeName

getAttributeValue

public String getAttributeValue()
Returns the attribute value (ATV).

Specified by:
getAttributeValue in interface Attribute
Returns:
the attribute value

getAtv

public String getAtv()
Shorthand for getAttributeValue().

Specified by:
getAtv in interface Attribute
Returns:
the attribute value

setAttributeValue

public void setAttributeValue(String atv)
Sets the attribute value (ATV).

Specified by:
setAttributeValue in interface Attribute
Parameters:
atv - the attribute value

setAtv

public void setAtv(String atv)
Shorthand for setAttributeValue(String).

Specified by:
setAtv in interface Attribute
Parameters:
atv - the attribute value

getSuppress

public Suppressible getSuppress()
Returns the suppressibility value (SUPPRESS).

Specified by:
getSuppress in interface SuppressibleElement
Returns:
the Suppressible value

isSuppressible

public boolean isSuppressible()
Indicates whether or not this Attribute is suppressible.

Specified by:
isSuppressible in interface SuppressibleElement
Returns:
true if suppressible, false if not suppressible

setSuppress

public void setSuppress(Suppressible suppress)
Sets the suppressibility value (SUPPRESS).

Specified by:
setSuppress in interface SuppressibleElement
Parameters:
suppress - the Suppressible value

isObsolete

public boolean isObsolete()
Indicates whether or not this AttributeImpl is obsolete.

Specified by:
isObsolete in interface SuppressibleElement
Returns:
true if obsolete, false if not obsolete

getKeyFields

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

Specified by:
getKeyFields in interface Attribute
Returns:
a String composed from the cui, atui, versioned source, atn, atv, and satui.

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 an Attribute 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 Attribute 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