org.cishell.framework.algorithm
Interface DataValidator


public interface DataValidator

An additional interface an AlgorithmFactory can implement that allows for further data validation beyond what is provided in the service dictionary's in_data/out_data specifications. This is useful in cases where an algorithm expects a certain type of data, but must make additional checks. For example, if an algorithm only worked on symmetric matrices, this interface would check the data ahead of time to ensure that the given matrix was in fact a symmetric matrix.

Author:
Bruce Herr (bh2@bh2.net)

Method Summary
 String validate(Data[] data)
          Validates the given data that is proposed to be given to the algorithm.
 

Method Detail

validate

String validate(Data[] data)
Validates the given data that is proposed to be given to the algorithm. It can return three different values:
nullNo validation present
""The data is valid
"..." A localized description of why its invalid

Parameters:
data - The proposed data that may be given to create an Algorithm
Returns:
null, "", or another string