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.
|
Importer(ImporterConfig importerConfig,
EventManager eventManager)
Creates a new importer with the given configuration.
|
Modifier and Type | Method and Description |
---|---|
static Importer |
get() |
EventManager |
getEventManager()
Gets the event manager.
|
ImporterConfig |
getImporterConfig()
Gets the importer configuration.
|
ImporterResponse |
importDocument(Doc document)
Imports a document according to the importer configuration.
|
ImporterResponse |
importDocument(File file,
ContentType contentType,
String contentEncoding,
Properties metadata,
String reference)
Deprecated.
Since 3.0.0 use
importDocument(ImporterRequest) |
ImporterResponse |
importDocument(File input,
Properties metadata)
Deprecated.
Since 3.0.0 use
importDocument(ImporterRequest) |
ImporterResponse |
importDocument(ImporterRequest req)
Imports a document according to the importer configuration.
|
ImporterResponse |
importDocument(InputStream input,
ContentType contentType,
String contentEncoding,
Properties metadata,
String reference)
Deprecated.
Since 3.0.0 use
importDocument(ImporterRequest) |
ImporterResponse |
importDocument(InputStream input,
Properties metadata,
String reference)
Deprecated.
Since 3.0.0 use
importDocument(ImporterRequest) |
static void |
main(String[] args)
Invokes the importer from the command line.
|
public Importer()
public Importer(ImporterConfig importerConfig)
importerConfig
- Importer configurationpublic Importer(ImporterConfig importerConfig, EventManager eventManager)
importerConfig
- Importer configurationeventManager
- event managerpublic static Importer get()
public static void main(String[] args)
args
- Invoke it once without any arguments to get a
list of command-line options.public ImporterConfig getImporterConfig()
public EventManager getEventManager()
public ImporterResponse importDocument(ImporterRequest req)
req
- request instructions for importingpublic ImporterResponse importDocument(Doc document)
document
- the document to import@Deprecated public ImporterResponse importDocument(InputStream input, Properties metadata, String reference)
importDocument(ImporterRequest)
input
- document inputmetadata
- the document starting metadatareference
- document reference (e.g. URL, file path, etc)@Deprecated public ImporterResponse importDocument(File input, Properties metadata)
importDocument(ImporterRequest)
input
- document inputmetadata
- the document starting metadata@Deprecated public ImporterResponse importDocument(File file, ContentType contentType, String contentEncoding, Properties metadata, String reference)
importDocument(ImporterRequest)
file
- document inputcontentType
- document content-typecontentEncoding
- document content encodingmetadata
- the document starting metadatareference
- document reference (e.g. URL, file path, etc)@Deprecated public ImporterResponse importDocument(InputStream input, ContentType contentType, String contentEncoding, Properties metadata, String reference)
importDocument(ImporterRequest)
input
- an input streamcontentType
- document content-typecontentEncoding
- document content encodingmetadata
- the document starting metadatareference
- document reference (e.g. URL, file path, etc)Copyright © 2009–2023 Norconex Inc.. All rights reserved.