|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgov.nih.nlm.umls.io.RichMRFilesConceptInputStream
This ConceptInputStream builds Concept objects from a
full set of "Rich Release Format" MR files.
| Field Summary | |
protected String |
add_suffix
|
protected Map |
atom_hm
|
protected String[] |
file_names
|
protected String |
from_rsab
|
protected String |
from_vsab
|
protected Object[] |
install_paths
|
protected PushBackReader |
mrcoc_source
|
protected int |
mrconso_counter
|
protected int |
mrconso_lines
|
protected PushBackReader |
mrconso_source
|
protected PushBackReader |
mrcxt_source
|
protected PushBackReader |
mrdef_source
|
protected PushBackReader |
mrdoc_source
|
protected PushBackReader |
mrhier_source
|
protected PushBackReader |
mrhist_source
|
protected PushBackReader |
mrmap_source
|
protected PushBackReader |
mrrel_source
|
protected PushBackReader |
mrsat_source
|
protected PushBackReader |
mrsty_source
|
protected Map |
rel_hm
|
protected Concept |
this_concept
|
protected String |
to_rsab
|
protected String |
to_vsab
|
protected String[] |
tokens
|
| Constructor Summary | |
RichMRFilesConceptInputStream()
Instantiates an empty RichMRFilesConceptInputStream; |
|
| Method Summary | |
void |
close()
Close files opened during open(String[]). |
protected Concept |
getAtoms(Concept this_concept,
String current_cui)
Instantiates Atoms from the MRCONSO.RRF file matching the
specified CUI and adds them to the current Concept. |
protected void |
getAttributes(Concept this_concept,
String current_cui)
Gets Attributes from the MRSAT.RRF files with the
given cui and adds them to the current Concept. |
protected void |
getComponentHistories(Concept this_concept,
String current_cui)
Gets ComponentHistorys from the MRHIST.RRF file with the
given cui and adds them to the current Concept. |
int |
getConceptProgress()
Returns the percentage of MRCONSO lines that have been processed. |
protected void |
getContexts(Concept this_concept,
String current_cui)
Gets Contexts from the MRCXT.RRF and
MRHIER.RRF files with the
given cui and adds them to this_concept. |
protected void |
getCoocurrences(Concept this_concept,
String current_cui)
Gets Coocurrences from the MRCOC.RRF file with the
given cui and adds them to the current Concept. |
protected void |
getDefinitions(Concept this_concept,
String current_cui)
Gets Definitions from the MRDEF.RRF file with the
given cui and adds them to the current Concept. |
protected Map |
getLineCounts()
Reads through MRFILES.RRF to determine the size
of MRCONSO.RRF. |
protected void |
getMappings(Concept this_concept,
String current_cui)
Gets Mappings from the MRMAP.RRF file with the
given cui and adds them to the current Concept. |
protected void |
getRelationships(Concept this_concept,
String current_cui)
Gets Relationships from the MRREL.RRF file with the
given cui and adds them to the current Concept. |
protected void |
getSemanticTypes(Concept this_concept,
String current_cui)
Gets SemanticTypes from the MRSTY.RRF file with the
given cui and adds them to the current Concept. |
protected Atom |
newInstanceFromMRCONSO(String line)
Instantiates an Atom from a MRCONSO.RRF line. |
protected Context |
newInstanceFromMRHIER(String line)
Instantiates an Context from a MRHIER.RRF line. |
void |
open(String[] paths)
Opens all of the MR Files in preparation for subsetting. |
protected void |
openMRFiles()
Opens the Rich Release Format MR files. |
protected PushBackReader |
openSourceFile(String name)
Opens the source file from the most current of the given installation paths in which this source is available. |
Concept |
readConcept()
Returns a Concept containing data from the MR files. |
void |
setAdditionalSuffix(String suffix)
Sets an additional suffix. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected PushBackReader mrconso_source
protected PushBackReader mrcxt_source
protected PushBackReader mrsty_source
protected PushBackReader mrdef_source
protected PushBackReader mrrel_source
protected PushBackReader mrcoc_source
protected PushBackReader mrsat_source
protected PushBackReader mrhist_source
protected PushBackReader mrmap_source
protected PushBackReader mrhier_source
protected PushBackReader mrdoc_source
protected Map atom_hm
protected Map rel_hm
protected String[] file_names
protected Object[] install_paths
protected Concept this_concept
protected int mrconso_lines
protected int mrconso_counter
protected String from_rsab
protected String from_vsab
protected String to_rsab
protected String to_vsab
protected String add_suffix
protected final String[] tokens
| Constructor Detail |
public RichMRFilesConceptInputStream()
RichMRFilesConceptInputStream;
| Method Detail |
public void open(String[] paths)
throws IOException
open in interface ConceptInputStreampaths - the sources containing the files
IOException - if any files can not be opened
protected void openMRFiles()
throws IOException
IOException - if any files cannot be opened
public void close()
throws IOException
open(String[]).
close in interface ConceptInputStreamIOException - if files can not be closed
public Concept readConcept()
throws IOException
Concept containing data from the MR files.
readConcept in interface ConceptInputStreamConcept containing data from the MR files
IOException - if files could not be readpublic int getConceptProgress()
MRCONSO lines that have been processed.
getConceptProgress in interface ConceptInputStreamMRCONSO lines that have been processed
protected PushBackReader openSourceFile(String name)
throws IOException
name - the filename
PushBackReader on the file
IOException - if the file could not be opened.
protected Map getLineCounts()
throws IOException
MRFILES.RRF to determine the size
of MRCONSO.RRF.
Map of file names to lines in file
IOException - if the file cannot be opened or read
protected Atom newInstanceFromMRCONSO(String line)
throws IOException
Atom from a MRCONSO.RRF line.
line - a line from MRCONSO.RRF
Atom matching the line
IOException - if there is a problem with the file
protected Concept getAtoms(Concept this_concept,
String current_cui)
throws IOException
Atoms from the MRCONSO.RRF file matching the
specified CUI and adds them to the current Concept.
this_concept - the current Conceptcurrent_cui - the current CUI
Concept that will contain the Atoms
IOException - if anything goes wrong
protected void getAttributes(Concept this_concept,
String current_cui)
throws IOException
Attributes from the MRSAT.RRF files with the
given cui and adds them to the current Concept.
this_concept - the current Conceptcurrent_cui - the current CUI
IOException - if problem reading the file
protected void getContexts(Concept this_concept,
String current_cui)
throws IOException
Contexts from the MRCXT.RRF and
MRHIER.RRF files with the
given cui and adds them to this_concept.
this_concept - Concept that will contain the Contextscurrent_cui - String representation of the cui
IOException - if problem reading from MRCXT.RRF or
MRHIER.RRF
protected Context newInstanceFromMRHIER(String line)
throws IOException
Context from a MRHIER.RRF line.
line - a line from MRHIER.RRF
Context matching the line
IOException - if there is a problem with the file
protected void getCoocurrences(Concept this_concept,
String current_cui)
throws IOException
Coocurrences from the MRCOC.RRF file with the
given cui and adds them to the current Concept.
this_concept - the current Conceptcurrent_cui - the current CUI
IOException - if problem reading from MRCOC.RRF
protected void getDefinitions(Concept this_concept,
String current_cui)
throws IOException
Definitions from the MRDEF.RRF file with the
given cui and adds them to the current Concept.
this_concept - the current Conceptcurrent_cui - the current CUI
IOException - if problem reading from MRDEF.RRF
protected void getSemanticTypes(Concept this_concept,
String current_cui)
throws IOException
SemanticTypes from the MRSTY.RRF file with the
given cui and adds them to the current Concept.
this_concept - the current Conceptcurrent_cui - the current CUI
IOException - if problem reading from MRSTY.RRF
protected void getRelationships(Concept this_concept,
String current_cui)
throws IOException
Relationships from the MRREL.RRF file with the
given cui and adds them to the current Concept.
this_concept - the current Conceptcurrent_cui - the current CUI
IOException - if problem reading from MRREL.RRF
protected void getComponentHistories(Concept this_concept,
String current_cui)
throws IOException
ComponentHistorys from the MRHIST.RRF file with the
given cui and adds them to the current Concept.
this_concept - the current Conceptcurrent_cui - the current CUI
IOException - if problem reading from MRHIST.RRF
protected void getMappings(Concept this_concept,
String current_cui)
throws IOException
Mappings from the MRMAP.RRF file with the
given cui and adds them to the current Concept.
this_concept - the current Conceptcurrent_cui - the current CUI
IOException - if problem reading from MRMAP.RRFpublic void setAdditionalSuffix(String suffix)
suffix - to be added to the .RRF suffix
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||