Interface FormRecognizerService

All Known Implementing Classes:
FormRecognizerServiceImpl

public interface FormRecognizerService
An interface containing methods for the Form Recognizer service.
  • Method Details

    • extractDataFromPassport

      StudentDto extractDataFromPassport(org.springframework.web.multipart.MultipartFile passport)
      Extracts and returns the data from the passport.
      Parameters:
      passport - The photo of the passport.
      Returns:
      The extracted StudentDto object.
    • getFieldsFromDocument

      Map<String,com.azure.ai.formrecognizer.documentanalysis.models.DocumentField> getFieldsFromDocument(org.springframework.web.multipart.MultipartFile passport)
      Extracts all fields from the uploaded passport.
      Parameters:
      passport - The uploaded passport.
      Returns:
      The extracted fields stored in a Map.
    • validatePassport

      PassportValidationResponse validatePassport(String studentDto, org.springframework.web.multipart.MultipartFile passport)
      Validates the data entered by the user against the data which can be found-, and has been extracted from the passport.
      Parameters:
      studentDto - The student itself.
      passport - The photo of the passport.
      Returns:
      A PassportValidationResponse object.
    • deletePassportValidationByPassportNumber

      String deletePassportValidationByPassportNumber(String passportNumber)
      Deletes a passport validation data identified by the passport number.
      Parameters:
      passportNumber - the passport number.
      Returns:
      A feedback message.
    • validatePassportManually

      String validatePassportManually(Long studentId)
      Validates the passport manually.
      Parameters:
      studentId - The id of the student.
      Returns:
      An informational message.
    • isUserValid

      Boolean isUserValid(String passportNumber)
      Checks if the user is valid or not.
      Parameters:
      passportNumber - The passport number.
      Returns:
      true if the user is valid, false otherwise.