public class JsonOnlineDumpFile extends WmfDumpFile
MwDumpFile.DateComparator
dateStamp, DUMP_SITE_BASE_URL, projectName
Constructor and Description |
---|
JsonOnlineDumpFile(String dateStamp,
String projectName,
WebResourceFetcher webResourceFetcher,
DirectoryManager dumpfileDirectoryManager)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
fetchIsDone()
Finds out if the dump is ready.
|
DumpContentType |
getDumpContentType()
Returns information about the content of the dump.
|
InputStream |
getDumpFileStream()
Returns an input stream that provides access to the (uncompressed) text
content of the dump file.
|
void |
prepareDumpFile()
Prepares the dump file for access via
MwDumpFile.getDumpFileStream() or
MwDumpFile.getDumpFileReader() . |
getDateStamp, getDateStampFromDumpFileDirectoryName, getDumpFileCompressionType, getDumpFileDirectoryName, getDumpFileName, getDumpFilePostfix, getDumpFileReader, getDumpFileWebDirectory, getProjectName, isAvailable, isRevisionDumpFile, toString
public JsonOnlineDumpFile(String dateStamp, String projectName, WebResourceFetcher webResourceFetcher, DirectoryManager dumpfileDirectoryManager)
dateStamp
- dump date in format YYYYMMDDprojectName
- project name string (e.g. "wikidatawiki")webResourceFetcher
- object to use for accessing the webdumpfileDirectoryManager
- the directory manager for the directory where dumps should be
downloaded topublic DumpContentType getDumpContentType()
MwDumpFile
public InputStream getDumpFileStream() throws IOException
MwDumpFile
It is important to close the stream after use.
IOException
- if the dump file contents could not be accessedpublic void prepareDumpFile() throws IOException
MwDumpFile
MwDumpFile.getDumpFileStream()
or
MwDumpFile.getDumpFileReader()
. In particular, this will download any
remote files.IOException
- if there was a problem preparing the filesprotected boolean fetchIsDone()
WmfDumpFile
fetchIsDone
in class WmfDumpFile
Copyright © 2014–2024 Wikidata Toolkit Developers. Generated from source code published under the Apache License 2.0. For more information, see the Wikidata Toolkit homepage