protected void verify(JRVerifier verifier, PieDataset dataset)
{
verifier.verifyElementDataset(dataset);
JRExpression keyExpression = dataset.getKeyExpression();
if (keyExpression == null)
{
verifier.addBrokenRule("No key expression for pie chart dataset", dataset);
}
else
{
String valueClass = keyExpression.getValueClassName();
if (valueClass == null)
{
verifier.addBrokenRule("No value class for key chart dataset key expression",
keyExpression);
}
else if (!"java.lang.String".equals(valueClass))
{
verifier.addBrokenRule("Class " + valueClass
+ " not supported for key chart dataset key expression. Use java.lang.String instead.",
keyExpression);
}
}
JRExpression valueExpression = dataset.getValueExpression();
if (valueExpression == null)
{
verifier.addBrokenRule("No value expression for key chart dataset", dataset);
}
else
{
String valueClass = valueExpression.getValueClassName();
if (valueClass == null)
{
verifier.addBrokenRule("No value class for key chart dataset value expression",
valueExpression);
}