public class DBSimpleQuery
extends java.lang.Object
Constructor and Description |
---|
DBSimpleQuery()
construct an instance of the DBSimpleQuery class
|
Modifier and Type | Method and Description |
---|---|
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.
|
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 queryjava.io.IOException
java.sql.SQLException
java.lang.ClassNotFoundException
public static void main(java.lang.String[] args)
Usage: java DBSimpleQuery
query
- the text to search for in the element and attribute contentpublic java.util.Hashtable findDocuments(java.lang.String query)
query
- the text to search forpublic 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 queryCopyright © 2020 Regents of the University of California. All Rights Reserved.