|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.teiid.internal.core.index.IndexInput
org.teiid.internal.core.index.SimpleIndexInput
public class SimpleIndexInput
A simpleIndexInput is an input on an in memory Index.
| Field Summary | |
|---|---|
protected IndexedFile |
currentFile
|
protected InMemoryIndex |
index
|
protected IndexedFile[] |
sortedFiles
|
protected WordEntry[] |
sortedWordEntries
|
| Fields inherited from class org.teiid.internal.core.index.IndexInput |
|---|
currentWordEntry, filePosition, wordPosition |
| Constructor Summary | |
|---|---|
SimpleIndexInput(InMemoryIndex index)
|
|
| Method Summary | |
|---|---|
void |
clearCache()
clears the cache of this indexInput, if it keeps track of the information already read. |
void |
close()
Closes the IndexInput. |
IndexedFile |
getCurrentFile()
Returns the current file the indexInput is pointing to in the index. |
IndexedFile |
getIndexedFile(IDocument document)
Returns the indexedFile corresponding to the given document in the index the input reads in (e.g. |
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. |
int |
getNumFiles()
Returns the number of files in the index. |
int |
getNumWords()
Returns the number of unique words in the index. |
java.lang.Object |
getSource()
Returns the Object the input is reading from. |
void |
init()
|
void |
moveToNextFile()
Moves the pointer on the current file to the next file in the index. |
void |
moveToNextWordEntry()
Moves the pointer on the current word to the next file in the index. |
void |
open()
Open the Source where the input gets the information from. |
IEntryResult[] |
queryEntriesPrefixedBy(char[] prefix)
Returns the list of the files containing the given word in the index. |
IQueryResult[] |
queryFilesReferringToPrefix(char[] prefix)
|
IQueryResult[] |
queryInDocumentNames(java.lang.String word)
Returns the list of the files whose name contain the given word in the index. |
protected void |
setFirstFile()
Set the pointer on the current file to the first file of the index. |
protected void |
setFirstWord()
Set the pointer on the current word to the first word of the index. |
| Methods inherited from class org.teiid.internal.core.index.IndexInput |
|---|
getCurrentWordEntry, getFilePosition, hasMoreFiles, hasMoreWords, isOpen, setOpen |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected WordEntry[] sortedWordEntries
protected IndexedFile currentFile
protected IndexedFile[] sortedFiles
protected InMemoryIndex index
| Constructor Detail |
|---|
public SimpleIndexInput(InMemoryIndex index)
| Method Detail |
|---|
public void clearCache()
IndexInput
clearCache in class IndexInputIndexInput.clearCache()
public void close()
throws java.io.IOException
IndexInput
close in class IndexInputjava.io.IOExceptionIndexInput.close()
public IndexedFile getCurrentFile()
throws java.io.IOException
IndexInput
getCurrentFile in class IndexInputjava.io.IOExceptionIndexInput.getCurrentFile()
public IndexedFile getIndexedFile(int fileNum)
throws java.io.IOException
IndexInput
getIndexedFile in class IndexInputjava.io.IOExceptionIndexInput.getIndexedFile(int)
public IndexedFile getIndexedFile(IDocument document)
throws java.io.IOException
IndexInput
getIndexedFile in class IndexInputjava.io.IOExceptionIndexInput.getIndexedFile(IDocument)public int getNumFiles()
IndexInput
getNumFiles in class IndexInputIndexInput.getNumFiles()public int getNumWords()
IndexInput
getNumWords in class IndexInputIndexInput.getNumWords()public java.lang.Object getSource()
IndexInput
getSource in class IndexInputIndexInput.getSource()public void init()
public void moveToNextFile()
throws java.io.IOException
IndexInput
moveToNextFile in class IndexInputjava.io.IOExceptionIndexInput.moveToNextFile()
public void moveToNextWordEntry()
throws java.io.IOException
IndexInput
moveToNextWordEntry in class IndexInputjava.io.IOExceptionIndexInput.moveToNextWordEntry()
public void open()
throws java.io.IOException
IndexInput
open in class IndexInputjava.io.IOExceptionIndexInput.open()
public IEntryResult[] queryEntriesPrefixedBy(char[] prefix)
throws java.io.IOException
IndexInput
queryEntriesPrefixedBy in class IndexInputjava.io.IOException
public IQueryResult[] queryFilesReferringToPrefix(char[] prefix)
throws java.io.IOException
queryFilesReferringToPrefix in class IndexInputjava.io.IOException
public IQueryResult[] queryInDocumentNames(java.lang.String word)
throws java.io.IOException
IndexInput
queryInDocumentNames in class IndexInputjava.io.IOExceptionIndexInput.queryInDocumentNames(String)
protected void setFirstFile()
throws java.io.IOException
IndexInput
setFirstFile in class IndexInputjava.io.IOExceptionIndexInput.setFirstFile()
protected void setFirstWord()
throws java.io.IOException
IndexInput
setFirstWord in class IndexInputjava.io.IOExceptionIndexInput.setFirstWord()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||