|
||||||||||
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 Atom s 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 Attribute s 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 ComponentHistory s 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 Context s 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 Coocurrence s 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 Definition s 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 Mapping s 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 Relationship s 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 SemanticType s 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 ConceptInputStream
paths
- the sources containing the files
IOException
- if any files can not be openedprotected void openMRFiles() throws IOException
IOException
- if any files cannot be openedpublic void close() throws IOException
open(String[])
.
close
in interface ConceptInputStream
IOException
- if files can not be closedpublic Concept readConcept() throws IOException
Concept
containing data from the MR files.
readConcept
in interface ConceptInputStream
Concept
containing data from the MR files
IOException
- if files could not be readpublic int getConceptProgress()
MRCONSO
lines that have been processed.
getConceptProgress
in interface ConceptInputStream
MRCONSO
lines that have been processedprotected 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 readprotected 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 fileprotected Concept getAtoms(Concept this_concept, String current_cui) throws IOException
Atom
s from the MRCONSO.RRF
file matching the
specified CUI and adds them to the current Concept
.
this_concept
- the current Concept
current_cui
- the current CUI
Concept
that will contain the Atom
s
IOException
- if anything goes wrongprotected void getAttributes(Concept this_concept, String current_cui) throws IOException
Attribute
s from the MRSAT.RRF
files with the
given cui and adds them to the current Concept
.
this_concept
- the current Concept
current_cui
- the current CUI
IOException
- if problem reading the fileprotected void getContexts(Concept this_concept, String current_cui) throws IOException
Context
s 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 Context
scurrent_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 fileprotected void getCoocurrences(Concept this_concept, String current_cui) throws IOException
Coocurrence
s from the MRCOC.RRF
file with the
given cui and adds them to the current Concept
.
this_concept
- the current Concept
current_cui
- the current CUI
IOException
- if problem reading from MRCOC.RRF
protected void getDefinitions(Concept this_concept, String current_cui) throws IOException
Definition
s from the MRDEF.RRF
file with the
given cui and adds them to the current Concept
.
this_concept
- the current Concept
current_cui
- the current CUI
IOException
- if problem reading from MRDEF.RRF
protected void getSemanticTypes(Concept this_concept, String current_cui) throws IOException
SemanticType
s from the MRSTY.RRF
file with the
given cui and adds them to the current Concept
.
this_concept
- the current Concept
current_cui
- the current CUI
IOException
- if problem reading from MRSTY.RRF
protected void getRelationships(Concept this_concept, String current_cui) throws IOException
Relationship
s from the MRREL.RRF
file with the
given cui and adds them to the current Concept
.
this_concept
- the current Concept
current_cui
- the current CUI
IOException
- if problem reading from MRREL.RRF
protected void getComponentHistories(Concept this_concept, String current_cui) throws IOException
ComponentHistory
s from the MRHIST.RRF
file with the
given cui and adds them to the current Concept
.
this_concept
- the current Concept
current_cui
- the current CUI
IOException
- if problem reading from MRHIST.RRF
protected void getMappings(Concept this_concept, String current_cui) throws IOException
Mapping
s from the MRMAP.RRF
file with the
given cui and adds them to the current Concept
.
this_concept
- the current Concept
current_cui
- the current CUI
IOException
- if problem reading from MRMAP.RRF
public 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 |