Skip to content

Commit

Permalink
Import zvukovych dokumentu NDK - hack for pages in supplements
Browse files Browse the repository at this point in the history
  • Loading branch information
vlahoda committed Jan 21, 2025
1 parent 058c23f commit 4bb5651
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
group=cz.incad.kramerius
version=7.0.40-rc2
version=7.0.40-rc3
#version=7.0.40-devmerge
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,13 @@ private void setDCModelAndPolicy(OaiDcType dc, String model, String policy) {

private boolean singleVolumeMonograph = false;

private String soundCollectionId = null; //root sound collection id for sound recordings, used in processStructLink for adding missing page relations

private Foxml processDiv(Foxml parent, String parentModel, DivType div) {
String divType = div.getTYPE();
if ("SOUNDCOLLECTION".equalsIgnoreCase(divType)) {
soundCollectionId = div.getID();
}
if ("PAGE".equalsIgnoreCase(divType)) return null;//divs for PAGES are processed from physical map and structlinks
MdSecType modsIdObj = (MdSecType) firstItem(div.getDMDID());
//if ("PICTURE".equalsIgnoreCase(divType)) return null;//divs for PICTURE are not supported in K4
Expand Down Expand Up @@ -695,6 +700,16 @@ protected void processStructLink(StructLink structLink) {
}
} else {
part.getRe().addRelation(RelsExt.IS_ON_PAGE, target.getPid(), false);
if (soundCollectionId != null ) {
Foxml soundCollection = objects.get(soundCollectionId);
if (soundCollection != null) {
if (pagesFirst) {
soundCollection.getRe().insertPage(target.getPid());
} else {
soundCollection.getRe().addRelation(RelsExt.HAS_PAGE, target.getPid(), false);
}
}
}
}
}
}
Expand Down

0 comments on commit 4bb5651

Please sign in to comment.