org.mitre.midiki.workshop
Class Symptom

java.lang.Object
  |
  +--org.mitre.midiki.workshop.Symptom
All Implemented Interfaces:
java.io.Serializable

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

Represents a physical symptom, and whether the symptom must be present or absent. Typically, disease descriptions show those symptoms which must be present, while diagnosis queries may contain symptoms which have been identified as absent (as distinct from symptoms whose status is unknown).

Since:
1.0
See Also:
Serializable, Serialized Form

Field Summary
 java.lang.String name
          The name of the symptom.
 boolean present
          true if the symptom is present.
 boolean required
          true if the symptom is required vs suggestive.
 
Constructor Summary
Symptom()
          Empty constructor.
Symptom(java.lang.String n, boolean q, boolean p)
          Creates a new Symptom instance.
 
Method Summary
 boolean matches(Symptom s)
          Returns true if the symptom matches the query.
 java.lang.String toString()
          Generates a string representation of the symptom.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

public java.lang.String name
The name of the symptom.

required

public boolean required
true if the symptom is required vs suggestive.

present

public boolean present
true if the symptom is present.
Constructor Detail

Symptom

public Symptom()
Empty constructor.

Symptom

public Symptom(java.lang.String n,
               boolean q,
               boolean p)
Creates a new Symptom instance.
Parameters:
n - a String value
q - a boolean value
p - a boolean value
Method Detail

toString

public java.lang.String toString()
Generates a string representation of the symptom.
Overrides:
toString in class java.lang.Object
Returns:
a String value

matches

public boolean matches(Symptom s)
Returns true if the symptom matches the query. Since synonyms are not considered, this is a less powerful match than the one performed by WorkshopDatabase in calculating a diagnosis.
Parameters:
s - a Symptom value
Returns:
a boolean value