private Map<String,String> loadDCATSettings(){
  Map<String,String> loadedSettings=Maps.newHashMap();
  Closer closer=Closer.create();
  try {
    InputStream configStream=closer.register(streamUtils.classpathStream(DCAT_SETTINGS));
    if (configStream == null) {
      LOG.error("Failed to load DCAT settings: " + DCAT_SETTINGS);
    }
 else {
      Properties properties=new Properties();
      properties.load(configStream);
      for (      Map.Entry<Object,Object> entry : properties.entrySet()) {
        String key=StringUtils.trim((String)entry.getKey());
        String value=StringUtils.trim((String)entry.getValue());
        if (key != null && value != null) {
          loadedSettings.put(key,value);
        }
 else {
          throw new InvalidConfigException(InvalidConfigException.TYPE.INVALID_PROPERTIES_FILE,"Invalid properties file: " + DCAT_SETTINGS);
        }
      }
      LOG.debug("Loaded static DCAT settings: " + loadedSettings.toString());
    }
  }
 catch (  Exception e) {
    LOG.error("Failed to load DCAT settings from: " + DCAT_SETTINGS,e);
  }
 finally {
    try {
      closer.close();
    }
 catch (    IOException e) {
      LOG.debug("Failed to close input stream on DCAT settings file: " + DCAT_SETTINGS,e);
    }
  }
  return loadedSettings;
}

private Map < String , String > loadDCATSettings ( ) { Map < String , String > loadedSettings = Maps . newHashMap ( ) ; Closer closer = Closer . create ( ) ; try { InputStream configStream = closer . register ( streamUtils . classpathStream ( DCAT_SETTINGS ) ) ; if ( configStream == null ) { LOG . error ( "Failed to load DCAT settings: " + DCAT_SETTINGS ) ; } else { Properties properties = new Properties ( ) ; properties . load ( configStream ) ; for ( Map . Entry < Object , Object > entry : properties . entrySet ( ) ) { String key = StringUtils . trim ( ( String ) entry . getKey ( ) ) ; String value = StringUtils . trim ( ( String ) entry . getValue ( ) ) ; if ( key != null && value != null ) { loadedSettings . put ( key , value ) ; } else { throw new InvalidConfigException ( InvalidConfigException . TYPE . INVALID_PROPERTIES_FILE , "Invalid properties file: " + DCAT_SETTINGS ) ; } } LOG . debug ( "Loaded static DCAT settings: " + loadedSettings . toString ( ) ) ; } } catch ( Exception e ) { LOG . error ( "Failed to load DCAT settings from: " + DCAT_SETTINGS , e ) ; } finally { try { closer . close ( ) ; } catch ( IOException e ) { LOG . debug ( "Failed to close input stream on DCAT settings file: " + DCAT_SETTINGS , e ) ; } } return loadedSettings ; }
this method loads the dcat settings from dcatsettings . properties .
