public class Importer extends Object
Constructor and Description |
---|
Importer()
Creates a new importer with default configuration.
|
Importer(ImporterConfig importerConfig)
Creates a new importer with the given configuration.
|
Modifier and Type | Method and Description |
---|---|
CachedStreamFactory |
getStreamFactory() |
ImporterResponse |
importDocument(File file,
ContentType contentType,
String contentEncoding,
Properties metadata,
String reference)
Imports a document according to the importer configuration.
|
ImporterResponse |
importDocument(File input,
Properties metadata)
Imports a document according to the importer configuration.
|
ImporterResponse |
importDocument(InputStream input,
ContentType contentType,
String charEncoding,
Properties metadata,
String reference) |
ImporterResponse |
importDocument(InputStream input,
Properties metadata,
String reference)
Imports a document according to the importer configuration.
|
static void |
main(String[] args)
Invokes the importer from the command line.
|
public Importer()
public Importer(ImporterConfig importerConfig)
importerConfig
- Importer configurationpublic static void main(String[] args)
args
- Invoke it once without any arguments to get a
list of command-line options.public CachedStreamFactory getStreamFactory()
public ImporterResponse importDocument(InputStream input, Properties metadata, String reference)
input
- document inputmetadata
- the document starting metadatareference
- document reference (e.g. URL, file path, etc)public ImporterResponse importDocument(File input, Properties metadata) throws ImporterException
input
- document inputmetadata
- the document starting metadataImporterException
- problem importing documentpublic ImporterResponse importDocument(File file, ContentType contentType, String contentEncoding, Properties metadata, String reference) throws ImporterException
file
- document inputcontentType
- document content-typecontentEncoding
- document content encodingmetadata
- the document starting metadatareference
- document reference (e.g. URL, file path, etc)ImporterException
- problem importing documentpublic ImporterResponse importDocument(InputStream input, ContentType contentType, String charEncoding, Properties metadata, String reference)
Copyright © 2009–2021 Norconex Inc.. All rights reserved.