public class GenericDocument
A generic document. Contains fields and sub-documents.
To get access to convenient field getters for a specific document types, use class GenericDocumentLibrary
The usage is the following: val genericDocument: GenericDocument val wrapper = GenericDocumentLibrary.wrapperFromGenericDocument(genericDocument)
The wrapper variable will be the type of the corresponding document, for example class DeIdCardFront
class GenericDocumentLibrary,
class DeIdCardFrontpublic GenericDocument(@NotNull
io.scanbot.genericdocument.entity.GenericDocument.Type type,
@NotNull
java.util.List<io.scanbot.genericdocument.entity.Field> fields,
@NotNull
java.util.List<io.scanbot.genericdocument.entity.GenericDocument> children,
float confidence,
float confidenceWeight)
A generic document. Contains fields and sub-documents.
To get access to convenient field getters for a specific document types, use class GenericDocumentLibrary
The usage is the following: val genericDocument: GenericDocument val wrapper = GenericDocumentLibrary.wrapperFromGenericDocument(genericDocument)
The wrapper variable will be the type of the corresponding document, for example class DeIdCardFront
type - document typefields - a list of document fieldschildren - a list of sub-documentsconfidence - the average confidence in the accuracy of the document recognition resultconfidenceWeight - the weight of the confidence. Can be used to calculate the weighted average confidence of two documents.class GenericDocumentLibrary,
class DeIdCardFront@Nullable public Field fieldByTypeName(@NotNull java.lang.String name)
Returns a field given its local or common type name. Returns null if not found.
@NotNull
public java.util.List<io.scanbot.genericdocument.entity.Field> fieldsByTypeName(@NotNull
java.lang.String name)
Returns all fields given a local or common field type name.
@Nullable public GenericDocument childByDocumentType(@NotNull java.lang.String name)
Returns a sub-document given its document type name. Returns null if not found.
@NotNull public io.scanbot.genericdocument.entity.GenericDocument.Type getType()
document type
@NotNull public java.util.List<io.scanbot.genericdocument.entity.Field> getFields()
a list of document fields
@NotNull public java.util.List<io.scanbot.genericdocument.entity.GenericDocument> getChildren()
a list of sub-documents
public float getConfidence()
the average confidence in the accuracy of the document recognition result
public float getConfidenceWeight()
the weight of the confidence.
Can be used to calculate the weighted average confidence of two documents.
@NotNull public io.scanbot.genericdocument.entity.GenericDocument.Type component1()
document type
@NotNull public java.util.List<io.scanbot.genericdocument.entity.Field> component2()
a list of document fields
@NotNull public java.util.List<io.scanbot.genericdocument.entity.GenericDocument> component3()
a list of sub-documents
public float component4()
the average confidence in the accuracy of the document recognition result
public float component5()
the weight of the confidence.
Can be used to calculate the weighted average confidence of two documents.
@NotNull public GenericDocument copy(@NotNull io.scanbot.genericdocument.entity.GenericDocument.Type type, @NotNull java.util.List<io.scanbot.genericdocument.entity.Field> fields, @NotNull java.util.List<io.scanbot.genericdocument.entity.GenericDocument> children, float confidence, float confidenceWeight)
A generic document. Contains fields and sub-documents.
To get access to convenient field getters for a specific document types, use class GenericDocumentLibrary
The usage is the following: val genericDocument: GenericDocument val wrapper = GenericDocumentLibrary.wrapperFromGenericDocument(genericDocument)
The wrapper variable will be the type of the corresponding document, for example class DeIdCardFront
class GenericDocumentLibrary,
class DeIdCardFront@NotNull public java.lang.String toString()
public int hashCode()
public boolean equals(@Nullable
java.lang.Object p)