Package net.datacrow.core.migration.itemimport

Examples of net.datacrow.core.migration.itemimport.ItemImporterHelper


    private void loadItems(File file, int moduleIdx) {
        try {
             
            client.notifyMessage("Loading items");
           
            ItemImporterHelper reader = new ItemImporterHelper("XML", moduleIdx, file);
                reader.start();
                Collection<DcObject> items = reader.getItems();
                reader.clear();
               
                client.notifyStartedSubProcess(items.size());
               
               
                int counter = 1;
View Full Code Here


        File csvFile = new File(DataCrow.moduleDir + "data", getTableName() + ".data");
        File xmlFile = new File(DataCrow.moduleDir + "data", getTableName() + ".xml");
       
        Collection<DcObject> items = null;
        ItemImporterHelper reader = null;
        if (csvFile.exists()) {
            reader = new ItemImporterHelper("CSV", getIndex(), csvFile);
            reader.setSetting(CsvImporter._SEPERATOR, "\t");
        } else if (xmlFile.exists()) {
            reader = new ItemImporterHelper("XML", getIndex(), xmlFile);
        }
       
        if (reader != null) {
            reader.start();
            items = reader.getItems();
            reader.clear();
        }
       
        return items;
    }
View Full Code Here

TOP

Related Classes of net.datacrow.core.migration.itemimport.ItemImporterHelper

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.