de.folt.fuzzy
Class SQLMonoLingualFuzzyNode

java.lang.Object
  extended by java.util.Observable
      extended by de.folt.fuzzy.FuzzyDataStructureElement<K,T>
          extended by de.folt.fuzzy.FuzzyNode<java.lang.String,T>
              extended by de.folt.fuzzy.StringFuzzyNode<SQLMonoLingualObject>
                  extended by de.folt.fuzzy.SQLMonoLingualFuzzyNode
All Implemented Interfaces:
java.io.Serializable

public class SQLMonoLingualFuzzyNode
extends StringFuzzyNode<SQLMonoLingualObject>

This class implements a StringFuzzyNode and uses a SQLMonoLingualObject SQLMonoLingualObject as the reference value. The fuzzy key is computed from the plain text segment of the SQLMonoLingualObject.

Author:
klemens
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class de.folt.fuzzy.FuzzyNode
FuzzyNode.FUZZYNODESTATUS
 
Constructor Summary
SQLMonoLingualFuzzyNode(SQLMonoLingualObject mono)
          Create a new MonoLingualFuzzyNode based on the MonoLingualObject mono.
SQLMonoLingualFuzzyNode(SQLMonoLingualObject mono, int iKeyLen)
          This constructs a FuzzyNode for a MonoLingualObject.
 
Method Summary
 void remove(java.lang.Object value)
          remove remove for a fuzzy node based on the value of a node and removes this value from the value list.
 boolean removeValue(java.lang.Object value)
          removeValue removes a value from the value list of the values of the node
 java.util.Vector<FuzzyNodeSearchResult<java.lang.String,SQLMonoLingualObject>> search(FuzzyNode<java.lang.String,SQLMonoLingualObject> fuzzyCompareKey, int similarity)
          search searches FuzzyNode and its sons with a given similarity and returns a Vector of matching keys.
 java.util.Vector<FuzzyNode<java.lang.String,SQLMonoLingualObject>> search(java.lang.Object value)
          search search for a fuzzy node based on the value of a node
 java.util.Vector<FuzzyNodeSearchResult<java.lang.String,SQLMonoLingualObject>> search(StringFuzzyNode<SQLMonoLingualObject> fuzzyCompareKey, int similarity)
          search search for a StringFuzzyNode
 
Methods inherited from class de.folt.fuzzy.StringFuzzyNode
search, shortFormat
 
Methods inherited from class de.folt.fuzzy.FuzzyNode
computeKeyDistance, countNodes, countSons, countValues, format, formatTree, formatTree, getDepth, getFuzzyNodeKey, getLeftSon, getMaxID, getNGram, getNodeID, getNODESMATCHED, getNODESPUSHED, getNODESSEARCHED, getRightSon, getStatus, getValues, iBalance, insertFuzzyNode, insertFuzzyNode, isAVLTree, isBInsertMode, removeValue, removeValue, setBInsertmode, setFuzzyNodeKey, setLeftSon, setMaxID, setNodeID, setRightSon, setStatus, setValues, updateFuzzyNode
 
Methods inherited from class java.util.Observable
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SQLMonoLingualFuzzyNode

public SQLMonoLingualFuzzyNode(SQLMonoLingualObject mono)
Create a new MonoLingualFuzzyNode based on the MonoLingualObject mono. Call MonoLingualFuzzyNode(MonoLingualObject mono, int iKeyLen) with iKeyLen = FuzzyNodeKey.getFuzzyKeyLength(). See MonoLingualFuzzyNode.MonoLingualFuzzyNode(MonoLingualObject , int)

Parameters:
mono - the MonolingualObject to use.

SQLMonoLingualFuzzyNode

public SQLMonoLingualFuzzyNode(SQLMonoLingualObject mono,
                               int iKeyLen)
This constructs a FuzzyNode for a MonoLingualObject. It uses the plain text of the MonoLingualobject (@see MonoLingualObject.getPlainTextSegment() for the key construction.

Parameters:
mono - the MonolingualObject to use.
iKeyLen - the key length to use for generating the FuzzyNodKey
Method Detail

remove

public void remove(java.lang.Object value)
Description copied from class: FuzzyNode
remove remove for a fuzzy node based on the value of a node and removes this value from the value list. It searches thru all nodes to find the (Objec) value

Overrides:
remove in class StringFuzzyNode<SQLMonoLingualObject>

removeValue

public boolean removeValue(java.lang.Object value)
Description copied from class: FuzzyNode
removeValue removes a value from the value list of the values of the node

Overrides:
removeValue in class StringFuzzyNode<SQLMonoLingualObject>
Parameters:
value - the object to remove
Returns:
true when successfully removed, otherwise false

search

public java.util.Vector<FuzzyNodeSearchResult<java.lang.String,SQLMonoLingualObject>> search(FuzzyNode<java.lang.String,SQLMonoLingualObject> fuzzyCompareKey,
                                                                                             int similarity)
Description copied from class: FuzzyNode
search searches FuzzyNode and its sons with a given similarity and returns a Vector of matching keys.

Overrides:
search in class StringFuzzyNode<SQLMonoLingualObject>
Parameters:
fuzzyCompareKey - the node to search for in the current node and its sons
similarity - the similarity in % (100% = perfect match)
Returns:
a vector of FuzzyNodeSearchResult

search

public java.util.Vector<FuzzyNode<java.lang.String,SQLMonoLingualObject>> search(java.lang.Object value)
Description copied from class: FuzzyNode
search search for a fuzzy node based on the value of a node

Overrides:
search in class StringFuzzyNode<SQLMonoLingualObject>
Returns:
return all the matching FuzzyNodes in a vector

search

public java.util.Vector<FuzzyNodeSearchResult<java.lang.String,SQLMonoLingualObject>> search(StringFuzzyNode<SQLMonoLingualObject> fuzzyCompareKey,
                                                                                             int similarity)
search search for a StringFuzzyNode

Parameters:
fuzzyCompareKey - the string fuzzy key to compare with
similarity - the similarity in % (0..100)
Returns: