org.tolven.app.entity
Class MenuDataWord

java.lang.Object
  extended by org.tolven.app.entity.MenuDataWord
All Implemented Interfaces:
java.io.Serializable

public class MenuDataWord
extends java.lang.Object
implements java.io.Serializable

This entity provides a cross reference from a word to a menu data item. Words are normalized: lower case, special characters and numbers are removed.

Author:
John Churin
See Also:
Serialized Form

Constructor Summary
MenuDataWord()
           
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compare two MenuDataWord objects for equality.
 java.lang.String getField()
          The field the word is found in.
 long getId()
           
 java.lang.String getLanguage()
           
 MenuData getMenuData()
          The MenuData item containing this word.
 AccountMenuStructure getMenuStructure()
           
 int getPosition()
          The position of the word in the field it appears in.
 java.lang.String getWord()
           
 int hashCode()
          Return a hash code for this object.
 void setField(java.lang.String field)
           
 void setId(long id)
           
 void setLanguage(java.lang.String language)
           
 void setMenuData(MenuData menuData)
           
 void setMenuStructure(AccountMenuStructure menuStructure)
           
 void setPosition(int position)
           
 void setWord(java.lang.String word)
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MenuDataWord

public MenuDataWord()
Method Detail

equals

public boolean equals(java.lang.Object obj)
Compare two MenuDataWord objects for equality. This test is based on the field the word occurs in, language, the word and the menu data item in which the word occurs. MenuStructure is not included in the test because MenuData is more selective and implies MenuStructure.

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Return a hash code for this object. Note: The hashCode is based on the the word which is adequate for a hash.

Overrides:
hashCode in class java.lang.Object

getId

public long getId()

setId

public void setId(long id)

getMenuData

public MenuData getMenuData()
The MenuData item containing this word.

Returns:

setMenuData

public void setMenuData(MenuData menuData)

getMenuStructure

public AccountMenuStructure getMenuStructure()

setMenuStructure

public void setMenuStructure(AccountMenuStructure menuStructure)

getWord

public java.lang.String getWord()

setWord

public void setWord(java.lang.String word)

getField

public java.lang.String getField()
The field the word is found in. This doubles as a relationship type. For example, when extracted from a diagnosis, this could contain category thus distinguishing the word from words from the name of the diagnoisis itself.

Returns:

setField

public void setField(java.lang.String field)

getPosition

public int getPosition()
The position of the word in the field it appears in. one-origin so the first position is one. The position ignores ignores. stop-words. For example, my name is bill, name is position 1 and bill is position 2.

Returns:

setPosition

public void setPosition(int position)

getLanguage

public java.lang.String getLanguage()

setLanguage

public void setLanguage(java.lang.String language)