public class ParsingConfig
extends java.lang.Object
implements com.exalead.util.Checkable, java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
ParsingConfig.FallbackReportMode |
static class |
ParsingConfig.ImplicitSequenceOperator |
static class |
ParsingConfig.OversizedQueryReportMode |
Modifier and Type | Field and Description |
---|---|
boolean |
allowOptions |
static boolean |
DEFAULT_ALLOW_OPTIONS |
static boolean |
DEFAULT_FALLBACK_ON_ERROR |
static java.lang.String |
DEFAULT_FALLBACK_REPORT_MODE |
static java.lang.String |
DEFAULT_IMPLICIT_SEQUENCE_OPERATOR |
static int |
DEFAULT_NEAR_DISTANCE |
static java.lang.String |
DEFAULT_OVERSIZED_QUERY_REPORT_MODE |
boolean |
fallbackOnError |
java.lang.String |
fallbackReportMode |
java.lang.String |
implicitSequenceOperator |
int |
maxQuerySize |
int |
nearDistance |
java.lang.String |
oversizedQueryReportMode |
Constructor and Description |
---|
ParsingConfig() |
ParsingConfig(ParsingConfig o)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
void |
check(boolean deep,
java.lang.String errorContext)
Checks this ParsingConfig.
|
static ParsingConfig |
fromString(java.lang.String s)
String representation of this ParsingConfig.
|
java.lang.String |
getFallbackReportMode()
Specifies how to report a search error in 'Troubleshooting > Logs':
quiet: No log.
local: Error is reported in the Process log.
global: Error is reported in both Process and Global logs.
|
ParsingConfig.FallbackReportMode |
getFallbackReportModeAsEnum()
Specifies how to report a search error in 'Troubleshooting > Logs':
quiet: No log.
local: Error is reported in the Process log.
global: Error is reported in both Process and Global logs.
|
java.lang.String |
getImplicitSequenceOperator()
The default query operator.
|
ParsingConfig.ImplicitSequenceOperator |
getImplicitSequenceOperatorAsEnum()
The default query operator.
|
int |
getMaxQuerySize()
Queries larger than N are rejected.
0 means no limit. |
int |
getNearDistance()
Default distance for NEAR queries
|
java.lang.String |
getOversizedQueryReportMode()
Specifies how to report an oversized query error in 'Troubleshooting > Logs':
quiet: No log.
local: Error is reported in the Process log.
global: Error is reported in both Process and Global logs.
|
ParsingConfig.OversizedQueryReportMode |
getOversizedQueryReportModeAsEnum()
Specifies how to report an oversized query error in 'Troubleshooting > Logs':
quiet: No log.
local: Error is reported in the Process log.
global: Error is reported in both Process and Global logs.
|
static boolean |
isA(java.lang.String str,
ParsingConfig.FallbackReportMode item) |
static boolean |
isA(java.lang.String str,
ParsingConfig.ImplicitSequenceOperator item) |
static boolean |
isA(java.lang.String str,
ParsingConfig.OversizedQueryReportMode item) |
boolean |
isAllowOptions()
Allows word options in user query.
|
boolean |
isFallbackOnError()
If the standard parsing fails, parses the query with a relaxed grammar, meaning it will split words on white spaces.
Note that in some cases, operators and prefix handlers will not be taken into account for the query. For example, a query that ends with an AND will normally return an error. If this option is selected, CloudView will search for "AND" instead of considering it as an operator. |
static boolean |
isOneOf(java.lang.String str,
ParsingConfig.FallbackReportMode... items) |
static boolean |
isOneOf(java.lang.String str,
ParsingConfig.ImplicitSequenceOperator... items) |
static boolean |
isOneOf(java.lang.String str,
ParsingConfig.OversizedQueryReportMode... items) |
ParsingConfig |
makeCopy()
Creates and returns a deep copy of this ParsingConfig.
|
static ParsingConfig |
readFrom(java.io.InputStream is)
Read this ParsingConfig from an XML fragment.
|
void |
setAllowOptions(boolean allowOptions)
Allows word options in user query.
|
void |
setFallbackOnError(boolean fallbackOnError)
If the standard parsing fails, parses the query with a relaxed grammar, meaning it will split words on white spaces.
Note that in some cases, operators and prefix handlers will not be taken into account for the query. For example, a query that ends with an AND will normally return an error. If this option is selected, CloudView will search for "AND" instead of considering it as an operator. |
void |
setFallbackReportMode(ParsingConfig.FallbackReportMode item)
Specifies how to report a search error in 'Troubleshooting > Logs':
quiet: No log.
local: Error is reported in the Process log.
global: Error is reported in both Process and Global logs.
|
void |
setFallbackReportMode(java.lang.String fallbackReportMode)
Specifies how to report a search error in 'Troubleshooting > Logs':
quiet: No log.
local: Error is reported in the Process log.
global: Error is reported in both Process and Global logs.
|
void |
setImplicitSequenceOperator(ParsingConfig.ImplicitSequenceOperator item)
The default query operator.
|
void |
setImplicitSequenceOperator(java.lang.String implicitSequenceOperator)
The default query operator.
|
void |
setMaxQuerySize(int maxQuerySize)
Queries larger than N are rejected.
0 means no limit. |
void |
setNearDistance(int nearDistance)
Default distance for NEAR queries
|
void |
setOversizedQueryReportMode(ParsingConfig.OversizedQueryReportMode item)
Specifies how to report an oversized query error in 'Troubleshooting > Logs':
quiet: No log.
local: Error is reported in the Process log.
global: Error is reported in both Process and Global logs.
|
void |
setOversizedQueryReportMode(java.lang.String oversizedQueryReportMode)
Specifies how to report an oversized query error in 'Troubleshooting > Logs':
quiet: No log.
local: Error is reported in the Process log.
global: Error is reported in both Process and Global logs.
|
java.lang.String |
toString()
String representation of this ParsingConfig.
|
ParsingConfig |
withAllowOptions(boolean allowOptions) |
ParsingConfig |
withAllowOptions(java.lang.Boolean allowOptions) |
ParsingConfig |
withFallbackOnError(boolean fallbackOnError) |
ParsingConfig |
withFallbackOnError(java.lang.Boolean fallbackOnError) |
ParsingConfig |
withFallbackReportMode(java.lang.String fallbackReportMode) |
ParsingConfig |
withImplicitSequenceOperator(java.lang.String implicitSequenceOperator) |
ParsingConfig |
withMaxQuerySize(int maxQuerySize) |
ParsingConfig |
withMaxQuerySize(java.lang.Integer maxQuerySize) |
ParsingConfig |
withNearDistance(int nearDistance) |
ParsingConfig |
withNearDistance(java.lang.Integer nearDistance) |
ParsingConfig |
withOversizedQueryReportMode(java.lang.String oversizedQueryReportMode) |
void |
writeTo(java.io.OutputStream os)
Write this ParsingConfig as an XML fragment
|
public boolean allowOptions
public static final boolean DEFAULT_ALLOW_OPTIONS
public int nearDistance
public static final int DEFAULT_NEAR_DISTANCE
public boolean fallbackOnError
public static final boolean DEFAULT_FALLBACK_ON_ERROR
public java.lang.String fallbackReportMode
public static final java.lang.String DEFAULT_FALLBACK_REPORT_MODE
public int maxQuerySize
public java.lang.String oversizedQueryReportMode
public static final java.lang.String DEFAULT_OVERSIZED_QUERY_REPORT_MODE
public java.lang.String implicitSequenceOperator
public static final java.lang.String DEFAULT_IMPLICIT_SEQUENCE_OPERATOR
public ParsingConfig()
public ParsingConfig(ParsingConfig o)
public static boolean isA(java.lang.String str, ParsingConfig.FallbackReportMode item)
public static boolean isOneOf(java.lang.String str, ParsingConfig.FallbackReportMode... items)
public void setFallbackReportMode(ParsingConfig.FallbackReportMode item)
public ParsingConfig.FallbackReportMode getFallbackReportModeAsEnum()
public static boolean isA(java.lang.String str, ParsingConfig.OversizedQueryReportMode item)
public static boolean isOneOf(java.lang.String str, ParsingConfig.OversizedQueryReportMode... items)
public void setOversizedQueryReportMode(ParsingConfig.OversizedQueryReportMode item)
public ParsingConfig.OversizedQueryReportMode getOversizedQueryReportModeAsEnum()
public static boolean isA(java.lang.String str, ParsingConfig.ImplicitSequenceOperator item)
public static boolean isOneOf(java.lang.String str, ParsingConfig.ImplicitSequenceOperator... items)
public void setImplicitSequenceOperator(ParsingConfig.ImplicitSequenceOperator item)
public ParsingConfig.ImplicitSequenceOperator getImplicitSequenceOperatorAsEnum()
public void setAllowOptions(boolean allowOptions)
public boolean isAllowOptions()
public ParsingConfig withAllowOptions(boolean allowOptions)
public ParsingConfig withAllowOptions(java.lang.Boolean allowOptions)
public void setNearDistance(int nearDistance)
public int getNearDistance()
public ParsingConfig withNearDistance(int nearDistance)
public ParsingConfig withNearDistance(java.lang.Integer nearDistance)
public void setFallbackOnError(boolean fallbackOnError)
public boolean isFallbackOnError()
public ParsingConfig withFallbackOnError(boolean fallbackOnError)
public ParsingConfig withFallbackOnError(java.lang.Boolean fallbackOnError)
public void setFallbackReportMode(java.lang.String fallbackReportMode)
public java.lang.String getFallbackReportMode()
public ParsingConfig withFallbackReportMode(java.lang.String fallbackReportMode)
public void setMaxQuerySize(int maxQuerySize)
public int getMaxQuerySize()
public ParsingConfig withMaxQuerySize(int maxQuerySize)
public ParsingConfig withMaxQuerySize(java.lang.Integer maxQuerySize)
public void setOversizedQueryReportMode(java.lang.String oversizedQueryReportMode)
public java.lang.String getOversizedQueryReportMode()
public ParsingConfig withOversizedQueryReportMode(java.lang.String oversizedQueryReportMode)
public void setImplicitSequenceOperator(java.lang.String implicitSequenceOperator)
public java.lang.String getImplicitSequenceOperator()
public ParsingConfig withImplicitSequenceOperator(java.lang.String implicitSequenceOperator)
public ParsingConfig makeCopy()
public static ParsingConfig 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 ParsingConfig 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 © 2013 Dassault Systèmes, All Rights Reserved.