MetsUtils { public static HashMap<String, FileGrp> initFileGroups() { FileGrp MCimagesGRP = new FileGrp(); MCimagesGRP.setID(Const.MC_GRP_ID); MCimagesGRP.setUSE("Images"); FileGrp UCimageGrp = new FileGrp(); UCimageGrp.setID(Const.UC_GRP_ID); UCimageGrp.setUSE("Images"); FileGrp AltoGRP = new FileGrp(); AltoGRP.setID(Const.ALTO_GRP_ID); AltoGRP.setUSE("Layout"); FileGrp TxtGRP = new FileGrp(); TxtGRP.setID(Const.TXT_GRP_ID); TxtGRP.setUSE("Text"); FileGrp TechMDGrp = new FileGrp(); TechMDGrp.setID("TECHMDGRP"); TechMDGrp.setUSE("Technical Metadata"); HashMap<String, FileGrp> fileGrpMap = new HashMap<String, FileGrp>(); fileGrpMap.put(Const.UC_GRP_ID, UCimageGrp); fileGrpMap.put(Const.MC_GRP_ID, MCimagesGRP); fileGrpMap.put(Const.ALTO_GRP_ID, AltoGRP); fileGrpMap.put(Const.TXT_GRP_ID, TxtGRP); fileGrpMap.put("TECHMDGRP", TechMDGrp); return fileGrpMap; }  static XMLGregorianCalendar getCurrentDate(); static Properties getMimeToExtension(); static String getElementType(String  model); static List<String> findPSPPIDs(String pid, MetsContext ctx, boolean fillChildren); static String getProperty(String name, java.util.List<PropertyType> properties); static List<Element> removeSchemaLocation(List<Element> elements); static List<Element> removeModsCollection(List<Element> elements); static byte[] getBinaryDataStreams(List<DatastreamType> datastreams, String type); static boolean equalDataStreams(String dataStream, String streamName); static Document getDocumentFromList(List<Element> elements); static String xPathEvaluateString(List<Element> elements, String xPath); static Node xPathEvaluateNode(List<Element> elements, String xPath); static String getModel(List<Element> relExtStream); static void copyStream(InputStream is, OutputStream os); static byte[] getBinaryDataStreams(FedoraClient fedoraClient, IMetsElement metsElement, String streamName); static HashMap<String, FileGrp> initFileGroups(); static HashMap<String, FileGrp> initAudioFileGroups(); static HashMap<String, FileGrp> initAudioFileGroups(HashMap<String, FileGrp> fileGrpMap); static DigitalObject readFoXML(String path); static DigitalObject readFoXML(String uuid, FedoraClient client); static List<String> validateAgainstXSD(Document document, InputStream xsd); static List<String> validateAgainstXSD(File file, InputStream xsd); static boolean hasReferenceXML(String name); static String validateIdentifier(String identifier); static String removeNonAlpabetChars(String inputString); static void saveInfoFile(String path, MetsContext metsContext, String md5, String fileMd5Name, File metsFile); static String getPackageID(IMetsElement element); static DigitalObject readRelatedFoXML(String uuid, FedoraClient client); static DigitalObject readRelatedFoXML(String path, String fileName); static FileMD5Info getDigestAndCopy(InputStream is, OutputStream os); static FileMD5Info getDigest(InputStream is); static String getParent(String uuid, RemoteStorage remoteStorage); static String getParent(String uuid, Map<String, String> fileSystemParents); static Document getDocumentFromBytes(byte[] bytes); static void deleteFolder(File folder); static HashMap<String, FileGrp> initEbornFileGroups();  }
@Test public void initGroupsTest() throws Exception { HashMap<String, FileGrp> fileGroups = MetsUtils.initFileGroups(); assertEquals(5, fileGroups.keySet().size()); }