Example usage for org.apache.poi.ss.formula.eval NotImplementedException NotImplementedException

List of usage examples for org.apache.poi.ss.formula.eval NotImplementedException NotImplementedException

Introduction

In this page you can find the example usage for org.apache.poi.ss.formula.eval NotImplementedException NotImplementedException.

Prototype

public NotImplementedException(String message) 

Source Link

Usage

From source file:com.ggvaidya.scinames.model.change.RenamesFromIdsInData.java

License:Open Source License

@Override
public Stream<PotentialChange> generate(Project project, Dataset ds) {
    throw new NotImplementedException(
            "Cannot generate per dataset generate(" + project + ", " + ds + "): not supported");
}

From source file:nl.eur.ese.spreadsheettest.DStarRunner.java

License:Apache License

/**
 * Checks a row in a database against a condition database.
 *
 * @param db Database./*from   w  w w.  j  a  va  2 s .c o m*/
 * @param row The row in the database to check.
 * @param cdb The condition database to use for checking.
 * @return Whether the row matches the conditions.
 * @throws EvaluationException If references could not be resolved or comparison
 * operators and operands didn't match.
 */
private static boolean fullfillsConditions(TwoDEval db, int row, TwoDEval cdb) throws EvaluationException {
    // Only one row must match to accept the input, so rows are ORed.
    // Each row is made up of cells where each cell is a condition,
    // all have to match, so they are ANDed.
    for (int conditionRow = 1; conditionRow < cdb.getHeight(); ++conditionRow) {
        boolean matches = true;
        for (int column = 0; column < cdb.getWidth(); ++column) { // columns are ANDed
            // Whether the condition column matches a database column, if not it's a
            // special column that accepts formulas.
            boolean columnCondition = true;
            ValueEval condition = null;
            try {
                // The condition to apply.
                condition = solveReference(cdb.getValue(conditionRow, column));
            } catch (java.lang.RuntimeException e) {
                // It might be a special formula, then it is ok if it fails.
                columnCondition = false;
            }
            // If the condition is empty it matches.
            if (condition instanceof BlankEval)
                continue;
            // The column in the DB to apply the condition to.
            ValueEval targetHeader = solveReference(cdb.getValue(0, column));
            targetHeader = solveReference(targetHeader);

            if (!(targetHeader instanceof StringValueEval)) {
                throw new EvaluationException(ErrorEval.VALUE_INVALID);
            }

            if (getColumnForName(targetHeader, db) == -1)
                // No column found, it's again a special column that accepts formulas.
                columnCondition = false;

            if (columnCondition == true) { // normal column condition
                // Should not throw, checked above.
                ValueEval value = db.getValue(row, getColumnForName(targetHeader, db));
                if (!testNormalCondition(value, condition)) {
                    matches = false;
                    break;
                }
            } else { // It's a special formula condition.
                if (getStringFromValueEval(condition).isEmpty()) {
                    throw new EvaluationException(ErrorEval.VALUE_INVALID);
                }
                throw new NotImplementedException("D* function with formula conditions");
            }
        }
        if (matches == true) {
            return true;
        }
    }
    return false;
}

From source file:org.vsearchd.crawler.controller.ServerDocumentPoolManager.java

License:Open Source License

public synchronized void clear() {
    throw new NotImplementedException("don't use this ;)");
}

From source file:org.vsearchd.crawler.controller.ServerDocumentPoolManager.java

License:Open Source License

public synchronized long size() {
    throw new NotImplementedException("don't use this ;)");
}

From source file:org.vsearchd.crawler.controller.ServerDocumentPoolManager.java

License:Open Source License

public synchronized void addMessage(String msg) {
    throw new NotImplementedException("don't use this ;)");
}