Commit a858684b authored by marceteau's avatar marceteau
Browse files

gestion archiveprofile + retrait temporaire systemid

parent bb99bff1
......@@ -585,7 +585,7 @@ public class DCToSeda21Converter extends AbstractArchiveConverter {
// Identifier -> SystemId
if (sip.getDocDC().getIdentifier() != null && !"".equals(sip.getDocDC().getIdentifier())) {
content.getSystemId().add(sip.getDocDC().getIdentifier());
// content.getSystemId().add(sip.getDocDC().getIdentifier());
}
// Version Tag Language
List<Locale> languages = sip.getDocDC().getLanguage();
......
......@@ -155,6 +155,7 @@ public class Seda1ToSeda21Converter extends AbstractArchiveConverter {
private static final String DOCUMENT_TYPE = "DocumentType";
private static final String KEYWORD_CONTENT = "Keyword_KeywordContent";
private static final String IDENTIFIANT_DOC_PRODUCTEUR = "IdentifiantDocProducteur";
private static final String ARCHIVAL_PROFILE = "ArchivalProfile";
private String planClassementFilePath;
/**
......@@ -374,12 +375,16 @@ public class Seda1ToSeda21Converter extends AbstractArchiveConverter {
manifest.setArchivalAgreement(archivalAgreement);
// Profil d'archivage
String archivalProfileValue = properties.getProperty(ARCHIVAL_PROFILE);
// ArchivesIDType archiveProfileId = currentArchive.getArchivalProfile();
ManagementMetadataType managementMetadata = objectFactory.createManagementMetadataType();
// IdentifierType archivalProfile = objectFactory.createIdentifierType();
// archivalProfile.setValue(archiveProfileId.getValue());
// managementMetadata.setArchivalProfile(archivalProfile);
if (!archivalProfileValue.trim().equalsIgnoreCase("") && !archivalProfileValue.trim().equalsIgnoreCase("false")) {
IdentifierType archivalProfile = objectFactory.createIdentifierType();
archivalProfile.setValue(archivalProfileValue);
managementMetadata.setArchivalProfile(archivalProfile);
}
fr.gouv.culture.archivesdefrance.seda.v2.AppraisalRuleType appraisalRule = mapAppraisalRules(currentArchive.getAppraisalRule());
......@@ -488,14 +493,15 @@ public class Seda1ToSeda21Converter extends AbstractArchiveConverter {
// content.getTransferringAgencyArchiveUnitIdentifier().add(transferringAgencyId.getValue());
// }
if(properties.getProperty(IDENTIFIANT_DOC_PRODUCTEUR).equalsIgnoreCase("OriginatingAgencyArchiveUnitIdentifier")) {
String identifiantDocProd = properties.getProperty(IDENTIFIANT_DOC_PRODUCTEUR);
if(identifiantDocProd != null && identifiantDocProd.equalsIgnoreCase("OriginatingAgencyArchiveUnitIdentifier")) {
ArchivesIDType transferringAgencyId = currentArchive.getOriginatingAgencyArchiveIdentifier();
content.getOriginatingAgencyArchiveUnitIdentifier().add(transferringAgencyId.getValue());
} else if(properties.getProperty(IDENTIFIANT_DOC_PRODUCTEUR).equalsIgnoreCase("OriginatingSystemId")) {
} else if(identifiantDocProd != null && identifiantDocProd.equalsIgnoreCase("OriginatingSystemId")) {
// ArchivesIDType transferringAgencyId = currentArchive.getOriginatingAgencyArchiveIdentifier();
// content.getTransferringAgencyArchiveUnitIdentifier().add(transferringAgencyId.getValue());
} else {
ArchivesIDType transferringAgencyId = currentArchive.getOriginatingAgencyArchiveIdentifier();
ArchivesIDType transferringAgencyId = currentArchive.getTransferringAgencyArchiveIdentifier();
content.getTransferringAgencyArchiveUnitIdentifier().add(transferringAgencyId.getValue());
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment