de.unidu.is.retrieval
Class Async2SyncRetriever

java.lang.Object
  extended byde.unidu.is.retrieval.Async2SyncRetriever
All Implemented Interfaces:
Retriever

public class Async2SyncRetriever
extends java.lang.Object
implements Retriever

A synchronous variant of an asynchronous retriever.

Since:
13-Oct-2004
Version:
$Revision: 1.6 $, $Date: 2005/03/01 09:20:45 $
Author:
Henrik Nottelmann

Field Summary
protected  AsyncRetriever asyncRetriever
          The asynchronous retriever.
 
Constructor Summary
Async2SyncRetriever(AsyncRetriever asyncRetriever)
          Creates a new object.
 
Method Summary
 void close()
          Closes the retriever, and optionally frees used system resources (e.g. closes a network connection).
 org.w3c.dom.Document getDocument(ProbDoc doc)
          Returns the full XML document.
 org.w3c.dom.Document getDocument(java.lang.String docID)
          Returns the full XML document.
 java.util.List getDocuments(java.util.List result)
          Returns the full XML documents.
 java.util.List getResult(Query query)
          Returns result for the specified query.
 java.util.List getResultSummaries(Query query)
          Returns a summarised result for the specified query.
 Schema getSchema()
          Returns the schema used by this retriever.
 java.util.List getSummaries(java.util.List result)
          Returns summaries of the XML documents.
 org.w3c.dom.Document getSummary(ProbDoc doc)
          Returns a summary of the XML document.
 org.w3c.dom.Document getSummary(java.lang.String docID)
          Returns a summary of the XML document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

asyncRetriever

protected AsyncRetriever asyncRetriever
The asynchronous retriever.

Constructor Detail

Async2SyncRetriever

public Async2SyncRetriever(AsyncRetriever asyncRetriever)
Creates a new object.

Parameters:
asyncRetriever - asynchronous retriever
Method Detail

getSchema

public Schema getSchema()
Description copied from interface: Retriever
Returns the schema used by this retriever.

Specified by:
getSchema in interface Retriever
Returns:
schema used by this retriever

getResult

public java.util.List getResult(Query query)
                         throws UnsupportedQueryException,
                                IndexException
Description copied from interface: Retriever
Returns result for the specified query.

Specified by:
getResult in interface Retriever
Parameters:
query - XIRQL query
Returns:
list of ProbDoc instances
Throws:
UnsupportedQueryException
IndexException

getResultSummaries

public java.util.List getResultSummaries(Query query)
                                  throws UnsupportedQueryException,
                                         IndexException,
                                         DocumentNotFoundException
Description copied from interface: Retriever
Returns a summarised result for the specified query.

Specified by:
getResultSummaries in interface Retriever
Parameters:
query - XIRQL query
Returns:
list of XMLDoc instances
Throws:
UnsupportedQueryException
IndexException
DocumentNotFoundException

getSummary

public org.w3c.dom.Document getSummary(java.lang.String docID)
                                throws DocumentNotFoundException
Description copied from interface: Retriever
Returns a summary of the XML document.

Specified by:
getSummary in interface Retriever
Parameters:
docID - document id
Returns:
summary of XML document
Throws:
DocumentNotFoundException

getSummary

public org.w3c.dom.Document getSummary(ProbDoc doc)
                                throws DocumentNotFoundException
Description copied from interface: Retriever
Returns a summary of the XML document.

Specified by:
getSummary in interface Retriever
Parameters:
doc - document descriptor
Returns:
summary of XML document
Throws:
DocumentNotFoundException

getSummaries

public java.util.List getSummaries(java.util.List result)
                            throws DocumentNotFoundException
Description copied from interface: Retriever
Returns summaries of the XML documents.

Specified by:
getSummaries in interface Retriever
Parameters:
result - list of ProbDoc instances
Returns:
list of XMLDoc instances
Throws:
DocumentNotFoundException

getDocument

public org.w3c.dom.Document getDocument(java.lang.String docID)
                                 throws DocumentNotFoundException
Description copied from interface: Retriever
Returns the full XML document.

Specified by:
getDocument in interface Retriever
Parameters:
docID - document id
Returns:
full XML document
Throws:
DocumentNotFoundException

getDocument

public org.w3c.dom.Document getDocument(ProbDoc doc)
                                 throws DocumentNotFoundException
Description copied from interface: Retriever
Returns the full XML document.

Specified by:
getDocument in interface Retriever
Parameters:
doc - document descriptor
Returns:
full XML document
Throws:
DocumentNotFoundException

getDocuments

public java.util.List getDocuments(java.util.List result)
                            throws DocumentNotFoundException
Description copied from interface: Retriever
Returns the full XML documents.

Specified by:
getDocuments in interface Retriever
Parameters:
result - list of ProbDoc instances
Returns:
list of XMLDoc instances
Throws:
DocumentNotFoundException

close

public void close()
           throws IndexException
Description copied from interface: Retriever
Closes the retriever, and optionally frees used system resources (e.g. closes a network connection).

Specified by:
close in interface Retriever
Throws:
IndexException