public static HashMap<String, HashMap<String, ArrayList<String>>> getCofactorProcessEdges(PathCaseRepository repository) {
        HashMap<String, HashMap<String, ArrayList<String>>> edges = new HashMap<String, HashMap<String, ArrayList<String>>>();

        ArrayList<String> GenericProcessIDListInRepository = getGenericProcessIDListInRepository(repository);
        for (String gpid : GenericProcessIDListInRepository) {
            ArrayList<ProcessToMoleculesTable.ProcessToMoleculesTableEntry> rows = repository.genericProcessToMoleculesTable.getRows(gpid);
            HashMap<String, ArrayList<String>> gpidCofactorMap = edges.get(gpid);
            if (gpidCofactorMap == null) {
                gpidCofactorMap = new HashMap<String, ArrayList<String>>();
                edges.put(gpid,gpidCofactorMap);
            }

            if (rows != null) {
                ArrayList<String> genericcofactors = new ArrayList<String>();
                ArrayList<String> cofactorins = new ArrayList<String>();
                ArrayList<String> cofactorouts = new ArrayList<String>();

                for (ProcessToMoleculesTable.ProcessToMoleculesTableEntry entry : rows) {
                    if (entry.MoleculeRole.equalsIgnoreCase(MOLECULE_ROLE_STRINGS.COFACTOR)) {
                        genericcofactors.add(entry.MoleculeId);
                    } else if (entry.MoleculeRole.equalsIgnoreCase(MOLECULE_ROLE_STRINGS.COFACTORIN)) {
                        cofactorins.add(entry.MoleculeId);
                    } else if (entry.MoleculeRole.equalsIgnoreCase(MOLECULE_ROLE_STRINGS.COFACTOROUT)) {
                        cofactorouts.add(entry.MoleculeId);
                    }
                }

                gpidCofactorMap.put(MOLECULE_ROLE_STRINGS.COFACTOR, genericcofactors);
                gpidCofactorMap.put(MOLECULE_ROLE_STRINGS.COFACTORIN, cofactorins);
                gpidCofactorMap.put(MOLECULE_ROLE_STRINGS.COFACTOROUT, cofactorouts);
            }
        }

        return edges;
    }