gov.nih.nlm.umls.meta
Interface Concept

All Superinterfaces:
Comparable
All Known Implementing Classes:
PlaceholderConcept

public interface Concept
extends Comparable

Represents a UMLS Concept.

Author:
Brian Carlsen, Deborah Shapiro

Nested Class Summary
static class Concept.ByCUIComparator
          Inner class compares Concepts based on cui.
static class Concept.ByPreferredNameComparator
          Sorts the Concepts based on String order.
 
Method Summary
 void addAtom(Atom atom)
          Adds the specified Atom.
 void addAttribute(Attribute att)
          Adds the specified Attribute.
 void addComponentHistory(ComponentHistory map)
          Adds a ComponentHistory.
 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 addMapping(Mapping map)
          Adds a Mapping.
 void addRelationship(Relationship rel)
          Adds the specified Relationship.
 void addSemanticType(SemanticType sty)
          Adds a SemanticType.
 void clear()
          This removes all of the Concept's components.
 void clearAtoms()
          Remove all Atoms.
 void clearAttributes()
          Remove all Attributes.
 void clearComponentHistories()
          Removes all ComponentHistorys.
 void clearContexts()
          Remove all Contexts.
 void clearCoocurrences()
          Remove all Coocurrences.
 void clearDefinitions()
          Remove all Definitions.
 void clearLocators()
          Remove all Locators.
 void clearMappings()
          Removes all Mappings.
 void clearRelationships()
          Remove all Relationships.
 void clearSemanticTypes()
          Removes all SemanticTypes.
 Atom[] getAtoms()
          Returns the Atoms.
 Atom[] getAtoms(Restrictor restrictor)
          Returns a subset of this Concept's Atoms.
 List getAtomsAsList()
          Returns the Atoms as a List.
 Attribute[] getAttributes()
          Returns the Attributes.
 List getAttributesAsList()
          Returns the Attributes as a List.
 Attribute[] getAttributesForAtom(Atom atom)
          Returns the attributes with aui that matches that of the given Atom.
 List getAttributesForAtomAsList(Atom atom)
          Returns the attributes with aui that matches that of the given Atom in a List.
 AtomAttribute[] getAttributesForRelationship(AtomRelationship rel)
          Returns the attributes with aui that matches that of the given Relationship.
 List getAttributesForRelationshipAsList(AtomRelationship rel)
          Returns the attributes with aui that matches that of the given Relationship in a List.
 ComponentHistory[] getComponentHistories()
          Returns the ComponentHistorys.
 List getComponentHistoriesAsList()
          Returns the ComponentHistorys as a List.
 String getConceptIdentifier()
          Returns the concept unique identifier (CUI) for the Concept.
 ContextGroup[] getContextGroups()
          Return the ContextGroups.
 List getContextGroupsAsList()
          Returns the ContextGroups as a List.
 Context[] getContexts()
          Return the Contexts.
 Context[] getContexts(Restrictor restrictor)
          Returns a subset of this Concept's Contexts.
 List getContextsAsList()
          Returns the Contexts as a List.
 CoocurrenceGroup[] getCoocurrenceGroups()
          Returns the CoocurrenceGroups.
 List getCoocurrenceGroupsAsList()
          Returns the CoocurrenceGroups as a List.
 Coocurrence[] getCoocurrences()
          Returns the Coocurrences.
 Coocurrence[] getCoocurrences(Restrictor restrictor)
          Returns a subset of this Concept's Coocurrences.
 List getCoocurrencesAsList()
          Returns the Coocurrences as a List.
 String getCui()
          Returns the concept unique identifier (CUI) for the Concept.
 Definition[] getDefinitions()
          Returns the Definitions.
 Definition[] getDefinitions(Restrictor restrictor)
          Returns a subset of this Concept's 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.
 Mapping[] getMappings()
          Returns the Mappings.
 List getMappingsAsList()
          Returns the Mappings as a List.
 Atom getPreferredAtom()
          Returns the preferred atom of the concept.
 Atom getPreferredAtom(Comparator comparator)
          Returns the preferred atom of the concept.
 Relationship[] getRelationships()
          Returns the Relationships.
 Relationship[] getRelationships(Restrictor restrictor)
          Returns a subset of this Concept's Relationships.
 List getRelationshipsAsList()
          Returns the Relationships as a List.
 SemanticType[] getSemanticTypes()
          Returns the SemanticTypes.
 List getSemanticTypesAsList()
          Returns the SemanticTypes as a List.
 TermAttribute[] getTermAttributes()
          Returns the TermAttributes.
 List getTermAttributesAsList()
          Returns the TermAttributes as a List.
 Term[] getTerms()
          Returns the Terms.
 List getTermsAsList()
          Returns the Terms as a List.
 boolean isEmpty()
          This indicates if the Concept is empty, meaning that either the SemanticType was removed or all of the Atoms were removed.
 void removeAtom(Atom atom)
          Removes the specified Atom.
 void removeAttribute(Attribute att)
          Removes the specified Attribute.
 void removeComponentHistory(ComponentHistory map)
          Removes the specified ComponentHistory.
 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 removeMapping(Mapping map)
          Removes the specified Mapping.
 void removeRelationship(Relationship rel)
          Removes the specified Relationship.
 void removeSemanticType(SemanticType sty)
          Removes the specified SemanticType.
 void setAtoms(Atom[] atoms)
          Replace any Atoms with the ones in the specified array.
 void setAtoms(List atoms)
          Replace Atoms with the ones in the specified List.
 void setAttributes(Attribute[] atts)
          Replace Attributes with the ones in the specified array.
 void setAttributes(List atts)
          Replace Attributes with the ones in the specified List.
 void setComponentHistories(ComponentHistory[] maps)
          Replace ComponentHistorys with the ones in the specified array.
 void setComponentHistories(List maps)
          Replace ComponentHistorys with the ones in the specified List.
 void setConceptIdentifier(String cui)
          Sets the concept unique identifier (CUI) for the Concept.
 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 setCui(String cui)
          Sets the concept unique identifier (CUI) for the Concept.
 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 setMappings(List maps)
          Replace Mappings with the ones in the specified List.
 void setMappings(Mapping[] maps)
          Replace Mappings 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.
 void setSemanticTypes(List stys)
          Replace SemanticTypes with the ones in the specified List.
 void setSemanticTypes(SemanticType[] stys)
          Replace SemanticTypes with the ones in the specified array.
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

clear

public void clear()
This removes all of the Concept's components.


isEmpty

public boolean isEmpty()
This indicates if the Concept is empty, meaning that either the SemanticType was removed or all of the Atoms were removed.

Returns:
boolean if empty

getAtoms

public Atom[] getAtoms()
Returns the Atoms.

Returns:
an Atom []

getAtomsAsList

public List getAtomsAsList()
Returns the Atoms as a List.

Returns:
the Atoms as a List

addAtom

public void addAtom(Atom atom)
Adds the specified Atom.

Parameters:
atom - the Atom to be added

removeAtom

public void removeAtom(Atom atom)
Removes the specified Atom.

Parameters:
atom - the Atom to be removed

clearAtoms

public void clearAtoms()
Remove all Atoms.


setAtoms

public void setAtoms(Atom[] atoms)
Replace any Atoms with the ones in the specified array.

Parameters:
atoms - a Atom []

setAtoms

public void setAtoms(List atoms)
Replace Atoms with the ones in the specified List.

Parameters:
atoms - a List of Atoms

getPreferredAtom

public Atom getPreferredAtom()
Returns the preferred atom of the concept. It has TS=P, STT=PF, and ISPREF=Y.

Returns:
Atom

getPreferredAtom

public Atom getPreferredAtom(Comparator comparator)
Returns the preferred atom of the concept. Uses the given Concept.ByCUIComparator to determine the preferred atom.

Parameters:
comparator - Concept.ByCUIComparator
Returns:
Atom

getLocators

public Locator[] getLocators()
Returns the Locators.

Returns:
a Locator []

getLocatorsAsList

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

Returns:
the Locators as a List

addLocator

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

Parameters:
loc - the Locator to be added

removeLocator

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

Parameters:
loc - the Locator to be removed

clearLocators

public void clearLocators()
Remove all Locators.


setLocators

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

Parameters:
locs - a Locator []

setLocators

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

Parameters:
locs - a List of Locators

getAttributes

public Attribute[] getAttributes()
Returns the Attributes.

Returns:
a Attribute []

getAttributesAsList

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

Returns:
the Attributes as a List

addAttribute

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

Parameters:
att - the Attribute to be added

removeAttribute

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

Parameters:
att - the Attribute to be removed

clearAttributes

public void clearAttributes()
Remove all Attributes.


setAttributes

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

Parameters:
atts - an Attribute []

setAttributes

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

Parameters:
atts - a List of Attributes

getAttributesForAtom

public Attribute[] getAttributesForAtom(Atom atom)
Returns the attributes with aui that matches that of the given Atom.

Parameters:
atom - Atom
Returns:
List of Attributes

getAttributesForAtomAsList

public List getAttributesForAtomAsList(Atom atom)
Returns the attributes with aui that matches that of the given Atom in a List.

Parameters:
atom - Atom
Returns:
List of Attributes

getAttributesForRelationship

public AtomAttribute[] getAttributesForRelationship(AtomRelationship rel)
Returns the attributes with aui that matches that of the given Relationship.

Parameters:
rel - Relationship
Returns:
List of AtomAttributes

getAttributesForRelationshipAsList

public List getAttributesForRelationshipAsList(AtomRelationship rel)
Returns the attributes with aui that matches that of the given Relationship in a List.

Parameters:
rel - Relationship
Returns:
List of Attributes

getContexts

public Context[] getContexts()
Return the Contexts.

Returns:
a Context []

getContexts

public Context[] getContexts(Restrictor restrictor)
Returns a subset of this Concept's Contexts. Restricts the return based on the given Restrictor.

Parameters:
restrictor - Restrictor
Returns:
Context[]

getContextsAsList

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

Returns:
the Contexts as a List

addContext

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

Parameters:
cxt - the Context to be added

removeContext

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

Parameters:
cxt - the Context to be removed

clearContexts

public void clearContexts()
Remove all Contexts.


setContexts

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

Parameters:
cxts - a Context []

setContexts

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

Parameters:
cxts - a List of Contexts

getCoocurrences

public Coocurrence[] getCoocurrences()
Returns the Coocurrences.

Returns:
a Coocurrence []

getCoocurrences

public Coocurrence[] getCoocurrences(Restrictor restrictor)
Returns a subset of this Concept's Coocurrences. Restricts the return based on the given Restrictor.

Parameters:
restrictor - Restrictor
Returns:
Coocurrence[]

getCoocurrencesAsList

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

Returns:
the Coocurrences as a List

addCoocurrence

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

Parameters:
coc - the Coocurrence to be added

removeCoocurrence

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

Parameters:
coc - the Coocurrence to be removed

clearCoocurrences

public void clearCoocurrences()
Remove all Coocurrences.


setCoocurrences

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

Parameters:
cocs - a Coocurrence []

setCoocurrences

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

Parameters:
cocs - a List of Coocurrences

getDefinitions

public Definition[] getDefinitions()
Returns the Definitions.

Returns:
a Definition []

getDefinitions

public Definition[] getDefinitions(Restrictor restrictor)
Returns a subset of this Concept's Definitions. Restricts the return based on the given Restrictor.

Parameters:
restrictor - Restrictor
Returns:
Definition[]

getDefinitionsAsList

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

Returns:
the Definitions as a List

addDefinition

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

Parameters:
def - the Definition to be added

removeDefinition

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

Parameters:
def - the Definition to be removed

clearDefinitions

public void clearDefinitions()
Remove all Definitions.


setDefinitions

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

Parameters:
defs - a Definition []

setDefinitions

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

Parameters:
defs - a List of Definitions

getRelationships

public Relationship[] getRelationships()
Returns the Relationships.

Returns:
a Relationship []

getRelationships

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

Parameters:
restrictor - Restrictor
Returns:
Relationship[]

getRelationshipsAsList

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

Returns:
the Relationships as a List

addRelationship

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

Parameters:
rel - the Relationship to be added

removeRelationship

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

Parameters:
rel - the Relationship to be removed

clearRelationships

public void clearRelationships()
Remove all Relationships.


setRelationships

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

Parameters:
rels - a Relationship []

setRelationships

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

Parameters:
rels - a List of Relationships

getSemanticTypes

public SemanticType[] getSemanticTypes()
Returns the SemanticTypes.

Returns:
a SemanticType []

getSemanticTypesAsList

public List getSemanticTypesAsList()
Returns the SemanticTypes as a List.

Returns:
the SemanticTypes as a List

addSemanticType

public void addSemanticType(SemanticType sty)
Adds a SemanticType.

Parameters:
sty - the SemanticType to be added

removeSemanticType

public void removeSemanticType(SemanticType sty)
Removes the specified SemanticType.

Parameters:
sty - the SemanticType to be removed

clearSemanticTypes

public void clearSemanticTypes()
Removes all SemanticTypes.


setSemanticTypes

public void setSemanticTypes(SemanticType[] stys)
Replace SemanticTypes with the ones in the specified array.

Parameters:
stys - a SemanticType []

setSemanticTypes

public void setSemanticTypes(List stys)
Replace SemanticTypes with the ones in the specified List.

Parameters:
stys - a List of SemanticTypes

getComponentHistories

public ComponentHistory[] getComponentHistories()
Returns the ComponentHistorys.

Returns:
a ComponentHistory []

getComponentHistoriesAsList

public List getComponentHistoriesAsList()
Returns the ComponentHistorys as a List.

Returns:
the ComponentHistorys as a List

addComponentHistory

public void addComponentHistory(ComponentHistory map)
Adds a ComponentHistory.

Parameters:
map - the ComponentHistory to be added

removeComponentHistory

public void removeComponentHistory(ComponentHistory map)
Removes the specified ComponentHistory.

Parameters:
map - the ComponentHistory to be removed

clearComponentHistories

public void clearComponentHistories()
Removes all ComponentHistorys.


setComponentHistories

public void setComponentHistories(ComponentHistory[] maps)
Replace ComponentHistorys with the ones in the specified array.

Parameters:
maps - a ComponentHistory []

setComponentHistories

public void setComponentHistories(List maps)
Replace ComponentHistorys with the ones in the specified List.

Parameters:
maps - a List of ComponentHistorys

getMappings

public Mapping[] getMappings()
Returns the Mappings.

Returns:
a Mapping []

getMappingsAsList

public List getMappingsAsList()
Returns the Mappings as a List.

Returns:
the Mappings as a List

addMapping

public void addMapping(Mapping map)
Adds a Mapping.

Parameters:
map - the Mapping to be added

removeMapping

public void removeMapping(Mapping map)
Removes the specified Mapping.

Parameters:
map - the Mapping to be removed

clearMappings

public void clearMappings()
Removes all Mappings.


setMappings

public void setMappings(Mapping[] maps)
Replace Mappings with the ones in the specified array.

Parameters:
maps - a Mapping []

setMappings

public void setMappings(List maps)
Replace Mappings with the ones in the specified List.

Parameters:
maps - a List of Mappings

getCui

public String getCui()
Returns the concept unique identifier (CUI) for the Concept. This is shorthand for getConceptIdentifier().

Returns:
the CUI

setCui

public void setCui(String cui)
Sets the concept unique identifier (CUI) for the Concept. This is shorthand for setConceptIdentifier(String).

Parameters:
cui - the CUI

getConceptIdentifier

public String getConceptIdentifier()
Returns the concept unique identifier (CUI) for the Concept.

Returns:
the CUI

setConceptIdentifier

public void setConceptIdentifier(String cui)
Sets the concept unique identifier (CUI) for the Concept.

Parameters:
cui - the CUI

getKeyFields

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

Returns:
a String composed from key Concept fields

getContextGroups

public ContextGroup[] getContextGroups()
Return the ContextGroups.

Returns:
a ContextGroup []

getContextGroupsAsList

public List getContextGroupsAsList()
Returns the ContextGroups as a List.

Returns:
the ContextGroups as a List

getCoocurrenceGroups

public CoocurrenceGroup[] getCoocurrenceGroups()
Returns the CoocurrenceGroups.

Returns:
a CoocurrenceGroup []

getCoocurrenceGroupsAsList

public List getCoocurrenceGroupsAsList()
Returns the CoocurrenceGroups as a List.

Returns:
the CoocurrenceGroups as a List

getTermAttributes

public TermAttribute[] getTermAttributes()
Returns the TermAttributes.

Returns:
a TermAttribute []

getTermAttributesAsList

public List getTermAttributesAsList()
Returns the TermAttributes as a List.

Returns:
the TermAttributes as a List

getTerms

public Term[] getTerms()
Returns the Terms.

Returns:
an Term []

getTermsAsList

public List getTermsAsList()
Returns the Terms as a List.

Returns:
the Terms as a List

getAtoms

public Atom[] getAtoms(Restrictor restrictor)
Returns a subset of this Concept's Atoms. Restricts the return based on the given Restrictor.

Parameters:
restrictor - Restrictor
Returns:
Atom[]


Copyright ©2005