shared
Class AugCategory

java.lang.Object
  |
  +--shared.AugCategory

public class AugCategory
extends java.lang.Object

The AugCategory class contains information on categories used in labelling and provides support for augmented categories. An augmented category has extra information besides the category number. The minimal augmentation implemented here also gives a string description. This class could be subclassed to provide certainty levels and other augmentations relevant for categories.


Field Summary
static boolean MLCBinaryDisplay
          Option to change display between MLC++ binary and MLC++ source specifications.
 
Constructor Summary
AugCategory(AugCategory ac)
          Copy constructor.
AugCategory(int aCat, java.lang.String dscr)
          Constructor.
 
Method Summary
 int Category()
          Returns the category number.
 java.lang.String description()
          Returns the description as a string.
 void display(java.io.BufferedWriter ostream)
          Prints the description and the category number.
 boolean equals(AugCategory rhs)
          Checks if this AugCategory is "equivalent" to the specified AugCategory.
 boolean notequal(AugCategory rhs)
          Checks if this AugCategory is not "equivalent" to the specified AugCategory.
 int num()
          Returns the category number.
 java.lang.String toString()
          Creates a String value containing the description and the category number.
 void update(int aCat, java.lang.String dscr)
          Sets the category and description to the specified values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MLCBinaryDisplay

public static boolean MLCBinaryDisplay
Option to change display between MLC++ binary and MLC++ source specifications. Default is TRUE, setting to binary. FALSE sets to source.
Constructor Detail

AugCategory

public AugCategory(int aCat,
                   java.lang.String dscr)
Constructor.
Parameters:
aCat - The category this AugCategory represents.
dscr - The description of this AugCategory.

AugCategory

public AugCategory(AugCategory ac)
Copy constructor.
Parameters:
ac - The AugCategory to be copied.
Method Detail

num

public int num()
Returns the category number.
Returns:
The category number.

description

public java.lang.String description()
Returns the description as a string.
Returns:
The description of this AugCategorizer.

Category

public int Category()
Returns the category number.
Returns:
The category number.

display

public void display(java.io.BufferedWriter ostream)
Prints the description and the category number.
Parameters:
ostream - The output stream to be written to.

equals

public boolean equals(AugCategory rhs)
Checks if this AugCategory is "equivalent" to the specified AugCategory. The categories may match, but the strings may be different for continuous splits, where the numbers are just consecutive.
Parameters:
rhs - The AugCategory to which this instance is being compared.
Returns:
TRUE if the categories match and the descriptions are equal, FALSE otherwise.

notequal

public boolean notequal(AugCategory rhs)
Checks if this AugCategory is not "equivalent" to the specified AugCategory. The categories may match, but the strings may be different for continuous splits, where the numbers are just consecutive.
Parameters:
rhs - The AugCategory to which this instance is being compared.
Returns:
TRUE if the categories do not match or the descriptions are not equal, FALSE otherwise.

update

public void update(int aCat,
                   java.lang.String dscr)
Sets the category and description to the specified values.
Parameters:
aCat - The new category.
dscr - The new description.

toString

public java.lang.String toString()
Creates a String value containing the description and the category number.
Overrides:
toString in class java.lang.Object
Returns:
The description of the category stored in this AugCategory.