Package de.timefinder.core.io.text

Examples of de.timefinder.core.io.text.ImportText


        MySwingWorker sw = new MySwingWorker(ID) {

            @Override
            protected void myconstruct() throws Exception {
                bar.getProgressMonitor().worked(10);
                ImportText importer = new ImportText(dataPool, settings, file);

                bar.getProgressMonitor().worked(20);
                importer.doWork();
                bar.getProgressMonitor().worked(80);
            }

            @Override
            protected void done() {
View Full Code Here


        super.setUp();
    }

    @Test
    public void testDoWork() {
        ImportText importer = new ImportText(dataPool, settings, null);

        importer.setFeatureReader(new StringReader(""));
        importer.setLocationReader(new StringReader(""));
       
        importer.setPersonReader(new StringReader(
                "#id\tname\tevents\n" +
                "4\tPerson1\t1\n" +
                "5\tPerson2\t1\n"));

        importer.setEventReader(new StringReader(
                "#id\tname\tduration\tpersons\n" +
                "1\tEvent1\t10\t4,5\n" +
                "2\tEvent2\t12\t\n" +
                "3\tEvent3\t13\t\n"));

        importer.doWork();

        Dao<Event> newEDao = dataPool.getDao(Event.class);
        Dao<Person> newPDao = dataPool.getDao(Person.class);
        assertEquals(3, newEDao.getAll().size());
        assertEquals(2, newPDao.getAll().size());
View Full Code Here

TOP

Related Classes of de.timefinder.core.io.text.ImportText

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.