dbpackage
Class NlpDb

java.lang.Object
  extended bydbpackage.NlpDb
All Implemented Interfaces:
Pos

public class NlpDb
extends java.lang.Object
implements Pos


Field Summary
 
Fields inherited from interface naturalpackage.Pos
ADJ, adjexceptions, ADV, ALL_S, ART, ARTS, CONJ, CONJS, DET, DETS, HOW, MEASUREMENT, NOUN, NP, NUM_S, NUMBER, PP, PREP, PREPS, PRON, PRONS, UNKNOWN, VERB, VP, WHAT, WHEN, WHERE, WHO, WHY
 
Constructor Summary
NlpDb()
           
 
Method Summary
 boolean checkForTableName(java.sql.Connection con, java.lang.String tablename)
          This method checks to see if the table already exists in the database
 boolean checkForTree(java.sql.Connection con, java.lang.String tablename, java.lang.String colname)
          This method checks to see if a tree already exists in the db
 boolean createTable(java.sql.Connection con, java.lang.String tablename)
          This method creates a table in whatever DB you specify
 java.util.Vector grabTheTree(java.sql.Connection con, java.lang.String tablename, java.lang.String colname)
          This method grabs the tree from the database
 boolean insertVerbAndVector(java.sql.Connection con, java.lang.String tablename, java.lang.String colname, java.util.Vector tree)
          This method inserts verb & vector (Which is how tree is represented in db
 boolean storeVerb(java.sql.Connection con, java.lang.String tablename, java.lang.String colname)
          This method stores something in the column
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NlpDb

public NlpDb()
Method Detail

createTable

public boolean createTable(java.sql.Connection con,
                           java.lang.String tablename)
This method creates a table in whatever DB you specify

Parameters:
con - This is the connection you want to use
tablename - This is the name of the table you want to create
Returns:
boolean returns a true if successful and false if not

checkForTableName

public boolean checkForTableName(java.sql.Connection con,
                                 java.lang.String tablename)
This method checks to see if the table already exists in the database

Parameters:
con - This is the connection you want to use
tablename - This is the name of the table you want to create
Returns:
boolean returns a true if successful and false if not

checkForTree

public boolean checkForTree(java.sql.Connection con,
                            java.lang.String tablename,
                            java.lang.String colname)
This method checks to see if a tree already exists in the db

Parameters:
con - This is the connection you want to use
tablename - This is the name of the table you want to create
Returns:
boolean returns a true if successful and false if not

insertVerbAndVector

public boolean insertVerbAndVector(java.sql.Connection con,
                                   java.lang.String tablename,
                                   java.lang.String colname,
                                   java.util.Vector tree)
This method inserts verb & vector (Which is how tree is represented in db

Parameters:
con - This is the connection you want to use
tablename - This is the name of the table you want to create
colname - this is the column name where you want it inserted
Returns:
boolean returns a true if successful and false if not

grabTheTree

public java.util.Vector grabTheTree(java.sql.Connection con,
                                    java.lang.String tablename,
                                    java.lang.String colname)
This method grabs the tree from the database

Parameters:
con - This is the connection you want to use
tablename - This is the name of the table you want to create
Returns:
Vector returns a vector holding the tree

storeVerb

public boolean storeVerb(java.sql.Connection con,
                         java.lang.String tablename,
                         java.lang.String colname)
This method stores something in the column

Parameters:
con - This is the connection you want to use
tablename - This is the name of the table you want to create
Returns:
boolean returns a true if successful and false if not