|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gov.nist.nlpir.irf.document.DocCollection
This class models a document collection
A document collection contains documents and associated
information such: what converter and indexing modalities
were used to create the documents and index them, what
indexes were created and where they are located, etc.
Note: The default indexing technique for all indexing features
is set here - see method setDefaultIndexingModalities().
Field Summary | |
private java.lang.String |
converterClassName
The name of the converter used to create the documents |
private java.lang.String |
description
A brief description of the collection |
private java.lang.String |
docClassName
The name of the class of documents in the collection |
private java.util.Vector |
documents
The documents that make up this collection |
private java.util.Dictionary |
indexes
The indexes created for this collection |
private IndexingModalities |
indexingModalities
The indexing modalities that guide indexing of the documents |
private java.lang.String |
indexLocation
Information about the location of indexes for the collection Must be set by constructor so existence of DocCollection implies knowledge of index location information. |
private boolean |
modified
Flag indicating whether this collection has been modified since it was loaded |
private java.lang.String |
name
The collection's name |
private boolean |
proxyRefsCounted
Flag, true if refs to proxy docs and indexes can be added to the table of in-memory proxies |
(package private) static long |
serialVersionUID
serial version universal id - put here so Java does not insert one which may change due to revisions and make it impossible to deserialize earlier versions of serialized objects |
Constructor Summary | |
DocCollection()
No-argument constructor |
|
DocCollection(java.lang.String n,
java.lang.String d,
java.lang.String l)
Constructor - initializes the collection with name, description, and index location information as specified |
Method Summary | |
void |
addDoc(ProxyDocument doc)
Adds a document to the collection - if the other documents have been made persistent then the added document must be made persistent before the reference to it is counted. |
void |
addIndex(ProxyIndex index)
Adds an index to the list of those associated with this collection |
void |
addIndexingModalityUnit(IndexingModalityUnit modalityUnit)
Adds an indexing modality unit |
void |
editIndexingModalities(DocumentIntrf r)
Allows indexing modalities to be added/deleted by the end user |
protected void |
finalize()
Cleans up table of references to proxies prior to garbage collection If direct references to proxies or Java containers of references have been registered, then unregister them. |
ProxyIndex |
findIndex(java.lang.String indexname)
Looks up an index by name in the dictionary of available indexes |
java.lang.String |
getConverterClassName()
Gets the name of the class for the document objects in this collection |
java.lang.String |
getDescription()
Gets the description of the collection |
java.lang.String |
getDocClassName()
Gets the name of the class for the document objects in this collection |
void |
getFirstInstances()
Removes any proxies duplicated during deserialization - replacing them with references to a single instance of the proxy. |
IndexingModalities |
getIndexingModalities()
Gets the indexing modalities for this collection |
java.util.Enumeration |
getIndexIter()
Gets an enumeration to allow iteration over the available indexes |
java.lang.String |
getIndexLocation()
Gets the collection-level location of the indexes for this collection |
boolean |
getModified()
Tests whether the collection has been modified since last save |
java.lang.String |
getName()
Gets the name of the collection |
int |
getNumDocs()
Returns the number of documents in the collection |
void |
present()
Displays info on contents of the document collection |
void |
save()
Save the latest version of the documents, indexes, and indexing modalities associated with this collection. |
void |
setConverterClassName(java.lang.String name)
Sets the name of the class of the converter for this collection |
void |
setDefaultIndexingModalities(DocumentIntrf r)
Sets the indexing modalities based on supplied sample (proxy) document using reflection. |
void |
setDescription(java.lang.String desc)
Sets the description of the collection |
void |
setDocClassName(java.lang.String name)
Sets the name of the class for the document objects in this collection |
void |
setDocuments(java.util.Vector docs)
Sets the documents |
void |
setIndexingModalities(IndexingModalities IMs)
Sets indexing modalities for this collection |
private void |
setIndexLocation(java.lang.String loc)
Sets the collection-level location of the indexes for this collection |
void |
setName(java.lang.String n)
Sets the name of the collection |
Methods inherited from class java.lang.Object |
|
Field Detail |
static final long serialVersionUID
private java.util.Vector documents
private java.lang.String name
private java.lang.String description
private java.lang.String docClassName
private java.lang.String converterClassName
private java.lang.String indexLocation
private IndexingModalities indexingModalities
private java.util.Dictionary indexes
private boolean proxyRefsCounted
private transient boolean modified
Constructor Detail |
public DocCollection()
public DocCollection(java.lang.String n, java.lang.String d, java.lang.String l)
n
- the initial name for the collectiond
- the initial description for the collectionl
- information about the location of the collection index(s)Method Detail |
public final boolean getModified()
public final int getNumDocs()
public final java.lang.String getName()
public final void setName(java.lang.String n)
public void addIndex(ProxyIndex index)
index
- the index to be addedpublic java.util.Enumeration getIndexIter()
public ProxyIndex findIndex(java.lang.String indexname)
indexname
- the name of the index to be looked uppublic void setDocuments(java.util.Vector docs)
docs
- a vector of documents associated with this collectionpublic void addDoc(ProxyDocument doc)
public final void setDescription(java.lang.String desc)
public final java.lang.String getDescription()
public final void setDocClassName(java.lang.String name)
public final java.lang.String getDocClassName()
public final void setConverterClassName(java.lang.String name)
public final java.lang.String getConverterClassName()
private final void setIndexLocation(java.lang.String loc)
loc
- the index location info stringpublic final java.lang.String getIndexLocation()
public final void setIndexingModalities(IndexingModalities IMs)
public final IndexingModalities getIndexingModalities()
public final void addIndexingModalityUnit(IndexingModalityUnit modalityUnit)
public void setDefaultIndexingModalities(DocumentIntrf r)
r
- sample documentpublic void editIndexingModalities(DocumentIntrf r)
r
- sample documentpublic void getFirstInstances()
public void save()
public void present()
protected void finalize()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |