Package com.acumenvelocity.ath.solr.tm
Class SolrTmConnector
- java.lang.Object
-
- net.sf.okapi.lib.translation.BaseConnector
-
- com.acumenvelocity.ath.solr.tm.SolrTmConnector
-
- All Implemented Interfaces:
AutoCloseable,Iterator<net.sf.okapi.common.query.QueryResult>,net.sf.okapi.common.query.IQuery,net.sf.okapi.lib.translation.ITMQuery
public class SolrTmConnector extends net.sf.okapi.lib.translation.BaseConnector implements net.sf.okapi.lib.translation.ITMQuery
-
-
Field Summary
Fields Modifier and Type Field Description static String[]EXACT_RETURN_FIELDSstatic String[]FUZZY_RETURN_FIELDS
-
Constructor Summary
Constructors Constructor Description SolrTmConnector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()intgetMaximumHits()StringgetName()net.sf.okapi.common.IParametersgetParameters()StringgetSettingsDisplay()intgetThreshold()booleanhasNext()net.sf.okapi.common.query.QueryResultnext()voidopen()intquery(String plainText)intquery(net.sf.okapi.common.resource.TextFragment queryTf)voidsetMaximumHits(int maxHits)voidsetParameters(net.sf.okapi.common.IParameters params)voidsetThreshold(int threshold)-
Methods inherited from class net.sf.okapi.lib.translation.BaseConnector
batchLeverage, batchQuery, batchQueryText, clearAttributes, getNoQueryThreshold, getSourceLanguage, getTargetLanguage, getWeight, leverage, removeAttribute, setAttribute, setLanguages, setNoQueryThreshold, setRootDirectory, setWeight
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sf.okapi.common.query.IQuery
batchLeverage, batchQuery, batchQueryText, clearAttributes, getNoQueryThreshold, getSourceLanguage, getTargetLanguage, getWeight, leverage, removeAttribute, setAttribute, setLanguages, setNoQueryThreshold, setRootDirectory, setWeight
-
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
-
-
-
Method Detail
-
getName
public String getName()
- Specified by:
getNamein interfacenet.sf.okapi.common.query.IQuery
-
getSettingsDisplay
public String getSettingsDisplay()
- Specified by:
getSettingsDisplayin interfacenet.sf.okapi.common.query.IQuery
-
hasNext
public boolean hasNext()
-
next
public net.sf.okapi.common.query.QueryResult next()
-
open
public void open()
- Specified by:
openin interfacenet.sf.okapi.common.query.IQuery
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfacenet.sf.okapi.common.query.IQuery
-
query
public int query(String plainText)
- Specified by:
queryin interfacenet.sf.okapi.common.query.IQuery
-
query
public int query(net.sf.okapi.common.resource.TextFragment queryTf)
- Specified by:
queryin interfacenet.sf.okapi.common.query.IQuery
-
setMaximumHits
public void setMaximumHits(int maxHits)
- Specified by:
setMaximumHitsin interfacenet.sf.okapi.lib.translation.ITMQuery
-
getMaximumHits
public int getMaximumHits()
- Specified by:
getMaximumHitsin interfacenet.sf.okapi.lib.translation.ITMQuery
-
getThreshold
public int getThreshold()
- Specified by:
getThresholdin interfacenet.sf.okapi.lib.translation.ITMQuery
-
setThreshold
public void setThreshold(int threshold)
- Specified by:
setThresholdin interfacenet.sf.okapi.lib.translation.ITMQuery
-
getParameters
public net.sf.okapi.common.IParameters getParameters()
- Specified by:
getParametersin interfacenet.sf.okapi.common.query.IQuery- Overrides:
getParametersin classnet.sf.okapi.lib.translation.BaseConnector
-
setParameters
public void setParameters(net.sf.okapi.common.IParameters params)
- Specified by:
setParametersin interfacenet.sf.okapi.common.query.IQuery- Overrides:
setParametersin classnet.sf.okapi.lib.translation.BaseConnector
-
-