boolean updateMetadata(@NotNull Document metadata){
  try {
    VersionMetadata updated=loadMetadata(metadata.getRootElement());
    if (updated.dataVersion > myMetadata.dataVersion) {
      myMetadata=updated;
      File metadataFilePath=getMetadataFilePath();
      writeDocument(metadata,metadataFilePath,SystemProperties.getLineSeparator());
      LOG.info("Saved component version metadata to: " + metadataFilePath);
      return true;
    }
  }
 catch (  Throwable e) {
    LOG.info("Failed to update component version metadata",e);
  }
  return false;
}

boolean updateMetadata ( @ NotNull Document metadata ) { try { VersionMetadata updated = loadMetadata ( metadata . getRootElement ( ) ) ; if ( updated . dataVersion > myMetadata . dataVersion ) { myMetadata = updated ; File metadataFilePath = getMetadataFilePath ( ) ; writeDocument ( metadata , metadataFilePath , SystemProperties . getLineSeparator ( ) ) ; LOG . info ( "Saved component version metadata to: " + metadataFilePath ) ; return true ; } } catch ( Throwable e ) { LOG . info ( "Failed to update component version metadata" , e ) ; } return false ; }
updates the version metadata with the given xml document .
