edu.columbia.surge.hashImpl
Class ClauseFactoryH

java.lang.Object
  |
  +--edu.columbia.surge.hashImpl.ClauseFactoryH

public class ClauseFactoryH
extends java.lang.Object
implements ClauseFactory

This class holds the factory methods for the Clause class. Users can use this class to create instances of Clause objects with their desired parameters. A static keyword is used to instantiate an instance of ClauseFactoryH so that the static variable "factory" in this class will have access to the create methods. Users can also create instances of ClauseH directly using the constructors of the Clause class. The primary reason of the creation of this class is to allow the Clause class, which implements the Clause interface to have constructors while being able to implement all the methods in the interface.

See Also:
ClauseH

Field Summary
static ClauseFactoryH factory
          The static instance which helps users to access to the methods in this class.
 
Method Summary
 Clause create()
          A factory method which creates an instance of ClauseH without any given parameters.
 Clause create(Proc proc, Partic partic)
          A factory method to compute and return an instance of Clause class that fulfills the minimum requirement of a clause, which consists of a process and a participant.
 Clause create(Proc proc, Partic partic, java.lang.String tense, java.lang.String adverb, java.lang.String mood, java.lang.String polarity, java.lang.String complexity, boolean restrictiveness, Circum circum, PreMod preMod, java.lang.String[] scope, FDRef ref)
          A factory method to compute and return 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

factory

public static ClauseFactoryH factory
The static instance which helps users to access to the methods in this class.
Method Detail

create

public Clause create()
A factory method which creates an instance of ClauseH without any given parameters.
Specified by:
create in interface ClauseFactory

create

public Clause create(Proc proc,
                     Partic partic)
              throws InvalidConstructorException,
                     InvalidPathException
A factory method to compute and return 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.
Specified by:
create in interface ClauseFactory
Parameters:
proc - the process of the clause
partic - the participant of the cluase
Returns:
an instance of Clause which consists of a given process and a participant
Throws:
InvalidConstructorException -  
InvalidPathException -  
See Also:
FDH.putPathOverride(java.lang.String[], java.lang.Object)

create

public Clause create(Proc proc,
                     Partic partic,
                     java.lang.String tense,
                     java.lang.String adverb,
                     java.lang.String mood,
                     java.lang.String polarity,
                     java.lang.String complexity,
                     boolean restrictiveness,
                     Circum circum,
                     PreMod preMod,
                     java.lang.String[] scope,
                     FDRef ref)
              throws InvalidConstructorException,
                     InvalidPathException
A factory method to compute and return 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.
Specified by:
create in interface ClauseFactory
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.
Returns:
an instance of Clause which consists of all the user specifications.
Throws:
InvalidConstructorException -  
InvalidPathException -