public class DocumentCollection extends Object
The DocumentCollection is represented by a file with one line for each ExternalDocument in the DocumentCollection. The line consist of either
| Constructor and Description |
|---|
DocumentCollection(String fileName)
create a new DocumentCollection based on file 'fileName'.
|
DocumentCollection(String directory,
String fileName)
create a new DocumentCollection based on file
fileName,
where the paths are relative to directory. |
| Modifier and Type | Method and Description |
|---|---|
ExternalDocument |
get(int i)
returns the i-th document in the Collection.
|
String |
getName()
returns the fileName (not the full path) of the Collection.
|
boolean |
open()
read the information about the Collection from an external file.
|
void |
save()
save all the Documents in the Collection.
|
void |
saveAs(String newFileName)
save the Collection to file 'newFileName', and then save all the
Documents in the Collection.
|
void |
saveAs(String newFileName,
String collectionDirectory) |
void |
saveAsAbsolute(String newFileName,
String collectionDirectory) |
int |
size()
returns the number of documents in the Collection.
|
public DocumentCollection(String fileName)
public boolean open()
public void save()
public void saveAs(String newFileName)
public void saveAs(String newFileName, String collectionDirectory)
parsedCollection - parseDir - public void saveAsAbsolute(String newFileName, String collectionDirectory)
parsedCollection - parseDir - public int size()
public ExternalDocument get(int i)
public String getName()
Copyright © 2016 New York University. All rights reserved.