eu.id3.document

## Class DocumentAuthenticator

- java.lang.Object
- - eu.id3.document.DocumentAuthenticator

- All Implemented Interfaces:
    java.io.Serializable, java.lang.AutoCloseable

      public class DocumentAuthenticator
      extends java.lang.Object
      implements java.lang.AutoCloseable, java.io.Serializable

  Verifies the authenticity of a document using security features such as holograms.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DocumentAuthenticator()` Creates a new instance of the DocumentAuthenticator class.
    `DocumentAuthenticator(long handle)` Creates a new instance of the DocumentAuthenticator class.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `appendFrame(DocumentImage image)` Appends a frame in the FIFO buffer.
    `HologramAuthenticationResultList` | `authenticateHolograms()` Authenticates the holograms on the current frame buffer.
    `void` | `close()` Releases all resources used by this DocumentAuthenticator.
    `protected void` | `finalize()` Finalizer for this class.
    `java.lang.String` | `getDocumentName()` Gets the document type to authenticate.
    `long` | `getHandle()` Gets the native handle.
    `int` | `getTemporalWindowSize()` Gets the size of the FIFO frame buffer, used for processing.
    `boolean` | `isFull()` Checks if the frame buffer is full and ready to authenticate for all holograms.
    `void` | `setDocumentName(java.lang.String documentName)` Sets the document type to authenticate.
    `void` | `setTemporalWindowSize(int temporalWindowSize)` Sets the size of the FIFO frame buffer, used for processing.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DocumentAuthenticator

          public DocumentAuthenticator()
                                throws DocumentException

      Creates a new instance of the DocumentAuthenticator class.
      Throws:
        `DocumentException` - An error has occurred during Document Library execution.

    - #### DocumentAuthenticator

          public DocumentAuthenticator(long handle)
                                throws DocumentException

      Creates a new instance of the DocumentAuthenticator class.
      Parameters:
        `handle` - Handle to the DocumentAuthenticator.
      Throws:
        `DocumentException` - An error has occurred during Document Library execution.

  - ### Method Detail

    - #### close

          public void close()

      Releases all resources used by this DocumentAuthenticator.
      Specified by:
        `close` in interface `java.lang.AutoCloseable`

    - #### finalize

          protected void finalize()

      Finalizer for this class. Finalizers are deprecated since Java 9+. This method is not guaranteed to be called. To release all memory held by this class please be sure to call the close() method.
      Overrides:
        `finalize` in class `java.lang.Object`

    - #### getHandle

          public long getHandle()

      Gets the native handle.
      Returns:
        The native handle.

    - #### getDocumentName

          public java.lang.String getDocumentName()
                                           throws DocumentException

      Gets the document type to authenticate.
      Returns:
        Document type to authenticate.
      Throws:
        `DocumentException` - An error has occurred during Document Library execution.

    - #### setDocumentName

          public void setDocumentName(java.lang.String documentName)
                               throws DocumentException

      Sets the document type to authenticate.
      Parameters:
        `documentName` - Document type to authenticate.
      Throws:
        `DocumentException` - An error has occurred during Document Library execution.

    - #### getTemporalWindowSize

          public int getTemporalWindowSize()
                                    throws DocumentException

      Gets the size of the FIFO frame buffer, used for processing.
      Returns:
        Size of the FIFO frame buffer, used for processing.
      Throws:
        `DocumentException` - An error has occurred during Document Library execution.

    - #### setTemporalWindowSize

          public void setTemporalWindowSize(int temporalWindowSize)
                                     throws DocumentException

      Sets the size of the FIFO frame buffer, used for processing.
      Parameters:
        `temporalWindowSize` - Size of the FIFO frame buffer, used for processing.
      Throws:
        `DocumentException` - An error has occurred during Document Library execution.

    - #### appendFrame

          public void appendFrame(DocumentImage image)
                           throws DocumentException

      Appends a frame in the FIFO buffer.
      Parameters:
        `image` - Source image of the aligned document to append
      Throws:
        `DocumentException` - An error has occurred during Document Library execution.

    - #### authenticateHolograms

          public HologramAuthenticationResultList authenticateHolograms()
                                                                 throws DocumentException

      Authenticates the holograms on the current frame buffer. Important: Buffer must be full to the temporal window size.
      Returns:
        List of result for each hologram enrolled in document.
      Throws:
        `DocumentException` - An error has occurred during Document Library execution.

    - #### isFull

          public boolean isFull()
                         throws DocumentException

      Checks if the frame buffer is full and ready to authenticate for all holograms.
      Returns:
        A value indicating whether the frame buffer is full.
      Throws:
        `DocumentException` - An error has occurred during Document Library execution.

Copyright © 2020-2030, id3 Technologies. All rights reserved. eu.id3.document