private void finishInstall(File tmpFile,Vocabulary vocabulary) throws IOException {
  Preconditions.checkNotNull(tmpFile);
  Preconditions.checkNotNull(vocabulary);
  Preconditions.checkNotNull(vocabulary.getUriString());
  try {
    File installedFile=getVocabFile(vocabulary.getUriResolvable());
    if (!installedFile.exists()) {
      FileUtils.moveFile(tmpFile,installedFile);
    }
    Vocabulary fromFile=loadFromFile(installedFile);
    fromFile.setUriResolvable(vocabulary.getUriResolvable());
    vocabulariesById.put(vocabulary.getUriString(),fromFile);
  }
 catch (  IOException e) {
    log.error("Installing vocabulary failed, while trying to move and rename vocabulary file: " + e.getMessage(),e);
    throw e;
  }
}

private void finishInstall ( File tmpFile , Vocabulary vocabulary ) throws IOException { Preconditions . checkNotNull ( tmpFile ) ; Preconditions . checkNotNull ( vocabulary ) ; Preconditions . checkNotNull ( vocabulary . getUriString ( ) ) ; try { File installedFile = getVocabFile ( vocabulary . getUriResolvable ( ) ) ; if ( ! installedFile . exists ( ) ) { FileUtils . moveFile ( tmpFile , installedFile ) ; } Vocabulary fromFile = loadFromFile ( installedFile ) ; fromFile . setUriResolvable ( vocabulary . getUriResolvable ( ) ) ; vocabulariesById . put ( vocabulary . getUriString ( ) , fromFile ) ; } catch ( IOException e ) { log . error ( "Installing vocabulary failed, while trying to move and rename vocabulary file: " + e . getMessage ( ) , e ) ; throw e ; } }
move and rename temporary file to final version . update vocabulary loaded into local lookup .
