Analyze.Filter
Interface FilterInterface

All Known Implementing Classes:
Alphabetic, Alphanumeric32, Bytes, RunFreeBytes, Tanach, Words

public interface FilterInterface

Interface for Analyze filters.

         FilterInterface F = (FilterInterface) new Filter() ;

         System.out.println(F.getName()) ;
         System.out.println(F.getDecription()) ;
         int AlphabetSize = F.getAlphabetSize() ;

         F.setFrame(SuperFrame) ;  // A frame to put popup windows in.
         F.setArray(Buffer, N) ;

         Vector Out = F.getVector() ;

  


Method Summary
 java.lang.String getAlignment()
          Gets the XML parameter align (alignment) for the output Objects.
 int getAlphabetSize()
          Gets the alphabet size of the output Objects, 0 for a non-alphabetic filter.
 java.lang.String getDescription()
          Gets a description of the filter.
 java.lang.String getDirection()
          Gets the XML parameter dir (direction) for the output Objects.
 java.lang.String getInputFontName()
          Gets the font name for typed input text.
 java.util.Locale getInputLocale()
          Gets the locale (language, country, and variant) for typed input text.
 java.lang.String getName()
          Gets the name of the filter.
 java.lang.String getPosition(java.lang.Object[] Data, int Text, int Index)
          Gets the position, represented as a String, from the Object[] produced by the filter.
 java.lang.String getStyle()
          Gets the XML parameter style for the output Objects.
 java.util.Vector getVector()
          Gets the filtered output array.
 boolean isPrunable()
          Indicates if the filtered text is prunable.
 void setArray(byte[] InputArray, int Length)
          Sets the input byte array.
 void setFrame(java.awt.Frame F)
          Sets the program Frame so that the filter can popup its own windows, called before the setArray method is called.
 

Method Detail

setFrame

public void setFrame(java.awt.Frame F)
Sets the program Frame so that the filter can popup its own windows, called before the setArray method is called.

Parameters:
F - Frame to put warning messages or controls in.

setArray

public void setArray(byte[] InputArray,
                     int Length)
Sets the input byte array.

Parameters:
InputArray - byte[] giving input byte array.
Length - int giving number of bytes in InputArray.

getVector

public java.util.Vector getVector()
Gets the filtered output array.

Returns:
V Vector containing Objects filtered from InputArray.

getName

public java.lang.String getName()
Gets the name of the filter.

Returns:
String giving the name of the filter.

getDescription

public java.lang.String getDescription()
Gets a description of the filter.

Returns:
String describing the filter in detail.

getAlphabetSize

public int getAlphabetSize()
Gets the alphabet size of the output Objects, 0 for a non-alphabetic filter. Filters that have non-zero AlphabetSize are NOT prunable. If AlphabetSize = 0, a non-alphabetic filter, then pruning is an option having a default value set by the isPrunable method below..

Returns:
int giving the alphabet size.

getStyle

public java.lang.String getStyle()
Gets the XML parameter style for the output Objects.

Returns:
String giving the style, i.e. "font-family:Ezra SIL;font-size:20", can be set to "" for usual style.

getPosition

public java.lang.String getPosition(java.lang.Object[] Data,
                                    int Text,
                                    int Index)
Gets the position, represented as a String, from the Object[] produced by the filter. Filter output objects do NOT need to contain position data. For them, this method can be set to be:

    return Integer.toString(Text) + "." + Integer.toString(Index) ;   

Parameters:
Data - Object[] of Vectors giving Objects.
Text - int index of Data Vector containing the text.
Index - int giving position of Object within Data Vector.
Returns:
String giving position from Data[Index]

getDirection

public java.lang.String getDirection()
Gets the XML parameter dir (direction) for the output Objects.

Returns:
String giving the direction, i.e. "ltr" for left-to-right or "rtl" for right-to-left.

getAlignment

public java.lang.String getAlignment()
Gets the XML parameter align (alignment) for the output Objects.

Returns:
String giving the alignment, i.e. "left" for left or "right" for right.

getInputLocale

public java.util.Locale getInputLocale()
Gets the locale (language, country, and variant) for typed input text. If the text is from the usual locale, return Locale.getDefault().

Returns:
Locale giving the desired input Locale.

getInputFontName

public java.lang.String getInputFontName()
Gets the font name for typed input text.

Returns:
String giving name of font for typed input text.

isPrunable

public boolean isPrunable()
Indicates if the filtered text is prunable. Alphabets are NOT prunable. If AlphabetSize = 0, a non-alphabetic filter, then pruning is an option having a default value set by this method.

Returns:
boolean indicating if filtered text is prunable.