io.mosip.kernel.cbeffutil.container.CbeffContainerI Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kernel-cbeffutil-api Show documentation
Show all versions of kernel-cbeffutil-api Show documentation
Biometric interface to be compliant with CBEFF standard
The newest version!
package io.mosip.kernel.cbeffutil.container;
import java.util.List;
/**
* Interface for creating and updating Common Biometric Exchange Formats
* Framework (CBEFF) data containers.
*
*
* This interface defines methods for creating and updating Biometric
* Information Record (BIR) types and validating XML against XSD schema.
*
*
*
* Implementations of this interface should provide concrete implementations for
* creating and updating BIR types, as well as validating XML data against an
* XSD schema.
*
*
*
* Authors: Ramadurai Pandian
*
*
* @param Type of data used for creating or updating BIR types.
* @param Type representing the result of creating or updating BIR types.
*
* @since 1.0.0
*/
@SuppressWarnings({ "java:S112" })
public abstract class CbeffContainerI {
/**
* Creates a new Biometric Information Record (BIR) type based on the provided
* list of data.
*
* @param bir List of data to create the BIR type.
* @return The created BIR type.
* @throws Exception If an error occurs during creation.
*/
public abstract U createBIRType(List bir) throws Exception;
/**
* Updates an existing Biometric Information Record (BIR) type using the
* provided list of data and the existing file bytes.
*
* @param bir List of data to update the BIR type.
* @param fileBytes Byte array of the existing file.
* @return The updated BIR type.
* @throws Exception If an error occurs during update.
*/
public abstract U updateBIRType(List bir, byte[] fileBytes) throws Exception;
/**
* Validates the XML data against the XSD schema represented by the provided
* byte arrays.
*
* @param fileBytes Byte array of the XML data to validate.
* @param xsdBytes Byte array of the XSD schema data for validation.
* @return {@code true} if the XML is valid according to the XSD schema,
* {@code false} otherwise.
* @throws Exception If an error occurs during validation.
*/
public abstract boolean validateXML(byte[] fileBytes, byte[] xsdBytes) throws Exception;
}