gov.nih.nlm.umls.io
Interface ConceptInputStream

All Known Subinterfaces:
MetamorphoSysInputStream, MetathesaurusInputStream
All Known Implementing Classes:
OriginalMRFilesConceptInputStream, OriginalMRMetamorphoSysInputStream, OriginalMRMetathesaurusInputStream, RichMRFilesConceptInputStream, RichMRMetamorphoSysInputStream, RichMRMetathesaurusInputStream

public interface ConceptInputStream

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.
 void open(String[] paths)
          Opens the input stream.
 Concept readConcept()
          Read a Concept from the input stream and return it.
 

Method Detail

open

public 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

public 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

public 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

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

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


Copyright ©2005