public abstract class Document extends Object
Learn more
| Modifier and Type | Method and Description |
|---|---|
static Document |
createFromFile(String filePath)
Creates a document from a file.
|
static Document |
createFromStream(String documentKey,
Date modificationDate,
String extension,
InputStream stream)
Creates a document from a stream.
|
static Document |
createFromStructure(String documentKey,
Date modificationDate,
DocumentField[] fields)
Creates a document from a structure that is an array of text fields.
|
static Document |
createLazy(DocumentSourceKind documentSourceKind,
String documentKey,
IDocumentLoader documentLoader)
Creates a lazy-loaded document.
|
DocumentField[] |
getAdditionalFields()
Gets the additional fields for the document.
|
String[] |
getAttributes()
Gets the attributes of the document.
|
abstract String |
getDocumentKey()
Gets the document key that is used to identify the document within an index.
|
abstract DocumentSourceKind |
getDocumentSourceKind()
Gets the document source kind.
|
abstract String |
getExtension()
Gets the extension used for this document type.
|
abstract Date |
getModificationDate()
Gets the last modification date of the document.
|
abstract boolean |
isLazy()
Gets a value indicating whether the document is loaded as needed or not.
|
void |
setAdditionalFields(DocumentField[] value)
Sets the additional fields for the document.
|
void |
setAttributes(String[] value)
Sets the attributes of the document.
|
String |
toString()
Returns a
java.lang.String that represents the current Document. |
public static Document createFromFile(String filePath)
filePath - The document file path.public static Document createFromStream(String documentKey, Date modificationDate, String extension, InputStream stream)
documentKey - The document key.modificationDate - The document modification date.extension - The document extension.stream - The document stream.public static Document createFromStructure(String documentKey, Date modificationDate, DocumentField[] fields)
documentKey - The document key.modificationDate - The document modification date.fields - The document fields.public static Document createLazy(DocumentSourceKind documentSourceKind, String documentKey, IDocumentLoader documentLoader)
documentSourceKind - The document source kind. This value must match the kind of the loaded document.documentKey - The document key. This value must match the key of the loaded document.documentLoader - The document loader.public DocumentField[] getAdditionalFields()
public String[] getAttributes()
public abstract String getDocumentKey()
public abstract DocumentSourceKind getDocumentSourceKind()
public abstract String getExtension()
public abstract Date getModificationDate()
public abstract boolean isLazy()
public void setAdditionalFields(DocumentField[] value)
value - The additional fields for the document.public void setAttributes(String[] value)
value - The attributes of the document.Copyright © 2026. All rights reserved.