Record Class DocumentContent
java.lang.Object
java.lang.Record
com.blueriq.component.api.documents.extraction.DocumentContent
- Record Components:
text- the text content of the documentimages- the image content of the documentdocumentType- the type of content in the document
public record DocumentContent(String text, List<DocumentImage> images, DocumentType documentType)
extends Record
Represents the content extracted from a document.
-
Constructor Summary
ConstructorsConstructorDescriptionDocumentContent(String text) Creates a newDocumentContentinstance for a text-only document.DocumentContent(String text, List<DocumentImage> images) Creates a newDocumentContentinstance for a document containing both text and images.DocumentContent(String text, List<DocumentImage> images, DocumentType documentType) Creates a newDocumentContentinstance.DocumentContent(List<DocumentImage> images) Creates a newDocumentContentinstance for an image-only document. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedocumentTyperecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.images()Returns an unmodifiable list of images.text()Returns the value of thetextrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DocumentContent
Creates a newDocumentContentinstance.- Parameters:
text- the text contentimages- the image contentdocumentType- the document type
-
DocumentContent
Creates a newDocumentContentinstance for a text-only document.- Parameters:
text- the text content
-
DocumentContent
Creates a newDocumentContentinstance for an image-only document.- Parameters:
images- the image content
-
DocumentContent
Creates a newDocumentContentinstance for a document containing both text and images.- Parameters:
text- the text contentimages- the image content
-
-
Method Details
-
images
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
text
-
documentType
Returns the value of thedocumentTyperecord component.- Returns:
- the value of the
documentTyperecord component
-