nct.service.synonyms
Interface SynonymMapper

All Known Implementing Classes:
DIPSynonyms

public interface SynonymMapper

An interface that describes methods for transforming an identifier into a synonym of a particular type.


Method Summary
 java.lang.String getIdFromSynonym(java.lang.String synonym)
          Returns the unique id for the specified synonym.
 java.util.List<java.lang.String> getPotentialSynonyms(java.lang.String input)
          This method will return a list of potential synonyms that match the input.
 java.lang.String getSynonym(java.lang.String synonym, java.lang.String type)
          A shortcut method for calling: String s = syns.getSynonymFromId(syns.getIdFromSynonym(synonym), type);
 java.lang.String getSynonymFromId(java.lang.String id, java.lang.String type)
          Returns a synonym of a particular type for the specified id.
 

Method Detail

getIdFromSynonym

java.lang.String getIdFromSynonym(java.lang.String synonym)
Returns the unique id for the specified synonym.

Parameters:
synonym - The synonym to check the database for.
Returns:
The unique id for the input synonym.

getSynonymFromId

java.lang.String getSynonymFromId(java.lang.String id,
                                  java.lang.String type)
Returns a synonym of a particular type for the specified id.

Parameters:
id - The id to check the database for.
type - The type of synonym desired for the specified id.
Returns:
The requested synonym.

getSynonym

java.lang.String getSynonym(java.lang.String synonym,
                            java.lang.String type)
A shortcut method for calling: String s = syns.getSynonymFromId(syns.getIdFromSynonym(synonym), type);

Parameters:
synonym - The synonym to check the database for.
type - The type of synonym desired for the specified input synonym.
Returns:
The requested synonym.

getPotentialSynonyms

java.util.List<java.lang.String> getPotentialSynonyms(java.lang.String input)
This method will return a list of potential synonyms that match the input.

Parameters:
input - The input string that will be matched against the list of synonyms in the database.
Returns:
A list of potential synonyms.