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

## com.qizx.api.util.fulltext
Class DefaultFullTextFactory

    java.lang.Object
      com.qizx.api.util.fulltext.DefaultFullTextFactory

All Implemented Interfaces:
  FullTextFactory

    public class DefaultFullTextFactory

extends Object
implements FullTextFactory

Fulltext service provider plugged by default.

Provides a generic TextTokenizer and a standard Scorer. Might be extended in future versions to provide stemmer and thesaurus.

Constructor Summary
`DefaultFullTextFactory()`

Method Summary
`Scorer` | `createScorer()` Returns a scoring algorithm.
`Stemmer` | `getStemmer(String languageCode)` Returns an appropriate Stemmer for the language, if any.
`Thesaurus` | `getThesaurus(String uri, String languageCode, String relationship, int levelMin, int levelMax)` Returns a Thesaurus lookup driver.
`TextTokenizer` | `getTokenizer(String languageCode)` Returns an instance of TextTokenizer suitable for the specified language.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DefaultFullTextFactory

    public DefaultFullTextFactory()

Method Detail

### getTokenizer

    public TextTokenizer getTokenizer(String languageCode)

  Description copied from interface: `FullTextFactory`
  Returns an instance of TextTokenizer suitable for the specified language.

  Specified by:
    `getTokenizer` in interface `FullTextFactory`
  Parameters:
    `languageCode` - an ISO language code (e.g 'en', 'fr-CH'), or null if no language is specified, in which case a generic tokenizer (`DefaultTextTokenizer`) is provided.
  Returns:
    a new instance of a WordTokenizer.

### getStemmer

    public Stemmer getStemmer(String languageCode)

  Description copied from interface: `FullTextFactory`
  Returns an appropriate Stemmer for the language, if any.

  Specified by:
    `getStemmer` in interface `FullTextFactory`
  Returns:
    an instance of a Stemmer, or null if no applicable stemmer can be found,

### getThesaurus

    public Thesaurus getThesaurus(String uri,
                                  String languageCode,
                                  String relationship,
                                  int levelMin,
                                  int levelMax)

  Description copied from interface: `FullTextFactory`
  Returns a Thesaurus lookup driver. This driver is searched using the URI and the language code. It is then assumed to filter lookup by the specified relationship and levels.

  Specified by:
    `getThesaurus` in interface `FullTextFactory`
  Parameters:
    `uri` - identifier of the Thesaurus. It is the string "default" if the default thesaurus is invoked.
    `languageCode` - a normalized language code like "en" or "fr-CH". A null language code is in principle not meaningful.
    `relationship` - relationship from root word(s) to thesaurus-equivalent words. It can be null if the relationship is unspecified.
    `levelMin` - minimum value of the level of a synonym. A simple synonym has a level equal to 1.
    `levelMax` - maximum value of the level of a synonym. A negative value means no maximum.
  Returns:
    an instance of a Thesaurus, or null if none can be found,

### createScorer

    public Scorer createScorer()

  Description copied from interface: `FullTextFactory`
  Returns a scoring algorithm.

  Specified by:
    `createScorer` in interface `FullTextFactory`
  Returns:
    an implementation of Scorer

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