@Test public void testCreatePeriodicalIssueImport_Supplement() throws Exception { ModsDefinition periodicalMods = mods("registration/ndkPeriodical2.xml"); ModsDefinition periodicalIssueMods = mods("registration/ndkPeriodical2VolumeSupplement.xml"); ModsDefinition periodicalVolumeMods = mods("registration/ndkPeriodical2Volume.xml"); MixType mix = mix("registration/mix.xml"); Import imp = factory.createPeriodicalIssueImport( periodicalMods, periodicalVolumeMods, periodicalIssueMods, mix, null, false); assertNotNull(imp); PeriodicalIssue pi = imp.getPeriodicalIssue(); assertNotNull(pi); assertEquals("ccnb", "cnb000356910", pi.getCcnb()); assertEquals("issn", "0862-6545", pi.getIssn()); assertNull("otherOriginator", pi.getOtherOriginator()); TitleInfo titleInfo = pi.getTitleInfo(); assertNotNull(titleInfo); assertEquals("Respekt", titleInfo.getPeriodicalTitle()); assertEquals("10", titleInfo.getVolumeTitle()); assertEquals("Bibliografický přehled článků za r. 1999", titleInfo.getIssueTitle()); assertNotNull(imp.getDigitalDocument()); }
public Import createPeriodicalIssueImport( ModsDefinition titleMods, ModsDefinition volumeMods, ModsDefinition issueMods, MixType mix, ErrorHandler status, boolean eBorn ) throws SAXException { Import imp = new Import(); PeriodicalIssue issue = new PeriodicalIssue(); issue.setCcnb(ResolverUtils.getIdentifier("ccnb", issueMods, volumeMods, titleMods)); issue.setDigitalBorn(eBorn); issue.setIssn(ResolverUtils.getIdentifier("issn", issueMods, volumeMods, titleMods)); issue.setOtherOriginator(ResolverUtils.getOriginator("personal", false, issueMods, volumeMods, titleMods)); issue.setPrimaryOriginator(ResolverUtils.getPrimaryOriginator(issueMods, volumeMods, titleMods)); issue.setPublication(ResolverUtils.getPublication(issueMods, volumeMods, titleMods)); TitleInfo titleInfo = new TitleInfo(); titleInfo.setIssueTitle(ResolverUtils.getTitlePartNumber(issueMods)); if (titleInfo.getIssueTitle() == null) { titleInfo.setIssueTitle(ResolverUtils.getTitlePartName(issueMods)); if (titleInfo.getIssueTitle() == null) { Publication publication = ResolverUtils.getPublication(issueMods); String dateIssued = publication != null && publication.getYear() != null ? publication.getYear() : null; titleInfo.setIssueTitle(dateIssued); } } titleInfo.setPeriodicalTitle(ResolverUtils.getTitle(titleMods)); titleInfo.setVolumeTitle(ResolverUtils.getTitlePartNumber(volumeMods)); issue.setTitleInfo(titleInfo); imp.setPeriodicalIssue(issue); DigitalDocument digitalDocument; if (eBorn) { digitalDocument = new DigitalDocumentBuilder().setUuid(ResolverUtils.getIdentifier("uuid", issueMods)).build(); } else{ digitalDocument = new DigitalDocumentBuilder().setUuid(ResolverUtils.getIdentifier("uuid", issueMods)).setMix(mix).build(); } imp.setDigitalDocument(digitalDocument); debugXml(imp); ResolverXmlUtils.validate(imp, status); return imp; }
NdkEntityFactory { public Import createPeriodicalIssueImport( ModsDefinition titleMods, ModsDefinition volumeMods, ModsDefinition issueMods, MixType mix, ErrorHandler status, boolean eBorn ) throws SAXException { Import imp = new Import(); PeriodicalIssue issue = new PeriodicalIssue(); issue.setCcnb(ResolverUtils.getIdentifier("ccnb", issueMods, volumeMods, titleMods)); issue.setDigitalBorn(eBorn); issue.setIssn(ResolverUtils.getIdentifier("issn", issueMods, volumeMods, titleMods)); issue.setOtherOriginator(ResolverUtils.getOriginator("personal", false, issueMods, volumeMods, titleMods)); issue.setPrimaryOriginator(ResolverUtils.getPrimaryOriginator(issueMods, volumeMods, titleMods)); issue.setPublication(ResolverUtils.getPublication(issueMods, volumeMods, titleMods)); TitleInfo titleInfo = new TitleInfo(); titleInfo.setIssueTitle(ResolverUtils.getTitlePartNumber(issueMods)); if (titleInfo.getIssueTitle() == null) { titleInfo.setIssueTitle(ResolverUtils.getTitlePartName(issueMods)); if (titleInfo.getIssueTitle() == null) { Publication publication = ResolverUtils.getPublication(issueMods); String dateIssued = publication != null && publication.getYear() != null ? publication.getYear() : null; titleInfo.setIssueTitle(dateIssued); } } titleInfo.setPeriodicalTitle(ResolverUtils.getTitle(titleMods)); titleInfo.setVolumeTitle(ResolverUtils.getTitlePartNumber(volumeMods)); issue.setTitleInfo(titleInfo); imp.setPeriodicalIssue(issue); DigitalDocument digitalDocument; if (eBorn) { digitalDocument = new DigitalDocumentBuilder().setUuid(ResolverUtils.getIdentifier("uuid", issueMods)).build(); } else{ digitalDocument = new DigitalDocumentBuilder().setUuid(ResolverUtils.getIdentifier("uuid", issueMods)).setMix(mix).build(); } imp.setDigitalDocument(digitalDocument); debugXml(imp); ResolverXmlUtils.validate(imp, status); return imp; } }
NdkEntityFactory { public Import createPeriodicalIssueImport( ModsDefinition titleMods, ModsDefinition volumeMods, ModsDefinition issueMods, MixType mix, ErrorHandler status, boolean eBorn ) throws SAXException { Import imp = new Import(); PeriodicalIssue issue = new PeriodicalIssue(); issue.setCcnb(ResolverUtils.getIdentifier("ccnb", issueMods, volumeMods, titleMods)); issue.setDigitalBorn(eBorn); issue.setIssn(ResolverUtils.getIdentifier("issn", issueMods, volumeMods, titleMods)); issue.setOtherOriginator(ResolverUtils.getOriginator("personal", false, issueMods, volumeMods, titleMods)); issue.setPrimaryOriginator(ResolverUtils.getPrimaryOriginator(issueMods, volumeMods, titleMods)); issue.setPublication(ResolverUtils.getPublication(issueMods, volumeMods, titleMods)); TitleInfo titleInfo = new TitleInfo(); titleInfo.setIssueTitle(ResolverUtils.getTitlePartNumber(issueMods)); if (titleInfo.getIssueTitle() == null) { titleInfo.setIssueTitle(ResolverUtils.getTitlePartName(issueMods)); if (titleInfo.getIssueTitle() == null) { Publication publication = ResolverUtils.getPublication(issueMods); String dateIssued = publication != null && publication.getYear() != null ? publication.getYear() : null; titleInfo.setIssueTitle(dateIssued); } } titleInfo.setPeriodicalTitle(ResolverUtils.getTitle(titleMods)); titleInfo.setVolumeTitle(ResolverUtils.getTitlePartNumber(volumeMods)); issue.setTitleInfo(titleInfo); imp.setPeriodicalIssue(issue); DigitalDocument digitalDocument; if (eBorn) { digitalDocument = new DigitalDocumentBuilder().setUuid(ResolverUtils.getIdentifier("uuid", issueMods)).build(); } else{ digitalDocument = new DigitalDocumentBuilder().setUuid(ResolverUtils.getIdentifier("uuid", issueMods)).setMix(mix).build(); } imp.setDigitalDocument(digitalDocument); debugXml(imp); ResolverXmlUtils.validate(imp, status); return imp; }  }
NdkEntityFactory { public Import createPeriodicalIssueImport( ModsDefinition titleMods, ModsDefinition volumeMods, ModsDefinition issueMods, MixType mix, ErrorHandler status, boolean eBorn ) throws SAXException { Import imp = new Import(); PeriodicalIssue issue = new PeriodicalIssue(); issue.setCcnb(ResolverUtils.getIdentifier("ccnb", issueMods, volumeMods, titleMods)); issue.setDigitalBorn(eBorn); issue.setIssn(ResolverUtils.getIdentifier("issn", issueMods, volumeMods, titleMods)); issue.setOtherOriginator(ResolverUtils.getOriginator("personal", false, issueMods, volumeMods, titleMods)); issue.setPrimaryOriginator(ResolverUtils.getPrimaryOriginator(issueMods, volumeMods, titleMods)); issue.setPublication(ResolverUtils.getPublication(issueMods, volumeMods, titleMods)); TitleInfo titleInfo = new TitleInfo(); titleInfo.setIssueTitle(ResolverUtils.getTitlePartNumber(issueMods)); if (titleInfo.getIssueTitle() == null) { titleInfo.setIssueTitle(ResolverUtils.getTitlePartName(issueMods)); if (titleInfo.getIssueTitle() == null) { Publication publication = ResolverUtils.getPublication(issueMods); String dateIssued = publication != null && publication.getYear() != null ? publication.getYear() : null; titleInfo.setIssueTitle(dateIssued); } } titleInfo.setPeriodicalTitle(ResolverUtils.getTitle(titleMods)); titleInfo.setVolumeTitle(ResolverUtils.getTitlePartNumber(volumeMods)); issue.setTitleInfo(titleInfo); imp.setPeriodicalIssue(issue); DigitalDocument digitalDocument; if (eBorn) { digitalDocument = new DigitalDocumentBuilder().setUuid(ResolverUtils.getIdentifier("uuid", issueMods)).build(); } else{ digitalDocument = new DigitalDocumentBuilder().setUuid(ResolverUtils.getIdentifier("uuid", issueMods)).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 createPeriodicalIssueImport( ModsDefinition titleMods, ModsDefinition volumeMods, ModsDefinition issueMods, MixType mix, ErrorHandler status, boolean eBorn ) throws SAXException { Import imp = new Import(); PeriodicalIssue issue = new PeriodicalIssue(); issue.setCcnb(ResolverUtils.getIdentifier("ccnb", issueMods, volumeMods, titleMods)); issue.setDigitalBorn(eBorn); issue.setIssn(ResolverUtils.getIdentifier("issn", issueMods, volumeMods, titleMods)); issue.setOtherOriginator(ResolverUtils.getOriginator("personal", false, issueMods, volumeMods, titleMods)); issue.setPrimaryOriginator(ResolverUtils.getPrimaryOriginator(issueMods, volumeMods, titleMods)); issue.setPublication(ResolverUtils.getPublication(issueMods, volumeMods, titleMods)); TitleInfo titleInfo = new TitleInfo(); titleInfo.setIssueTitle(ResolverUtils.getTitlePartNumber(issueMods)); if (titleInfo.getIssueTitle() == null) { titleInfo.setIssueTitle(ResolverUtils.getTitlePartName(issueMods)); if (titleInfo.getIssueTitle() == null) { Publication publication = ResolverUtils.getPublication(issueMods); String dateIssued = publication != null && publication.getYear() != null ? publication.getYear() : null; titleInfo.setIssueTitle(dateIssued); } } titleInfo.setPeriodicalTitle(ResolverUtils.getTitle(titleMods)); titleInfo.setVolumeTitle(ResolverUtils.getTitlePartNumber(volumeMods)); issue.setTitleInfo(titleInfo); imp.setPeriodicalIssue(issue); DigitalDocument digitalDocument; if (eBorn) { digitalDocument = new DigitalDocumentBuilder().setUuid(ResolverUtils.getIdentifier("uuid", issueMods)).build(); } else{ digitalDocument = new DigitalDocumentBuilder().setUuid(ResolverUtils.getIdentifier("uuid", issueMods)).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
            );  }