Class SimpleTBConnector
- java.lang.Object
-
- net.sf.okapi.lib.terminology.simpletb.SimpleTBConnector
-
- All Implemented Interfaces:
ITermAccess
public class SimpleTBConnector extends Object implements ITermAccess
-
-
Constructor Summary
Constructors Constructor Description SimpleTBConnector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EntryaddEntry(String srcTerm, String trgTerm)voidclose()Closes the connection to the termbase.List<TermHit>getExistingStrings(TextFragment fragment, LocaleId fragmentLocId, LocaleId otherLocId)List<TermHit>getExistingTerms(TextFragment fragment, LocaleId fragmentLocId, LocaleId otherLocId)Gets the list of all terms of the termbase that exist in a given fragment for a given source/target pair of locales.ParametersgetParameters()Gets the current parameters for this termbase connector.voidinitializeSearch(boolean stringSearch, boolean betweenCodes)voidopen()Opens the connection to the termbase.voidsetParameters(IParameters params)Sets the parameters for this termbase connector.
-
-
-
Method Detail
-
getParameters
public Parameters getParameters()
Description copied from interface:ITermAccessGets the current parameters for this termbase connector.- Specified by:
getParametersin interfaceITermAccess- Returns:
- the current parameters for this termbase connector.
-
setParameters
public void setParameters(IParameters params)
Description copied from interface:ITermAccessSets the parameters for this termbase connector.- Specified by:
setParametersin interfaceITermAccess- Parameters:
params- the new parameter
-
open
public void open()
Description copied from interface:ITermAccessOpens the connection to the termbase. You may need to callITermAccess.setParameters(IParameters)before this method.- Specified by:
openin interfaceITermAccess
-
close
public void close()
Description copied from interface:ITermAccessCloses the connection to the termbase.- Specified by:
closein interfaceITermAccess
-
getExistingTerms
public List<TermHit> getExistingTerms(TextFragment fragment, LocaleId fragmentLocId, LocaleId otherLocId)
Description copied from interface:ITermAccessGets the list of all terms of the termbase that exist in a given fragment for a given source/target pair of locales.- Specified by:
getExistingTermsin interfaceITermAccess- Parameters:
fragment- the fragment to examine.fragmentLocId- the locale of the fragment.otherLocId- the other (source or target) locale.- Returns:
- the list of all terms of the termbase that exist in the given fragment.
-
getExistingStrings
public List<TermHit> getExistingStrings(TextFragment fragment, LocaleId fragmentLocId, LocaleId otherLocId)
- Specified by:
getExistingStringsin interfaceITermAccess
-
initializeSearch
public void initializeSearch(boolean stringSearch, boolean betweenCodes)
-
-