org.egothor.core.memory
Class FTField

java.lang.Object
  extended by org.egothor.core.memory.FTField
Direct Known Subclasses:
HTMLField

public class FTField
extends java.lang.Object

Class FTField represents a field in the tree structure of fields. The implementation that is provided in this class would be used for the root field only . Every field would then rewrite words() method. WARNING: This class is not synchronized.

Author:
Leo Galambos

Constructor Summary
FTField()
           
 
Method Summary
 void addField(java.lang.String name, FTField child)
           
 boolean addFilter(Filter filter)
          Append a next filter to the chain of filters used over the token stream of words().
 Sequence<Token> filteredWords()
          Return an enumeration of the terms in the field filtered by filters.
 java.util.HashMap<java.lang.String,org.egothor.core.memory.MemoryProximities> invertize()
          Construct a new Hashtable and adds inverted lists to it.
 Sequence<Token> words()
          Return an enumeration of the terms in the field.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FTField

public FTField()
Method Detail

addFilter

public boolean addFilter(Filter filter)
Append a next filter to the chain of filters used over the token stream of words(). After this.append(filter1); this.append(filter2); : this.append(filterN); the filters will be applied in this order: filter1, filter2, ... filterN. If any filter ends with a non-Filter object, nothing is added.

Parameters:
filter - the filter
Returns:
false if the filter is not added

addField

public void addField(java.lang.String name,
                     FTField child)
Parameters:
name - name of the field in this parent object
child - the field

words

public Sequence<Token> words()
Return an enumeration of the terms in the field.

Returns:
null

filteredWords

public Sequence<Token> filteredWords()
Return an enumeration of the terms in the field filtered by filters.

Returns:
sequence of tokens

invertize

public java.util.HashMap<java.lang.String,org.egothor.core.memory.MemoryProximities> invertize()
Construct a new Hashtable and adds inverted lists to it.

Returns:
a Hashtable containing inverted lists