DaBInImporter: Zuweisung der Terms zu Projekten und Publikationen funktioniert jetzt endlich.

git-svn-id: https://svn.libreccm.org/ccm/trunk@664 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2010-12-27 20:41:37 +00:00
parent 906a804323
commit 02d747050b
3 changed files with 305 additions and 319 deletions

View File

@ -2138,19 +2138,22 @@ public class DaBInImporter extends Program {
Term term;
term = termsDomain.getTerm(
finishedProjectsTerm.getUniqueID());
System.out.printf("\tAdding project to term '%s:%s'...\n",
term.getUniqueID(),
term.getName());
term.addObject(project);
term.save();
project.save();
} else {
Term term;
term =
termsDomain.getTerm(currentProjectsTerm.getUniqueID());
if (projectDe != null) {
term.addObject(projectDe);
}
if (projectEn != null) {
term.addObject(projectEn);
}
System.out.printf("\tAdding project to term '%s:%s'...\n",
term.getUniqueID(),
term.getName());
term.addObject(project);
term.save();
project.save();
}
System.out.println("\tOK");
@ -2641,12 +2644,9 @@ public class DaBInImporter extends Program {
term = publicationsTerm;
}
term = termsDomain.getTerm(term.getUniqueID());
if (publicationDe != null) {
term.addObject(publicationDe);
}
if (publicationEn != null) {
term.addObject(publicationEn);
}
System.out.printf("\tAdding publication to term '%s:%s'...\n", term.
getUniqueID(), term.getName());
term.addObject(publication);
term.save();
}
};
@ -2761,12 +2761,9 @@ public class DaBInImporter extends Program {
term = workingPapersTerm;
}
term = termsDomain.getTerm(term.getUniqueID());
if (workingPaperDe != null) {
term.addObject(workingPaperDe);
}
if (workingPaperEn != null) {
term.addObject(workingPaperEn);
}
System.out.printf("\tAdding project to term '%s:%s'...\n", term.
getUniqueID(), term.getName());
term.addObject(workingPaper);
term.save();
System.out.println("\tOK");
@ -3291,8 +3288,10 @@ public class DaBInImporter extends Program {
try {
Term term = Term.create(uniqueId, name, false, "", domain);
term.save();
parent.addNarrowerTerm(term, false, false);
//parent.save();
Term parentTerm = termsDomain.getTerm(parent.getUniqueID());
term = termsDomain.getTerm(term.getUniqueID());
parentTerm.addNarrowerTerm(term, true, true);
parentTerm.save();
} catch (Exception ex) {
ex.printStackTrace(System.err);
}

File diff suppressed because it is too large Load Diff

View File

@ -64,3 +64,4 @@ log4j.logger.com.arsdigita.packaging.Loader=INFO
#log4j.logger.com.arsdigita.cms.search.ContentPageMetadataProvider=DEBUG
#log4j.logger.com.arsdigita.london.importer=DEBUG
#log4j.logger.com.arsdigita.london.terms.importer.TermItemBuilder=DEBUG
log4j.logger.com.arsdigita.categorization.Category=DEBUG