OmsCodeToMetsMapping { public static ObjectTypeCodeMapping getObjectTypeCodeMapping(String omsTypeCode) { if (omsTypeCode == null || (omsObjectTypeCodeMap.containsKey(omsTypeCode) == false)) return omsObjectTypeCodeMap.get(OT_NULL); return omsObjectTypeCodeMap.get(omsTypeCode); }  static ObjectTypeCodeMapping getObjectTypeCodeMapping(String omsTypeCode); static String getMappedOmsAccessCode(String omsAccessCodeId); static void setDNX_OPEN_ACCESS(String omsCode); static void setOmsAccessRestrictionCode(String omsAccessCodeId, String omsCode); static final String OT_IMG; static final String OT_MON; static final String OT_SER; static final String OT_SND; static final String OT_TXT; static final String OT_VID; static final String OT_WWW; static final String OT_NULL; static final String UnpublishedIE; }
@Test public void testGetObjectTypeCodeMapping() { test("OT_IMG", DCTypeElement.Image, DCFormatElement.Image, "DigitisedImageIE"); test("OT_SND", DCTypeElement.Sound, DCFormatElement.Audio, "DigitisedSoundIE"); test("OT_TXT", DCTypeElement.Text, DCFormatElement.Text, "DefaultIE"); test("OT_WWW", DCTypeElement.InteractiveResource, DCFormatElement.Text, "WebHarvestIE"); test("OT_SER", DCTypeElement.Text, DCFormatElement.Text, "PeriodicIE"); test("OT_MON", DCTypeElement.Image, DCFormatElement.Image, "OneOffIE"); test("OT_VID", DCTypeElement.MovingImage, DCFormatElement.Video, "OneOffIE"); test(OmsCodeToMetsMapping.OT_NULL, null, null, "DefaultIE"); test("Some Junk", null, null, "DefaultIE"); test(null, null, null, "DefaultIE"); }