public class CompareHandler implements TagHandler {
public void startElement(String uri, String localName, String qName,
Attributes attributes) throws SAXException {
CompareMapperImpl smi = new CompareMapperImpl(attributes
.getValue("name"));
smi.setTypeHelper(typeHelper);
/* defined input/output map ? */
Object input = maps.get(attributes.getValue("input"));
Object output = maps.get(attributes.getValue("output"));
if (output != null) {
try {
smi.setFilter((Class) input, (Map) output);
} catch (ClassCastException e) {
throw new SAXException(
"Incorrect types for input/output attributes in search map. Output should be a map and input a bean.");
}
}