Class PhrasePlugin
- java.lang.Object
-
- com.attivio.sdk.search.query.phrase.Phrase
-
- com.attivio.sdk.search.query.phrase.PhrasePlugin
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
public final class PhrasePlugin extends Phrase
Phrase query plugin to support template queries that are replaced in during query processing.NOTE: this phrase operator must be replaced/rewritten/removed during query processing, otherwise the query will fail.
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.attivio.sdk.search.query.phrase.Phrase
Phrase.Parameter
-
-
Field Summary
-
Fields inherited from class com.attivio.sdk.search.query.phrase.Phrase
boost, parameters
-
-
Constructor Summary
Constructors Constructor Description PhrasePlugin()
Constructor.PhrasePlugin(java.lang.String name)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object other)
int
getEndOffset()
Get the end offset (0 indexed, exclusive) for this term in the original query string.java.lang.String
getName()
int
getStartOffset()
Get the start offset (0 indexed, inclusive) for this term in the original query string.int
hashCode()
Phrase
rewriteChildren(PhraseHandler handler)
Rewrite any children of this phrase usinghandler
.void
setName(java.lang.String value)
void
toString(java.lang.StringBuilder buffer, boolean compact)
Appends the string representation of this query tobuffer
.-
Methods inherited from class com.attivio.sdk.search.query.phrase.Phrase
clone, containsParameters, containsParameters, copyParameters, getBoost, getParameter, getParameter, getParameter, getParameter, getParameterInternal, isMatchAll, parameters, parseIntParameter, removeParameter, rewrite, setBoost, setParameter, setParameters, toArray, toString, toString
-
-
-
-
Method Detail
-
getName
public java.lang.String getName()
-
setName
public void setName(java.lang.String value)
-
getStartOffset
public int getStartOffset()
Get the start offset (0 indexed, inclusive) for this term in the original query string.This value is set during parsing and indicates the start offset into the original query string that this term represents. In general, offsets should not be set/modified by query transformers and it is recommended that start and end offsets are set to zero when cloning.
NOTE: if
Phrase.getStartOffset()
==Phrase.getEndOffset()
, this indicates that the term did not come from a parsed query string.- Specified by:
getStartOffset
in classPhrase
-
getEndOffset
public int getEndOffset()
Get the end offset (0 indexed, exclusive) for this term in the original query string.This value is set during parsing and indicates the end offset of the original query string that this term represents. In general, offsets should not be set/modified by query transformers and it is recommended that start and end offsets are set to zero when cloning.
NOTE: if
Phrase.getStartOffset()
==Phrase.getEndOffset()
, this indicates that the term did not come from a parsed query string.- Specified by:
getEndOffset
in classPhrase
-
rewriteChildren
public Phrase rewriteChildren(PhraseHandler handler)
Rewrite any children of this phrase usinghandler
.Returns the modified phrase, which may be
null
if all children were removed byhandler
.This method may have no effect if this
Phrase
represents a leaf in the tree.NOTE: child phrases are not recursively traversed.
- Specified by:
rewriteChildren
in classPhrase
-
-