Ein paar kleinere Korrekturen am CSV-Importer und am allgemeinen Import-Util
git-svn-id: https://svn.libreccm.org/ccm/trunk@1914 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
22d2a675f1
commit
21100f7ae0
|
|
@ -162,7 +162,7 @@ public class ImporterUtil {
|
|||
bundle.save();
|
||||
|
||||
publication.setPublisher(publisher);
|
||||
|
||||
|
||||
if (publish) {
|
||||
publishItem(publisher);
|
||||
}
|
||||
|
|
@ -239,7 +239,7 @@ public class ImporterUtil {
|
|||
|
||||
collectedVolume.save();
|
||||
article.setCollectedVolume(collectedVolume);
|
||||
|
||||
|
||||
if (publish) {
|
||||
publishItem(collectedVolume);
|
||||
}
|
||||
|
|
@ -324,7 +324,7 @@ public class ImporterUtil {
|
|||
|
||||
proceedings.save();
|
||||
inProceedings.setProceedings(proceedings);
|
||||
|
||||
|
||||
if (publish) {
|
||||
publishItem(proceedings);
|
||||
}
|
||||
|
|
@ -390,7 +390,7 @@ public class ImporterUtil {
|
|||
bundle.save();
|
||||
|
||||
article.setJournal(journal);
|
||||
|
||||
|
||||
if (publish) {
|
||||
publishItem(journal);
|
||||
}
|
||||
|
|
@ -421,7 +421,9 @@ public class ImporterUtil {
|
|||
final LifecycleDefinitionCollection lifecycles = item.getContentSection().getLifecycleDefinitions();
|
||||
lifecycles.next();
|
||||
final LifecycleDefinition lifecycleDef = lifecycles.getLifecycleDefinition();
|
||||
item.publish(lifecycleDef, now.getTime());
|
||||
final ContentItem pending = item.publish(lifecycleDef, now.getTime());
|
||||
lifecycles.close();
|
||||
item.promotePendingVersion(pending);
|
||||
}
|
||||
|
||||
protected final String normalizeString(final String str) {
|
||||
|
|
@ -435,4 +437,5 @@ public class ImporterUtil {
|
|||
replace(" ", "-").
|
||||
replaceAll("[^a-zA-Z0-9\\-]", "").toLowerCase().trim();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,12 +72,13 @@ abstract class AbstractPublicationImporter<T extends Publication> {
|
|||
assignCategories(publication.getPublicationBundle());
|
||||
|
||||
if (publishNewItems) {
|
||||
//final Calendar now = new GregorianCalendar();
|
||||
//final LifecycleDefinitionCollection lifecycles = publication.getContentSection().
|
||||
// getLifecycleDefinitions();
|
||||
//lifecycles.next();
|
||||
//final LifecycleDefinition lifecycleDef = lifecycles.getLifecycleDefinition();
|
||||
//publication.publish(lifecycleDef, now.getTime());
|
||||
// final Calendar now = new GregorianCalendar();
|
||||
// final LifecycleDefinitionCollection lifecycles = publication.getContentSection().
|
||||
// getLifecycleDefinitions();
|
||||
// lifecycles.next();
|
||||
// final LifecycleDefinition lifecycleDef = lifecycles.getLifecycleDefinition();
|
||||
// publication.publish(lifecycleDef, now.getTime());
|
||||
// lifecycles.close();
|
||||
importerUtil.publishItem(publication);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,8 +57,12 @@ public class CsvImporterConfig extends AbstractConfig {
|
|||
|
||||
public Map<String, Category> getDepartmentCategories() {
|
||||
final String categoryIds = getDepartmentCategoryIds();
|
||||
|
||||
|
||||
final Map<String, Category> categories = new HashMap<String, Category>();
|
||||
|
||||
if ((categoryIds == null) || categoryIds.isEmpty()) {
|
||||
return categories;
|
||||
}
|
||||
|
||||
final String[] departmentTokens = categoryIds.split(";");
|
||||
for (String departmentToken : departmentTokens) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue