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
Iteratorinterface 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 intendScopeCount()intgetPositionIncrement()booleanhasNext()booleanisPhraseBreak(java.lang.String... scopes)Returnstrueif a phrase break occurs.booleanisScopeEnd(java.lang.String scope)Check if this ScopeInfo represents the end ofscope.booleanisScopeStart(java.lang.String scope)Check if this ScopeInfo represents the start ofscope.Tokennext()voidremove()Not SupportedScopeInforesetIteration()Reset iteration.protected static ScopeInforeuse(ScopeInfo reuse, com.attivio.sdk.token.TokenList.Element head, com.attivio.sdk.token.TokenList.Element tail)Get a scope info, reusing if possible.intstartScopeCount()
-
-
-
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:
hasNextin interfacejava.util.Iterator<Token>
-
getPositionIncrement
public int getPositionIncrement()
-
remove
public void remove()
Not Supported- Specified by:
removein interfacejava.util.Iterator<Token>
-
isPhraseBreak
public boolean isPhraseBreak(java.lang.String... scopes)
Returnstrueif a phrase break occurs.Phrase breaks include:
- any scope specified in
scopesstarting 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.
-
-