EntryProcessor
This commit is contained in:
@@ -109,7 +109,7 @@ public class MamMigrationSelective implements CommandLineRunner {
|
||||
record.addClassification("MediaAssistant-Migration");
|
||||
record.addClassification("Country.Global");
|
||||
record.addClassification("Agencies.Bayer AH");
|
||||
record.addClassification("Usage.Unrestricted");
|
||||
record.addClassification("Usage.Restricted");
|
||||
|
||||
// status
|
||||
if (entry.stateId == 6) { // ACCEPTED
|
||||
@@ -146,9 +146,9 @@ public class MamMigrationSelective implements CommandLineRunner {
|
||||
if (entry.comment.get("en") != null)
|
||||
description += "Comment: " + entry.comment.get("en") + "\n\n";
|
||||
|
||||
String migrationDescription = "Migrated from Media Assistant ID " + entry.id + ", Date of Issue: "
|
||||
String migrationDescription = "Migrated from Media Assistant ID " + entry.id + "\nDate of Issue: "
|
||||
+ stringDate.format(entry.creationDate);
|
||||
description += "[" + migrationDescription + "]";
|
||||
description += migrationDescription;
|
||||
record.addField("byr_ah_description", description);
|
||||
|
||||
// Keywords
|
||||
@@ -159,12 +159,18 @@ public class MamMigrationSelective implements CommandLineRunner {
|
||||
|
||||
// License Information
|
||||
record.addField("byr_ah_licenseHolderList", Collections.singletonList(Definitions.defaultLicenseHolder));
|
||||
|
||||
// SR: If license holder is not "Bayer Animal Health GmbH" put on review list
|
||||
if (!entry.copyright.organization.get("id").equals("3740")) {
|
||||
log.warn("Entry " + entry.id + ": License Holder is not set to 'Bayer Animal Health GmbH' (organization 3740)");
|
||||
}
|
||||
|
||||
|
||||
record.addField("byr_ah_licenseAdditionalPermittedUse", Collections.singletonList(Definitions.defaultAdditionalPermittedUse));
|
||||
|
||||
String licenseDescription = "";
|
||||
if (entry.copyright.use != null)
|
||||
licenseDescription += entry.copyright.use + "\n";
|
||||
licenseDescription += "Released for internet: " + entry.release.get("forInternet") + "\nReleased for intranet: " + entry.release.get("forIntranet");
|
||||
licenseDescription += entry.copyright.use;
|
||||
record.addField("byr_ah_licenseComments", licenseDescription);
|
||||
|
||||
if (entry.gpc != null)
|
||||
|
||||
Reference in New Issue
Block a user