Class AnchorFilter
- java.lang.Object
-
- com.attivio.sdk.search.query.phrase.Phrase
-
- com.attivio.sdk.search.query.phrase.AnchorFilter
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
public final class AnchorFilter extends Phrase
Anchor phrase to start/end of an indexed value.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AnchorFilter.AnchorMode
Mode for anchoring this term to indexed values-
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 AnchorFilter()
Constructor.AnchorFilter(AnchorFilter.AnchorMode mode, Phrase phrase)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AnchorFilter
clone()
static AnchorFilter
endswith(Phrase phrase)
static AnchorFilter
equals(Phrase phrase)
boolean
equals(java.lang.Object other)
int
getEndOffset()
Get the end offset (0 indexed, exclusive) for this term in the original query string.AnchorFilter.AnchorMode
getMode()
Get the mode for anchoringphrase
.Phrase
getPhrase()
Get the phrase anchor filtering will be applied to.int
getStartOffset()
Get the start offset (0 indexed, inclusive) for this term in the original query string.int
hashCode()
Phrase
rewrite(PhraseHandler handler)
Recursively rewrite this phrase usinghandler
.Phrase
rewriteChildren(PhraseHandler handler)
Rewrite any children of this phrase usinghandler
.void
setMode(AnchorFilter.AnchorMode value)
Set the mode for anchoringphrase
.void
setPhrase(Phrase value)
Set the phrase anchor filtering will be applied to.static AnchorFilter
startswith(Phrase phrase)
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
containsParameters, containsParameters, copyParameters, getBoost, getParameter, getParameter, getParameter, getParameter, getParameterInternal, isMatchAll, parameters, parseIntParameter, removeParameter, setBoost, setParameter, setParameters, toArray, toString, toString
-
-
-
-
Constructor Detail
-
AnchorFilter
public AnchorFilter()
Constructor.
-
AnchorFilter
public AnchorFilter(AnchorFilter.AnchorMode mode, Phrase phrase)
Constructor.
-
-
Method Detail
-
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
-
getMode
public AnchorFilter.AnchorMode getMode()
Get the mode for anchoringphrase
.
-
setMode
public void setMode(AnchorFilter.AnchorMode value)
Set the mode for anchoringphrase
.
-
getPhrase
public Phrase getPhrase()
Get the phrase anchor filtering will be applied to.
-
setPhrase
public void setPhrase(Phrase value)
Set the phrase anchor filtering will be applied to.
-
rewrite
public Phrase rewrite(PhraseHandler handler)
Recursively rewrite this phrase usinghandler
.NOTE: If a phrase has any children, the phrase itself will be passed to
handler
first, prior to its children. Ifhandler
returns a new phrase, its children will not be traversed automatically.
-
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
-
clone
public AnchorFilter clone()
-
toString
public void toString(java.lang.StringBuilder buffer, boolean compact)
Appends the string representation of this query tobuffer
.
-
equals
public static AnchorFilter equals(Phrase phrase)
-
startswith
public static AnchorFilter startswith(Phrase phrase)
-
endswith
public static AnchorFilter endswith(Phrase phrase)
-
-