* -------------------------------- wenn Filegroups definiert wurden, werden diese jetzt in die Metsstruktur übernommen
* --------------------------------
*/
// Replace all paths with the given VariableReplacer, also the file
// group paths!
VariableReplacer vp = new VariableReplacer(mm.getDigitalDocument(), this.myPrefs, myProzess, null);
Set<ProjectFileGroup> myFilegroups = myProzess.getProjekt().getFilegroups();
if (myFilegroups != null && myFilegroups.size() > 0) {
for (ProjectFileGroup pfg : myFilegroups) {
// check if source files exists
if (pfg.getFolder() != null && pfg.getFolder().length() > 0) {
File folder = new File(myProzess.getMethodFromName(pfg.getFolder()));
if (folder != null && folder.exists() && folder.list().length > 0) {
VirtualFileGroup v = new VirtualFileGroup();
v.setName(pfg.getName());
v.setPathToFiles(vp.replace(pfg.getPath()));
v.setMimetype(pfg.getMimetype());
v.setFileSuffix(pfg.getSuffix());
mm.getDigitalDocument().getFileSet().addVirtualFileGroup(v);
}
} else {
VirtualFileGroup v = new VirtualFileGroup();
v.setName(pfg.getName());
v.setPathToFiles(vp.replace(pfg.getPath()));
v.setMimetype(pfg.getMimetype());
v.setFileSuffix(pfg.getSuffix());
mm.getDigitalDocument().getFileSet().addVirtualFileGroup(v);
}
}
}
// Replace rights and digiprov entries.
mm.setRightsOwner(vp.replace(myProzess.getProjekt().getMetsRightsOwner()));
mm.setRightsOwnerLogo(vp.replace(myProzess.getProjekt().getMetsRightsOwnerLogo()));
mm.setRightsOwnerSiteURL(vp.replace(myProzess.getProjekt().getMetsRightsOwnerSite()));
mm.setRightsOwnerContact(vp.replace(myProzess.getProjekt().getMetsRightsOwnerMail()));
mm.setDigiprovPresentation(vp.replace(myProzess.getProjekt().getMetsDigiprovPresentation()));
mm.setDigiprovReference(vp.replace(myProzess.getProjekt().getMetsDigiprovReference()));
mm.setDigiprovPresentationAnchor(vp.replace(myProzess.getProjekt().getMetsDigiprovPresentationAnchor()));
mm.setDigiprovReferenceAnchor(vp.replace(myProzess.getProjekt().getMetsDigiprovReferenceAnchor()));
mm.setPurlUrl(vp.replace(myProzess.getProjekt().getMetsPurl()));
mm.setContentIDs(vp.replace(myProzess.getProjekt().getMetsContentIDs()));
String pointer = myProzess.getProjekt().getMetsPointerPath();
pointer = vp.replace(pointer);
mm.setMptrUrl(pointer);
String anchor = myProzess.getProjekt().getMetsPointerPathAnchor();
pointer = vp.replace(anchor);
mm.setMptrAnchorUrl(pointer);
// if (!ConfigMain.getParameter("ImagePrefix", "\\d{8}").equals("\\d{8}")) {
List<String> images = new ArrayList<String>();
if (ConfigMain.getBooleanParameter("ExportValidateImages", true)) {