|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.ucsb.nceas.morpho.query.LocalQuery
LocalQuery is a class designed to execute a query defined in an XML document that follows the PathQuery DTD. The path based query statements are converted to XPath expressions and the XPath API features of Apache Xalan/Xerces are used to find nodes specified by the expressions. All XML documents in a given local subdirectory are scanned. The process thus mimics the database search on Metacat, but is applied only to local documents.
Field Summary | |
static java.util.Hashtable |
dom_collection
hash table with dom objects from previously scanned local XML documents; serves as a cache to avoid having to re-parse documents every time an XPath search is carried out. |
Constructor Summary | |
LocalQuery(Query query,
Morpho morpho)
Basic Constuctor for the class |
Method Summary | |
ResultSet |
execute()
Run the query against the local document store |
static void |
main(java.lang.String[] args)
Main routine for testing |
static void |
removeFromCache(java.lang.String docid)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static java.util.Hashtable dom_collection
Constructor Detail |
public LocalQuery(Query query, Morpho morpho)
query
- the query on which this Local query is basedmorpho
- the Morpho frameworkMethod Detail |
public ResultSet execute()
public static void removeFromCache(java.lang.String docid)
public static void main(java.lang.String[] args)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |