public class WARCImporter extends Object
| Constructor and Description |
|---|
WARCImporter(File stateDir,
File repoDir,
String persistedIndexName,
String namespace,
String auid)
Constructor when using a new local repository.
|
WARCImporter(LockssRepository repository,
String namespace,
String auid)
Constructor when using an existing repository.
|
WARCImporter(URL url,
String user,
String password,
String namespace,
String auid)
Constructor when using a new REST service repository.
|
| Modifier and Type | Method and Description |
|---|---|
LockssRepository |
getRepository()
Provides the repository used by this object.
|
LockssRepository |
importWARC(File warc)
Imports into the repository a WARC file.
|
static void |
main(String[] args)
Main entry as a standalone program.
|
public WARCImporter(LockssRepository repository, String namespace, String auid)
repository - A LockssRepository with the existing repository where to import
the WARC file.namespace - A String with the target namespace of artifacts imported from the WARC file.auid - A String with the Archival Unit identifier linked to the imported
WARC file.public WARCImporter(File stateDir, File repoDir, String persistedIndexName, String namespace, String auid) throws IOException
repoDir - A File with the directory of the local repository to be used.persistedIndexName - A String with the name of the file where to persist the repository
index.namespace - A String with the target namespace of artifacts imported from the WARC file.auid - A String with the Archival Unit identifier linked to the imported
WARC file.IOException - if there are problems creating the local repository.public WARCImporter(URL url, String user, String password, String namespace, String auid) throws IOException
url - A URL with the location of the repository REST service to be used.user - A String with the name of the user to use to access the REST
service repository.password - A String with the password of the user to use to access the REST
service repository.namespace - A String with the target namespace of artifacts imported from the WARC file.auid - A String with the Archival Unit identifier linked to the imported
WARC file.IOExceptionpublic static void main(String[] args) throws org.apache.commons.cli.ParseException, MalformedURLException, IOException
args - A String[] with the command line arguments.org.apache.commons.cli.ParseException - if received.MalformedURLException - if received.IOException - if received.public LockssRepository importWARC(File warc) throws IOException
warc - A File with the specification of the WARC file to be imported.IOException - if there are problems importing the WARC file.public LockssRepository getRepository()
Copyright © 2000–2023 LOCKSS Program. All rights reserved.