Package com.attivio.sdk.token
Class ScopeInfo
- java.lang.Object
-
- com.attivio.sdk.token.ScopeInfo
-
- All Implemented Interfaces:
java.util.Iterator<Token>
public final class ScopeInfo extends java.lang.Object implements java.util.Iterator<Token>
Represents scope tokens.ADVANCED: this structure represents advanced scope identification information and may change in incompatible ways in the future.
NOTE: this class implements the
Iterator
interface to support iterating over scope tokens efficiently. Iteration can be reset at any time by callingresetIteration()
.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
endScopeCount()
int
getPositionIncrement()
boolean
hasNext()
boolean
isPhraseBreak(java.lang.String... scopes)
Returnstrue
if a phrase break occurs.boolean
isScopeEnd(java.lang.String scope)
Check if this ScopeInfo represents the end ofscope
.boolean
isScopeStart(java.lang.String scope)
Check if this ScopeInfo represents the start ofscope
.Token
next()
void
remove()
Not SupportedScopeInfo
resetIteration()
Reset iteration.protected static ScopeInfo
reuse(ScopeInfo reuse, com.attivio.sdk.token.TokenList.Element head, com.attivio.sdk.token.TokenList.Element tail)
Get a scope info, reusing if possible.int
startScopeCount()
-
-
-
Method Detail
-
reuse
protected static ScopeInfo reuse(ScopeInfo reuse, com.attivio.sdk.token.TokenList.Element head, com.attivio.sdk.token.TokenList.Element tail)
Get a scope info, reusing if possible.
-
resetIteration
public ScopeInfo resetIteration()
Reset iteration.
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfacejava.util.Iterator<Token>
-
getPositionIncrement
public int getPositionIncrement()
-
remove
public void remove()
Not Supported- Specified by:
remove
in interfacejava.util.Iterator<Token>
-
isPhraseBreak
public boolean isPhraseBreak(java.lang.String... scopes)
Returnstrue
if a phrase break occurs.Phrase breaks include:
- any scope specified in
scopes
starting or ending. - any scope that has a position increment > 1.
- any scope specified in
-
startScopeCount
public int startScopeCount()
-
endScopeCount
public int endScopeCount()
-
isScopeStart
public boolean isScopeStart(java.lang.String scope)
Check if this ScopeInfo represents the start ofscope
.
-
isScopeEnd
public boolean isScopeEnd(java.lang.String scope)
Check if this ScopeInfo represents the end ofscope
.
-
-