com.sun.labs.minion.test.regression
Class IndexInverter.DocumentPartition

java.lang.Object
  extended by com.sun.labs.minion.test.regression.IndexInverter.DocumentPartition
Enclosing class:
IndexInverter

public class IndexInverter.DocumentPartition
extends java.lang.Object

The inner class DocumentPartition is an in-memory lightweight simulation of a DiskPartition. It provides the ability to maintain a collection of documents.


Constructor Summary
IndexInverter.DocumentPartition()
           
 
Method Summary
 void createDocuments(DiskPartition partition)
          Create the empty collection of documents to be maintained by this DocumentPartition
 com.sun.labs.minion.test.regression.IndexInverter.Document getDocument(int documentId)
          Returns the document whose identifier is documentId
 void outputDocuments(java.lang.String outputDir)
          Write out the documents into the output directory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndexInverter.DocumentPartition

public IndexInverter.DocumentPartition()
Method Detail

createDocuments

public void createDocuments(DiskPartition partition)
Create the empty collection of documents to be maintained by this DocumentPartition

Parameters:
partition - a DiskPartition, which can be asked for the documents it contains

getDocument

public com.sun.labs.minion.test.regression.IndexInverter.Document getDocument(int documentId)
Returns the document whose identifier is documentId

Parameters:
documentId - the integer identifier for the document (starts at 1)
Returns:
a Document

outputDocuments

public void outputDocuments(java.lang.String outputDir)
Write out the documents into the output directory

Parameters:
outputDir - a String identifying the directory into which the recreated documents should be written