com.metamatrix.modeler.core.index
Interface IndexSelector


public interface IndexSelector

IndexSelector


Method Summary
 java.io.File getFile(java.lang.String path)
          Return the file at the given relative path in the vdb.
 java.io.InputStream getFileContent(java.lang.String path)
          Return a InputStream the contents of the file at path relative to the directory location of the index files.
 java.io.InputStream getFileContent(java.lang.String path, java.lang.String[] tokens, java.lang.String[] tokenRelacements)
          Return a InputStream the contents of the file at path relative to the directory location of the index files.
 java.lang.String getFileContentAsString(java.lang.String path)
          Return a strings that represent contents of the file at paths relative to the directory location of the index files.
 java.util.List getFileContentsAsString(java.util.List paths)
          Return the collection of strings that represent contents of the files at paths relative to the directory location of the index files.
 java.lang.String[] getFilePaths()
          Get the relative paths to files in the vdb.
 long getFileSize(java.lang.String path)
          Get the length of the file after token replacement if any is compleate.
 com.metamatrix.internal.core.index.Index[] getIndexes()
          Return the array of com.metamatrix.internal.core.index.IIndex instances to use
 boolean isValid()
          Return boolean indicating if indexes on this selector are good to use.
 void setValid(boolean valid)
          Set boolean indicating if indexes on this selector are good to use.
 

Method Detail

getIndexes

com.metamatrix.internal.core.index.Index[] getIndexes()
                                                      throws java.io.IOException
Return the array of com.metamatrix.internal.core.index.IIndex instances to use

Returns:
array of indexes
Throws:
java.io.IOException - if errors are encountered obtaining the index file

getFilePaths

java.lang.String[] getFilePaths()
Get the relative paths to files in the vdb.

Returns:
The array of paths to files in the vdb
Since:
4.2

getFileContentsAsString

java.util.List getFileContentsAsString(java.util.List paths)
Return the collection of strings that represent contents of the files at paths relative to the directory location of the index files.

Parameters:
paths - collection of paths for files
Returns:
collection of contents of files at given locations as strings

getFileContentAsString

java.lang.String getFileContentAsString(java.lang.String path)
Return a strings that represent contents of the file at paths relative to the directory location of the index files.

Parameters:
path - The path to the file
Returns:
Contents of the file at the given location as a string

getFileContent

java.io.InputStream getFileContent(java.lang.String path,
                                   java.lang.String[] tokens,
                                   java.lang.String[] tokenRelacements)
Return a InputStream the contents of the file at path relative to the directory location of the index files.

Parameters:
path - The path to the file
tokens - The tokens found in the file that need to be replaced
tokenReplacements - The strings used to replace tokens in the file
Returns:
contents of file at given location as InputStream

getFile

java.io.File getFile(java.lang.String path)
Return the file at the given relative path in the vdb.

Parameters:
path - The path to the file

getFileSize

long getFileSize(java.lang.String path)
Get the length of the file after token replacement if any is compleate.

Parameters:
path - The path to the file
Returns:
length of file at given location

getFileContent

java.io.InputStream getFileContent(java.lang.String path)
Return a InputStream the contents of the file at path relative to the directory location of the index files.

Parameters:
path - The path to the file
Returns:
contents of file at given location as InputStream

isValid

boolean isValid()
Return boolean indicating if indexes on this selector are good to use. Applications using the selector should mark it invalid of files backing the indexes are somehow getting deleted or currupted.

Returns:
true if the indexes on the selector
Since:
4.2

setValid

void setValid(boolean valid)
Set boolean indicating if indexes on this selector are good to use. Applications using the selector should mark it invalid of files backing the indexes are somehow getting deleted or currupted.

Parameters:
true - if the indexes on the selector
Since:
4.2


Copyright © 2009. All Rights Reserved.