Package io.mosip.mimoto.service.impl
Class CbeffImpl
- java.lang.Object
-
- io.mosip.mimoto.service.impl.CbeffImpl
-
-
Constructor Summary
Constructors Constructor Description CbeffImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]createXML(List<BIR> birList)Method used for creating Cbeff XML.byte[]createXML(List<BIR> birList, byte[] xsd)Method used for creating Cbeff XML with xsd.Map<String,String>getAllBDBData(byte[] xmlBytes, String type, String subType)Method used for getting Map of BIR from XML bytes with type and subType.Map<String,String>getBDBBasedOnType(byte[] fileBytes, String type, String subType)Method used for validating XML against XSD.List<BIR>getBIRDataFromXML(byte[] xmlBytes)Method used for getting list of BIR from XML bytes *List<BIR>getBIRDataFromXMLType(byte[] xmlBytes, String type)voidloadXSD()Load XSD.byte[]updateXML(List<BIR> birList, byte[] fileBytes)Method used for updating Cbeff XML.booleanvalidateXML(byte[] xmlBytes)booleanvalidateXML(byte[] xmlBytes, byte[] xsdBytes)Method used for validating XML against XSD.
-
-
-
Method Detail
-
loadXSD
@PostConstruct public void loadXSD() throws IOExceptionLoad XSD.- Throws:
IOException- Signals that an I/O exception has occurred.
-
createXML
public byte[] createXML(List<BIR> birList) throws Exception
Method used for creating Cbeff XML.
-
createXML
public byte[] createXML(List<BIR> birList, byte[] xsd) throws Exception
Method used for creating Cbeff XML with xsd.
-
updateXML
public byte[] updateXML(List<BIR> birList, byte[] fileBytes) throws Exception
Method used for updating Cbeff XML.
-
validateXML
public boolean validateXML(byte[] xmlBytes, byte[] xsdBytes) throws ExceptionMethod used for validating XML against XSD.- Specified by:
validateXMLin interfaceCbeffUtil- Parameters:
xmlBytes- byte array of XML dataxsdBytes- byte array of XSD data- Returns:
- boolean if data is valid or not
- Throws:
Exception- Exception
-
validateXML
public boolean validateXML(byte[] xmlBytes) throws Exception- Specified by:
validateXMLin interfaceCbeffUtil- Throws:
Exception
-
getBDBBasedOnType
public Map<String,String> getBDBBasedOnType(byte[] fileBytes, String type, String subType) throws Exception
Method used for validating XML against XSD.- Specified by:
getBDBBasedOnTypein interfaceCbeffUtil- Parameters:
fileBytes- byte array of XML datatype- to be searchedsubType- to be searched- Returns:
- bdbMap Map of type and String of encoded biometric data
- Throws:
Exception- Exception
-
getBIRDataFromXML
public List<BIR> getBIRDataFromXML(byte[] xmlBytes) throws Exception
Method used for getting list of BIR from XML bytes *- Specified by:
getBIRDataFromXMLin interfaceCbeffUtil- Parameters:
xmlBytes- byte array of XML data- Returns:
- List of BIR data extracted from XML
- Throws:
Exception- Exception
-
getAllBDBData
public Map<String,String> getAllBDBData(byte[] xmlBytes, String type, String subType) throws Exception
Method used for getting Map of BIR from XML bytes with type and subType.- Specified by:
getAllBDBDatain interfaceCbeffUtil- Parameters:
xmlBytes- byte array of XML datatype- typesubType- subType- Returns:
- bdbMap Map of BIR data extracted from XML
- Throws:
Exception- Exception
-
-