DaBInImporter: Aktueller Stand.

git-svn-id: https://svn.libreccm.org/ccm/trunk@653 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2010-12-20 10:56:38 +00:00
parent 4d04a8edb4
commit e7ec3833c2
1 changed files with 11 additions and 7 deletions

View File

@ -2131,13 +2131,15 @@ public class DaBInImporter extends Program {
//Assign to term/category
Calendar today = new GregorianCalendar();
SciProject sciProject = (SciProject) project.
getPrimaryInstance();
if ((sciProject.getEnd() != null)
&& today.getTime().after(sciProject.getEnd())) {
SciProject sciProject =
(SciProject) project.getPrimaryInstance();
if ((sciProject.getEnd() != null)
&& today.getTime().after(sciProject.getEnd())) {
finishedProjectsTerm.addObject(project);
finishedProjectsTerm.save();
} else {
currentProjectsTerm.addObject(project);
currentProjectsTerm.save();
}
System.out.println("\tOK");
@ -2628,6 +2630,7 @@ public class DaBInImporter extends Program {
term = publicationsTerm;
}
term.addObject(publication);
term.save();
}
};
@ -2736,6 +2739,7 @@ public class DaBInImporter extends Program {
term = workingPapersTerm;
}
term.addObject(workingPaper);
term.save();
System.out.println("\tOK");
@ -2797,6 +2801,7 @@ public class DaBInImporter extends Program {
FileAsset file = new FileAsset();
file.loadFromFile(workingPaper.getPrimaryInstance().
getName(), pdf, "application/octet-stream");
fsi.setFile(file);
file.setContentSection(section);
fsi.setContentSection(section);
@ -2805,8 +2810,6 @@ public class DaBInImporter extends Program {
bundle.setContentSection(section);
bundle.setDefaultLanguage("de");
//files.addItem(bundle);
RelatedLink download = new RelatedLink();
download.setTitle("download");
download.setTargetType(Link.INTERNAL_LINK);
@ -3214,7 +3217,8 @@ public class DaBInImporter extends Program {
try {
term = termsDomain.getTerm(uniqueId);
} 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);
}
}