public class Importer extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DOC_CONTENT_FAMILY |
static String |
DOC_CONTENT_TYPE |
static String |
DOC_REFERENCE |
static String |
IMPORTER_PREFIX |
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 |
---|---|
boolean |
importDocument(File input,
ContentType contentType,
File output,
Properties metadata,
String docReference)
Imports a document according to the importer configuration.
|
boolean |
importDocument(File input,
File output,
Properties metadata)
Imports a document according to the importer configuration.
|
boolean |
importDocument(InputStream input,
ContentType contentType,
Writer output,
Properties metadata,
String docReference)
Imports a document according to the importer configuration.
|
boolean |
importDocument(InputStream input,
Writer output,
Properties metadata)
Imports a document according to the importer configuration.
|
static void |
main(String[] args)
Invokes the importer from the command line.
|
public static final String IMPORTER_PREFIX
public static final String DOC_REFERENCE
public static final String DOC_CONTENT_TYPE
public static final String DOC_CONTENT_FAMILY
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 boolean importDocument(InputStream input, Writer output, Properties metadata) throws IOException
input
- document inputoutput
- document outputmetadata
- the document starting metadatatrue
if the document has successfully been imported,
false
if the document was rejected (i.e. filtered)IOException
- problem importing documentpublic boolean importDocument(InputStream input, ContentType contentType, Writer output, Properties metadata, String docReference) throws IOException
input
- document inputcontentType
- document content-typeoutput
- document outputmetadata
- the document starting metadatadocReference
- document reference (e.g. URL, file path, etc)true
if the document has successfully been imported,
false
if the document was rejected (i.e. filtered)IOException
- problem importing documentpublic boolean importDocument(File input, File output, Properties metadata) throws IOException
input
- document inputoutput
- document outputmetadata
- the document starting metadatatrue
if the document has successfully been imported,
false
if the document was rejected (i.e. filtered)IOException
- problem importing documentpublic boolean importDocument(File input, ContentType contentType, File output, Properties metadata, String docReference) throws IOException
input
- document inputcontentType
- document content-typeoutput
- document outputmetadata
- the document starting metadatadocReference
- document reference (e.g. URL, file path, etc)true
if the document has successfully been imported,
false
if the document was rejected (i.e. filtered)IOException
- problem importing documentCopyright © 2009-2014 Norconex Inc.. All Rights Reserved.