edu.cmu.minorthird.text
Class AbstractTextBase

java.lang.Object
  extended by edu.cmu.minorthird.text.AbstractTextBase
All Implemented Interfaces:
TextBase
Direct Known Subclasses:
MutableTextBase, SubTextBase

public abstract class AbstractTextBase
extends java.lang.Object
implements TextBase


Field Summary
protected  Tokenizer tokenizer
           
 
Constructor Summary
AbstractTextBase(Tokenizer t)
           
 
Method Summary
abstract  Span documentSpan(java.lang.String documentId)
          Looks up the document Span for the given documentId.
abstract  java.util.Iterator<Span> documentSpanIterator()
          Returns an iterator over the documents in this TextBase.
abstract  Document getDocument(java.lang.String docID)
          Returns the Document with the given ID
 Tokenizer getTokenizer()
          Returns the Tokenizer used on the documents in this text base.
abstract  int size()
          Returns the number of documents contained in this TextBase.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tokenizer

protected Tokenizer tokenizer
Constructor Detail

AbstractTextBase

public AbstractTextBase(Tokenizer t)
Method Detail

getTokenizer

public Tokenizer getTokenizer()
Description copied from interface: TextBase
Returns the Tokenizer used on the documents in this text base.

Specified by:
getTokenizer in interface TextBase

size

public abstract int size()
Description copied from interface: TextBase
Returns the number of documents contained in this TextBase.

Specified by:
size in interface TextBase

getDocument

public abstract Document getDocument(java.lang.String docID)
Description copied from interface: TextBase
Returns the Document with the given ID

Specified by:
getDocument in interface TextBase

documentSpanIterator

public abstract java.util.Iterator<Span> documentSpanIterator()
Description copied from interface: TextBase
Returns an iterator over the documents in this TextBase.

Specified by:
documentSpanIterator in interface TextBase

documentSpan

public abstract Span documentSpan(java.lang.String documentId)
Description copied from interface: TextBase
Looks up the document Span for the given documentId. Returns the Span or null if a document with documentId was not found in this TextBase.

Specified by:
documentSpan in interface TextBase