Package org.apache.metamodel.excel

Examples of org.apache.metamodel.excel.ExcelConfiguration


        final Resource resource = getResource(params);
        final int columnNameLineNumber = getInt(params.getColumnNameLineNumber(),
                ExcelConfiguration.DEFAULT_COLUMN_NAME_LINE);
        final boolean skipEmptyLines = getBoolean(params.getSkipEmptyLines(), true);
        final boolean skipEmptyColumns = getBoolean(params.getSkipEmptyColumns(), false);
        final ExcelConfiguration configuration = new ExcelConfiguration(columnNameLineNumber, skipEmptyLines,
                skipEmptyColumns);
        return new ExcelDataContext(resource, configuration);
    }
View Full Code Here


     * @param file
     *            an Excel spreadsheet file
     * @return a DataContext object that matches the request
     */
    public static UpdateableDataContext createExcelDataContext(File file) {
        return createExcelDataContext(file, new ExcelConfiguration());
    }
View Full Code Here

import junit.framework.TestCase;

public class ExcelConfigurationTest extends TestCase {

  public void testToString() throws Exception {
    ExcelConfiguration conf = new ExcelConfiguration(1, true, false);
    assertEquals(
        "ExcelConfiguration[columnNameLineNumber=1, skipEmptyLines=true, skipEmptyColumns=false]",
        conf.toString());
  }
View Full Code Here

        "ExcelConfiguration[columnNameLineNumber=1, skipEmptyLines=true, skipEmptyColumns=false]",
        conf.toString());
  }

  public void testEquals() throws Exception {
    ExcelConfiguration conf1 = new ExcelConfiguration(1, true, false);
    ExcelConfiguration conf2 = new ExcelConfiguration(1, true, false);
    ExcelConfiguration conf3 = new ExcelConfiguration(2, true, false);

    assertEquals(conf1, conf2);
    assertFalse(conf1.equals(conf3));
  }
View Full Code Here

        dc = DataContextFactory.createExcelDataContext(file);
        assertNotNull(dc);
        assertTrue(dc instanceof ExcelDataContext);

        dc = DataContextFactory.createExcelDataContext(file,
                new ExcelConfiguration());
        assertNotNull(dc);
        assertTrue(dc instanceof ExcelDataContext);
    }
View Full Code Here

     * @param file
     *            an Excel spreadsheet file
     * @return a DataContext object that matches the request
     */
    public static UpdateableDataContext createExcelDataContext(File file) {
        return createExcelDataContext(file, new ExcelConfiguration());
    }
View Full Code Here

     * @param file
     *            an Excel spreadsheet file
     * @return a DataContext object that matches the request
     */
    public static UpdateableDataContext createExcelDataContext(File file) {
        return createExcelDataContext(file, new ExcelConfiguration());
    }
View Full Code Here

TOP

Related Classes of org.apache.metamodel.excel.ExcelConfiguration

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.