protected BigDecimal convertVersion(Resource resource){
  if (resource.getEmlVersion() != null) {
    BigDecimal version=resource.getEmlVersion();
    if (version.equals(BigDecimal.ZERO)) {
      return Constants.INITIAL_RESOURCE_VERSION;
    }
 else     if (version.scale() == 0) {
      BigDecimal majorMinorVersion=version.setScale(1,RoundingMode.CEILING);
      log.debug("Converted version [" + version.toPlainString() + "] to ["+ majorMinorVersion.toPlainString()+ "]");
      return majorMinorVersion;
    }
  }
  return null;
}

protected BigDecimal convertVersion ( Resource resource ) { if ( resource . getEmlVersion ( ) != null ) { BigDecimal version = resource . getEmlVersion ( ) ; if ( version . equals ( BigDecimal . ZERO ) ) { return Constants . INITIAL_RESOURCE_VERSION ; } else if ( version . scale ( ) == 0 ) { BigDecimal majorMinorVersion = version . setScale ( 1 , RoundingMode . CEILING ) ; log . debug ( "Converted version [" + version . toPlainString ( ) + "] to [" + majorMinorVersion . toPlainString ( ) + "]" ) ; return majorMinorVersion ; } } return null ; }
convert integer version number to major_version . minor_version version number . please note ipts before v2 . 2 used integer - based version numbers .
