Example usage for org.apache.poi.hpsf CustomProperties size

List of usage examples for org.apache.poi.hpsf CustomProperties size

Introduction

In this page you can find the example usage for org.apache.poi.hpsf CustomProperties size.

Prototype

@Override
    public int size() 

Source Link

Usage

From source file:edu.ku.brc.specify.tasks.subpane.wb.ConfigureXLS.java

License:Open Source License

/**
 * @param props/*w w  w. j  av a2s. c om*/
 * @param cols
 * @return
 */
protected boolean doReadMappings(CustomProperties props, List<ImportColumnInfo> cols) {
    boolean usesViewOrder = usesViewOrderKey(props);
    if (props != null && ((usesViewOrder && props.size() == cols.size()) || !usesViewOrder)) {
        if (usesViewOrder) {
            for (ImportColumnInfo col : cols) {
                String key = getKeyForCol(col, usesViewOrder);
                if (key != null) {
                    String[] mapping = ((String) props.get(key)).split("\t");
                    if (!mapping[0].equals(col.getColTitle())) {
                        return false;
                    }
                }
            }
        }
        return true;
    } else {
        return false;
    }
}