|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nih.nlm.umls.meta.impl.PlaceholderConcept
Implementation of the Concept
interface.
Used when Concept
components do not need to be saved.
Uses less space than Concept
.
Nested Class Summary |
Nested classes inherited from class gov.nih.nlm.umls.meta.Concept |
Concept.ByCUIComparator, Concept.ByPreferredNameComparator |
Field Summary | |
protected List |
atoms
|
protected String |
cui
|
Constructor Summary | |
PlaceholderConcept()
Instantiates an empty PlaceholderConcept . |
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 PlaceholderConcept 's components. |
void |
clearAtoms()
Remove all Atom s. |
void |
clearAttributes()
Remove all Attribute s. |
void |
clearComponentHistories()
Removes all ComponentHistory s. |
void |
clearContexts()
Remove all Context s. |
void |
clearCoocurrences()
Remove all Coocurrence s. |
void |
clearDefinitions()
Remove all Definition s. |
void |
clearLocators()
Remove all Locator s. |
void |
clearMappings()
Removes all Mapping s. |
void |
clearRelationships()
Remove all Relationship s. |
void |
clearSemanticTypes()
Removes all SemanticType s. |
int |
compareTo(Object o)
Compares this Concept to another one. |
boolean |
equals(Object o)
Returns true if the specified object is
equal to this object. |
Atom[] |
getAtoms()
Returns the Atom s. |
Atom[] |
getAtoms(Restrictor restrictor)
Returns a subset of this Concept 's Atom s. |
List |
getAtomsAsList()
Returns the Atom s as a List . |
Attribute[] |
getAttributes()
Returns the Attribute s. |
List |
getAttributesAsList()
Returns the Attribute s 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 ComponentHistory s. |
List |
getComponentHistoriesAsList()
Returns the ComponentHistory s as a List . |
String |
getConceptIdentifier()
Returns the concept unique identifier (CUI) for the Concept
that holds this Concept . |
ContextGroup[] |
getContextGroups()
Return the ContextGroup s. |
List |
getContextGroupsAsList()
Returns the ContextGroup s as a List . |
Context[] |
getContexts()
Return the Context s. |
Context[] |
getContexts(Restrictor restrictor)
Returns a subset of this Concept 's Context s. |
List |
getContextsAsList()
Returns the Context s as a List . |
CoocurrenceGroup[] |
getCoocurrenceGroups()
Returns the CoocurrenceGroup s. |
List |
getCoocurrenceGroupsAsList()
Returns the CoocurrenceGroup s as a List . |
Coocurrence[] |
getCoocurrences()
Returns the Coocurrence s. |
Coocurrence[] |
getCoocurrences(Restrictor restrictor)
Returns a subset of this Concept 's Coocurrence s. |
List |
getCoocurrencesAsList()
Returns the Coocurrence s as a List . |
String |
getCui()
Shorthand for getConceptIdentifier() . |
Definition[] |
getDefinitions()
Returns the Definition s. |
Definition[] |
getDefinitions(Restrictor restrictor)
Returns a subset of this Concept 's Definition s. |
List |
getDefinitionsAsList()
Returns the Definition s as a List . |
String |
getKeyFields()
Returns a String key which can be used
by equals, compareTo, and hashCode methods. |
Locator[] |
getLocators()
Returns the Locator s. |
List |
getLocatorsAsList()
Returns the Locator s as a List . |
Mapping[] |
getMappings()
Returns the Mapping s. |
List |
getMappingsAsList()
Returns the Mapping s 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 Relationship s. |
Relationship[] |
getRelationships(Restrictor restrictor)
Returns a subset of this Concept 's Relationship s. |
List |
getRelationshipsAsList()
Returns the Relationship s as a List . |
SemanticType[] |
getSemanticTypes()
Returns the SemanticType s. |
List |
getSemanticTypesAsList()
Returns the SemanticType s as a List . |
TermAttribute[] |
getTermAttributes()
Returns the TermAttribute s. |
List |
getTermAttributesAsList()
Returns the TermAttribute s as a List . |
Term[] |
getTerms()
Returns the Term s. |
List |
getTermsAsList()
Returns the Term s as a List . |
int |
hashCode()
Return a hash code based on key fields. |
boolean |
isEmpty()
This indicates if the Concept is empty, meaning
that either the SemanticType was removed or
all of the Atom s 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 Atom s with the
ones in the specified array. |
void |
setAtoms(List atoms)
Replace Atom s with the
ones in the specified List . |
void |
setAttributes(Attribute[] atts)
Replace Attribute s with the ones in the specified array. |
void |
setAttributes(List atts)
Replace Attribute s with the ones in the specified List . |
void |
setComponentHistories(ComponentHistory[] maps)
Replace ComponentHistory s with the ones in the specified array. |
void |
setComponentHistories(List maps)
Replace ComponentHistory s with the ones in the specified List . |
void |
setConceptIdentifier(String cui)
Sets the concept unique identifier (CUI) for the Concept
that holds this Concept . |
void |
setContexts(Context[] cxts)
Replace Context s with the ones in the specified array. |
void |
setContexts(List cxts)
Replace Context s with the ones in the specified List . |
void |
setCoocurrences(Coocurrence[] cocs)
Replace Coocurrence s with the ones in the specified array. |
void |
setCoocurrences(List cocs)
Replace Coocurrence s with the ones in the specified List . |
void |
setCui(String cui)
Shorthand for setConceptIdentifier(String) . |
void |
setDefinitions(Definition[] defs)
Replace Definition s with the ones in the specified array. |
void |
setDefinitions(List defs)
Replace Definition s with the ones in the specified List . |
void |
setLocators(List locs)
Replace Locator s with the ones in the specified List . |
void |
setLocators(Locator[] locs)
Replace Locator s with the ones in the specified array. |
void |
setMappings(List maps)
Replace Mapping s with the ones in the specified List . |
void |
setMappings(Mapping[] maps)
Replace Mapping s with the ones in the specified array. |
void |
setRelationships(List rels)
Replace Relationship s of the ones in the specified List . |
void |
setRelationships(Relationship[] rels)
Replace Relationship s with the ones in the specified array. |
void |
setSemanticTypes(List stys)
Replace SemanticType s with the ones in the specified List . |
void |
setSemanticTypes(SemanticType[] stys)
Replace SemanticType s with the ones in the specified array. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected List atoms
protected String cui
Constructor Detail |
public PlaceholderConcept()
PlaceholderConcept
.
Method Detail |
public void clear()
PlaceholderConcept
's components.
clear
in interface Concept
public boolean isEmpty()
Concept
Concept
is empty, meaning
that either the SemanticType
was removed or
all of the Atom
s were removed.
isEmpty
in interface Concept
public Atom[] getAtoms()
Atom
s.
getAtoms
in interface Concept
Atom
[]
public List getAtomsAsList()
Atom
s as a List
.
getAtomsAsList
in interface Concept
Atom
s as a List
public void addAtom(Atom atom)
Atom
.
addAtom
in interface Concept
atom
- the Atom
to be addedpublic void removeAtom(Atom atom)
Atom
.
removeAtom
in interface Concept
atom
- the Atom
to be removedpublic void clearAtoms()
Atom
s.
clearAtoms
in interface Concept
public void setAtoms(Atom[] atoms)
Atom
s with the
ones in the specified array.
setAtoms
in interface Concept
atoms
- a Atom
[]
public void setAtoms(List atoms)
Atom
s with the
ones in the specified List
.
setAtoms
in interface Concept
atoms
- a List
of Atom
spublic Atom getPreferredAtom()
getPreferredAtom
in interface Concept
Atom
public Atom getPreferredAtom(Comparator comparator)
Comparator
to determine the preferred atom.
getPreferredAtom
in interface Concept
comparator
- Comparator
Atom
public Locator[] getLocators()
Locator
s.
getLocators
in interface Concept
Locator
[]
public List getLocatorsAsList()
Locator
s as a List
.
getLocatorsAsList
in interface Concept
Locator
s as a List
public void addLocator(Locator loc)
Locator
.
addLocator
in interface Concept
loc
- the Locator
to be addedpublic void removeLocator(Locator loc)
Locator
.
removeLocator
in interface Concept
loc
- the Locator
to be removedpublic void clearLocators()
Locator
s.
clearLocators
in interface Concept
public void setLocators(Locator[] locs)
Locator
s with the ones in the specified array.
setLocators
in interface Concept
locs
- a Locator
[]
public void setLocators(List locs)
Locator
s with the ones in the specified List
.
setLocators
in interface Concept
locs
- a List
of Locator
spublic Attribute[] getAttributes()
Attribute
s.
getAttributes
in interface Concept
Attribute
[]
public List getAttributesAsList()
Attribute
s as a List
.
getAttributesAsList
in interface Concept
Attribute
s as a List
public void addAttribute(Attribute att)
Attribute
.
addAttribute
in interface Concept
att
- the Attribute
to be addedpublic void removeAttribute(Attribute att)
Attribute
.
removeAttribute
in interface Concept
att
- the Attribute
to be removedpublic void clearAttributes()
Attribute
s.
clearAttributes
in interface Concept
public void setAttributes(Attribute[] atts)
Attribute
s with the ones in the specified array.
setAttributes
in interface Concept
atts
- an Attribute
[]
public void setAttributes(List atts)
Attribute
s with the ones in the specified List
.
setAttributes
in interface Concept
atts
- a List
of Attribute
spublic Context[] getContexts()
Context
s.
getContexts
in interface Concept
Context
[]
public Context[] getContexts(Restrictor restrictor)
Concept
's Context
s.
Restricts the return based on the given Restrictor
.
getContexts
in interface Concept
restrictor
- Restrictor
public List getContextsAsList()
Context
s as a List
.
getContextsAsList
in interface Concept
Context
s as a List
public void addContext(Context cxt)
Context
.
addContext
in interface Concept
cxt
- the Context
to be addedpublic void removeContext(Context cxt)
Context
.
removeContext
in interface Concept
cxt
- the Context
to be removedpublic void clearContexts()
Context
s.
clearContexts
in interface Concept
public void setContexts(Context[] cxts)
Context
s with the ones in the specified array.
setContexts
in interface Concept
cxts
- a Context
[]
public void setContexts(List cxts)
Context
s with the ones in the specified List
.
setContexts
in interface Concept
cxts
- a List
of Context
spublic Coocurrence[] getCoocurrences()
Coocurrence
s.
getCoocurrences
in interface Concept
Coocurrence
[]
public Coocurrence[] getCoocurrences(Restrictor restrictor)
Concept
's Coocurrence
s.
Restricts the return based on the given Restrictor
.
getCoocurrences
in interface Concept
restrictor
- Restrictor
public List getCoocurrencesAsList()
Coocurrence
s as a List
.
getCoocurrencesAsList
in interface Concept
Coocurrence
s as a List
public void addCoocurrence(Coocurrence coc)
Coocurrence
.
addCoocurrence
in interface Concept
coc
- the Coocurrence
to be addedpublic void removeCoocurrence(Coocurrence coc)
Coocurrence
.
removeCoocurrence
in interface Concept
coc
- the Coocurrence
to be removedpublic void clearCoocurrences()
Coocurrence
s.
clearCoocurrences
in interface Concept
public void setCoocurrences(Coocurrence[] cocs)
Coocurrence
s with the ones in the specified array.
setCoocurrences
in interface Concept
cocs
- a Coocurrence
[]
public void setCoocurrences(List cocs)
Coocurrence
s with the ones in the specified List
.
setCoocurrences
in interface Concept
cocs
- a List
of Coocurrence
spublic Definition[] getDefinitions()
Definition
s.
getDefinitions
in interface Concept
Definition
[]
public Definition[] getDefinitions(Restrictor restrictor)
Concept
's Definition
s.
Restricts the return based on the given Restrictor
.
getDefinitions
in interface Concept
restrictor
- Restrictor
public List getDefinitionsAsList()
Definition
s as a List
.
getDefinitionsAsList
in interface Concept
Definition
s as a List
public void addDefinition(Definition def)
Definition
.
addDefinition
in interface Concept
def
- the Definition
to be addedpublic void removeDefinition(Definition def)
Definition
.
removeDefinition
in interface Concept
def
- the Definition
to be removedpublic void clearDefinitions()
Definition
s.
clearDefinitions
in interface Concept
public void setDefinitions(Definition[] defs)
Definition
s with the ones in the specified array.
setDefinitions
in interface Concept
defs
- a Definition
[]
public void setDefinitions(List defs)
Definition
s with the ones in the specified List
.
setDefinitions
in interface Concept
defs
- a List
of Definition
spublic Relationship[] getRelationships()
Relationship
s.
getRelationships
in interface Concept
Relationship
[]
public Relationship[] getRelationships(Restrictor restrictor)
Concept
's Relationship
s.
Restricts the return based on the given Restrictor
.
getRelationships
in interface Concept
restrictor
- Restrictor
public List getRelationshipsAsList()
Relationship
s as a List
.
getRelationshipsAsList
in interface Concept
Relationship
s as a List
public void addRelationship(Relationship rel)
Relationship
.
addRelationship
in interface Concept
rel
- the Relationship
to be addedpublic void removeRelationship(Relationship rel)
Relationship
.
removeRelationship
in interface Concept
rel
- the Relationship
to be removedpublic void clearRelationships()
Relationship
s.
clearRelationships
in interface Concept
public void setRelationships(Relationship[] rels)
Relationship
s with the ones in the specified array.
setRelationships
in interface Concept
rels
- a Relationship
[]
public void setRelationships(List rels)
Relationship
s of the ones in the specified List
.
setRelationships
in interface Concept
rels
- a List
of Relationship
spublic SemanticType[] getSemanticTypes()
SemanticType
s.
getSemanticTypes
in interface Concept
SemanticType
[]
public List getSemanticTypesAsList()
SemanticType
s as a List
.
getSemanticTypesAsList
in interface Concept
SemanticType
s as a List
public void addSemanticType(SemanticType sty)
SemanticType
.
addSemanticType
in interface Concept
sty
- the SemanticType
to be addedpublic void removeSemanticType(SemanticType sty)
SemanticType
.
removeSemanticType
in interface Concept
sty
- the SemanticType
to be removedpublic void clearSemanticTypes()
SemanticType
s.
clearSemanticTypes
in interface Concept
public void setSemanticTypes(SemanticType[] stys)
SemanticType
s with the ones in the specified array.
setSemanticTypes
in interface Concept
stys
- a SemanticType
[]
public void setSemanticTypes(List stys)
SemanticType
s with the ones in the specified List
.
setSemanticTypes
in interface Concept
stys
- a List
of SemanticType
spublic ComponentHistory[] getComponentHistories()
ComponentHistory
s.
getComponentHistories
in interface Concept
ComponentHistory
[]
public List getComponentHistoriesAsList()
ComponentHistory
s as a List
.
getComponentHistoriesAsList
in interface Concept
ComponentHistory
s as a List
public void addComponentHistory(ComponentHistory map)
ComponentHistory
.
addComponentHistory
in interface Concept
map
- the ComponentHistory
to be addedpublic void removeComponentHistory(ComponentHistory map)
ComponentHistory
.
removeComponentHistory
in interface Concept
map
- the ComponentHistory
to be removedpublic void clearComponentHistories()
ComponentHistory
s.
clearComponentHistories
in interface Concept
public void setComponentHistories(ComponentHistory[] maps)
ComponentHistory
s with the ones in the specified array.
setComponentHistories
in interface Concept
maps
- a ComponentHistory
[]
public void setComponentHistories(List maps)
ComponentHistory
s with the ones in the specified List
.
setComponentHistories
in interface Concept
maps
- a List
of ComponentHistory
spublic Mapping[] getMappings()
Mapping
s.
getMappings
in interface Concept
Mapping
[]
public List getMappingsAsList()
Mapping
s as a List
.
getMappingsAsList
in interface Concept
Mapping
s as a List
public void addMapping(Mapping map)
Mapping
.
addMapping
in interface Concept
map
- the Mapping
to be addedpublic void removeMapping(Mapping map)
Mapping
.
removeMapping
in interface Concept
map
- the Mapping
to be removedpublic void clearMappings()
Mapping
s.
clearMappings
in interface Concept
public void setMappings(Mapping[] maps)
Mapping
s with the ones in the specified array.
setMappings
in interface Concept
maps
- a Mapping
[]
public void setMappings(List maps)
Mapping
s with the ones in the specified List
.
setMappings
in interface Concept
maps
- a List
of Mapping
spublic Attribute[] getAttributesForAtom(Atom atom)
Atom
.
getAttributesForAtom
in interface Concept
atom
- Atom
List
of Attribute
spublic List getAttributesForAtomAsList(Atom atom)
Atom
in a List
.
getAttributesForAtomAsList
in interface Concept
atom
- Atom
List
of AtomAttribute
spublic AtomAttribute[] getAttributesForRelationship(AtomRelationship rel)
Relationship
.
getAttributesForRelationship
in interface Concept
rel
- AtomRelationship
List
of Attribute
spublic List getAttributesForRelationshipAsList(AtomRelationship rel)
Relationship
in a List
.
getAttributesForRelationshipAsList
in interface Concept
rel
- AtomRelationship
List
of Attribute
spublic String getCui()
getConceptIdentifier()
.
getCui
in interface Concept
public void setCui(String cui)
setConceptIdentifier(String)
.
setCui
in interface Concept
cui
- the CUIpublic String getConceptIdentifier()
Concept
that holds this Concept
.
getConceptIdentifier
in interface Concept
public void setConceptIdentifier(String cui)
Concept
that holds this Concept
.
setConceptIdentifier
in interface Concept
cui
- the CUIpublic ContextGroup[] getContextGroups()
ContextGroup
s.
getContextGroups
in interface Concept
ContextGroup
[]
public List getContextGroupsAsList()
ContextGroup
s as a List
.
getContextGroupsAsList
in interface Concept
ContextGroup
s as a List
public CoocurrenceGroup[] getCoocurrenceGroups()
CoocurrenceGroup
s.
getCoocurrenceGroups
in interface Concept
CoocurrenceGroup
[]
public List getCoocurrenceGroupsAsList()
CoocurrenceGroup
s as a List
.
getCoocurrenceGroupsAsList
in interface Concept
CoocurrenceGroup
s as a List
public TermAttribute[] getTermAttributes()
TermAttribute
s.
getTermAttributes
in interface Concept
TermAttribute
[]
public List getTermAttributesAsList()
TermAttribute
s as a List
.
getTermAttributesAsList
in interface Concept
TermAttribute
s as a List
public Term[] getTerms()
Term
s.
getTerms
in interface Concept
Term
[]
public List getTermsAsList()
Term
s as a List
.
getTermsAsList
in interface Concept
Term
s as a List
public String getKeyFields()
String
key which can be used
by equals, compareTo, and hashCode methods.
getKeyFields
in interface Concept
String
composed from the cui.public Atom[] getAtoms(Restrictor restrictor)
Concept
's Atom
s.
Restricts the return based on the given Restrictor
.
getAtoms
in interface Concept
restrictor
- Restrictor
public int hashCode()
public boolean equals(Object o)
true
if the specified object is
equal to this object. The specified object must be a
Concept
with matching key fields.
o
- an Object
to compare against
true
if Object o is equal
false
otherwisepublic int compareTo(Object o)
Concept
to another one. Results
are indeterminate if the specified parameter is not of the
same class.
compareTo
in interface Comparable
o
- the Object
to compare to
int
representing the relative ordering
of this and the compare-to object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |