public abstract class IndexInput extends Object
Modifier and Type | Field and Description |
---|---|
protected WordEntry |
currentWordEntry |
protected int |
filePosition |
protected int |
wordPosition |
Constructor and Description |
---|
IndexInput() |
Modifier and Type | Method and Description |
---|---|
abstract void |
clearCache()
clears the cache of this indexInput, if it keeps track of the information already read.
|
abstract void |
close()
Closes the IndexInput.
|
abstract IndexedFile |
getCurrentFile()
Returns the current file the indexInput is pointing to in the index.
|
WordEntry |
getCurrentWordEntry()
Returns the current file the indexInput is pointing to in the index.
|
int |
getFilePosition()
Returns the position of the current file the input is pointing to in the index.
|
abstract IndexedFile |
getIndexedFile(IDocument document)
Returns the indexedFile corresponding to the given document in the index the input
reads in (e.g.
|
abstract IndexedFile |
getIndexedFile(int fileNum)
Returns the indexedFile corresponding to the given document number in the index the input
reads in, or null if such indexedFile does not exist.
|
abstract int |
getNumFiles()
Returns the number of files in the index.
|
abstract int |
getNumWords()
Returns the number of unique words in the index.
|
abstract Object |
getSource()
Returns the Object the input is reading from.
|
boolean |
hasMoreFiles()
Returns true if the input has not reached the end of the index for the files.
|
boolean |
hasMoreWords()
Returns true if the input has not reached the end of the index for the files.
|
boolean |
isOpen()
returns the open state of the index
|
abstract void |
moveToNextFile()
Moves the pointer on the current file to the next file in the index.
|
abstract void |
moveToNextWordEntry()
Moves the pointer on the current word to the next file in the index.
|
abstract void |
open()
Open the Source where the input gets the information from.
|
abstract IEntryResult[] |
queryEntriesPrefixedBy(char[] prefix)
Returns the list of the files containing the given word in the index.
|
abstract IQueryResult[] |
queryFilesReferringToPrefix(char[] prefix) |
abstract IQueryResult[] |
queryInDocumentNames(String word)
Returns the list of the files whose name contain the given word in the index.
|
protected abstract void |
setFirstFile()
Set the pointer on the current file to the first file of the index.
|
protected abstract void |
setFirstWord()
Set the pointer on the current word to the first word of the index.
|
void |
setOpen(boolean state)
Set the open state of the Index
|
protected int filePosition
protected WordEntry currentWordEntry
protected int wordPosition
public abstract void clearCache()
public abstract void close() throws IOException
IOException
public abstract IndexedFile getCurrentFile() throws IOException
IOException
public WordEntry getCurrentWordEntry() throws IOException
IOException
public int getFilePosition()
public void setOpen(boolean state)
public boolean isOpen()
public abstract IndexedFile getIndexedFile(int fileNum) throws IOException
IOException
public abstract IndexedFile getIndexedFile(IDocument document) throws IOException
IOException
public abstract int getNumFiles()
public abstract int getNumWords()
public abstract Object getSource()
public boolean hasMoreFiles()
public boolean hasMoreWords()
public abstract void moveToNextFile() throws IOException
IOException
public abstract void moveToNextWordEntry() throws IOException
IOException
public abstract void open() throws IOException
IOException
public abstract IEntryResult[] queryEntriesPrefixedBy(char[] prefix) throws IOException
IOException
public abstract IQueryResult[] queryFilesReferringToPrefix(char[] prefix) throws IOException
IOException
public abstract IQueryResult[] queryInDocumentNames(String word) throws IOException
IOException
protected abstract void setFirstFile() throws IOException
IOException
protected abstract void setFirstWord() throws IOException
IOException
Copyright © 2018 JBoss by Red Hat. All rights reserved.