public boolean apply(ReferenceType arg0) {
// TODO: this is inefficient, calculating the index each time, but
// shouldn't be added to constructor as the supplier is an expensive
// call
Map<URI, Catalog> index = catalogsByIdSupplier.get();
Catalog catalog = index.get(arg0.getHref());
if (catalog == null) {
if (logger.isTraceEnabled())
logger.trace("didn't find catalog %s", arg0);
return false;
} else
return !catalog.isReadOnly();
}