|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.ucsb.nceas.metacat.DBSimpleQuery
public class DBSimpleQuery
A Class that searches a relational DB for elements and attributes that have free text matches to the query string. It returns a result set consisting of the root nodeid for each document that satisfies the query
| Constructor Summary | |
|---|---|
DBSimpleQuery()
construct an instance of the DBSimpleQuery class |
|
| Method Summary | |
|---|---|
java.util.Hashtable |
findDocuments(java.lang.String query)
routine to search the elements and attributes looking to match query |
java.util.Hashtable |
findDocuments(java.lang.String query,
java.lang.String requestedDoctype)
routine to search the elements and attributes looking to match query |
static void |
main(java.lang.String[] args)
the main routine used to test the DBSimpleQuery utility. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DBSimpleQuery()
throws java.io.IOException,
java.sql.SQLException,
java.lang.ClassNotFoundException
Generally, one would call the findDocuments() routine after creating an instance to specify the search query
conn - the JDBC connection that we use for the query
java.io.IOException
java.sql.SQLException
java.lang.ClassNotFoundException| Method Detail |
|---|
public static void main(java.lang.String[] args)
Usage: java DBSimpleQuery
query - the text to search for in the element and attribute content
public java.util.Hashtable findDocuments(java.lang.String query)
query - the text to search for
public java.util.Hashtable findDocuments(java.lang.String query,
java.lang.String requestedDoctype)
query - the text to search forrequestedDoctype - the type of documents to return from the query
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||