edu.columbia.surge.hashImpl
Class CommonH

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

public class CommonH
extends FDH
implements Common

The Common category for a FD. Methods to set the lex and the head of the common category are provided. There are a lot of variations you can make to the noun such as setting it to be definite, plural... Since there are too many options and they are not common, methods are not provided to set those properties. And setLex() will be the only required/automate method provided here. This is the class that implements the Common 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 CommonH. User can either use the CommonFactoryH class or directly use the constructor of this class to create instances of CommonH.

See Also:
CommonFactoryH, Serialized Form

Constructor Summary
CommonH()
          Constructor which creates an instance of CommonH without any given parameters.
CommonH(java.lang.String lex)
          Constructor which creates an instance of CommonH with the given lexical entry.
CommonH(java.lang.String lex, boolean definite)
          Constructor which creates an instance of CommonH with the given lexical entry and a boolean to specify whether the lex should be definite.
 
Method Summary
 void setDefinite(boolean definite)
          A method to set whether the common cat should be definite
 void setLex(java.lang.String lex)
          A method to set the head of the common category
 
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

CommonH

public CommonH()
Constructor which creates an instance of CommonH without any given parameters.

CommonH

public CommonH(java.lang.String lex)
        throws InvalidConstructorException
Constructor which creates an instance of CommonH with the given lexical entry. If the lexical entry is invalid, an InvalidConstructorException should be thrown.
Parameters:
lex - lexical entry

CommonH

public CommonH(java.lang.String lex,
               boolean definite)
        throws InvalidConstructorException
Constructor which creates an instance of CommonH with the given lexical entry and a boolean to specify whether the lex should be definite. If the lexical entry is invalid, an InvalidConstructorException should be thrown.
Parameters:
lex - lexical entry
definite - set whether the lex should be definite. Input true to be definite.
Method Detail

setLex

public void setLex(java.lang.String lex)
A method to set the head of the common category
Specified by:
setLex in interface Common
Parameters:
lex - the lexical entry of the common phrase

setDefinite

public void setDefinite(boolean definite)
A method to set whether the common cat should be definite
Specified by:
setDefinite in interface Common
Parameters:
true - to be definite, false to be non-definite