iglu.ir
Class DefaultDocumentSet

java.lang.Object
  |
  +--iglu.ir.DefaultDocumentSet
All Implemented Interfaces:
DocumentSet, EditableDocumentSet, java.io.Serializable

public class DefaultDocumentSet
extends java.lang.Object
implements EditableDocumentSet, java.io.Serializable

Simple document set. Basically a wrapper for a LinkedList

Version:
1.0
Author:
See Also:
Serialized Form

Field Summary
(package private)  java.util.LinkedList docs
           
(package private)  DocumentFilter[] filters
           
(package private)  java.util.LinkedList metaData
           
 
Constructor Summary
DefaultDocumentSet()
          Create a new DocumentSet.
 
Method Summary
 int addDoc(Document d)
          Add a new document with no metadata
 int addDoc(Document d, java.lang.Object metaData)
          Add a new document with metadata
 Document getDoc(int i)
          Get document i
 java.lang.Object getDocMeta(int i)
          Get meta data for document i
 java.util.Iterator iterator()
          Get an iterator over the document set.
 void setFilters(DocumentFilter[] filters)
          set the filter list
 int size()
          Return the number of documents in the document set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

docs

java.util.LinkedList docs

metaData

java.util.LinkedList metaData

filters

DocumentFilter[] filters
Constructor Detail

DefaultDocumentSet

public DefaultDocumentSet()
Create a new DocumentSet.

Method Detail

addDoc

public int addDoc(Document d)
Add a new document with no metadata

Specified by:
addDoc in interface EditableDocumentSet

addDoc

public int addDoc(Document d,
                  java.lang.Object metaData)
Add a new document with metadata

Specified by:
addDoc in interface EditableDocumentSet

getDoc

public Document getDoc(int i)
Get document i

Specified by:
getDoc in interface DocumentSet

setFilters

public void setFilters(DocumentFilter[] filters)
set the filter list

Specified by:
setFilters in interface DocumentSet

getDocMeta

public java.lang.Object getDocMeta(int i)
Get meta data for document i

Specified by:
getDocMeta in interface DocumentSet

iterator

public java.util.Iterator iterator()
Get an iterator over the document set.

Specified by:
iterator in interface DocumentSet

size

public int size()
Return the number of documents in the document set.

Specified by:
size in interface DocumentSet