} else if(filterTypeParam.equalsIgnoreCase(StreamFilterType.DOM.name())) {
filterType = StreamFilterType.DOM;
} else if(filterTypeParam.equalsIgnoreCase(StreamFilterType.SAX.name())) {
filterType = StreamFilterType.SAX;
} else {
throw new SmooksException("Invalid '" + Filter.STREAM_FILTER_TYPE + "' configuration parameter value of '" + filterTypeParam + "'. Must be 'SAX' or 'DOM'.");
}
} else if(visitorConfig.getDomVisitorCount() == visitorConfig.getVisitorCount()) {
filterType = StreamFilterType.DOM;
} else if(visitorConfig.getSaxVisitorCount() == visitorConfig.getVisitorCount()) {
filterType = StreamFilterType.SAX;
} else {
throw new SmooksException("Ambiguous Resource Configuration set. All Element Content Handlers must support processing on the SAX and/or DOM Filter:\n" + getResourceFilterCharacteristics());
}
// If the filter type has been configured, we make sure the selected filter matches...
if(filterTypeParam != null) {
if(!filterTypeParam.equalsIgnoreCase(filterType.name())) {
throw new SmooksException("The configured Filter ('" + filterTypeParam + "') cannot be used with the specified set of Smooks visitors. The '" + filterType + "' Filter is the only filter that can be used for this set of Visitors. Turn on Debug logging for more information.");
}
}
return filterType;
}