public class StreamBasedJsonDocumentSupplier extends AbstractDocumentJsonReader implements org.dice_research.topicmodeling.preprocessing.docsupplier.DocumentSupplier, Closeable
| Modifier and Type | Field and Description |
|---|---|
private org.dice_research.topicmodeling.utils.doc.Document |
document |
private int |
documentCount |
private static org.slf4j.Logger |
LOGGER |
private int |
nextDocumentId |
private com.google.gson.stream.JsonReader |
reader |
private static boolean |
USE_DOCUMENT_IDS_FROM_FILE_DEFAULT |
private boolean |
useDocumentIdsFromFile |
builder, gson| Modifier | Constructor and Description |
|---|---|
private |
StreamBasedJsonDocumentSupplier(com.google.gson.stream.JsonReader reader,
boolean useDocumentIdsFromFile) |
private |
StreamBasedJsonDocumentSupplier(com.google.gson.stream.JsonReader reader,
boolean useDocumentIdsFromFile,
com.google.gson.GsonBuilder builder) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
static StreamBasedJsonDocumentSupplier |
createReader(File file) |
static StreamBasedJsonDocumentSupplier |
createReader(File file,
boolean useDocumentIdsFromFile) |
static StreamBasedJsonDocumentSupplier |
createReader(File file,
boolean useDocumentIdsFromFile,
com.google.gson.GsonBuilder builder) |
static StreamBasedJsonDocumentSupplier |
createReader(Reader reader) |
static StreamBasedJsonDocumentSupplier |
createReader(Reader reader,
boolean useDocumentIdsFromFile) |
static StreamBasedJsonDocumentSupplier |
createReader(Reader reader,
boolean useDocumentIdsFromFile,
com.google.gson.GsonBuilder builder) |
static StreamBasedJsonDocumentSupplier |
createReader(String filename) |
static StreamBasedJsonDocumentSupplier |
createReader(String filename,
boolean useDocumentIdsFromFile) |
static StreamBasedJsonDocumentSupplier |
createReader(String filename,
boolean useDocumentIdsFromFile,
com.google.gson.GsonBuilder builder) |
org.dice_research.topicmodeling.utils.doc.Document |
getNextDocument() |
protected int |
getNextDocumentId() |
void |
setDocumentStartId(int documentStartId) |
readDocument, readDocumentprivate static final org.slf4j.Logger LOGGER
private static final boolean USE_DOCUMENT_IDS_FROM_FILE_DEFAULT
private boolean useDocumentIdsFromFile
private com.google.gson.stream.JsonReader reader
private org.dice_research.topicmodeling.utils.doc.Document document
private int documentCount
private int nextDocumentId
private StreamBasedJsonDocumentSupplier(com.google.gson.stream.JsonReader reader,
boolean useDocumentIdsFromFile)
private StreamBasedJsonDocumentSupplier(com.google.gson.stream.JsonReader reader,
boolean useDocumentIdsFromFile,
com.google.gson.GsonBuilder builder)
public static StreamBasedJsonDocumentSupplier createReader(String filename) throws FileNotFoundException
FileNotFoundExceptionpublic static StreamBasedJsonDocumentSupplier createReader(File file)
public static StreamBasedJsonDocumentSupplier createReader(Reader reader)
public static StreamBasedJsonDocumentSupplier createReader(String filename, boolean useDocumentIdsFromFile) throws FileNotFoundException
FileNotFoundExceptionpublic static StreamBasedJsonDocumentSupplier createReader(File file, boolean useDocumentIdsFromFile)
public static StreamBasedJsonDocumentSupplier createReader(Reader reader, boolean useDocumentIdsFromFile)
public static StreamBasedJsonDocumentSupplier createReader(String filename, boolean useDocumentIdsFromFile, com.google.gson.GsonBuilder builder) throws FileNotFoundException
FileNotFoundExceptionpublic static StreamBasedJsonDocumentSupplier createReader(File file, boolean useDocumentIdsFromFile, com.google.gson.GsonBuilder builder)
public static StreamBasedJsonDocumentSupplier createReader(Reader reader, boolean useDocumentIdsFromFile, com.google.gson.GsonBuilder builder)
public org.dice_research.topicmodeling.utils.doc.Document getNextDocument()
getNextDocument in interface org.dice_research.topicmodeling.preprocessing.docsupplier.DocumentSupplierpublic void setDocumentStartId(int documentStartId)
setDocumentStartId in interface org.dice_research.topicmodeling.preprocessing.docsupplier.DocumentSupplierprotected int getNextDocumentId()
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2015–2020. All rights reserved.