de.unidu.is.retrieval.hyrex
Class HyREXRetriever

java.lang.Object
  extended byde.unidu.is.retrieval.AbstractRetriever
      extended byde.unidu.is.retrieval.hyrex.HyREXRetriever
All Implemented Interfaces:
Retriever

public class HyREXRetriever
extends AbstractRetriever

An retrieval interface to a HyREX server, supporting only querying a HyREX server.

Since:
2004-03-14
Version:
$Revision: 1.10 $, $Date: 2005/02/28 22:27:56 $
Author:
Henrik Nottelmann

Field Summary
protected  HyREXClient client
          The low-level, multi-purpose HyREX client.
 
Fields inherited from class de.unidu.is.retrieval.AbstractRetriever
schema
 
Constructor Summary
HyREXRetriever(java.lang.String hostname, int port, java.lang.String db, java.lang.String cls)
          Creates a new HyREX instance.
HyREXRetriever(java.lang.String hostname, int port, java.lang.String db, java.lang.String cls, Schema schema)
          Creates a new HyREX instance.
 
Method Summary
 void close()
          Closes the retriever and the corresponding HyREX connection.
 org.w3c.dom.Document getDocument(java.lang.String docID)
          Returns the full XML document
 java.util.List getResult(Query query)
          Returns result for the specified query.
 
Methods inherited from class de.unidu.is.retrieval.AbstractRetriever
getDocument, getDocuments, getResultSummaries, getSchema, getSummaries, getSummary, getSummary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

client

protected HyREXClient client
The low-level, multi-purpose HyREX client.

Constructor Detail

HyREXRetriever

public HyREXRetriever(java.lang.String hostname,
                      int port,
                      java.lang.String db,
                      java.lang.String cls)
Creates a new HyREX instance.

Parameters:
hostname - name of the HyREX server host
port - port of the HyREX server host
db - HyREX database
cls - HyREX class

HyREXRetriever

public HyREXRetriever(java.lang.String hostname,
                      int port,
                      java.lang.String db,
                      java.lang.String cls,
                      Schema schema)
Creates a new HyREX instance.

Parameters:
hostname - name of the HyREX server host
port - port of the HyREX server host
db - HyREX database
cls - HyREX class
schema - schema
Method Detail

getResult

public java.util.List getResult(Query query)
                         throws IndexException,
                                UnsupportedQueryException
Returns result for the specified query.

Parameters:
query - XIRQL query
Returns:
list of ProbDoc instances
Throws:
IndexException
UnsupportedQueryException

getDocument

public org.w3c.dom.Document getDocument(java.lang.String docID)
                                 throws DocumentNotFoundException
Returns the full XML document

Parameters:
docID - document id
Returns:
full XML document, or null if it does not exist
Throws:
DocumentNotFoundException
See Also:
Retriever.getDocument(java.lang.String)

close

public void close()
           throws IndexException
Closes the retriever and the corresponding HyREX connection.

Specified by:
close in interface Retriever
Overrides:
close in class AbstractRetriever
Throws:
IndexException
See Also:
Retriever.close()