Skip to content

Commit

Permalink
Creating schemas before mets
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonioG70 committed Mar 23, 2023
1 parent acfa70d commit 7b96862
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@ public Path build(final Path destinationDirectory, final String fileNameWithoutE
Path zipPath = getZipPath(destinationDirectory, fileNameWithoutExtension);
try {
Map<String, ZipEntryInfo> zipEntries = getZipEntries();
//default metadata need to be added before creating the mets in order to add them in the mets file
EARKUtils.addDefaultSchemas(LOGGER, getSchemas(), buildDir);

boolean isMetadataOther = (this.getOtherMetadata() != null && !this.getOtherMetadata().isEmpty());
boolean isMetadata = ((this.getDescriptiveMetadata() != null && !this.getDescriptiveMetadata().isEmpty())
|| (this.getPreservationMetadata() != null && !this.getPreservationMetadata().isEmpty()));
Expand All @@ -207,7 +210,6 @@ public Path build(final Path destinationDirectory, final String fileNameWithoutE
EARKUtils.addOtherMetadataToZipAndMETS(zipEntries, mainMETSWrapper, getOtherMetadata(), null);
EARKUtils.addRepresentationsToZipAndMETS(this, getRepresentations(), zipEntries, mainMETSWrapper, buildDir,
sipType);
EARKUtils.addDefaultSchemas(LOGGER, getSchemas(), buildDir);
EARKUtils.addSchemasToZipAndMETS(zipEntries, mainMETSWrapper, getSchemas(), null);
EARKUtils.addDocumentationToZipAndMETS(zipEntries, mainMETSWrapper, getDocumentation(), null);
METSUtils.addMainMETSToZip(zipEntries, mainMETSWrapper, buildDir);
Expand Down

0 comments on commit 7b96862

Please sign in to comment.