|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgov.nih.nlm.nls.nlp.textfeatures.MmObject
gov.nih.nlm.nls.nlp.textfeatures.Collection
public final class Collection
Collection is a collection of documents. Tue Mar 06 12:53:20 EST 2001, divita Initial Version
| Field Summary |
|---|
| Fields inherited from class gov.nih.nlm.nls.nlp.textfeatures.MmObject |
|---|
serialVersionUID |
| Constructor Summary | |
|---|---|
Collection()
This is a constructor for Collection. |
|
Collection(gov.nih.nlm.nls.utils.GlobalBehavior pSettings)
This is a constructor for Collection. |
|
Collection(java.lang.String pFileName)
Deprecated. |
|
Collection(java.lang.StringBuffer pCollectionText)
This is a constructor for Collection. |
|
Collection(java.lang.String pFileName,
gov.nih.nlm.nls.utils.GlobalBehavior pSettings)
This is a constructor for Collection. |
|
| Method Summary | |
|---|---|
void |
addDocument(Document pDocument)
Method addDocument |
void |
countWordFrequencies(Document pDocument)
Method countWordFrequencies aggregates document frequencies for for words |
java.lang.String |
displayContent(gov.nih.nlm.nls.utils.GlobalBehavior pSettings)
Method displayContent diplays the relevant content for this object. |
void |
displayContentToOut(gov.nih.nlm.nls.utils.GlobalBehavior pSettings)
Method displayContentToOut diplays the relevant content for this object. |
java.io.BufferedReader |
getBufferedReader()
Method getBufferedReader returns the buffered reader There is no automatic method to close the buffer when it is not used anymore. |
java.io.File[] |
getCollectionFiles()
Method getCollectionFiles |
void |
getCollectionFrequencyList()
Method getCollectionFrequencyList prints out to the settings stream the corpus frequencies for each word in the corpus. |
java.util.Vector |
getDocuments()
Method getDocuments retrieves the set of Documents associated with this collection |
gov.nih.nlm.nls.utils.GlobalBehavior |
getSettings()
Method getSettings |
void |
init(java.lang.String pCollection)
Method init |
boolean |
isInteractive()
Method isInteractive returns true if the input is coming from standard input. |
static void |
main(java.lang.String[] argv)
This is a test main, whose purpose is to test the functionality of each method developed for this class. |
java.lang.String |
peek()
Method peek returns the first X number of characters of the collection. |
(package private) java.lang.String |
readCollectionContent(java.lang.String pFileName)
Method readCollectionContent reads in the contents of a collection from a file or from standard input. |
java.io.File[] |
readDirectoryContent(java.io.File pFileName)
Method readDirectoryContent returns a File[] of (abstract) files |
void |
setBufferedReader(java.lang.String pFileName)
Method setBufferedReader opens the fileStream of the file for this collection. |
void |
setDocuments(java.util.Vector pDocuments)
Method setDocuments |
void |
setGlobalBehaviors(gov.nih.nlm.nls.utils.GlobalBehavior pSettings)
Method setGlobalBehaviors |
| Methods inherited from class gov.nih.nlm.nls.nlp.textfeatures.MmObject |
|---|
appendOriginalString, getCharOffset, getId, getLabel, getOriginalString, getSpan, getStrippedString, getTrimmedString, setId, setLabel, setOriginalString, setSpan, setStrippedString, setTrimmedString, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Collection()
throws java.lang.Exception
java.lang.Exceptionpublic Collection(java.lang.StringBuffer pCollectionText)
pCollectionText -
public Collection(java.lang.String pFileName)
throws java.lang.Exception
pFileName - The full path to a file to be read in.
java.lang.Exception
public Collection(java.lang.String pFileName,
gov.nih.nlm.nls.utils.GlobalBehavior pSettings)
throws java.lang.Exception
pFileName - The full path to a file to be read in.pSettings -
java.lang.Exception
public Collection(gov.nih.nlm.nls.utils.GlobalBehavior pSettings)
throws java.lang.Exception
pSettings -
java.lang.Exception| Method Detail |
|---|
public void init(java.lang.String pCollection)
pCollection - public void setDocuments(java.util.Vector pDocuments)
pDocuments - a Vector of Documentpublic void addDocument(Document pDocument)
pDocument - public java.util.Vector getDocuments()
final java.lang.String readCollectionContent(java.lang.String pFileName)
throws java.lang.Exception
pFileName - The full Pathname of the file, or null (for standard input)
java.lang.Exceptionpublic void displayContentToOut(gov.nih.nlm.nls.utils.GlobalBehavior pSettings)
pSettings - public java.lang.String displayContent(gov.nih.nlm.nls.utils.GlobalBehavior pSettings)
pSettings -
public boolean isInteractive()
public void setBufferedReader(java.lang.String pFileName)
throws java.lang.Exception
pFileName -
java.lang.Exceptionpublic java.io.BufferedReader getBufferedReader()
public java.lang.String peek()
public java.io.File[] readDirectoryContent(java.io.File pFileName)
pFileName -
public java.io.File[] getCollectionFiles()
public void countWordFrequencies(Document pDocument)
pDocument - public void getCollectionFrequencyList()
public void setGlobalBehaviors(gov.nih.nlm.nls.utils.GlobalBehavior pSettings)
pSettings - public gov.nih.nlm.nls.utils.GlobalBehavior getSettings()
public static final void main(java.lang.String[] argv)
argv - The command line input, tokenized
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||