|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nih.nlm.umls.io.OriginalMRFilesConceptInputStream
This ConceptInputStream
builds Concept
objects from a full
set of original format MR files.
Field Summary | |
protected String[] |
file_names
|
protected String |
mr_dir
|
protected PushBackReader |
mratx_source
|
protected PushBackReader |
mrcoc_source
|
protected int |
mrcon_counter
|
protected int |
mrcon_lines
|
protected PushBackReader |
mrcon_source
|
protected PushBackReader |
mrcxt_source
|
protected PushBackReader |
mrdef_source
|
protected PushBackReader |
mrlo_source
|
protected PushBackReader |
mrrel_source
|
protected PushBackReader |
mrsat_source
|
protected PushBackReader |
mrso_source
|
protected PushBackReader |
mrsty_source
|
protected Concept |
this_concept
|
protected String[] |
tokens
|
Constructor Summary | |
OriginalMRFilesConceptInputStream()
Instantiates an empty OriginalMRFilesConceptInputStream . |
Method Summary | |
void |
close()
Close files opened during open(String[]) . |
protected Concept |
getAtoms(Concept this_concept,
String current_cui)
Returns Atom s from the MRCON
and MRSO files with the
given cui and adds them to the current Concept . |
protected void |
getAttributes(Concept this_concept,
String current_cui)
Returns Attribute s from the MRSAT files with the
given cui and adds them to the current Concept |
int |
getConceptProgress()
Returns the percentage of MRCON lines that have been processed. |
protected void |
getContexts(Concept this_concept,
String current_cui)
Returns Context s from the MRCXT files with the
given cui and adds them to the current Concept . |
protected void |
getCoocurrences(Concept this_concept,
String current_cui)
Returns a Coocurrence s from the MRCOC file with the
given cui and adds them to the current Concept . |
protected void |
getDefinitions(Concept this_concept,
String current_cui)
Returns Definition s from the MRDEF file with the
given cui and adds them to the current Concept . |
protected Map |
getLineCounts()
Reads through MRFILES to determine the size of MRCON . |
protected void |
getLocators(Concept this_concept,
String current_cui)
Returns Locator s from the MRLO file with the
given cui and adds them to the current Concept . |
protected void |
getMappings(Concept this_concept,
String current_cui)
Returns Mapping s from the MRATX file with the
given cui and adds them to the current Concept . |
protected void |
getRelationships(Concept this_concept,
String current_cui)
Returns Relationship s from the MRREL file with the
given cui and adds them to the current Concept |
protected void |
getSemanticTypes(Concept this_concept,
String current_cui)
Returns SemanticType s from the MRSTY file with the
given cui and adds them to the current Concept . |
void |
open(String[] install_paths)
Opens all of the MR Files in preparation for subsetting. |
protected PushBackReader |
openSourceFile(String name)
Opens the specified file in the directory passed to open(String[]) . |
Concept |
readConcept()
Returns the next Concept from the MR Files. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected PushBackReader mrso_source
protected PushBackReader mrcon_source
protected PushBackReader mrsty_source
protected PushBackReader mrdef_source
protected PushBackReader mrrel_source
protected PushBackReader mrcxt_source
protected PushBackReader mrcoc_source
protected PushBackReader mratx_source
protected PushBackReader mrsat_source
protected PushBackReader mrlo_source
protected String[] file_names
protected String mr_dir
protected Concept this_concept
protected int mrcon_lines
protected int mrcon_counter
protected final String[] tokens
Constructor Detail |
public OriginalMRFilesConceptInputStream()
OriginalMRFilesConceptInputStream
.
Method Detail |
public void open(String[] install_paths) throws IOException
open
in interface ConceptInputStream
install_paths
- the directory containing the files
IOException
- if any files can not be openedpublic void close() throws IOException
open(String[])
.
close
in interface ConceptInputStream
IOException
- if files can not be closedpublic int getConceptProgress()
MRCON
lines that have been processed.
getConceptProgress
in interface ConceptInputStream
MRCON
lines that have been processedpublic Concept readConcept() throws IOException
Concept
from the MR Files.
readConcept
in interface ConceptInputStream
Concept
from the MR Files
IOException
- if files could not be readprotected PushBackReader openSourceFile(String name) throws IOException
open(String[])
.
name
- the filename
BufferedReader
on the file
IOException
- if the file could not be openedprotected Map getLineCounts() throws IOException
MRFILES
to determine the size of MRCON
.
This is used in the getConceptProgress()
method.
Map
of file names to lines in file
IOException
- if the file cannot be opened or readprotected void getMappings(Concept this_concept, String current_cui) throws IOException
Mapping
s from the MRATX
file with the
given cui and adds them to the current Concept
.
this_concept
- Concept
that will contain the Mapping
scurrent_cui
- String
representation of the cui
IOException
- if there is a problem with the fileprotected Concept getAtoms(Concept this_concept, String current_cui) throws IOException
Atom
s from the MRCON
and MRSO
files with the
given 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 there is a problem with the fileprotected void getAttributes(Concept this_concept, String current_cui) throws IOException
Attribute
s from the MRSAT
files with the
given cui and adds them to the current Concept
this_concept
- the current Concept
current_cui
- the current CUI
IOException
- if there is a problem with the fileprotected void getContexts(Concept this_concept, String current_cui) throws IOException
Context
s from the MRCXT
files with the
given cui and adds them to the current Concept
.
this_concept
- the current Concept
current_cui
- the current CUI
IOException
- if anything wrong with fileprotected void getCoocurrences(Concept this_concept, String current_cui) throws IOException
Coocurrence
s from the MRCOC
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 fileprotected void getDefinitions(Concept this_concept, String current_cui) throws IOException
Definition
s from the MRDEF
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 the fileprotected void getLocators(Concept this_concept, String current_cui) throws IOException
Locator
s from the MRLO
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 fileprotected void getSemanticTypes(Concept this_concept, String current_cui) throws IOException
SemanticType
s from the MRSTY
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 fileprotected void getRelationships(Concept this_concept, String current_cui) throws IOException
Relationship
s from the MRREL
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 file
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |