protected boolean isForThisNode(BrixNode bn) {
return super.isForThisNode(bn) && isCorrectMimeType(bn);
}
protected boolean isCorrectMimeType(BrixNode bn) {
ResourceNode rn = (ResourceNode) bn;
if (bn == null || rn.getMimeType() == null) {
return false;
}
// TODO: perhaps should only test on lower case here?
// if so, need to lowercase all incoming types in the constructor
String type = rn.getMimeType();
int slash = type.indexOf('/');
if (slash < 0) {
return mimeTypePrefixes.contains(type);
} else {
String prefix = type.substring(0, slash);