Package io.mosip.mimoto.util
Class CbeffValidator
- java.lang.Object
-
- io.mosip.mimoto.util.CbeffValidator
-
public class CbeffValidator extends Object
- Author:
- Ramadurai Pandian An Utility Class to validate the data before generating an valid CBEFF XML and to get all the data based on Type and SubType
-
-
Constructor Summary
Constructors Constructor Description CbeffValidator()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]createXMLBytes(BIR bir, byte[] xsd)Method used for creating XML bytes using JAXBstatic Map<String,String>getAllBDBData(BIR birRoot, String type, String subType)static Map<String,String>getBDBBasedOnTypeAndSubType(BIR bir, String type, String subType)Method used for searching Cbeff data based on type and subtypestatic List<BIR>getBIRDataFromXMLType(byte[] xmlBytes, String type)static BIRgetBIRFromXML(byte[] fileBytes)Method used for BIR Typestatic <E extends Enum<E>>
booleanisInEnum(String value, Class<E> enumClass)static booleanvalidateXML(BIR birRoot)Method used for custom validation of the BIR
-
-
-
Method Detail
-
validateXML
public static boolean validateXML(BIR birRoot) throws CbeffException
Method used for custom validation of the BIR- Parameters:
birRoot- BIR data- Returns:
- boolean value if BIR is valid
- Throws:
CbeffException- when any condition fails
-
createXMLBytes
public static byte[] createXMLBytes(BIR bir, byte[] xsd) throws Exception
Method used for creating XML bytes using JAXB- Parameters:
bir- BIR typexsd- xml schema definition- Returns:
- byte[] byte array of XML data
- Throws:
Exception- exception
-
getBIRFromXML
public static BIR getBIRFromXML(byte[] fileBytes) throws Exception
Method used for BIR Type- Parameters:
fileBytes- byte array of XML data- Returns:
- BIR BIR data
- Throws:
Exception- exception
-
getBDBBasedOnTypeAndSubType
public static Map<String,String> getBDBBasedOnTypeAndSubType(BIR bir, String type, String subType) throws Exception
Method used for searching Cbeff data based on type and subtype- Parameters:
biometricType- BIR datatype- format typesubType- format subtype- Returns:
- bdbMap
- Throws:
Exception- exception
-
getAllBDBData
public static Map<String,String> getAllBDBData(BIR birRoot, String type, String subType) throws Exception
- Throws:
Exception
-
-