gov.nih.nlm.umls.io
Interface ConceptInputStream

All Superinterfaces:
LocalNullValueSupport
All Known Subinterfaces:
MetamorphoSysInputStream, MetathesaurusInputStream
All Known Implementing Classes:
MRCXTBuilderOutputStream, NLMFileMetamorphoSysInputStream, OriginalMRFilesConceptInputStream, OriginalMRMetamorphoSysInputStream, OriginalMRMetathesaurusInputStream, RichMRFilesConceptInputStream, RichMRMetamorphoSysInputStream, RichMRMetathesaurusInputStream

public interface ConceptInputStream
extends LocalNullValueSupport

Generically represents a way of reading Concepts from some input source. This source can be MR Files, update MR Files, a database, or pretty much anything else that can be defined by one or more "locations" or "paths".

Author:
Deborah Shapiro

Method Summary
 void close()
          Closes the input stream.
 int getConceptProgress()
          Returns the percentage of Concepts that have been processed so far.
 String[] getWarnings()
          Returns a String[] of warnings accumulated during processing of the input stream.
 void open(String[] paths)
          Opens the input stream.
 Concept readConcept()
          Read a Concept from the input stream and return it.
 
Methods inherited from interface gov.nih.nlm.util.LocalNullValueSupport
getNullValue, isEmptyValue, setNullValue
 

Method Detail

open

void open(String[] paths)
          throws IOException
Opens the input stream. Here is where the actual files or database containing the Metathesaurus data should be opened.

Parameters:
paths - paths to the sources of Metathesaurus data
Throws:
IOException - if there is a problem opening the input stream

close

void close()
           throws IOException
Closes the input stream. Here is where the actual files or database containing the Metathesaurus data should be closed.

Throws:
IOException - if there is a problem closing the input stream

readConcept

Concept readConcept()
                    throws IOException
Read a Concept from the input stream and return it. This method should provide the mapping between the input data and Concept objects. Furthermore, it should be implemented like a stream, in the sense that only the content for the next Concept should be read into memory.

Returns:
a Concept read from the input stream
Throws:
IOException - if there is a problem reading a concept

getConceptProgress

int getConceptProgress()
Returns the percentage of Concepts that have been processed so far.

Returns:
the percentage of Concepts that have been processed so far

getWarnings

String[] getWarnings()
Returns a String[] of warnings accumulated during processing of the input stream.

Returns:
String[] of warnings


Copyright ©2005