SMILA (incubation) API documentation

org.eclipse.smila.search.datadictionary
Class DataDictionaryController

java.lang.Object
  extended by org.eclipse.smila.search.datadictionary.DataDictionaryController

public abstract class DataDictionaryController
extends java.lang.Object

A Class class.

Author:
BROX IT-Solutions GmbH

Constructor Summary
DataDictionaryController()
           
 
Method Summary
static void addIndex(DIndex dIndex)
          This method adds an index entry to the data dictionary and saves it.
static void addIndex(java.lang.String indexTypeName)
          Adds the index.
static boolean deleteIndex(java.lang.String indexName)
          This method removes an index entry from the data dictionary.
static DAnyFinderDataDictionary getDataDictionary()
          Gets the data dictionary.
static DAnyFinderDataDictionary getDataDictionaryTypes()
          Gets the data dictionary types.
static java.lang.String getExistingIndexName(java.lang.String indexName)
          Checks whether an index with a given name exists and returns that name if such an index is found.
static DIndex getIndex(java.lang.String indexName)
          Gets the index.
static boolean hasIndex(java.lang.String indexName)
          Checks for index.
static boolean hasIndexIgnoreCase(java.lang.String indexName)
          This method checks whether an index with the same name already exists in the data dictionary.
static boolean renameIndex(java.lang.String indexName, java.lang.String newIndexName)
          Rename index.
static void setIndexConfiguration(java.lang.String indexName, DConfiguration dConfiguration)
          Sets the index configuration.
static void validateConfiguration(DConfiguration dConfiguration, DIndexStructure dIS)
          Validate configuration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataDictionaryController

public DataDictionaryController()
Method Detail

addIndex

public static void addIndex(DIndex dIndex)
                     throws DataDictionaryException
This method adds an index entry to the data dictionary and saves it.

Parameters:
dIndex - the d index
Throws:
DataDictionaryException - the data dictionary exception

addIndex

public static void addIndex(java.lang.String indexTypeName)
                     throws DataDictionaryException
Adds the index.

Parameters:
indexTypeName - the index type name
Throws:
DataDictionaryException - the data dictionary exception

renameIndex

public static boolean renameIndex(java.lang.String indexName,
                                  java.lang.String newIndexName)
                           throws DataDictionaryException
Rename index.

Parameters:
indexName - the index name
newIndexName - the new index name
Returns:
true, if successful
Throws:
DataDictionaryException - the data dictionary exception

deleteIndex

public static boolean deleteIndex(java.lang.String indexName)
                           throws DataDictionaryException
This method removes an index entry from the data dictionary. It returnes true, when the index entry has exists.

Parameters:
indexName - the index name
Returns:
true, if delete index
Throws:
DataDictionaryException - the data dictionary exception

getDataDictionaryTypes

public static DAnyFinderDataDictionary getDataDictionaryTypes()
                                                       throws DataDictionaryException
Gets the data dictionary types.

Returns:
the data dictionary types
Throws:
DataDictionaryException - the data dictionary exception

getDataDictionary

public static DAnyFinderDataDictionary getDataDictionary()
                                                  throws DataDictionaryException
Gets the data dictionary.

Returns:
the data dictionary
Throws:
DataDictionaryException - the data dictionary exception

getExistingIndexName

public static java.lang.String getExistingIndexName(java.lang.String indexName)
                                             throws DataDictionaryException
Checks whether an index with a given name exists and returns that name if such an index is found. If hasIndexIgnoreCase() returns true, this method can be used to obtain the name of the index in the same writing as is used in the data dictionary.

Parameters:
indexName - - The name of the index to search for
Returns:
The name of the index as it is stored in the data dictionary
Throws:
DataDictionaryException - if the data dictionary cannot be loaded

getIndex

public static DIndex getIndex(java.lang.String indexName)
                       throws DataDictionaryException
Gets the index.

Parameters:
indexName - the index name
Returns:
the index
Throws:
DataDictionaryException - the data dictionary exception

hasIndex

public static boolean hasIndex(java.lang.String indexName)
                        throws DataDictionaryException
Checks for index.

Parameters:
indexName - the index name
Returns:
true, if successful
Throws:
DataDictionaryException - the data dictionary exception

hasIndexIgnoreCase

public static boolean hasIndexIgnoreCase(java.lang.String indexName)
                                  throws DataDictionaryException
This method checks whether an index with the same name already exists in the data dictionary. The check is performed in a case-insensitive manner.

Parameters:
indexName - - The name of the index to check
Returns:
boolean
Throws:
DataDictionaryException - if the data dictionary cannot be loaded

setIndexConfiguration

public static void setIndexConfiguration(java.lang.String indexName,
                                         DConfiguration dConfiguration)
                                  throws DataDictionaryException
Sets the index configuration.

Parameters:
indexName - the index name
dConfiguration - the d configuration
Throws:
DataDictionaryException - the data dictionary exception

validateConfiguration

public static void validateConfiguration(DConfiguration dConfiguration,
                                         DIndexStructure dIS)
                                  throws DataDictionaryException
Validate configuration.

Parameters:
dConfiguration - the d configuration
dIS - the d is
Throws:
DataDictionaryException - the data dictionary exception

SMILA (incubation) API documentation