Commit 40e58f2d authored by marceteau's avatar marceteau
Browse files

modif ghost archive unit + modif codec audio

parent e5762581
......@@ -596,35 +596,37 @@ public class DCToSeda21Converter extends AbstractArchiveConverter {
+ "alors que les propriétés demandent sa génération. "
+ "Ajoutez-le en entrée avec l'option -p ");
String[] filePlanLine = filePlanData(planClassementFilePath, filePlan);
String systemId = filePlanLine[1];
String descriptionLevelStr = filePlanLine[2];
TextType title = objectFactory.createTextType();
title.setValue(filePlanLine[3]);
//Ajout de l'Archive Unit fantome
ArchiveUnitType ghostArchiveUnit = objectFactory.createArchiveUnitType();
ArchiveUnitType ghostArchiveUnitAttachment = objectFactory.createArchiveUnitType();
descriptiveMetadata.getArchiveUnit().add(ghostArchiveUnit);
archiveUnitCounter++;
ghostArchiveUnit.setId("ID" + archiveUnitCounter);
archiveUnitCounter++;
ghostArchiveUnitAttachment.setId("ID" + archiveUnitCounter);
ghostArchiveUnitAttachment.setArchiveUnitRefId(rootArchiveUnit);
DescriptiveMetadataContentType ghostContent = objectFactory.createDescriptiveMetadataContentType();
ManagementType ghostManagement = objectFactory.createManagementType();
ghostContent.setDescriptionLevel(LevelType.fromValue(descriptionLevelStr));
ghostContent.getTitle().add(title);
UpdateOperationType updateOperation = objectFactory.createUpdateOperationType();
updateOperation.setSystemId(systemId);
ghostManagement.setUpdateOperation(updateOperation);
ghostArchiveUnit.setManagement(ghostManagement);
ghostArchiveUnit.setContent(ghostContent);
ghostArchiveUnit.getArchiveUnitOrArchiveUnitReferenceAbstractOrDataObjectReference().add(ghostArchiveUnitAttachment);
if (filePlanLine!=null) {
String systemId = filePlanLine[1];
String descriptionLevelStr = filePlanLine[2];
TextType title = objectFactory.createTextType();
title.setValue(filePlanLine[3]);
//Ajout de l'Archive Unit fantome
ArchiveUnitType ghostArchiveUnit = objectFactory.createArchiveUnitType();
ArchiveUnitType ghostArchiveUnitAttachment = objectFactory.createArchiveUnitType();
descriptiveMetadata.getArchiveUnit().add(ghostArchiveUnit);
archiveUnitCounter++;
ghostArchiveUnit.setId("ID" + archiveUnitCounter);
archiveUnitCounter++;
ghostArchiveUnitAttachment.setId("ID" + archiveUnitCounter);
ghostArchiveUnitAttachment.setArchiveUnitRefId(rootArchiveUnit);
DescriptiveMetadataContentType ghostContent = objectFactory.createDescriptiveMetadataContentType();
ManagementType ghostManagement = objectFactory.createManagementType();
ghostContent.setDescriptionLevel(LevelType.fromValue(descriptionLevelStr));
ghostContent.getTitle().add(title);
UpdateOperationType updateOperation = objectFactory.createUpdateOperationType();
updateOperation.setSystemId(systemId);
ghostManagement.setUpdateOperation(updateOperation);
ghostArchiveUnit.setManagement(ghostManagement);
ghostArchiveUnit.setContent(ghostContent);
ghostArchiveUnit.getArchiveUnitOrArchiveUnitReferenceAbstractOrDataObjectReference().add(ghostArchiveUnitAttachment);
}
} catch (Exception e) {
e.printStackTrace();
}
......@@ -1273,12 +1275,12 @@ public class DCToSeda21Converter extends AbstractArchiveConverter {
/**
* Si codec Video ET Audio, on mets les 2 codec dans la balise Video
*/
if(audioCodec != "") {
videoTechnicalMetadataType.getAny().add(createXMLElement(audioCodec, "Codec"));
}
//if(audioCodec != "") {
// videoTechnicalMetadataType.getAny().add(createXMLElement(audioCodec, "Codec"));
//}
metadata.setVideo(videoTechnicalMetadataType);
}
if("".equals(videoCodec) && audioCodec != "") {
if(audioCodec != "") {
AudioTechnicalMetadataType audioTechnicalMetadataType = objectFactory.createAudioTechnicalMetadataType();
audioTechnicalMetadataType.getAny().add(createXMLElement(audioCodec, "Codec"));
metadata.setAudio(audioTechnicalMetadataType);
......
Supports Markdown
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