DaBInImporter: Aktueller Stand.
git-svn-id: https://svn.libreccm.org/ccm/trunk@653 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
4d04a8edb4
commit
e7ec3833c2
|
|
@ -2131,13 +2131,15 @@ public class DaBInImporter extends Program {
|
||||||
|
|
||||||
//Assign to term/category
|
//Assign to term/category
|
||||||
Calendar today = new GregorianCalendar();
|
Calendar today = new GregorianCalendar();
|
||||||
SciProject sciProject = (SciProject) project.
|
SciProject sciProject =
|
||||||
getPrimaryInstance();
|
(SciProject) project.getPrimaryInstance();
|
||||||
if ((sciProject.getEnd() != null)
|
if ((sciProject.getEnd() != null)
|
||||||
&& today.getTime().after(sciProject.getEnd())) {
|
&& today.getTime().after(sciProject.getEnd())) {
|
||||||
finishedProjectsTerm.addObject(project);
|
finishedProjectsTerm.addObject(project);
|
||||||
|
finishedProjectsTerm.save();
|
||||||
} else {
|
} else {
|
||||||
currentProjectsTerm.addObject(project);
|
currentProjectsTerm.addObject(project);
|
||||||
|
currentProjectsTerm.save();
|
||||||
}
|
}
|
||||||
|
|
||||||
System.out.println("\tOK");
|
System.out.println("\tOK");
|
||||||
|
|
@ -2628,6 +2630,7 @@ public class DaBInImporter extends Program {
|
||||||
term = publicationsTerm;
|
term = publicationsTerm;
|
||||||
}
|
}
|
||||||
term.addObject(publication);
|
term.addObject(publication);
|
||||||
|
term.save();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -2736,6 +2739,7 @@ public class DaBInImporter extends Program {
|
||||||
term = workingPapersTerm;
|
term = workingPapersTerm;
|
||||||
}
|
}
|
||||||
term.addObject(workingPaper);
|
term.addObject(workingPaper);
|
||||||
|
term.save();
|
||||||
|
|
||||||
System.out.println("\tOK");
|
System.out.println("\tOK");
|
||||||
|
|
||||||
|
|
@ -2797,6 +2801,7 @@ public class DaBInImporter extends Program {
|
||||||
FileAsset file = new FileAsset();
|
FileAsset file = new FileAsset();
|
||||||
file.loadFromFile(workingPaper.getPrimaryInstance().
|
file.loadFromFile(workingPaper.getPrimaryInstance().
|
||||||
getName(), pdf, "application/octet-stream");
|
getName(), pdf, "application/octet-stream");
|
||||||
|
fsi.setFile(file);
|
||||||
file.setContentSection(section);
|
file.setContentSection(section);
|
||||||
fsi.setContentSection(section);
|
fsi.setContentSection(section);
|
||||||
|
|
||||||
|
|
@ -2805,8 +2810,6 @@ public class DaBInImporter extends Program {
|
||||||
bundle.setContentSection(section);
|
bundle.setContentSection(section);
|
||||||
bundle.setDefaultLanguage("de");
|
bundle.setDefaultLanguage("de");
|
||||||
|
|
||||||
//files.addItem(bundle);
|
|
||||||
|
|
||||||
RelatedLink download = new RelatedLink();
|
RelatedLink download = new RelatedLink();
|
||||||
download.setTitle("download");
|
download.setTitle("download");
|
||||||
download.setTargetType(Link.INTERNAL_LINK);
|
download.setTargetType(Link.INTERNAL_LINK);
|
||||||
|
|
@ -3214,7 +3217,8 @@ public class DaBInImporter extends Program {
|
||||||
try {
|
try {
|
||||||
term = termsDomain.getTerm(uniqueId);
|
term = termsDomain.getTerm(uniqueId);
|
||||||
} catch (DataObjectNotFoundException ex) {
|
} catch (DataObjectNotFoundException ex) {
|
||||||
System.out.printf("Term '%s' does not exist. Creating...\n", token);
|
System.out.printf("Term '%s' does not exist. Creating...\n",
|
||||||
|
token);
|
||||||
createTerm(uniqueId, name, termsDomain, prevTerm);
|
createTerm(uniqueId, name, termsDomain, prevTerm);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue