plugin.text
Class TextAnalyzer

java.lang.Object
  extended by plugin.text.TextAnalyzer
All Implemented Interfaces:
IArcPlugin

public class TextAnalyzer
extends java.lang.Object
implements IArcPlugin

Main class for Text-Plugin.

Modes:

Options:

Author:
Hannes

Constructor Summary
TextAnalyzer()
           
 
Method Summary
 boolean areWhitespacesIgnored()
          Returns if whitespaces are ignored in letter-based mode.
 boolean areWordsUsed()
          Returns the used mode.
 edu.umd.cs.piccolo.PNode getDescription()
          Returns a kind of description of the actual input (e.g. a sheet of music for a midi file).
 java.lang.String getDirectInput()
          Returns the string currently used in direct-input-mode.
 java.util.List getItems()
          Returns a list of items, according the actual input.
 java.lang.String getName()
          Returns the plug-ins name (e.g.
 javax.swing.JPanel getPanel()
          Returns a "configuration panel", which can be displayed somewhere in the application.
 void ignoreWhitespaces(boolean bIgnSpace)
          Sets if whitesspaces are ignored in letter-based mode.
 boolean isCaseSensitive()
           
 boolean isDirectInputUsed()
           
 boolean isEqual(java.lang.Object o1, java.lang.Object o2)
          Compares two objects.
 boolean isSoundexUsed()
          Returns if SOUNDEX is used in word-based mode.
 java.lang.String list2String(java.util.List l)
          Returns a string, according to the parameter.
 void setCaseSensitive(boolean b)
          Sets the option "Case Sensitive", which affects both modes, letter based and word based.
 void setDirectInput(java.lang.String strDirectInput)
          Sets the string to be used in direct-input mode.
 void setFile(java.io.File file)
          Sets the file to be used in file-mode.
 void useDirectInput(boolean bDirectInput)
          Sets the option "Direct Option".
 void useSoundex(boolean bUseSoundex)
          Sets if SOUNDEX shall be used in word-based mode.
 void useWords(boolean bUseWords)
          Switches between word-based and letter-based mode.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextAnalyzer

public TextAnalyzer()
Method Detail

getName

public java.lang.String getName()
Description copied from interface: IArcPlugin
Returns the plug-ins name (e.g. "MIDI")

Specified by:
getName in interface IArcPlugin

getPanel

public javax.swing.JPanel getPanel()
Description copied from interface: IArcPlugin
Returns a "configuration panel", which can be displayed somewhere in the application.

Specified by:
getPanel in interface IArcPlugin

isEqual

public boolean isEqual(java.lang.Object o1,
                       java.lang.Object o2)
Description copied from interface: IArcPlugin
Compares two objects.

Specified by:
isEqual in interface IArcPlugin
Returns:
'true' if the objects are equal, 'false' else.

list2String

public java.lang.String list2String(java.util.List l)
Description copied from interface: IArcPlugin
Returns a string, according to the parameter.

Specified by:
list2String in interface IArcPlugin
Parameters:
l - should be the list returned by getItems (or a part of it)

getDescription

public edu.umd.cs.piccolo.PNode getDescription()
Description copied from interface: IArcPlugin
Returns a kind of description of the actual input (e.g. a sheet of music for a midi file).

Specified by:
getDescription in interface IArcPlugin

getItems

public java.util.List getItems()
                        throws java.lang.Exception
Description copied from interface: IArcPlugin
Returns a list of items, according the actual input.

Specified by:
getItems in interface IArcPlugin
Throws:
java.lang.Exception

setFile

public void setFile(java.io.File file)
Sets the file to be used in file-mode.
Attention: Should be a text file.

Parameters:
file - the file to be used

setDirectInput

public void setDirectInput(java.lang.String strDirectInput)
Sets the string to be used in direct-input mode.

Parameters:
strDirectInput - the string to be used

getDirectInput

public java.lang.String getDirectInput()
Returns the string currently used in direct-input-mode.


useSoundex

public void useSoundex(boolean bUseSoundex)
Sets if SOUNDEX shall be used in word-based mode.

Parameters:
bUseSoundex - 'true' if SOUNDEX shall be used, 'false' else

isSoundexUsed

public boolean isSoundexUsed()
Returns if SOUNDEX is used in word-based mode.

Returns:
'true' if SOUNDEX is used

ignoreWhitespaces

public void ignoreWhitespaces(boolean bIgnSpace)
Sets if whitesspaces are ignored in letter-based mode. 'Whitespaces' mean following characters:

Parameters:
bIgnSpace - 'true' if whitespaces shall be ignored, 'false' else

areWhitespacesIgnored

public boolean areWhitespacesIgnored()
Returns if whitespaces are ignored in letter-based mode. 'Whitespaces' mean following characters:


useWords

public void useWords(boolean bUseWords)
Switches between word-based and letter-based mode.

Parameters:
bUseWords - use word-based mode/letter-based mode

areWordsUsed

public boolean areWordsUsed()
Returns the used mode.

Returns:
'true' for word-based mode, 'false' for letter-based mode

useDirectInput

public void useDirectInput(boolean bDirectInput)
Sets the option "Direct Option". If 'true', the plug-in uses the sting set by setDirectInput. Otherwise, the text in the file set by setFile is used.

Parameters:
bDirectInput - use direct input/file
See Also:
setDirectInput(String), setFile(File)

isDirectInputUsed

public boolean isDirectInputUsed()
Returns:
'true' if direct input is used, 'false' else

setCaseSensitive

public void setCaseSensitive(boolean b)
Sets the option "Case Sensitive", which affects both modes, letter based and word based.

Parameters:
b - case sensitive/case insensitive

isCaseSensitive

public boolean isCaseSensitive()
Returns:
'true' if the plugin acts case sensitive, 'false' else