gov.nih.nlm.mms
Interface ConceptOutputStream


public interface ConceptOutputStream

This interface defines an API for writing Concepts to the output Metathesaurus, an output destination. This destination can be MR Files, a database, or pretty much anything else.

Author:
Deborah Shapiro

Method Summary
 void close()
          Closes the output stream.
 String getConfigurationDetails()
          Returns a String describing the configuration details.
 String getName()
          Returns a descriptive, yet short, name of the output stream for display purposes.
 void open(String output_loc)
          Opens the output stream.
 void setConfiguration(UserConfiguration config)
          Sets the UserConfiguration.
 void writeConcept(Concept concept)
          Write a Concept to the output stream.
 void writeIndexEntry(IndexEntry index_entry)
          Write an IndexEntry to the output stream.
 void writeReleaseMetadata(ReleaseMetadata release_metadata)
          Write the ReleaseMetadata to the output stream.
 

Method Detail

getName

public String getName()
Returns a descriptive, yet short, name of the output stream for display purposes. This name is to be used when prompting the user for what output stream they would like to use.

Returns:
a short name of the output stream for display purposes.

setConfiguration

public void setConfiguration(UserConfiguration config)
Sets the UserConfiguration. In certain cases, output streams may require information provided by the user configuration.

Parameters:
config - the UserConfiguration

open

public void open(String output_loc)
          throws Exception
Opens the output stream. Here is where the actual files for the output Metathesaurus should be opened.

Parameters:
output_loc - locator information for the output stream
Throws:
Exception - if there is a problem opening files

close

public void close()
           throws Exception
Closes the output stream. Here is where the actual files for the output Metathesaurus should be closed.

Throws:
Exception - if there is a problem closing files

writeConcept

public void writeConcept(Concept concept)
                  throws Exception
Write a Concept to the output stream.

Parameters:
concept - a Concept to write to the output stream
Throws:
Exception - if there is a problem writing the concept

writeIndexEntry

public void writeIndexEntry(IndexEntry index_entry)
                     throws Exception
Write an IndexEntry to the output stream.

Parameters:
index_entry - an IndexEntry to write out
Throws:
Exception - if there is a problem writing the index entry

writeReleaseMetadata

public void writeReleaseMetadata(ReleaseMetadata release_metadata)
                          throws Exception
Write the ReleaseMetadata to the output stream.

Parameters:
release_metadata - the ReleaseMetadata to write out
Throws:
Exception - if there is a problem writing the release metadata

getConfigurationDetails

public String getConfigurationDetails()
Returns a String describing the configuration details. This is a mechanism for the output stream to write details of its operation to the log file that MetamorphoSys eventually produces.

Returns:
a String describing the configuration details


Copyright ©2005