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

java.lang.Object
  extended bygov.nih.nlm.umls.meta.impl.PlaceholderAtom
      extended bygov.nih.nlm.umls.meta.impl.AtomImpl
All Implemented Interfaces:
Atom, Comparable, ConceptElement, ContentViewElement, SourceElement, SuppressibleElement

public class AtomImpl
extends PlaceholderAtom

Default implementation of the Atom interface.

Author:
Brian Carlsen, Deborah Shapiro

Nested Class Summary
 
Nested classes inherited from class gov.nih.nlm.umls.meta.Atom
Atom.AtomRankComparator, Atom.ByLanguageRestrictor
 
Nested classes inherited from class gov.nih.nlm.umls.meta.SourceElement
SourceElement.BySourceComparator, SourceElement.BySourceRestrictor
 
Field Summary
 
Fields inherited from class gov.nih.nlm.umls.meta.impl.PlaceholderAtom
aui, code, concept, cvf, ispref, key_fields, key_fields_flag, lat, lui, saui, scui, sdui, source, str, stt, sui, suppress, ts, tty
 
Constructor Summary
AtomImpl()
          Instantiates an empty Atom.
AtomImpl(Atom atom)
          Instantiates an Atom from the specified Atom.
 
Method Summary
 void addAttribute(AtomAttribute att)
          Adds the specified AtomAttribute.
 void addContext(Context cxt)
          Adds the specified Context.
 void addCoocurrence(Coocurrence coc)
          Adds the specified Coocurrence.
 void addDefinition(Definition def)
          Adds the specified Definition.
 void addLocator(Locator loc)
          Add the specified Locator.
 void addRelationship(Relationship rel)
          Adds the specified Relationship.
 void clearAttributes()
          Remove all AtomAttributes.
 void clearContexts()
          Remove all Contexts.
 void clearCoocurrences()
          Remove all Coocurrences.
 void clearDefinitions()
          Remove all Definitions.
 void clearLocators()
          Remove all Locators.
 void clearRelationships()
          Remove all Relationships.
 AtomAttribute[] getAttributes()
          Returns the AtomAttributes.
 List getAttributesAsList()
          Returns the AtomAttributes as a List.
 Context[] getContexts()
          Return the Contexts.
 List getContextsAsList()
          Returns the Contexts as a List.
 Coocurrence[] getCoocurrences()
          Returns the Coocurrences.
 List getCoocurrencesAsList()
          Returns the Coocurrences as a List.
 Definition[] getDefinitions()
          Returns the Definitions.
 List getDefinitionsAsList()
          Returns the Definitions as a List.
 String getKeyFields()
          Returns a String key which can be used by equals, compareTo, and hashCode methods.
 Locator[] getLocators()
          Returns the Locators.
 List getLocatorsAsList()
          Returns the Locators as a List.
 Relationship[] getRelationships()
          Returns the Relationships.
 Relationship[] getRelationships(Restrictor restrictor)
          Returns a subset of this Atom's Relationships.
 List getRelationshipsAsList()
          Returns the Relationships as a List.
 void removeAttribute(AtomAttribute att)
          Removes the specified AtomAttribute.
 void removeContext(Context cxt)
          Removes the specified Context.
 void removeCoocurrence(Coocurrence coc)
          Removes the specified Coocurrence.
 void removeDefinition(Definition def)
          Remove the specified Definition.
 void removeLocator(Locator loc)
          Removes the specified Locator.
 void removeRelationship(Relationship rel)
          Removes the specified Relationship.
 void setAttributes(AtomAttribute[] atts)
          Replace AtomAttributes with the ones in the specified array.
 void setAttributes(List atts)
          Replace AtomAttributes with the ones in the specified List.
 void setContexts(Context[] cxts)
          Replace Contexts with the ones in the specified array.
 void setContexts(List cxts)
          Replace Contexts with the ones in the specified List.
 void setCoocurrences(Coocurrence[] cocs)
          Replace Coocurrences with the ones in the specified array.
 void setCoocurrences(List cocs)
          Replace Coocurrences with the ones in the specified List.
 void setDefinitions(Definition[] defs)
          Replace Definitions with the ones in the specified array.
 void setDefinitions(List defs)
          Replace Definitions with the ones in the specified List.
 void setLocators(List locs)
          Replace Locators with the ones in the specified List.
 void setLocators(Locator[] locs)
          Replace Locators with the ones in the specified array.
 void setRelationships(List rels)
          Replace Relationships of the ones in the specified List.
 void setRelationships(Relationship[] rels)
          Replace Relationships with the ones in the specified array.
 
Methods inherited from class gov.nih.nlm.umls.meta.impl.PlaceholderAtom
compareTo, equals, getAtomIdentifier, getAui, getCode, getConcept, getContentView, getCvf, getIspref, getLanguage, getLat, getLui, getName, getSaui, getScui, getSdui, getSource, getSourceAtomIdentifier, getSourceConceptIdentifier, getSourceDescriptor, getStr, getStringIdentifier, getStringType, getStt, getSui, getSuppress, getTermIdentifier, getTermStatus, getTermType, getTs, getTty, hashCode, hasPreferredAtomIdentifier, hasPreferredAui, hasPreferredLui, hasPreferredStringIdentifier, hasPreferredSui, hasPreferredTermIdentifier, isObsolete, isSuppressible, setAtomIdentifier, setAui, setCode, setConcept, setContentView, setCvf, setIspref, setLanguage, setLat, setLui, setName, setSaui, setScui, setSdui, setSource, setSourceAtomIdentifier, setSourceConceptIdentifier, setSourceDescriptor, setStr, setStringIdentifier, setStringType, setStt, setSui, setSuppress, setTermIdentifier, setTermStatus, setTermType, setTs, setTty
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AtomImpl

public AtomImpl()
Instantiates an empty Atom.


AtomImpl

public AtomImpl(Atom atom)
Instantiates an Atom from the specified Atom.

Parameters:
atom - Atom to be copied
Method Detail

getDefinitions

public Definition[] getDefinitions()
Returns the Definitions.

Specified by:
getDefinitions in interface Atom
Overrides:
getDefinitions in class PlaceholderAtom
Returns:
a Definition []

getDefinitionsAsList

public List getDefinitionsAsList()
Returns the Definitions as a List.

Specified by:
getDefinitionsAsList in interface Atom
Overrides:
getDefinitionsAsList in class PlaceholderAtom
Returns:
the Definitions as a List

addDefinition

public void addDefinition(Definition def)
Adds the specified Definition.

Specified by:
addDefinition in interface Atom
Overrides:
addDefinition in class PlaceholderAtom
Parameters:
def - the Definition to be added

removeDefinition

public void removeDefinition(Definition def)
Remove the specified Definition.

Specified by:
removeDefinition in interface Atom
Overrides:
removeDefinition in class PlaceholderAtom
Parameters:
def - the Definition to be removed

clearDefinitions

public void clearDefinitions()
Remove all Definitions.

Specified by:
clearDefinitions in interface Atom
Overrides:
clearDefinitions in class PlaceholderAtom

setDefinitions

public void setDefinitions(Definition[] defs)
Replace Definitions with the ones in the specified array.

Specified by:
setDefinitions in interface Atom
Overrides:
setDefinitions in class PlaceholderAtom
Parameters:
defs - a Definition []

setDefinitions

public void setDefinitions(List defs)
Replace Definitions with the ones in the specified List.

Specified by:
setDefinitions in interface Atom
Overrides:
setDefinitions in class PlaceholderAtom
Parameters:
defs - a List of Definitions

getLocators

public Locator[] getLocators()
Returns the Locators.

Specified by:
getLocators in interface Atom
Overrides:
getLocators in class PlaceholderAtom
Returns:
a Locator []

getLocatorsAsList

public List getLocatorsAsList()
Returns the Locators as a List.

Specified by:
getLocatorsAsList in interface Atom
Overrides:
getLocatorsAsList in class PlaceholderAtom
Returns:
the Locators as a List

addLocator

public void addLocator(Locator loc)
Add the specified Locator.

Specified by:
addLocator in interface Atom
Overrides:
addLocator in class PlaceholderAtom
Parameters:
loc - the Locator to be added

removeLocator

public void removeLocator(Locator loc)
Removes the specified Locator.

Specified by:
removeLocator in interface Atom
Overrides:
removeLocator in class PlaceholderAtom
Parameters:
loc - the Locator to be removed

clearLocators

public void clearLocators()
Remove all Locators.

Specified by:
clearLocators in interface Atom
Overrides:
clearLocators in class PlaceholderAtom

setLocators

public void setLocators(Locator[] locs)
Replace Locators with the ones in the specified array.

Specified by:
setLocators in interface Atom
Overrides:
setLocators in class PlaceholderAtom
Parameters:
locs - a Locator []

setLocators

public void setLocators(List locs)
Replace Locators with the ones in the specified List.

Specified by:
setLocators in interface Atom
Overrides:
setLocators in class PlaceholderAtom
Parameters:
locs - a List of Locators

getRelationships

public Relationship[] getRelationships()
Returns the Relationships.

Specified by:
getRelationships in interface Atom
Overrides:
getRelationships in class PlaceholderAtom
Returns:
a Relationship []

getRelationshipsAsList

public List getRelationshipsAsList()
Returns the Relationships as a List.

Specified by:
getRelationshipsAsList in interface Atom
Overrides:
getRelationshipsAsList in class PlaceholderAtom
Returns:
the Relationships as a List

addRelationship

public void addRelationship(Relationship rel)
Adds the specified Relationship.

Specified by:
addRelationship in interface Atom
Overrides:
addRelationship in class PlaceholderAtom
Parameters:
rel - the Relationship to be added

removeRelationship

public void removeRelationship(Relationship rel)
Removes the specified Relationship.

Specified by:
removeRelationship in interface Atom
Overrides:
removeRelationship in class PlaceholderAtom
Parameters:
rel - the Relationship to be removed

clearRelationships

public void clearRelationships()
Remove all Relationships.

Specified by:
clearRelationships in interface Atom
Overrides:
clearRelationships in class PlaceholderAtom

setRelationships

public void setRelationships(Relationship[] rels)
Replace Relationships with the ones in the specified array.

Specified by:
setRelationships in interface Atom
Overrides:
setRelationships in class PlaceholderAtom
Parameters:
rels - a Relationship []

setRelationships

public void setRelationships(List rels)
Replace Relationships of the ones in the specified List.

Specified by:
setRelationships in interface Atom
Overrides:
setRelationships in class PlaceholderAtom
Parameters:
rels - a List of Relationships

getCoocurrences

public Coocurrence[] getCoocurrences()
Returns the Coocurrences.

Specified by:
getCoocurrences in interface Atom
Overrides:
getCoocurrences in class PlaceholderAtom
Returns:
a Coocurrence []

getCoocurrencesAsList

public List getCoocurrencesAsList()
Returns the Coocurrences as a List.

Specified by:
getCoocurrencesAsList in interface Atom
Overrides:
getCoocurrencesAsList in class PlaceholderAtom
Returns:
the Coocurrences as a List

addCoocurrence

public void addCoocurrence(Coocurrence coc)
Adds the specified Coocurrence.

Specified by:
addCoocurrence in interface Atom
Overrides:
addCoocurrence in class PlaceholderAtom
Parameters:
coc - the Coocurrence to be added

removeCoocurrence

public void removeCoocurrence(Coocurrence coc)
Removes the specified Coocurrence.

Specified by:
removeCoocurrence in interface Atom
Overrides:
removeCoocurrence in class PlaceholderAtom
Parameters:
coc - the Coocurrence to be removed

clearCoocurrences

public void clearCoocurrences()
Remove all Coocurrences.

Specified by:
clearCoocurrences in interface Atom
Overrides:
clearCoocurrences in class PlaceholderAtom

setCoocurrences

public void setCoocurrences(Coocurrence[] cocs)
Replace Coocurrences with the ones in the specified array.

Specified by:
setCoocurrences in interface Atom
Overrides:
setCoocurrences in class PlaceholderAtom
Parameters:
cocs - a Coocurrence []

setCoocurrences

public void setCoocurrences(List cocs)
Replace Coocurrences with the ones in the specified List.

Specified by:
setCoocurrences in interface Atom
Overrides:
setCoocurrences in class PlaceholderAtom
Parameters:
cocs - a List of Coocurrences

getContexts

public Context[] getContexts()
Return the Contexts.

Specified by:
getContexts in interface Atom
Overrides:
getContexts in class PlaceholderAtom
Returns:
a Context []

getContextsAsList

public List getContextsAsList()
Returns the Contexts as a List.

Specified by:
getContextsAsList in interface Atom
Overrides:
getContextsAsList in class PlaceholderAtom
Returns:
the Contexts as a List

addContext

public void addContext(Context cxt)
Adds the specified Context.

Specified by:
addContext in interface Atom
Overrides:
addContext in class PlaceholderAtom
Parameters:
cxt - the Context to be added

removeContext

public void removeContext(Context cxt)
Removes the specified Context.

Specified by:
removeContext in interface Atom
Overrides:
removeContext in class PlaceholderAtom
Parameters:
cxt - the Context to be removed

clearContexts

public void clearContexts()
Remove all Contexts.

Specified by:
clearContexts in interface Atom
Overrides:
clearContexts in class PlaceholderAtom

setContexts

public void setContexts(Context[] cxts)
Replace Contexts with the ones in the specified array.

Specified by:
setContexts in interface Atom
Overrides:
setContexts in class PlaceholderAtom
Parameters:
cxts - a Context []

setContexts

public void setContexts(List cxts)
Replace Contexts with the ones in the specified List.

Specified by:
setContexts in interface Atom
Overrides:
setContexts in class PlaceholderAtom
Parameters:
cxts - a List of Contexts

getAttributes

public AtomAttribute[] getAttributes()
Returns the AtomAttributes.

Specified by:
getAttributes in interface Atom
Overrides:
getAttributes in class PlaceholderAtom
Returns:
a AtomAttribute []

getAttributesAsList

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

Specified by:
getAttributesAsList in interface Atom
Overrides:
getAttributesAsList in class PlaceholderAtom
Returns:
the AtomAttributes as a List

addAttribute

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

Specified by:
addAttribute in interface Atom
Overrides:
addAttribute in class PlaceholderAtom
Parameters:
att - the AtomAttribute to be added

removeAttribute

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

Specified by:
removeAttribute in interface Atom
Overrides:
removeAttribute in class PlaceholderAtom
Parameters:
att - the AtomAttribute to be removed

clearAttributes

public void clearAttributes()
Remove all AtomAttributes.

Specified by:
clearAttributes in interface Atom
Overrides:
clearAttributes in class PlaceholderAtom

setAttributes

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

Specified by:
setAttributes in interface Atom
Overrides:
setAttributes in class PlaceholderAtom
Parameters:
atts - an AtomAttribute []

setAttributes

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

Specified by:
setAttributes in interface Atom
Overrides:
setAttributes in class PlaceholderAtom
Parameters:
atts - a List of AtomAttributes

getRelationships

public Relationship[] getRelationships(Restrictor restrictor)
Returns a subset of this Atom's Relationships. Restricts the return based on the given Restrictor.

Specified by:
getRelationships in interface Atom
Overrides:
getRelationships in class PlaceholderAtom
Parameters:
restrictor - Restrictor
Returns:
Relationship[]

getKeyFields

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

Specified by:
getKeyFields in interface Atom
Overrides:
getKeyFields in class PlaceholderAtom
Returns:
a String composed from the cui, aui, sui, versioned source, tty, and code.


Copyright ©2005