Package com.norconex.importer
Class ImporterRequest
- java.lang.Object
-
- com.norconex.importer.ImporterRequest
-
public class ImporterRequest extends Object
An Importer request, unique for each document to be imported. Anull
is accepted for the file or input stream. This can sometimes be useful when dealing with meta data only. Anull
reference can also be provided, in which case the file name will be used as the reference when a file is provided, or an empty string when dealing with an input stream. It is recommended to pass a reference that represents your document when possible (at least just the filename, including appropriate extension).- Since:
- 3.0.0
- Author:
- Pascal Essiembre
-
-
Constructor Summary
Constructors Constructor Description ImporterRequest(InputStream inputStream)
ImporterRequest(Path file)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object other)
String
getContentEncoding()
ContentType
getContentType()
Path
getFile()
InputStream
getInputStream()
Properties
getMetadata()
String
getReference()
int
hashCode()
ImporterRequest
setContentEncoding(String contentEncoding)
ImporterRequest
setContentType(ContentType contentType)
ImporterRequest
setMetadata(Properties metadata)
ImporterRequest
setReference(String reference)
String
toString()
-
-
-
Constructor Detail
-
ImporterRequest
public ImporterRequest(InputStream inputStream)
-
ImporterRequest
public ImporterRequest(Path file)
-
-
Method Detail
-
getContentType
public ContentType getContentType()
-
setContentType
public ImporterRequest setContentType(ContentType contentType)
-
getContentEncoding
public String getContentEncoding()
-
setContentEncoding
public ImporterRequest setContentEncoding(String contentEncoding)
-
getMetadata
public Properties getMetadata()
-
setMetadata
public ImporterRequest setMetadata(Properties metadata)
-
getReference
public String getReference()
-
setReference
public ImporterRequest setReference(String reference)
-
getInputStream
public InputStream getInputStream()
-
getFile
public Path getFile()
-
-