protected void renameDwcaToIncludeVersion(Resource resource,BigDecimal version){
  Preconditions.checkNotNull(resource);
  Preconditions.checkNotNull(version);
  File unversionedDwca=dataDir.resourceDwcaFile(resource.getShortname());
  File versionedDwca=dataDir.resourceDwcaFile(resource.getShortname(),version);
  if (unversionedDwca.exists() && !versionedDwca.exists()) {
    try {
      Files.move(unversionedDwca,versionedDwca);
      log.debug("Renamed dwca.zip to " + versionedDwca.getName());
    }
 catch (    IOException e) {
      log.error("Failed to rename dwca.zip file name with version number for " + resource.getShortname(),e);
      throw new InvalidConfigException(TYPE.CONFIG_WRITE,"Failed to update version number for " + resource.getShortname() + ": "+ e.getMessage());
    }
  }
}

protected void renameDwcaToIncludeVersion ( Resource resource , BigDecimal version ) { Preconditions . checkNotNull ( resource ) ; Preconditions . checkNotNull ( version ) ; File unversionedDwca = dataDir . resourceDwcaFile ( resource . getShortname ( ) ) ; File versionedDwca = dataDir . resourceDwcaFile ( resource . getShortname ( ) , version ) ; if ( unversionedDwca . exists ( ) && ! versionedDwca . exists ( ) ) { try { Files . move ( unversionedDwca , versionedDwca ) ; log . debug ( "Renamed dwca.zip to " + versionedDwca . getName ( ) ) ; } catch ( IOException e ) { log . error ( "Failed to rename dwca.zip file name with version number for " + resource . getShortname ( ) , e ) ; throw new InvalidConfigException ( TYPE . CONFIG_WRITE , "Failed to update version number for " + resource . getShortname ( ) + ": " + e . getMessage ( ) ) ; } } }
rename a resource ' s dwca . zip to have the last published version , e . g . dwca - 18 . 0 . zip
