class Mrz {

    public DocumentData getPrettyData() {
        DocumentData data = new DocumentData();
        if (mrz.startsWith("P")) {
            data.setDocumentNumber(mrz.split("\n")[1].substring(PASSPORT_DOCNO_INDICES[0], PASSPORT_DOCNO_INDICES[1]));
            data.setDateOfBirth(mrz.split("\n")[1].substring(PASSPORT_DOB_INDICES[0], PASSPORT_DOB_INDICES[1]));
            data.setExpiryDate(mrz.split("\n")[1].substring(PASSPORT_EXP_INDICES[0],PASSPORT_EXP_INDICES[1]));
        } else if (mrz.startsWith("I")) {
            data.setDocumentNumber(mrz.split("\n")[0].substring(ID_DOCNO_INDICES[0],ID_DOCNO_INDICES[1]));
            data.setDateOfBirth(mrz.split("\n")[1].substring(ID_DOB_INDICES[0],ID_DOB_INDICES[1]));
            data.setExpiryDate(mrz.split("\n")[1].substring(ID_EXP_INDICES[0],ID_EXP_INDICES[1]));
        }
        return data;
    }

    public  Mrz(String mrz);

}