com.raritantechnologies.concept
Class Document

java.lang.Object
  extended bycom.raritantechnologies.concept.Document

public class Document
extends java.lang.Object

Maintains relationships between documents, keyword lists and other documents.


Developed by Raritan Technologies .

Author:
Ted Sullivan

Constructor Summary
Document(java.lang.String docName)
           
Document(java.lang.String docName, IResult res)
           
 
Method Summary
 void addKeyword(Keyword word)
           
 void addKeyword(java.lang.String word)
           
 void addRelatedDocument(Document doc)
           
 void addSentenceStart(int sentenceStart)
           
 void calculateRelatedDocuments(java.util.Map keywordDocumentList)
          map of keyword to Document object list
 double computeSimilarityScore(Document anotherDoc)
           
 boolean containsRelatedDocument(Document doc)
           
 java.util.List getCommonKeywords(Document anotherDoc)
           
 java.lang.String getDocumentText()
           
 int getKeywordCount(java.lang.String word)
           
 java.util.Collection getKeywordObjects()
           
 java.util.Set getKeywords()
           
 java.lang.String getName()
           
 java.util.List getRelatedDocuments()
           
 java.util.List getRelatedDocuments(java.lang.String keyword)
          returns a list of documents that share the specified keyword.
 IResult getResult()
           
 java.util.ArrayList getSentenceStarts()
           
 void initDocumentCountMap()
           
 void setDocumentText(java.lang.String documentText)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Document

public Document(java.lang.String docName)

Document

public Document(java.lang.String docName,
                IResult res)
Method Detail

getName

public java.lang.String getName()

getResult

public IResult getResult()

addKeyword

public void addKeyword(java.lang.String word)

addKeyword

public void addKeyword(Keyword word)

getKeywordCount

public int getKeywordCount(java.lang.String word)

getKeywords

public java.util.Set getKeywords()

getKeywordObjects

public java.util.Collection getKeywordObjects()

addSentenceStart

public void addSentenceStart(int sentenceStart)

getSentenceStarts

public java.util.ArrayList getSentenceStarts()

setDocumentText

public void setDocumentText(java.lang.String documentText)

getDocumentText

public java.lang.String getDocumentText()

initDocumentCountMap

public void initDocumentCountMap()

addRelatedDocument

public void addRelatedDocument(Document doc)

containsRelatedDocument

public boolean containsRelatedDocument(Document doc)

getRelatedDocuments

public java.util.List getRelatedDocuments()

getRelatedDocuments

public java.util.List getRelatedDocuments(java.lang.String keyword)
returns a list of documents that share the specified keyword.


getCommonKeywords

public java.util.List getCommonKeywords(Document anotherDoc)

computeSimilarityScore

public double computeSimilarityScore(Document anotherDoc)

calculateRelatedDocuments

public void calculateRelatedDocuments(java.util.Map keywordDocumentList)
map of keyword to Document object list