public class PensieveTMConnector extends BaseConnector implements ITMQuery
| Constructor and Description |
|---|
PensieveTMConnector() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearAttributes()
Removes all attributes from this query engine.
|
void |
close()
Closes this connector.
|
int |
getMaximumHits()
Gets the current maximum number of hits to retrieve.
|
String |
getName()
Gets the name of the connector.
|
IParameters |
getParameters()
Gets the current parameters of this connector.
|
String |
getSettingsDisplay()
Gets a display representation of the current settings for this connector.
|
int |
getThreshold()
Gets the current threshold value to use for the query.
|
boolean |
hasNext()
Indicates of there is a hit available.
|
QueryResult |
next()
Gets the next hit for the last query.
|
void |
open()
Opens this query engine.
|
int |
query(String plainText)
Starts a query for a give plain text.
|
int |
query(TextFragment text)
Starts a query for a given text.
|
void |
removeAttribute(String name)
Removes a given attribute from this query engine.
|
void |
setAttribute(String name,
String value)
Sets an attribute for this query engine.
|
void |
setLanguages(LocaleId sourceLocale,
LocaleId targetLocale)
Sets the source and target languages for this query engine.
|
void |
setMaximumHits(int max)
Sets the maximum number of hits to retrieve.
|
void |
setParameters(IParameters params)
Sets the parameters for opening and querying this connector.
|
void |
setRootDirectory(String rootDir)
Sets the root directory that may be used to replace the available ${rootDir} in the
parameters of this object.
|
void |
setThreshold(int threshold)
Sets the threshold value to use for the query.
|
batchLeverage, batchLeverageUsingBatchQuery, batchQuery, batchQueryText, getNoQueryThreshold, getSourceLanguage, getTargetLanguage, getWeight, leverage, leverageUsingBatchQuery, setNoQueryThreshold, setWeight, toInternalCodeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbatchLeverage, batchQuery, batchQueryText, getNoQueryThreshold, getSourceLanguage, getTargetLanguage, getWeight, leverage, setNoQueryThreshold, setWeightforEachRemaining, removepublic String getName()
IQuerypublic String getSettingsDisplay()
IQuerygetSettingsDisplay in interface IQuerypublic void setMaximumHits(int max)
ITMQuerysetMaximumHits in interface ITMQuerymax - The maximum number of hits to retrieve.public void setThreshold(int threshold)
ITMQuerysetThreshold in interface ITMQuerythreshold - The threshold value (between 0 and 100).public void close()
IQueryclose in interface AutoCloseableclose in interface IQuerypublic boolean hasNext()
IQueryhasNext in interface Iterator<QueryResult>hasNext in interface IQueryhasNext in class BaseConnectorpublic QueryResult next()
IQuerynext in interface Iterator<QueryResult>next in interface IQuerynext in class BaseConnectorpublic void open()
IQuerypublic int query(String plainText)
IQuerypublic int query(TextFragment text)
IQuerypublic void setAttribute(String name, String value)
IQuerysetAttribute in interface IQuerysetAttribute in class BaseConnectorname - name of the attribute.value - Value of the attribute.public void clearAttributes()
IQueryclearAttributes in interface IQueryclearAttributes in class BaseConnectorpublic void removeAttribute(String name)
IQueryremoveAttribute in interface IQueryremoveAttribute in class BaseConnectorname - The name of the attribute to remove.public void setLanguages(LocaleId sourceLocale, LocaleId targetLocale)
IQuerysetLanguages in interface IQuerysetLanguages in class BaseConnectorsourceLocale - Code of the source locale.targetLocale - Code of the target locale.public int getMaximumHits()
ITMQuerygetMaximumHits in interface ITMQuerypublic int getThreshold()
ITMQuerygetThreshold in interface ITMQuerypublic IParameters getParameters()
IQuerygetParameters in interface IQuerygetParameters in class BaseConnectorpublic void setParameters(IParameters params)
IQuerysetParameters in interface IQuerysetParameters in class BaseConnectorparams - the parameters to set.public void setRootDirectory(String rootDir)
IQuerysetRootDirectory in interface IQuerysetRootDirectory in class BaseConnectorrootDir - the root directory.Copyright © 2022. All rights reserved.