|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectde.unidu.is.retrieval.AbstractRetriever
de.unidu.is.retrieval.pire.PDatalogIR
An IR interface (for XML documents) to PIRE (using probabilistic Datalog).
PIRE only deals with flat documents, but that is sufficient for the IR specification. Datatype and operator names are automatically converted into the PIRE versions.
Currently, only wsum queries are supported.
| Constructor Summary | |
PDatalogIR(DB db,
java.lang.String collectionName)
Creates a new instance, which does not store added documents on disc. |
|
PDatalogIR(DB db,
java.lang.String collectionName,
java.lang.String docDir)
Creates a new instance, which stores added documents on disc. |
|
| Method Summary | |
void |
addToIndex(java.lang.String docID,
org.w3c.dom.Document document)
Add the XML document to the index. |
void |
addToIndex(java.lang.String docID,
java.lang.String document)
Add the XML document to the index. |
void |
close()
Closes the retriever, and optionally frees used system resources (e.g. |
void |
computeIndex()
Computes the index, based on the document values which were added before. |
void |
computeMoments()
Computes the moments of the indexing weights. |
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 |
Moments |
getMoments(Query query)
Returns the expectation and the variance of the RSVs for the specified query. |
PIRE |
getPIRE()
Returns the PIRE object used internally. |
double |
getRD(java.lang.String attName,
java.lang.String operator,
java.lang.String key)
Returns the value corresponding to the specified key in the resource description (the rd relation), e.g. for defining the
parameters of the mapping function. |
java.util.List |
getResult(Query query)
Returns result for the specified query. |
void |
initIndex()
Inits the index. |
void |
registerSchema(Schema schema)
Registers the specified schema. |
void |
removeIndex()
Removes the index. |
void |
setRD(java.lang.String attName,
java.lang.String operator,
java.lang.String key,
double value)
Sets the value corresponding to the specified key in the resource description (the rd relation), e.g. for defining the
parameters of the mapping function. |
| Methods inherited from class de.unidu.is.retrieval.AbstractRetriever |
getDocuments, getResultSummaries, getSchema, getSummaries, getSummary, getSummary |
| 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 |
getDocuments, getResultSummaries, getSchema, getSummaries, getSummary, getSummary |
| Constructor Detail |
public PDatalogIR(DB db,
java.lang.String collectionName)
db - databasecollectionName - name of the collection
public PDatalogIR(DB db,
java.lang.String collectionName,
java.lang.String docDir)
db - databasecollectionName - name of the collectiondocDir - directory for added documents| Method Detail |
public void registerSchema(Schema schema)
registerSchema in interface IRschema - collection schemaIR.registerSchema(de.unidu.is.retrieval.Schema)
public void initIndex()
throws IndexException
initIndex in interface IRIndexExceptionIR.initIndex()
public void addToIndex(java.lang.String docID,
org.w3c.dom.Document document)
throws DocumentMismatchException,
DocumentNotStorableException
If a directory was specified in the constructor, then the document is also stored in that directory.
addToIndex in interface IRdocID - document iddocument - XML document
DocumentMismatchException
DocumentNotStorableExceptionIR.addToIndex(java.lang.String,
org.w3c.dom.Document)
public void addToIndex(java.lang.String docID,
java.lang.String document)
throws DocumentMismatchException,
DocumentNotStorableException
If a directory was specified in the constructor, then the document is also stored in that directory.
addToIndex in interface IRdocID - document iddocument - XML document
DocumentMismatchException
DocumentNotStorableExceptionIR.addToIndex(java.lang.String,
java.lang.String)
public void computeIndex()
throws IndexException
computeIndex in interface IRIndexExceptionIR.computeIndex()
public void computeMoments()
throws IndexException
computeMoments in interface MomentsIRIndexException
public void removeIndex()
throws IndexException
removeIndex in interface IRIndexException
public java.util.List getResult(Query query)
throws UnsupportedQueryException
Currently, only wsum queries are supported.
getResult in interface Retrieverquery - XIRQL query
UnsupportedQueryExceptionRetriever.getResult(de.unidu.is.retrieval.Query)
public org.w3c.dom.Document getDocument(java.lang.String docID)
throws DocumentNotFoundException
getDocument in interface RetrieverdocID - document id
DocumentNotFoundExceptionRetriever.getDocument(java.lang.String)
public org.w3c.dom.Document getDocument(ProbDoc doc)
throws DocumentNotFoundException
getDocument in interface RetrievergetDocument in class AbstractRetrieverdoc - document descriptor
DocumentNotFoundExceptionRetriever.getDocument(de.unidu.is.retrieval.ProbDoc)
public Moments getMoments(Query query)
throws UnsupportedQueryException
Currently, only wsum queries are supported.
query - XIRQL query
UnsupportedQueryException
public double getRD(java.lang.String attName,
java.lang.String operator,
java.lang.String key)
rd relation), e.g. for defining the
parameters of the mapping function.
attName - attribute nameoperator - operator namekey - value key
public void setRD(java.lang.String attName,
java.lang.String operator,
java.lang.String key,
double value)
rd relation), e.g. for defining the
parameters of the mapping function.
attName - attribute nameoperator - operator namekey - value keyvalue - valuepublic PIRE getPIRE()
public void close()
close in interface Retrieverclose in class AbstractRetrieverRetriever.close()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||