@Test public void testCreateMultipartMonographImport_Supplement() throws Exception { ModsDefinition titleMods = mods("registration/ndkMultipartTitle2.xml"); ModsDefinition volumeMods = mods("registration/ndkMultipartTitle2Supplement.xml"); MixType mix = mix("registration/mix.xml"); Import imp = factory.createMultipartMonographImport(titleMods, volumeMods, mix, null); assertNotNull(imp); MonographVolume mv = imp.getMonographVolume(); assertNotNull(mv); assertNull(mv.getCcnb()); assertEquals("978-0-19-459881-1 (student's book : brož.)", mv.getIsbn()); assertEquals("Student's book", mv.getTitleInfo().getVolumeTitle()); assertEquals("English file", mv.getTitleInfo().getMonographTitle()); assertNotNull(imp.getDigitalDocument()); }
public Import createMultipartMonographImport( ModsDefinition titleMods, ModsDefinition volumeMods, MixType mix, ErrorHandler status ) throws SAXException { MonographVolume m = new MonographVolume(); m.setCcnb(ResolverUtils.getIdentifier("ccnb", volumeMods, titleMods)); m.setDigitalBorn(false); m.setIsbn(ResolverUtils.getIdentifier("isbn", volumeMods, titleMods)); m.setOtherOriginator(ResolverUtils.getOriginator("personal", false, volumeMods, titleMods)); m.setPrimaryOriginator(ResolverUtils.getPrimaryOriginator(volumeMods, titleMods)); m.setPublication(ResolverUtils.getPublication(volumeMods, titleMods)); MonographVolume.TitleInfo titleInfo = new MonographVolume.TitleInfo(); titleInfo.setMonographTitle(ResolverUtils.getTitle(titleMods)); titleInfo.setVolumeTitle(ResolverUtils.getTitlePartNumber(volumeMods)); if (titleInfo.getVolumeTitle() == null) { titleInfo.setVolumeTitle(ResolverUtils.getTitlePartName(volumeMods)); } m.setTitleInfo(titleInfo); Import imp = new Import(); imp.setMonographVolume(m); DigitalDocument digitalDocument = new DigitalDocumentBuilder() .setUuid(ResolverUtils.getIdentifier("uuid", volumeMods)) .setMix(mix) .build(); imp.setDigitalDocument(digitalDocument); debugXml(imp); ResolverXmlUtils.validate(imp, status); return imp; }
NdkEntityFactory { public Import createMultipartMonographImport( ModsDefinition titleMods, ModsDefinition volumeMods, MixType mix, ErrorHandler status ) throws SAXException { MonographVolume m = new MonographVolume(); m.setCcnb(ResolverUtils.getIdentifier("ccnb", volumeMods, titleMods)); m.setDigitalBorn(false); m.setIsbn(ResolverUtils.getIdentifier("isbn", volumeMods, titleMods)); m.setOtherOriginator(ResolverUtils.getOriginator("personal", false, volumeMods, titleMods)); m.setPrimaryOriginator(ResolverUtils.getPrimaryOriginator(volumeMods, titleMods)); m.setPublication(ResolverUtils.getPublication(volumeMods, titleMods)); MonographVolume.TitleInfo titleInfo = new MonographVolume.TitleInfo(); titleInfo.setMonographTitle(ResolverUtils.getTitle(titleMods)); titleInfo.setVolumeTitle(ResolverUtils.getTitlePartNumber(volumeMods)); if (titleInfo.getVolumeTitle() == null) { titleInfo.setVolumeTitle(ResolverUtils.getTitlePartName(volumeMods)); } m.setTitleInfo(titleInfo); Import imp = new Import(); imp.setMonographVolume(m); DigitalDocument digitalDocument = new DigitalDocumentBuilder() .setUuid(ResolverUtils.getIdentifier("uuid", volumeMods)) .setMix(mix) .build(); imp.setDigitalDocument(digitalDocument); debugXml(imp); ResolverXmlUtils.validate(imp, status); return imp; } }
NdkEntityFactory { public Import createMultipartMonographImport( ModsDefinition titleMods, ModsDefinition volumeMods, MixType mix, ErrorHandler status ) throws SAXException { MonographVolume m = new MonographVolume(); m.setCcnb(ResolverUtils.getIdentifier("ccnb", volumeMods, titleMods)); m.setDigitalBorn(false); m.setIsbn(ResolverUtils.getIdentifier("isbn", volumeMods, titleMods)); m.setOtherOriginator(ResolverUtils.getOriginator("personal", false, volumeMods, titleMods)); m.setPrimaryOriginator(ResolverUtils.getPrimaryOriginator(volumeMods, titleMods)); m.setPublication(ResolverUtils.getPublication(volumeMods, titleMods)); MonographVolume.TitleInfo titleInfo = new MonographVolume.TitleInfo(); titleInfo.setMonographTitle(ResolverUtils.getTitle(titleMods)); titleInfo.setVolumeTitle(ResolverUtils.getTitlePartNumber(volumeMods)); if (titleInfo.getVolumeTitle() == null) { titleInfo.setVolumeTitle(ResolverUtils.getTitlePartName(volumeMods)); } m.setTitleInfo(titleInfo); Import imp = new Import(); imp.setMonographVolume(m); DigitalDocument digitalDocument = new DigitalDocumentBuilder() .setUuid(ResolverUtils.getIdentifier("uuid", volumeMods)) .setMix(mix) .build(); imp.setDigitalDocument(digitalDocument); debugXml(imp); ResolverXmlUtils.validate(imp, status); return imp; }  }
NdkEntityFactory { public Import createMultipartMonographImport( ModsDefinition titleMods, ModsDefinition volumeMods, MixType mix, ErrorHandler status ) throws SAXException { MonographVolume m = new MonographVolume(); m.setCcnb(ResolverUtils.getIdentifier("ccnb", volumeMods, titleMods)); m.setDigitalBorn(false); m.setIsbn(ResolverUtils.getIdentifier("isbn", volumeMods, titleMods)); m.setOtherOriginator(ResolverUtils.getOriginator("personal", false, volumeMods, titleMods)); m.setPrimaryOriginator(ResolverUtils.getPrimaryOriginator(volumeMods, titleMods)); m.setPublication(ResolverUtils.getPublication(volumeMods, titleMods)); MonographVolume.TitleInfo titleInfo = new MonographVolume.TitleInfo(); titleInfo.setMonographTitle(ResolverUtils.getTitle(titleMods)); titleInfo.setVolumeTitle(ResolverUtils.getTitlePartNumber(volumeMods)); if (titleInfo.getVolumeTitle() == null) { titleInfo.setVolumeTitle(ResolverUtils.getTitlePartName(volumeMods)); } m.setTitleInfo(titleInfo); Import imp = new Import(); imp.setMonographVolume(m); DigitalDocument digitalDocument = new DigitalDocumentBuilder() .setUuid(ResolverUtils.getIdentifier("uuid", volumeMods)) .setMix(mix) .build(); imp.setDigitalDocument(digitalDocument); debugXml(imp); ResolverXmlUtils.validate(imp, status); return imp; }  Import createMultipartMonographImport(
            ModsDefinition titleMods,  ModsDefinition volumeMods,
            MixType mix, ErrorHandler status
            ); Import createMonographImport(
            ModsDefinition volumeMods, MixType mix, ErrorHandler status, boolean eBorn
            ); Import createMusicDocumentImport(ModsDefinition documentMods, ErrorHandler status); Import createPeriodicalIssueImport(
            ModsDefinition titleMods, ModsDefinition volumeMods,
            ModsDefinition issueMods, MixType mix, ErrorHandler status, boolean eBorn
            ); Import createCartographicImport(
            ModsDefinition titleMods, MixType mix, ErrorHandler status
            ); Import createSheetMusicImport(
            ModsDefinition titleMods, MixType mix, ErrorHandler status
            ); Import createOtherEntityImport(
            ModsDefinition titleMods, String documentType, MixType mix, ErrorHandler status, boolean eBorn
            ); }
NdkEntityFactory { public Import createMultipartMonographImport( ModsDefinition titleMods, ModsDefinition volumeMods, MixType mix, ErrorHandler status ) throws SAXException { MonographVolume m = new MonographVolume(); m.setCcnb(ResolverUtils.getIdentifier("ccnb", volumeMods, titleMods)); m.setDigitalBorn(false); m.setIsbn(ResolverUtils.getIdentifier("isbn", volumeMods, titleMods)); m.setOtherOriginator(ResolverUtils.getOriginator("personal", false, volumeMods, titleMods)); m.setPrimaryOriginator(ResolverUtils.getPrimaryOriginator(volumeMods, titleMods)); m.setPublication(ResolverUtils.getPublication(volumeMods, titleMods)); MonographVolume.TitleInfo titleInfo = new MonographVolume.TitleInfo(); titleInfo.setMonographTitle(ResolverUtils.getTitle(titleMods)); titleInfo.setVolumeTitle(ResolverUtils.getTitlePartNumber(volumeMods)); if (titleInfo.getVolumeTitle() == null) { titleInfo.setVolumeTitle(ResolverUtils.getTitlePartName(volumeMods)); } m.setTitleInfo(titleInfo); Import imp = new Import(); imp.setMonographVolume(m); DigitalDocument digitalDocument = new DigitalDocumentBuilder() .setUuid(ResolverUtils.getIdentifier("uuid", volumeMods)) .setMix(mix) .build(); imp.setDigitalDocument(digitalDocument); debugXml(imp); ResolverXmlUtils.validate(imp, status); return imp; }  Import createMultipartMonographImport(
            ModsDefinition titleMods,  ModsDefinition volumeMods,
            MixType mix, ErrorHandler status
            ); Import createMonographImport(
            ModsDefinition volumeMods, MixType mix, ErrorHandler status, boolean eBorn
            ); Import createMusicDocumentImport(ModsDefinition documentMods, ErrorHandler status); Import createPeriodicalIssueImport(
            ModsDefinition titleMods, ModsDefinition volumeMods,
            ModsDefinition issueMods, MixType mix, ErrorHandler status, boolean eBorn
            ); Import createCartographicImport(
            ModsDefinition titleMods, MixType mix, ErrorHandler status
            ); Import createSheetMusicImport(
            ModsDefinition titleMods, MixType mix, ErrorHandler status
            ); Import createOtherEntityImport(
            ModsDefinition titleMods, String documentType, MixType mix, ErrorHandler status, boolean eBorn
            );  }