umich.cac.queryengine.xindice
Class XIndiceQueryEngine

java.lang.Object
  extended byumich.cac.queryengine.xindice.XIndiceQueryEngine
All Implemented Interfaces:
QueryEngine

public final class XIndiceQueryEngine
extends java.lang.Object
implements QueryEngine

Responsible for connecting and querying the Xindice database collection.

Version:
$Header: /cvsroot/pbsaccounting/pbsaccounting/darkslide/doc/javadoc/umich/cac/queryengine/xindice/XIndiceQueryEngine.html,v 1.3 2003/12/18 17:16:40 rodmach Exp $
Author:
rmach@umich.edu

Constructor Summary
XIndiceQueryEngine(DataSource dataSource)
          Constructor.
 
Method Summary
 boolean connect()
          Connect to the database.
 void dispose()
          Close any resources (like database connections) that were acquired)
protected  org.xmldb.api.base.Collection getCollection()
          Get the collection from Xindice, must be connected first
 java.util.Vector query(java.lang.String xpath)
          Perform an XPATH query using XML:DB against the current collection and return a vector of Node results from the query.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XIndiceQueryEngine

public XIndiceQueryEngine(DataSource dataSource)
Constructor.

Parameters:
dataSource - DataSource objected read by the QueryEngineDigester
Method Detail

getCollection

protected org.xmldb.api.base.Collection getCollection()
Get the collection from Xindice, must be connected first

Returns:
Xindice Collection

connect

public boolean connect()
Connect to the database. You must not call connect after being connected

Specified by:
connect in interface QueryEngine
Returns:
true if connected, false otherwise

dispose

public void dispose()
Close any resources (like database connections) that were acquired)

Specified by:
dispose in interface QueryEngine

query

public java.util.Vector query(java.lang.String xpath)
Perform an XPATH query using XML:DB against the current collection and return a vector of Node results from the query. Any XPATH query supported by Xalan is usable by Xindice

Specified by:
query in interface QueryEngine
Parameters:
xpath - The XPATH query to perform
Returns:
List of Node results from the XPATH query, or empty Vector if no results