if (prop == null) {
prop = layer.getBlackboard().get(KEY);
}
if (prop instanceof Boolean && Boolean.TRUE.equals(prop)) {
try {
CachingFeatureSource cachingFeatureSource = (CachingFeatureSource) layer.getBlackboard().get("cache");
if( cachingFeatureSource != null ){
return cachingFeatureSource;
}
cachingFeatureSource = new CachingFeatureSource(resource);
layer.getBlackboard().put("cache", cachingFeatureSource);
return cachingFeatureSource;
} catch (IOException e) {
if ( ProjectPlugin.getPlugin().isDebugging()){
ProjectPlugin.getPlugin().log("Unable to cache "+resource+":"+e.getLocalizedMessage());