-
- All Implemented Interfaces:
-
android.os.Parcelable
public final class GenericDocument implements Parcelable
A generic document. Contains fields and sub-documents.
To get access to convenient field getters for a specific document types, use 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 DeIdCardFront
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classGenericDocument.TypeDocument type
-
Field Summary
Fields Modifier and Type Field Description private final GenericDocument.Typetypeprivate final List<Field>fieldsprivate final List<GenericDocument>childrenprivate final Floatconfidenceprivate final FloatconfidenceWeight
-
Constructor Summary
Constructors Constructor Description GenericDocument(GenericDocument.Type type, List<Field> fields, List<GenericDocument> children, Float confidence, Float confidenceWeight)
-
Method Summary
Modifier and Type Method Description final GenericDocument.TypegetType()final List<Field>getFields()final List<GenericDocument>getChildren()final FloatgetConfidence()final FloatgetConfidenceWeight()final FieldfieldByTypeName(String name)Returns a field given its local or common type name. final List<Field>fieldsByTypeName(String name)Returns all fields given a local or common field type name. final GenericDocumentchildByDocumentType(String name)Returns a sub-document given its document type name. -
-
Constructor Detail
-
GenericDocument
GenericDocument(GenericDocument.Type type, List<Field> fields, List<GenericDocument> children, Float confidence, Float confidenceWeight)
-
-
Method Detail
-
getType
final GenericDocument.Type getType()
-
getChildren
final List<GenericDocument> getChildren()
-
getConfidence
final Float getConfidence()
-
getConfidenceWeight
final Float getConfidenceWeight()
-
fieldByTypeName
final Field fieldByTypeName(String name)
Returns a field given its local or common type name. Returns null if not found.
-
fieldsByTypeName
final List<Field> fieldsByTypeName(String name)
Returns all fields given a local or common field type name.
-
childByDocumentType
final GenericDocument childByDocumentType(String name)
Returns a sub-document given its document type name. Returns null if not found.
-
-
-
-