Skip to content

Commit

Permalink
Merge pull request #145 from keeps/alindo-dev
Browse files Browse the repository at this point in the history
Creating schemas before mets
  • Loading branch information
006627 authored Mar 23, 2023
2 parents acfa70d + 7b96862 commit 624aa23
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 624aa23

Please sign in to comment.