IndexManager
Date: 2013-02-16

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.gcube.dir.master.index
Interface IndexManager<TERM extends Term<TERMSTATS>,TERMSTATS extends TermStats>

Type Parameters:
  `TERM` - the type of an index term.
  `TERMSTATS` - the type of the statistics of an index term.

All Known Implementing Classes:
  JDBCManager

    public interface IndexManager<TERM extends Term<TERMSTATS>,TERMSTATS extends TermStats>

Defines the behaviour of an inverted index of the terms which occur in one or more collections. `IndexManager` is parametric with respect to the subtype `T` of `Term`s and the subtype `TS` of `TermsStats` which annotate the `Term`.

Author:
  Fabio Simeoni (University of Strathclyde)

Method Summary
`void` | `addTerm(java.lang.String collectionID, TERM term)` Adds a term from a collection into the index.
`void` | `createIndex(IndexCreationParameters params)` Creates the index.
`void` | `deleteIndex()` Deletes the index.
`java.util.Map<java.lang.String,TERMSTATS>` | `getPostings(java.lang.String termName, java.util.Collection<java.lang.String> collectionIDs)` Retrieves all statistics of a term wich occurs in one or more collections.
`java.util.List<TERM>` | `getTerms(java.lang.String CollectionID)` Retrieves all the terms in a given collection from the index.
`void` | `removeTerms(java.lang.String CollectionID)` Removes all terms in a given collection from the index.

Method Detail

### createIndex

    void createIndex(IndexCreationParameters params)
                     throws java.lang.Exception

  Creates the index.

  Parameters:
    `params` - the creation parameters.
  Throws:
    `java.lang.Exception` - if the index could not be created.

### addTerm

    void addTerm(java.lang.String collectionID,
                 TERM term)
                 throws java.lang.Exception

  Adds a term from a collection into the index.

  Parameters:
    `collectionID` - the collection identifier.
    `term` - the terms.
  Throws:
    `java.lang.Exception` - if the term could not be added.

### getTerms

    java.util.List<TERM> getTerms(java.lang.String CollectionID)
                                                          throws java.lang.Exception

  Retrieves all the terms in a given collection from the index.

  Parameters:
    `collectionID` - the collection identifier.
  Returns:
    the terms.
  Throws:
    `java.lang.Exception` - if the terms could not be retrieved.

### removeTerms

    void removeTerms(java.lang.String CollectionID)
                     throws java.lang.Exception

  Removes all terms in a given collection from the index.

  Parameters:
    `collectionID` - collection identifier.
  Throws:
    `java.lang.Exception` - if the terms could not be removed.

### getPostings

    java.util.Map<java.lang.String,TERMSTATS> getPostings(java.lang.String termName,
                                                          java.util.Collection<java.lang.String> collectionIDs)
                                                                            throws java.lang.Exception

  Retrieves all statistics of a term wich occurs in one or more collections. * @param collectionIDs the collection identifiers.

  Parameters:
    `the` - term name.
  Returns:
    the statistics, indexed by collection identifier.
  Throws:
    `java.lang.Exception` - if the statistics could not be retrieved.

### deleteIndex

    void deleteIndex()
                     throws java.lang.Exception

  Deletes the index.

  Throws:
    `java.lang.Exception` - if the index could not be deleted.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD