edu.columbia.surge
Interface FD

All Known Subinterfaces:
AP, Circum, Clause, Common, FDNull, FDRef, NP, Partic, PersonalPronoun, PersonName, PP, PreMod, Proc, Proper
All Known Implementing Classes:
FDH

public abstract interface FD
extends java.util.Map

The interface which consists of the primary functions and features of a FD. A lot of the functions are derived from the java.util.Map interface. This is the base interface which is inherrited by various other kinds of FDs such as Proc, Clause, Partic... As this class defines what all kinds of FDs can do, it provides comprehensive methods which allow users to manipulate the path and the value of a FD. Besides being able to create new FDs by supplying its name and its value, there are also methods that allow users to supply a given path and a value so that users can traverse through the FDs with the given path names and change the value that is at the end of the path.

See Also:
FDFactory, AP, Circum, Clause, Common, FDNull, FDRef, NP, Partic, Proc, PersonalPronoun, PP, PreMod, Proper

Inner classes inherited from class java.util.Map
java.util.Map.Entry
 
Method Summary
 boolean checkPath(java.lang.String path)
          A method to verify whether the given path exists in this FD.
 boolean checkPath(java.lang.String[] path)
          A method to verify whether the path exists in this FD.
 java.lang.Object getPath(java.lang.String path)
          A method to return the object that associates with the given path.
 java.lang.Object getPath(java.lang.String[] path)
          A method to return the object that associates with the given path.
 void putPath(java.lang.String[] path, java.lang.Object newValue)
          A method for user to put a new value object into the key of a FD that is specified by the given existing path.
 void putPath(java.lang.String path, java.lang.Object newValue)
          A method for user to put a new value object into the key of a FD that is specified by the given existing path.
 void putPathOverride(java.lang.String[] path, java.lang.Object newValue)
          A method for user to put a new value object associate with the key of a FD that is specified by the given existing path.
 void putPathOverride(java.lang.String path, java.lang.Object newValue)
          A method for user to put a new value object associate with the key of a FD that is specified by the given existing path.
 java.lang.String toString()
          Override the toString() method inherrited from HashMap, this method unifies the FD into its equivalent lisp-string representation.
 java.lang.Object toXML()
          A method that outputs the FD to an XML.
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Method Detail

toXML

public java.lang.Object toXML()
                       throws InvalidPathException
A method that outputs the FD to an XML.
Returns:
some kind of an XML object that represents the FD
Throws:
InvalidPathException -  

putPath

public void putPath(java.lang.String[] path,
                    java.lang.Object newValue)
             throws InvalidPathException
A method for user to put a new value object into the key of a FD that is specified by the given existing path. If the path is not found, an exception will be thrown and no object will be inserted.
Parameters:
path - A path name which users specify the path to the desired node with a String array which each elelemnt in the path array will be the name of the node to be traversed.
newValue - A new value to be placed in the node of the given path
Throws:
InvalidPathException -  

putPath

public void putPath(java.lang.String path,
                    java.lang.Object newValue)
             throws InvalidPathException
A method for user to put a new value object into the key of a FD that is specified by the given existing path. If the path is not found, an exception will be thrown and no object will be inserted.
Parameters:
path - A path name which users specify the path to the desired node. The path is specified in one string with each path separated by spaces.
newValue - A new value to be placed in the node of the given path
Throws:
InvalidPathException -  

putPathOverride

public void putPathOverride(java.lang.String[] path,
                            java.lang.Object newValue)
                     throws InvalidPathException
A method for user to put a new value object associate with the key of a FD that is specified by the given existing path. If the given path is not found, it will be automatically created and the new object will be inserted at the end of the path.
Parameters:
path - A path name which users specify the path to the desired node with a String array which * each elelemnt in the path array will be the name of the node to be traversed.
newValue - A new value to be placed in the node of the given path
Throws:
InvalidPathException -  

putPathOverride

public void putPathOverride(java.lang.String path,
                            java.lang.Object newValue)
                     throws InvalidPathException
A method for user to put a new value object associate with the key of a FD that is specified by the given existing path. If the given path is not found, it will be automatically created and the new object will be inserted at the end of the path.
Parameters:
path - A path name which users specify the path to the desired node with a string which * path names are separated by spaces.
newValue - A new value to be placed in the node of the given path
Throws:
InvalidPathException -  

checkPath

public boolean checkPath(java.lang.String[] path)
A method to verify whether the path exists in this FD.
Parameters:
path - the path to be verified, specified by a string array with the names of the nodes of the path.
Returns:
a boolean of the verification result

checkPath

public boolean checkPath(java.lang.String path)
A method to verify whether the given path exists in this FD.
Parameters:
path - the path to be verified, specified by a string with the names of the nodes of the path separated by spaces.
Returns:
a boolean of the verification result

getPath

public java.lang.Object getPath(java.lang.String[] path)
                         throws InvalidPathException
A method to return the object that associates with the given path.
Parameters:
path - the path of the object to be retrieved, specified in a string array that stores each path node name.
Returns:
value the object on that path.
Throws:
InvalidPathException -  

getPath

public java.lang.Object getPath(java.lang.String path)
                         throws InvalidPathException
A method to return the object that associates with the given path.
Parameters:
path - the path of the object to be retrieved, specified in a string which each path name is separated by one space.
Returns:
value the object on that path.
Throws:
InvalidPathException -  

toString

public java.lang.String toString()
Override the toString() method inherrited from HashMap, this method unifies the FD into its equivalent lisp-string representation.
Returns:
the lisp-string representation of the FD
Overrides:
toString in class java.lang.Object