public abstract class AbstractImportManager extends Object implements ImportManager
| Modifier and Type | Field and Description |
|---|---|
protected Actioner |
actioner |
protected boolean |
allowUpdates |
protected Integer |
currentPosition |
protected com.tinkerpop.frames.FramedGraph<?> |
framedGraph |
protected Class<? extends ItemImporter> |
importerClass |
protected PermissionScope |
permissionScope |
protected boolean |
tolerant |
| Constructor and Description |
|---|
AbstractImportManager(com.tinkerpop.frames.FramedGraph<?> graph,
PermissionScope scope,
Actioner actioner,
boolean tolerant,
boolean allowUpdates,
Class<? extends ItemImporter> importerClass)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
ImportLog |
importArchive(org.apache.commons.compress.archivers.ArchiveInputStream stream,
String logMessage)
Import multiple items via an archive input stream.
|
ImportLog |
importFile(String filePath,
String logMessage)
Import a file by specifying its path.
|
ImportLog |
importFiles(List<String> filePaths,
String logMessage)
Import multiple files via a list of file paths.
|
protected abstract void |
importInputStream(InputStream stream,
String tag,
ActionManager.EventContext context,
ImportLog log)
Import an InputStream with an event context.
|
ImportLog |
importInputStream(InputStream stream,
String tag,
String logMessage)
Import an item via an input stream.
|
boolean |
isTolerant()
Determine if the importer is in tolerant mode.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitimportInputStreamprotected final com.tinkerpop.frames.FramedGraph<?> framedGraph
protected final PermissionScope permissionScope
protected final Actioner actioner
protected final boolean tolerant
protected final boolean allowUpdates
protected Integer currentPosition
protected final Class<? extends ItemImporter> importerClass
public AbstractImportManager(com.tinkerpop.frames.FramedGraph<?> graph,
PermissionScope scope,
Actioner actioner,
boolean tolerant,
boolean allowUpdates,
Class<? extends ItemImporter> importerClass)
graph - the framed graphscope - the permission scopeactioner - the actionertolerant - allow individual items to fail validation without
failing an entire batchallowUpdates - allow this import manager to update data items as well
as create themimporterClass - the class of the item importer objectpublic boolean isTolerant()
public ImportLog importFile(String filePath, String logMessage) throws IOException, InputParseError, ValidationError
ImportManagerimportFile in interface ImportManagerfilePath - path to the file to importlogMessage - an optional message to describe the importIOException - when reading or writing files failsInputParseError - when parsing the file failsValidationError - when the content of the file is invalidpublic ImportLog importInputStream(InputStream stream, String tag, String logMessage) throws IOException, InputParseError, ValidationError
ImportManagerimportInputStream in interface ImportManagerstream - the input streamtag - an optional tag identifying the source of the streamlogMessage - an optional log message to describe the importIOException - when reading or writing failsInputParseError - when parsing the stream data failsValidationError - when the content of the file is invalidpublic ImportLog importFiles(List<String> filePaths, String logMessage) throws IOException, ValidationError, InputParseError
ImportManagerimportFiles in interface ImportManagerfilePaths - a list of file pathslogMessage - an optional log message to describe the importIOException - when reading or writing failsValidationError - when the content of the file is invalidInputParseError - when parsing the stream data failspublic ImportLog importArchive(org.apache.commons.compress.archivers.ArchiveInputStream stream, String logMessage) throws IOException, InputParseError, ValidationError
ImportManagerimportArchive in interface ImportManagerstream - the archive input streamlogMessage - an optional log message to describe the importIOException - when reading or writing failsInputParseError - when parsing the stream data failsValidationError - when the content of the file is invalidprotected abstract void importInputStream(InputStream stream, String tag, ActionManager.EventContext context, ImportLog log) throws IOException, ValidationError, InputParseError
stream - the InputStream to importtag - an optional tag identifying the source of the streamcontext - the event that this import is part oflog - an import log to write toIOExceptionValidationErrorInputParseErrorCopyright © 2018 The European Holocaust Research Infrastructure (EHRI). All rights reserved.