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.fulltext
Class Thesaurus.LookupResult

    java.lang.Object
      java.util.AbstractCollection<E>
          java.util.AbstractList<E>
              java.util.ArrayList
                  com.qizx.api.fulltext.Thesaurus.LookupResult

All Implemented Interfaces:
  Serializable, Cloneable, Iterable, Collection, List, RandomAccess

Enclosing interface:
  Thesaurus

    public static class Thesaurus.LookupResult

extends ArrayList

Structure returned by Thesaurus lookup.

Contains:

- A list of Synonyms, equivalent to the looked up sequence,
- the number of consumed input tokens (i.e the length of the recognized thesaurus entry).

For example, if the thesaurus contains synonyms "wealthy", "well-off" and "well-to-do", then looking up the sequence "well off man" would return a LookupResult where consumedTokens = 2 (length of "well off"), and containing the token sequences "wealthy", "well off" and "well to do".

See Also:
  Serialized Form

Constructor Summary
`Thesaurus.LookupResult(int consumedTokens)` Creates a new empty lookup result.

Method Summary
`void` | `addSynonym(Thesaurus.Synonym syn)`
`void` | `addSynonym(Thesaurus.TokenSequence sequence, String relationship, int level)` Appends a Synonym.
`int` | `consumedTokens()` Returns the number of consumed input tokens.
`Thesaurus.TokenSequence` | `getSequence(int index)` Returns the word sequence at rank 'index'.
`Thesaurus.Synonym` | `getSynonym(int index)`
`int` | `size()` Returns the number of equivalent word sequences.

Methods inherited from class java.util.ArrayList
`add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, set, toArray, toArray, trimToSize`

Methods inherited from class java.util.AbstractList
`equals, hashCode, iterator, listIterator, listIterator, subList`

Methods inherited from class java.util.AbstractCollection
`containsAll, removeAll, retainAll, toString`

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

Methods inherited from interface java.util.List
`containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList`

Constructor Detail

### Thesaurus.LookupResult

    public Thesaurus.LookupResult(int consumedTokens)

  Creates a new empty lookup result.

  Parameters:
    `consumedTokens` - the number of consumed input tokens.

Method Detail

### consumedTokens

    public int consumedTokens()

  Returns the number of consumed input tokens.

### size

    public int size()

  Returns the number of equivalent word sequences.

  Specified by:
    `size` in interface `Collection`
  Specified by:
    `size` in interface `List`
  Overrides:
    `size` in class `ArrayList`

### getSynonym

    public Thesaurus.Synonym getSynonym(int index)

### getSequence

    public Thesaurus.TokenSequence getSequence(int index)

  Returns the word sequence at rank 'index'.

### addSynonym

    public void addSynonym(Thesaurus.TokenSequence sequence,
                           String relationship,
                           int level)

  Appends a Synonym.

### addSynonym

    public void addSynonym(Thesaurus.Synonym syn)

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