Package org.goobi.production.importer

Examples of org.goobi.production.importer.Record


                // PluginLoader.getPlugin(PluginType.Import,
                // this.currentPlugin);
                List<String> ids = this.plugin.splitIds(this.idList);
                List<Record> recordList = new ArrayList<Record>();
                for (String id : ids) {
                    Record r = new Record();
                    r.setData(id);
                    r.setId(id);
                    r.setCollections(this.digitalCollections);
                    recordList.add(r);
                }

                answer = this.plugin.generateFiles(recordList);
            } else if (this.importFile != null) {
                // uploaded file
                // IImportPlugin plugin = (IImportPlugin)
                // PluginLoader.getPlugin(PluginType.Import,
                // this.currentPlugin);
                this.plugin.setFile(this.importFile);
                List<Record> recordList = this.plugin.generateRecordsFromFile();
                for (Record r : recordList) {
                    r.setCollections(this.digitalCollections);
                }
                answer = this.plugin.generateFiles(recordList);
            } else if (StringUtils.isNotEmpty(this.records)) {
                // found list with records
                // IImportPlugin plugin = (IImportPlugin)
                // PluginLoader.getPlugin(PluginType.Import,
                // this.currentPlugin);
                List<Record> recordList = this.plugin.splitRecords(this.records);
                for (Record r : recordList) {
                    r.setCollections(this.digitalCollections);
                }
                answer = this.plugin.generateFiles(recordList);
            } else if (this.selectedFilenames.size() > 0) {
                List<Record> recordList = this.plugin.generateRecordsFromFilenames(this.selectedFilenames);
                for (Record r : recordList) {
                    r.setCollections(this.digitalCollections);
                }
                answer = this.plugin.generateFiles(recordList);

            }
View Full Code Here

TOP

Related Classes of org.goobi.production.importer.Record

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.