public class SuggestDispatcher
extends java.lang.Object
implements com.exalead.util.Checkable, java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
SuggestDispatcher.DesignedForLogics |
Modifier and Type | Field and Description |
---|---|
boolean |
addQuotes |
boolean |
boostVariety |
static boolean |
DEFAULT_ADD_QUOTES |
static boolean |
DEFAULT_BOOST_VARIETY |
static boolean |
DEFAULT_DISPLAY_PREFIX_IN_SUGGEST |
static boolean |
DEFAULT_MATCH_WHOLE_QUERY |
static int |
DEFAULT_MAX_NB_RESULTS |
static boolean |
DEFAULT_USE_WITH_UNKNOWN_PREFIX |
protected SuggestDispatcher.DesignedForLogics |
designedForLogics |
boolean |
displayPrefixInSuggest |
boolean |
matchWholeQuery |
int |
maxNbResults |
java.lang.String |
name |
java.util.List<PrefixHandlerSuggestPair> |
prefixHandlerSuggestPair |
boolean |
useWithUnknownPrefix |
Constructor and Description |
---|
SuggestDispatcher() |
SuggestDispatcher(SuggestDispatcher o)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
void |
check(boolean deep,
java.lang.String errorContext)
Checks this SuggestDispatcher.
|
static SuggestDispatcher |
fromString(java.lang.String s)
String representation of this SuggestDispatcher.
|
SuggestDispatcher.DesignedForLogics |
getDesignedForLogics() |
int |
getMaxNbResults()
Max number of suggest entries returned by this suggest dispatcher (0 returns all available entries).
|
java.lang.String |
getName()
The mandatory suggest dispatcher name.
|
java.util.List<PrefixHandlerSuggestPair> |
getPrefixHandlerSuggestPair()
Association of a prefix handler and a suggest
|
boolean |
isAddQuotes()
Adds quotes where necessary so that the whole suggestion is included in the prefix handler.
|
boolean |
isBoostVariety()
Allows to retrieve the best matches for each suggest according to the maximum number of suggestions.
|
boolean |
isDisplayPrefixInSuggest()
When activated, the suggest is prefixed by the corresponding prefix handler if defined.
|
boolean |
isMatchWholeQuery()
Sends the whole query to the default suggest if the cursor is outside a prefix handler.
If unselected, it sends a subquery delimited by surrounding prefixes. |
boolean |
isUseWithUnknownPrefix()
Sends the query to the default suggest if the cursor is within an undefined prefix handler.
If unselected, undefined prefix handlers are ignored and there will be no suggestions. |
SuggestDispatcher |
makeCopy()
Creates and returns a deep copy of this SuggestDispatcher.
|
static SuggestDispatcher |
readFrom(java.io.InputStream is)
Read this SuggestDispatcher from an XML fragment.
|
void |
setAddQuotes(boolean addQuotes)
Adds quotes where necessary so that the whole suggestion is included in the prefix handler.
|
void |
setBoostVariety(boolean boostVariety)
Allows to retrieve the best matches for each suggest according to the maximum number of suggestions.
|
void |
setDesignedForLogics(SuggestDispatcher.DesignedForLogics __value) |
void |
setDisplayPrefixInSuggest(boolean displayPrefixInSuggest)
When activated, the suggest is prefixed by the corresponding prefix handler if defined.
|
void |
setMatchWholeQuery(boolean matchWholeQuery)
Sends the whole query to the default suggest if the cursor is outside a prefix handler.
If unselected, it sends a subquery delimited by surrounding prefixes. |
void |
setMaxNbResults(int maxNbResults)
Max number of suggest entries returned by this suggest dispatcher (0 returns all available entries).
|
void |
setName(java.lang.String name)
The mandatory suggest dispatcher name.
|
void |
setUseWithUnknownPrefix(boolean useWithUnknownPrefix)
Sends the query to the default suggest if the cursor is within an undefined prefix handler.
If unselected, undefined prefix handlers are ignored and there will be no suggestions. |
java.lang.String |
toString()
String representation of this SuggestDispatcher.
|
SuggestDispatcher |
withAddQuotes(boolean addQuotes) |
SuggestDispatcher |
withAddQuotes(java.lang.Boolean addQuotes) |
SuggestDispatcher |
withBoostVariety(boolean boostVariety) |
SuggestDispatcher |
withBoostVariety(java.lang.Boolean boostVariety) |
SuggestDispatcher |
withDesignedForLogics(java.util.Collection<StringValue> __values) |
SuggestDispatcher |
withDesignedForLogics(StringValue... __values) |
SuggestDispatcher |
withDesignedForLogics(SuggestDispatcher.DesignedForLogics __value) |
SuggestDispatcher |
withDisplayPrefixInSuggest(boolean displayPrefixInSuggest) |
SuggestDispatcher |
withDisplayPrefixInSuggest(java.lang.Boolean displayPrefixInSuggest) |
SuggestDispatcher |
withMatchWholeQuery(boolean matchWholeQuery) |
SuggestDispatcher |
withMatchWholeQuery(java.lang.Boolean matchWholeQuery) |
SuggestDispatcher |
withMaxNbResults(int maxNbResults) |
SuggestDispatcher |
withMaxNbResults(java.lang.Integer maxNbResults) |
SuggestDispatcher |
withName(java.lang.String name) |
SuggestDispatcher |
withPrefixHandlerSuggestPair(java.util.Collection<PrefixHandlerSuggestPair> __values) |
SuggestDispatcher |
withPrefixHandlerSuggestPair(PrefixHandlerSuggestPair... __values)
Association of a prefix handler and a suggest
|
SuggestDispatcher |
withUseWithUnknownPrefix(boolean useWithUnknownPrefix) |
SuggestDispatcher |
withUseWithUnknownPrefix(java.lang.Boolean useWithUnknownPrefix) |
void |
writeTo(java.io.OutputStream os)
Write this SuggestDispatcher as an XML fragment
|
public java.util.List<PrefixHandlerSuggestPair> prefixHandlerSuggestPair
public java.lang.String name
public boolean matchWholeQuery
public static final boolean DEFAULT_MATCH_WHOLE_QUERY
public boolean useWithUnknownPrefix
public static final boolean DEFAULT_USE_WITH_UNKNOWN_PREFIX
protected SuggestDispatcher.DesignedForLogics designedForLogics
public boolean addQuotes
public static final boolean DEFAULT_ADD_QUOTES
public boolean displayPrefixInSuggest
public static final boolean DEFAULT_DISPLAY_PREFIX_IN_SUGGEST
public int maxNbResults
public static final int DEFAULT_MAX_NB_RESULTS
public boolean boostVariety
public static final boolean DEFAULT_BOOST_VARIETY
public SuggestDispatcher()
public SuggestDispatcher(SuggestDispatcher o)
public java.util.List<PrefixHandlerSuggestPair> getPrefixHandlerSuggestPair()
public SuggestDispatcher withPrefixHandlerSuggestPair(PrefixHandlerSuggestPair... __values)
public SuggestDispatcher withPrefixHandlerSuggestPair(java.util.Collection<PrefixHandlerSuggestPair> __values)
public void setName(java.lang.String name)
public java.lang.String getName()
public SuggestDispatcher withName(java.lang.String name)
public void setMatchWholeQuery(boolean matchWholeQuery)
public boolean isMatchWholeQuery()
public SuggestDispatcher withMatchWholeQuery(boolean matchWholeQuery)
public SuggestDispatcher withMatchWholeQuery(java.lang.Boolean matchWholeQuery)
public void setUseWithUnknownPrefix(boolean useWithUnknownPrefix)
public boolean isUseWithUnknownPrefix()
public SuggestDispatcher withUseWithUnknownPrefix(boolean useWithUnknownPrefix)
public SuggestDispatcher withUseWithUnknownPrefix(java.lang.Boolean useWithUnknownPrefix)
public SuggestDispatcher.DesignedForLogics getDesignedForLogics()
public void setDesignedForLogics(SuggestDispatcher.DesignedForLogics __value)
public SuggestDispatcher withDesignedForLogics(StringValue... __values)
public SuggestDispatcher withDesignedForLogics(java.util.Collection<StringValue> __values)
public SuggestDispatcher withDesignedForLogics(SuggestDispatcher.DesignedForLogics __value)
public void setAddQuotes(boolean addQuotes)
public boolean isAddQuotes()
public SuggestDispatcher withAddQuotes(boolean addQuotes)
public SuggestDispatcher withAddQuotes(java.lang.Boolean addQuotes)
public void setDisplayPrefixInSuggest(boolean displayPrefixInSuggest)
public boolean isDisplayPrefixInSuggest()
public SuggestDispatcher withDisplayPrefixInSuggest(boolean displayPrefixInSuggest)
public SuggestDispatcher withDisplayPrefixInSuggest(java.lang.Boolean displayPrefixInSuggest)
public void setMaxNbResults(int maxNbResults)
public int getMaxNbResults()
public SuggestDispatcher withMaxNbResults(int maxNbResults)
public SuggestDispatcher withMaxNbResults(java.lang.Integer maxNbResults)
public void setBoostVariety(boolean boostVariety)
public boolean isBoostVariety()
public SuggestDispatcher withBoostVariety(boolean boostVariety)
public SuggestDispatcher withBoostVariety(java.lang.Boolean boostVariety)
public SuggestDispatcher makeCopy()
public static SuggestDispatcher readFrom(java.io.InputStream is) throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBException
public void writeTo(java.io.OutputStream os) throws javax.xml.bind.JAXBException, java.io.IOException
javax.xml.bind.JAXBException
java.io.IOException
public static SuggestDispatcher fromString(java.lang.String s) throws javax.xml.bind.JAXBException, java.io.UnsupportedEncodingException
javax.xml.bind.JAXBException
java.io.UnsupportedEncodingException
public java.lang.String toString()
toString
in class java.lang.Object
public void check(boolean deep, java.lang.String errorContext) throws com.exalead.util.TypedException
check
in interface com.exalead.util.Checkable
com.exalead.util.TypedException
Copyright © 2021 Dassault Systèmes, All Rights Reserved.