public void carregar(String absolutePath, boolean isRequiredAll) throws IOException, StackOverflowError {
        int indexExtension = absolutePath.lastIndexOf(".");
        String ext;
        String path;

        if (indexExtension != -1) {
            ext = absolutePath.substring(indexExtension + 1).toLowerCase();
            path = absolutePath.substring(0, indexExtension);

            if (isRequiredAll) {
                controladorSimptomes.carregar(path + ".sim");
                controladorMalalties.carregar(path + ".mal");
                controladorPacients.carregar(path + ".pac");
                controladorSequencies.carregarSequencies(path + ".seq");
                controladorSequencies.carregarAlfabet(path + ".alf");
                
                controladorSimptomes.asociar();
                controladorMalalties.asociar();
                controladorPacients.asociar();
                controladorSequencies.asociar();

                mainForm.refreshAll();
            } else {
                if (ext.equals("sim")) {
                    controladorSimptomes.buidar();
                    controladorSimptomes.carregar(absolutePath);
                    controladorSimptomes.asociar();
                    mainForm.refreshSimptomes();
                } else if (ext.equals("mal")) {
                    controladorMalalties.buidar();
                    controladorMalalties.carregar(absolutePath);
                    controladorMalalties.asociar();
                    mainForm.refreshMalalties();
                } else if (ext.equals("pac")) {
                    controladorPacients.buidar();
                    controladorPacients.carregar(absolutePath);
                    controladorPacients.asociar();
                    mainForm.refreshPacients();
                } else if (ext.equals("seq")) {
                    controladorSequencies.buidarSequencies();
                    controladorSequencies.carregarSequencies(absolutePath);
                    controladorSequencies.asociar();
                    mainForm.refreshSequencies();
                } else if (ext.equals("alf")) {
                    controladorSequencies.buidarAlfabet();
                    controladorSequencies.carregarAlfabet(absolutePath);
                }
            }
        }
    }