SMILA (incubation) API documentation

org.eclipse.smila.search.index
Class IndexAdmin

java.lang.Object
  extended by org.eclipse.smila.search.index.IndexAdmin
Direct Known Subclasses:
IndexAdmin

public abstract class IndexAdmin
extends java.lang.Object

The Class IndexAdmin.

Author:
GSchmidt To change this generated comment go to Window>Preferences>Java>Code Generation>Code and Comments

Field Summary
static java.lang.String DELIMITER
          Delemiter for separating key values.
protected static long SLEEP_TIME
          Default sleep time.
 
Constructor Summary
IndexAdmin()
           
 
Method Summary
 void create(DIndexStructure dIndexStructure)
          Create index.
protected abstract  void createIndex(DIndexStructure dIndexStructure)
          Create index.
 void delete(java.lang.String indexName)
          Delete.
protected abstract  void deleteIndex(java.lang.String indexName)
          Delete index.
 boolean exists(java.lang.String indexName)
          Checks existence of a given index.
 java.lang.String existsIgnoreCase(java.lang.String indexName)
          Checks whether an index name exists in the data dictionary.
protected abstract  boolean indexExists(java.lang.String indexName)
          Index exists.
 void rename(java.lang.String indexName, java.lang.String newIndexName)
          Rename.
protected abstract  void renameIndex(java.lang.String indexName, java.lang.String newIndexName)
          Rename index.
 void reorganize(java.lang.String indexName)
          This method is responsible for reorganizeing the index structure of a given retrieval system.
protected abstract  void reorganizeIndex(java.lang.String indexName)
          Reorganize index.
 void save(java.lang.String indexName)
          Save.
abstract  void saveIndex(java.lang.String indexName)
          Save index.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DELIMITER

public static final java.lang.String DELIMITER
Delemiter for separating key values.

See Also:
Constant Field Values

SLEEP_TIME

protected static final long SLEEP_TIME
Default sleep time.

See Also:
Constant Field Values
Constructor Detail

IndexAdmin

public IndexAdmin()
Method Detail

create

public void create(DIndexStructure dIndexStructure)
            throws IndexException
Create index.

Parameters:
dIndexStructure - Index structure.
Throws:
IndexException - Unable to create index.

delete

public void delete(java.lang.String indexName)
            throws IndexException
Delete.

Parameters:
indexName - the index name
Throws:
IndexException - the index exception

rename

public void rename(java.lang.String indexName,
                   java.lang.String newIndexName)
            throws IndexException
Rename.

Parameters:
indexName - the index name
newIndexName - the new index name
Throws:
IndexException - the index exception

save

public void save(java.lang.String indexName)
          throws IndexException
Save.

Parameters:
indexName - the index name
Throws:
IndexException - the index exception

saveIndex

public abstract void saveIndex(java.lang.String indexName)
                        throws IndexException
Save index.

Parameters:
indexName - the index name
Throws:
IndexException - the index exception

createIndex

protected abstract void createIndex(DIndexStructure dIndexStructure)
                             throws IndexException
Create index.

Parameters:
dIndexStructure - Index structure.
Throws:
IndexException - Unable to create index.

deleteIndex

protected abstract void deleteIndex(java.lang.String indexName)
                             throws IndexException
Delete index.

Parameters:
indexName - the index name
Throws:
IndexException - the index exception

renameIndex

protected abstract void renameIndex(java.lang.String indexName,
                                    java.lang.String newIndexName)
                             throws IndexException
Rename index.

Parameters:
indexName - the index name
newIndexName - the new index name
Throws:
IndexException - the index exception

exists

public boolean exists(java.lang.String indexName)
               throws IndexException
Checks existence of a given index. Note that if this method returns false, that does not necessarily mean that an index with that name can be created. AnyFinder does not allow indexes that differ only in capitalization of names. If an index with name Test exists, exists("test") will return false, but create("test") will fail nevertheless. If you wish to check whether it is legal to create an index, call existsIgnoreCase() instead.

Parameters:
indexName - - index name to be checked
Returns:
true if an index with that name exists, false otherwise
Throws:
IndexException - If any other error occurs.

existsIgnoreCase

public java.lang.String existsIgnoreCase(java.lang.String indexName)
                                  throws IndexException
Checks whether an index name exists in the data dictionary. The check is performed in a case-insensitive manner. If no index can be found, this method returns null. If an index corresponding to indexName is found, this method calls exists() to check additional constraints that may be imposed by the retrieval plugin.

Parameters:
indexName - - The index name to search for
Returns:
The name of the index as found in the data dictionary or null if such an index does not exist
Throws:
IndexException - -

indexExists

protected abstract boolean indexExists(java.lang.String indexName)
                                throws IndexException
Index exists.

Parameters:
indexName - the index name
Returns:
true, if successful
Throws:
IndexException - the index exception

reorganize

public void reorganize(java.lang.String indexName)
                throws IndexException
This method is responsible for reorganizeing the index structure of a given retrieval system. It synchronize the access to the retrieval system during the reorganization process. The reorganization process itself is done by the delegate method reorganizeIndex(indexName). As part of the reorganization process the method checks, wether the index, which should be reorganized, exists.

Parameters:
indexName - the index name
Throws:
IndexException - the index exception

reorganizeIndex

protected abstract void reorganizeIndex(java.lang.String indexName)
                                 throws IndexException
Reorganize index.

Parameters:
indexName - the index name
Throws:
IndexException - the index exception

SMILA (incubation) API documentation