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-94f89814c4dfmaster
parent
906a804323
commit
02d747050b
|
|
@ -2138,19 +2138,22 @@ public class DaBInImporter extends Program {
|
||||||
Term term;
|
Term term;
|
||||||
term = termsDomain.getTerm(
|
term = termsDomain.getTerm(
|
||||||
finishedProjectsTerm.getUniqueID());
|
finishedProjectsTerm.getUniqueID());
|
||||||
|
System.out.printf("\tAdding project to term '%s:%s'...\n",
|
||||||
|
term.getUniqueID(),
|
||||||
|
term.getName());
|
||||||
term.addObject(project);
|
term.addObject(project);
|
||||||
term.save();
|
term.save();
|
||||||
|
project.save();
|
||||||
} else {
|
} else {
|
||||||
Term term;
|
Term term;
|
||||||
term =
|
term =
|
||||||
termsDomain.getTerm(currentProjectsTerm.getUniqueID());
|
termsDomain.getTerm(currentProjectsTerm.getUniqueID());
|
||||||
if (projectDe != null) {
|
System.out.printf("\tAdding project to term '%s:%s'...\n",
|
||||||
term.addObject(projectDe);
|
term.getUniqueID(),
|
||||||
}
|
term.getName());
|
||||||
if (projectEn != null) {
|
term.addObject(project);
|
||||||
term.addObject(projectEn);
|
|
||||||
}
|
|
||||||
term.save();
|
term.save();
|
||||||
|
project.save();
|
||||||
}
|
}
|
||||||
|
|
||||||
System.out.println("\tOK");
|
System.out.println("\tOK");
|
||||||
|
|
@ -2641,12 +2644,9 @@ public class DaBInImporter extends Program {
|
||||||
term = publicationsTerm;
|
term = publicationsTerm;
|
||||||
}
|
}
|
||||||
term = termsDomain.getTerm(term.getUniqueID());
|
term = termsDomain.getTerm(term.getUniqueID());
|
||||||
if (publicationDe != null) {
|
System.out.printf("\tAdding publication to term '%s:%s'...\n", term.
|
||||||
term.addObject(publicationDe);
|
getUniqueID(), term.getName());
|
||||||
}
|
term.addObject(publication);
|
||||||
if (publicationEn != null) {
|
|
||||||
term.addObject(publicationEn);
|
|
||||||
}
|
|
||||||
term.save();
|
term.save();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -2761,12 +2761,9 @@ public class DaBInImporter extends Program {
|
||||||
term = workingPapersTerm;
|
term = workingPapersTerm;
|
||||||
}
|
}
|
||||||
term = termsDomain.getTerm(term.getUniqueID());
|
term = termsDomain.getTerm(term.getUniqueID());
|
||||||
if (workingPaperDe != null) {
|
System.out.printf("\tAdding project to term '%s:%s'...\n", term.
|
||||||
term.addObject(workingPaperDe);
|
getUniqueID(), term.getName());
|
||||||
}
|
term.addObject(workingPaper);
|
||||||
if (workingPaperEn != null) {
|
|
||||||
term.addObject(workingPaperEn);
|
|
||||||
}
|
|
||||||
term.save();
|
term.save();
|
||||||
|
|
||||||
System.out.println("\tOK");
|
System.out.println("\tOK");
|
||||||
|
|
@ -2823,7 +2820,7 @@ public class DaBInImporter extends Program {
|
||||||
getName());
|
getName());
|
||||||
if (name.length() > 200) {
|
if (name.length() > 200) {
|
||||||
name = name.substring(0, 200);
|
name = name.substring(0, 200);
|
||||||
}
|
}
|
||||||
fsi.setName(name);
|
fsi.setName(name);
|
||||||
FileAsset file = new FileAsset();
|
FileAsset file = new FileAsset();
|
||||||
file.loadFromFile(name,
|
file.loadFromFile(name,
|
||||||
|
|
@ -3291,8 +3288,10 @@ public class DaBInImporter extends Program {
|
||||||
try {
|
try {
|
||||||
Term term = Term.create(uniqueId, name, false, "", domain);
|
Term term = Term.create(uniqueId, name, false, "", domain);
|
||||||
term.save();
|
term.save();
|
||||||
parent.addNarrowerTerm(term, false, false);
|
Term parentTerm = termsDomain.getTerm(parent.getUniqueID());
|
||||||
//parent.save();
|
term = termsDomain.getTerm(term.getUniqueID());
|
||||||
|
parentTerm.addNarrowerTerm(term, true, true);
|
||||||
|
parentTerm.save();
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
ex.printStackTrace(System.err);
|
ex.printStackTrace(System.err);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -63,4 +63,5 @@ log4j.logger.com.arsdigita.packaging.Loader=INFO
|
||||||
|
|
||||||
#log4j.logger.com.arsdigita.cms.search.ContentPageMetadataProvider=DEBUG
|
#log4j.logger.com.arsdigita.cms.search.ContentPageMetadataProvider=DEBUG
|
||||||
#log4j.logger.com.arsdigita.london.importer=DEBUG
|
#log4j.logger.com.arsdigita.london.importer=DEBUG
|
||||||
#log4j.logger.com.arsdigita.london.terms.importer.TermItemBuilder=DEBUG
|
#log4j.logger.com.arsdigita.london.terms.importer.TermItemBuilder=DEBUG
|
||||||
|
log4j.logger.com.arsdigita.categorization.Category=DEBUG
|
||||||
Loading…
Reference in New Issue