de.unidu.is.retrieval
Class AbstractRetriever

java.lang.Object
  extended byde.unidu.is.retrieval.AbstractRetriever
All Implemented Interfaces:
Retriever
Direct Known Subclasses:
HyREXRetriever, PDatalogIR

public abstract class AbstractRetriever
extends java.lang.Object
implements Retriever

An abstract gateway to retrievers.

Since:
2004-03-18
Version:
$Revision: 1.4 $, $Date: 2005/02/21 17:29:22 $
Author:
Henrik Nottelmann

Field Summary
protected  Schema schema
          The retriever schema.
 
Constructor Summary
AbstractRetriever()
          Creates a new instance.
 
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
 java.util.List getDocuments(java.util.List result)
          Returns the full XML documents.
 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 the full XML documents.
 org.w3c.dom.Document getSummary(ProbDoc doc)
          Returns the full 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
 
Methods inherited from interface de.unidu.is.retrieval.Retriever
getDocument, getResult
 

Field Detail

schema

protected Schema schema
The retriever schema.

Constructor Detail

AbstractRetriever

public AbstractRetriever()
Creates a new instance.

Method Detail

getSchema

public Schema getSchema()
Returns the schema used by this retriever.

Specified by:
getSchema in interface Retriever
Returns:
schema used by this retriever
See Also:
Retriever.getSchema()

getDocument

public org.w3c.dom.Document getDocument(ProbDoc doc)
                                 throws DocumentNotFoundException
Returns the full XML document

Specified by:
getDocument in interface Retriever
Parameters:
doc - document descriptor
Returns:
full XML document, or null if it does not exist
Throws:
DocumentNotFoundException
See Also:
Retriever.getDocument(de.unidu.is.retrieval.ProbDoc)

getDocuments

public java.util.List getDocuments(java.util.List result)
                            throws DocumentNotFoundException
Returns the full XML documents.

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

getSummary

public org.w3c.dom.Document getSummary(java.lang.String docID)
                                throws DocumentNotFoundException
Returns a summary of the XML document.

Specified by:
getSummary in interface Retriever
Parameters:
docID - document id
Returns:
summary of XML document
Throws:
DocumentNotFoundException
See Also:
Retriever.getSummary(java.lang.String)

getSummary

public org.w3c.dom.Document getSummary(ProbDoc doc)
                                throws DocumentNotFoundException
Returns the full XML document

Specified by:
getSummary in interface Retriever
Parameters:
doc - document descriptor
Returns:
full XML document, or null if it does not exist
Throws:
DocumentNotFoundException
See Also:
Retriever.getDocument(de.unidu.is.retrieval.ProbDoc)

getSummaries

public java.util.List getSummaries(java.util.List result)
                            throws DocumentNotFoundException
Returns the full XML documents.

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

getResultSummaries

public java.util.List getResultSummaries(Query query)
                                  throws UnsupportedQueryException,
                                         IndexException,
                                         DocumentNotFoundException
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
See Also:
Retriever.getResultSummaries(de.unidu.is.retrieval.Query)

close

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

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