Fido Alpha 3.2

fido.linguistic.components
Class Sentence

java.lang.Object
  |
  +--fido.linguistic.components.Sentence
All Implemented Interfaces:
Clause

public class Sentence
extends java.lang.Object
implements Clause

Concrete subclass of Clause that identifies the user input as having a verb. The input will either be a Fragment or a Sentence. This class holds all components associated with the input.


Field Summary
static int COMMAND
          Constant value for setMood() and getMood()
static int INFORMATION
          Constant value for setMood() and getMood()
static int QUESTION
          Constant value for setMood() and getMood()
 
Constructor Summary
Sentence()
          Creates a new empty Sentence object.
 
Method Summary
 Noun getIndirectObject()
          Returns the Noun in the indirect object slot.
 int getMood()
          Returns the Mood for the sentence.
 AdjectiveClass getPredicateAdjective()
          Returns the AdjectiveClass in the predicate adjective slot.
 Noun getPredicateNoun()
          Returns the Noun in the predicate noun slot.
 Noun getSubject()
          Returns the Noun in the subject slot.
 VerbPhrase getVerbPhrase()
          Returns the VerbPhrase for this sentence.
 void setIndirectObject(Noun indirectObject)
          Sets the indirect object slot to the given Noun.
 void setMood(int mood)
          Sets the mood of the sentence.
 void setPredicateAdjective(AdjectiveClass predicateAdjective)
          Sets the predicate adjective slot to the given AdjectiveClass.
 void setPredicateNoun(Noun predicateNoun)
          Sets the predicate noun slot to the given noun.
 void setSubject(Noun subject)
          Sets the subject slot to the given Noun.
 void setVerbPhrase(VerbPhrase verb)
          Sets the VerbPhrase for this sentence.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INFORMATION

public static final int INFORMATION
Constant value for setMood() and getMood()

See Also:
Constant Field Values

COMMAND

public static final int COMMAND
Constant value for setMood() and getMood()

See Also:
Constant Field Values

QUESTION

public static final int QUESTION
Constant value for setMood() and getMood()

See Also:
Constant Field Values
Constructor Detail

Sentence

public Sentence()
Creates a new empty Sentence object.

Method Detail

setMood

public void setMood(int mood)
Sets the mood of the sentence. The mood is action the system will take upon processing the input. Use the constant values defined in this class to set the mood value.

Parameters:
mood - Mood for the sentence.
See Also:
SentenceComponents

getMood

public int getMood()
Returns the Mood for the sentence. See setMood() for a more descriptive definition of mood.

Returns:
The mood of the sentence.
See Also:
setMood(int)

setSubject

public void setSubject(Noun subject)
Sets the subject slot to the given Noun.

Parameters:
subject - Subject of the sentence.

getSubject

public Noun getSubject()
Returns the Noun in the subject slot.

Returns:
The Noun in the subject slot. Null if there is no subject.

setIndirectObject

public void setIndirectObject(Noun indirectObject)
Sets the indirect object slot to the given Noun.

Parameters:
indirectObject - Indirect object of the sentence.

getIndirectObject

public Noun getIndirectObject()
Returns the Noun in the indirect object slot.

Returns:
The Noun in the indirect object slot. Null if there is no indirect object.

setPredicateNoun

public void setPredicateNoun(Noun predicateNoun)
Sets the predicate noun slot to the given noun. A predicate noun can be either a direct object or a predicate noun.

Parameters:
predicateNoun - Predicate noun of the sentence.

getPredicateNoun

public Noun getPredicateNoun()
Returns the Noun in the predicate noun slot. A predicate noun can be either a direct object or a predicate noun.

Returns:
The Noun in the predicate noun slot. Null if there is no predicate noun.

setPredicateAdjective

public void setPredicateAdjective(AdjectiveClass predicateAdjective)
Sets the predicate adjective slot to the given AdjectiveClass.

Parameters:
predicateAdjective - Predicate adjective of the sentence.

getPredicateAdjective

public AdjectiveClass getPredicateAdjective()
Returns the AdjectiveClass in the predicate adjective slot.

Returns:
The AdjectiveClass in the predicate adjective slot. Null if there is no predicate adjective.

setVerbPhrase

public void setVerbPhrase(VerbPhrase verb)
Sets the VerbPhrase for this sentence.

Parameters:
verb - The VerbPhrase for this sentence.

getVerbPhrase

public VerbPhrase getVerbPhrase()
Returns the VerbPhrase for this sentence.

Returns:
The VerbPhrase for this sentence.

Fido Alpha 3.2