Commit 37669d93 authored by granier's avatar granier
Browse files
parents d042aa77 3168a881
#!/usr/bin/env bash
java -jar /usr/share/java/archive-converter/${project.name}-${project.version}.jar $1
\ No newline at end of file
java -jar /usr/share/java/archive-converter/${project.name}-${project.version}.jar "$@"
\ No newline at end of file
......@@ -602,35 +602,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();
}
......@@ -1280,12 +1282,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