scale.annot
Enum Support.Belief

java.lang.Object
  extended by java.lang.Enum<Support.Belief>
      extended by scale.annot.Support.Belief
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Support.Belief>
Enclosing class:
Support

public static enum Support.Belief
extends java.lang.Enum<Support.Belief>

Annotations retain a measure of belief in the accuracy of the annotation. Annotations maintain separate values for the user's belief and the system's (i.e., Scale's) belief, and an indication of how to combine the beliefs into a single value. The representation of belief is intended to support two situations:

  1. Verification of annotations
  2. Overriding of annotations (usually by the user)
For example, an annotation which is known to be absolutely true presumably would not have to be verified. Also, if a user wants to disable an annotation that the system created, the system's belief may still be used to issue warnings.

We will not be overly sophisticated in our use of belief values. If the combined belief value suggests any level of truth, the annotation should be treated as true (except by annotation verification components).

The belief values and combination rule are specified using enumerations.

The value cNeutral expresses no belief, positive or negative, and is therefore identical to the annotation not existing. For many annotations, the absence of an annotation implies a value; hence in these cases, neutral will be equivalent to one of false or true. To make dealing with this unfortunate situation easier, the elements of the enumeration to have a method that returns an integer value so that we can do something like the following:

         if (ann.belief().value() <= cNeutral)
             // annotation is false.
         else
             // annotation is true.
 
False is less than true, and the values are ordered. Generally, neutral is used to indicate that an annotation is to be ignored.

Even though we do not currently have any annotations which can reasonably take a negative value, we have chosen to retain the negative half of the belief scale, so that the system can contradict the user (e.g., if the system disproves an annotation).


Enum Constant Summary
False
          The annotation is believed to be false.
Improbable
          The annotation is believed to be most probably false.
Neutral
          The value neutral expresses no belief, positive or negative, and is therefore identical to the annotation not existing.
Possible
          The annotation is believed to be probably true.
Probable
          The annotation is believed to be most probably true.
True
          The annotation is believed to be true.
Unlikely
          The annotation is believed to be probably false.
 
Method Summary
 int value()
           
static Support.Belief valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Support.Belief[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

False

public static final Support.Belief False
The annotation is believed to be false.


Improbable

public static final Support.Belief Improbable
The annotation is believed to be most probably false.


Unlikely

public static final Support.Belief Unlikely
The annotation is believed to be probably false.


Neutral

public static final Support.Belief Neutral
The value neutral expresses no belief, positive or negative, and is therefore identical to the annotation not existing.


Possible

public static final Support.Belief Possible
The annotation is believed to be probably true.


Probable

public static final Support.Belief Probable
The annotation is believed to be most probably true.


True

public static final Support.Belief True
The annotation is believed to be true.

Method Detail

values

public static Support.Belief[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Support.Belief c : Support.Belief.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Support.Belief valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

value

public int value()