edu.columbia.surge.hashImpl
Class ClauseH

java.lang.Object
  |
  +--java.util.AbstractMap
        |
        +--java.util.HashMap
              |
              +--edu.columbia.surge.hashImpl.FDH
                    |
                    +--edu.columbia.surge.hashImpl.ClauseH

public class ClauseH
extends FDH
implements Clause

The clause category for a FD. This class is used whenever users want to create a clause. As the minimum requirement, this class must be used together with the Partic and Proc class. In addition to setting the process and the participant of a clause, there are methods in this class to set the various properties of a clause. For methods that set the properties of a clause such as the setTense(...) and setPolarity(...) methods, some of the possible values/options for these methods are provided in the FDProperties class. This class implements the Clause interface and is implemented in the form of a HashMap as it is inherrited from the FDH class. This class consists of methods and constructors to set the required components of a Clause. User can either use the ClauseFactoryH class or directly use the constructor of this class to create instances of ClauseH.

See Also:
ClauseFactoryH, Proc, Partic, FDProperties, Serialized Form

Constructor Summary
ClauseH()
          Default constructor which creates a default instance of ClauseH.
ClauseH(Proc proc, Partic partic)
          Constructor to create an instance of Clause class that fulfills the minimum requirement of a clause, which consists of a process and a participant.
ClauseH(Proc proc, Partic partic, java.lang.String tense, java.lang.String adverb, java.lang.String mood, java.lang.String polarity, java.lang.String complex, boolean restrictiveness, Circum circum, PreMod preMod, java.lang.String[] scope, FDRef ref)
          Constructor to create an instance of ClauseH class that gives user the option to create an instance of ClauseH with all the most common and frequently used properties.
 
Method Summary
 void setAdverb(java.lang.String adverb)
          A method to set the adverb of a clause.
 void setCircum(Circum circum)
          A method to set the circumstance of a clause.
 void setComplex(java.lang.String complex)
          A method to set the complexity of a clause.
 void setMood(java.lang.String mood)
          A method to set the mood of a clause.
 void setPartic(Partic partic)
          A method to set the participants of a clause.
 void setPolarity(java.lang.String polarity)
          A method to set the polarity of a clause.
 void setPreMod(PreMod preMod)
          A method to set the pre-modifier of a clause.
 void setProc(Proc proc)
          A method to set the process of a clause.
 void setRestrictive(boolean restrictive)
          A method to set the restrictiveness of a clause.
 void setScope(java.lang.String[] scope)
          A method to set the scope of a clause by specifying the path of the holes in an array.
 void setScopeUsingRef(FDRef ref)
          A method to set the scope of a clause by making a referrence to the desired hole of the clause.
 void setTense(java.lang.String tense)
          A method to allow the user to set the tense of the clause.
 
Methods inherited from class edu.columbia.surge.hashImpl.FDH
checkPath, checkPath, computePathDifference, getPath, getPath, putPath, putPath, putPathOverride, putPathOverride, stackToPath, stringToArray, toString, toString, toXML
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClauseH

public ClauseH()
Default constructor which creates a default instance of ClauseH.

ClauseH

public ClauseH(Proc proc,
               Partic partic)
        throws InvalidConstructorException
Constructor to create an instance of Clause class that fulfills the minimum requirement of a clause, which consists of a process and a participant. An InvalidConstructorException is thrown if the proc and partic parameters are invalid. And an InvalidPathException will be thrown when the program is failed to use the putPathOverride() method in the FDH class to construct the clause FD.
Parameters:
proc - the process of the clause
partic - the participant of the clause
Throws:
InvalidConstructorException -  
See Also:
FDH.putPathOverride(java.lang.String[], java.lang.Object)

ClauseH

public ClauseH(Proc proc,
               Partic partic,
               java.lang.String tense,
               java.lang.String adverb,
               java.lang.String mood,
               java.lang.String polarity,
               java.lang.String complex,
               boolean restrictiveness,
               Circum circum,
               PreMod preMod,
               java.lang.String[] scope,
               FDRef ref)
        throws InvalidConstructorException,
               InvalidPathException
Constructor to create an instance of ClauseH class that gives user the option to create an instance of ClauseH with all the most common and frequently used properties. Among all the parameters, only proc and partic are required. If users do not want to specify certain properties, simply put a null as the actual parameter. For some parameters such as the "tense", "mood", the possible values/options can be found in the FDProperties class.
Parameters:
proc - the process of the clause
partic - the participant of the clause
tense - the tense of the clause
adverb - the possible adverb for the clause
mood - the possible mood of the clause
polarity - the polarity of the clause
complexity - set whether the clause is complex, true to be complex and vice versa.
restrictiveness - set whether the clause is restrictive, true to be restrictive and vice versa.
circum - the circumstance of the clause
preMod - the predefined-modifier of the clause
scope - specify the path to the hole and put them in the right order into the array. For example, if the whole is (partic (agent..)) then put String[] scope = {"partic", "agent"}
ref - the FD node which serves as the hole of the clause.
Throws:
InvalidConstructorException -  
InvalidPathException -  
Method Detail

setProc

public void setProc(Proc proc)
A method to set the process of a clause. (Required for a clause)
Specified by:
setProc in interface Clause
Parameters:
proc - the process to be specified

setPartic

public void setPartic(Partic partic)
A method to set the participants of a clause. (Required)
Specified by:
setPartic in interface Clause
Parameters:
partic - the participants to be specified

setAdverb

public void setAdverb(java.lang.String adverb)
               throws InvalidPathException
A method to set the adverb of a clause. (Optional)
Specified by:
setAdverb in interface Clause
Parameters:
adverb - the adverb to be inserted

setCircum

public void setCircum(Circum circum)
A method to set the circumstance of a clause. (Optional)
Specified by:
setCircum in interface Clause
Parameters:
circum - the circumstance to be specified

setComplex

public void setComplex(java.lang.String complex)
A method to set the complexity of a clause. (Optional)
Specified by:
setComplex in interface Clause
Parameters:
complex - the complexity to be specified

setMood

public void setMood(java.lang.String mood)
A method to set the mood of a clause. (Optional)
Specified by:
setMood in interface Clause
Parameters:
mood - the mood of the clause

setPolarity

public void setPolarity(java.lang.String polarity)
A method to set the polarity of a clause. By default, the polarity is positive. (Optional)
Specified by:
setPolarity in interface Clause
Parameters:
polarity - the polarity of a clause

setPreMod

public void setPreMod(PreMod preMod)
A method to set the pre-modifier of a clause. (Optional)
Specified by:
setPreMod in interface Clause
Parameters:
preMod - the pre-modifier to be specified

setRestrictive

public void setRestrictive(boolean restrictive)
A method to set the restrictiveness of a clause. (Optional)
Specified by:
setRestrictive in interface Clause
Parameters:
restrictiveness - true to be restrictive, false to be non-restrictive

setTense

public void setTense(java.lang.String tense)
A method to allow the user to set the tense of the clause. (Optional)
Specified by:
setTense in interface Clause
Parameters:
tense - the tense of the clause

setScope

public void setScope(java.lang.String[] scope)
A method to set the scope of a clause by specifying the path of the holes in an array. (Optional)
Specified by:
setScope in interface Clause
Parameters:
scope - specify the order of the roles by putting them in the right order into the array. For example, (scope {^ A B}) will be {"A", "B"}.

setScopeUsingRef

public void setScopeUsingRef(FDRef ref)
A method to set the scope of a clause by making a referrence to the desired hole of the clause. If the hole is empty without any properties, it will be a FDNull object. Otherwise, the hole will just be a normal FD but it will be referrenced to the clause as the hole.
Specified by:
setScopeUsingRef in interface Clause
Parameters:
ref - the FD node which serves as the hole of the clause.
See Also:
FDNull