gov.nih.nlm.mms
Class CuiSuiAuiList

java.lang.Object
  extended bygov.nih.nlm.mms.CuiSuiAuiList
All Implemented Interfaces:
CuiList

public class CuiSuiAuiList
extends Object
implements CuiList

This class is used during the first phase of MetamorphoSys subsetting, in which a list of cuis to be kept is built up. The class is designed to minimize the memory impact of keeping track of the cuis.

Author:
Deborah Shapiro, Brian Carlsen

Constructor Summary
CuiSuiAuiList()
          Instantiates an empty CuiSuiAuiList
 
Method Summary
 void addCui(String cui)
          Enables a filter to specify a Cui should be added to the cui list.
 boolean addedByUserOnly(String cui)
          Indicates that cui was added by the user and not just left through filtering process.
 void clear()
          Clears all refereces to the cui_list components so CuiSuiAuiList can be garbage collected.
 void clearAuiSet()
          Clears all references to the aui_set so that it can be garbage collected.
protected  String dump()
          Dumps size of the CuiSuiAuiList for debugging purposes.
 boolean inList(String cui)
          Returns true if any part of the Concept is being kept.
 boolean inList(String cui, String sui, String aui)
          Returns true if the cui,sui,aui combination is being kept.
 void removeCui(String cui)
          Enables a filter to specify a Cui that should be removed from the cui list.
 void setFilteredConcept(Concept concept)
          Set the final state of the Concept after filtering.
 void setUnfilteredConcept(Concept concept)
          Set the initial state of the Concept before filtering.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CuiSuiAuiList

public CuiSuiAuiList()
Instantiates an empty CuiSuiAuiList

Method Detail

setUnfilteredConcept

public void setUnfilteredConcept(Concept concept)
Set the initial state of the Concept before filtering. This is for later comparison purposes.

Parameters:
concept - an unfiltered Concept

setFilteredConcept

public void setFilteredConcept(Concept concept)
Set the final state of the Concept after filtering. Compare this against the unfiltered Concept, and determine what was removed, what was kept, and how to track that information in the least memory-intensive way.

Parameters:
concept - a filtered Concept

inList

public boolean inList(String cui)
Returns true if any part of the Concept is being kept.

Specified by:
inList in interface CuiList
Parameters:
cui - a String cui value
Returns:
true if any part of the Concept is being kept

inList

public boolean inList(String cui,
                      String sui,
                      String aui)
Returns true if the cui,sui,aui combination is being kept.

Parameters:
cui - a String cui value
sui - a String sui value
aui - a String aui value
Returns:
true if the cui,sui,aui combination is being kept

addCui

public void addCui(String cui)
Enables a filter to specify a Cui should be added to the cui list.

Specified by:
addCui in interface CuiList
Parameters:
cui - String

addedByUserOnly

public boolean addedByUserOnly(String cui)
Indicates that cui was added by the user and not just left through filtering process.

Specified by:
addedByUserOnly in interface CuiList
Parameters:
cui - String
Returns:
boolean

removeCui

public void removeCui(String cui)
Enables a filter to specify a Cui that should be removed from the cui list.

Specified by:
removeCui in interface CuiList
Parameters:
cui - String

clearAuiSet

public void clearAuiSet()
Clears all references to the aui_set so that it can be garbage collected.


clear

public void clear()
Clears all refereces to the cui_list components so CuiSuiAuiList can be garbage collected.


dump

protected String dump()
Dumps size of the CuiSuiAuiList for debugging purposes.

Returns:
dump string


Copyright ©2005