gov.llnl.ontology.text
Class SimpleDocument

java.lang.Object
  extended by gov.llnl.ontology.text.SimpleDocument
All Implemented Interfaces:
Document

public class SimpleDocument
extends Object
implements Document

A simple struct based implementation of a Document.

Author:
Keith Stevens

Constructor Summary
SimpleDocument(String corpusName, String docText, String originalText, String key, long id, String title, Set<String> categories)
          Constructs a new SimpleDocument using the given data values.
 
Method Summary
 Set<String> categories()
          Returns the set of categories that this document has, if any.
 long id()
          Returns a unique identifier for this document.
 String key()
          Returns a string name of this document.
 String originalText()
          Returns the original, uncleaned text.
 String rawText()
          Returns the raw text of the corpus.
 String sourceCorpus()
          Returns the name of the source corpus.
 String title()
          Returns the title of this document, if any exists.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleDocument

public SimpleDocument(String corpusName,
                      String docText,
                      String originalText,
                      String key,
                      long id,
                      String title,
                      Set<String> categories)
Constructs a new SimpleDocument using the given data values.

Parameters:
corpusName - the name of the corpus that this document came from
docText - the cleaned text for this document
key - A string based key for this document
id - A unique identifier for this key
title - A title for the document
Method Detail

sourceCorpus

public String sourceCorpus()
Returns the name of the source corpus.

Specified by:
sourceCorpus in interface Document

rawText

public String rawText()
Returns the raw text of the corpus.

Specified by:
rawText in interface Document

originalText

public String originalText()
Returns the original, uncleaned text.

Specified by:
originalText in interface Document

key

public String key()
Returns a string name of this document.

Specified by:
key in interface Document

id

public long id()
Returns a unique identifier for this document.

Specified by:
id in interface Document

title

public String title()
Returns the title of this document, if any exists.

Specified by:
title in interface Document

categories

public Set<String> categories()
Returns the set of categories that this document has, if any.

Specified by:
categories in interface Document


Copyright © 2010-2011. All Rights Reserved.