//application caching. Currently Search Factor caches
try {
initAttributes();
//String key = this.getCapabiltiesUrl + ":" + this.getProfileId();
CswCatalogCapabilities cap = null;
//cap = CAPABILITIES_CACHE.get(key);
//if(cap == null) {
CswCatalog cswCatalog = new CswCatalog(this.getGetCapabiltiesUrl(), "",
readCswProfiles().getProfileById(this.getProfileId()));
cswCatalog.setConnectionTimeoutMs(this.getConnectionTimeoutMs());
cswCatalog.setResponseTimeoutMs(this.getResponseTimeoutMs());
cswCatalog.connect();
cap = cswCatalog.getCapabilities();
this.setCapabilities(cap);
//CAPABILITIES_CACHE.put(key, cap);
//}
this.setGetMetadataRecordUrl(cap.get_getRecordByIDGetURL());
this.setGetRecordsUrl(cap.get_getRecordsPostURL());
} catch (Exception e) {
throw new SearchException("Could not get capabilities from "
+ this.getGetCapabiltiesUrl() + " : " + e.getMessage(), e);
}
}