/** * Function to calculate the volume path for the album resources, ie: /vol01 * * @return {@link String} the path to the volume */ public String calculateVolumePath( int albumVolumes ) { Integer resourceVolume = getVolume(); String volumePath = ( albumVolumes > 1 ? "" + File.separatorChar + VOLUME_FOLDER_PRENAME + Util.leftZeroPadding( ( resourceVolume > 0 ? resourceVolume : 1 ), 2 ) : "" ); return volumePath; }
/** * Return the absolute (relative from author folder) location to this resource * * @param albumPath {@link String} path of the album (resources are supposed to be under the album folder) * @param oldVolumes int old amount of volumes for the album * @return String path */ public String calculateAbsolutePath( String albumPath, int oldVolumes ) { return albumPath + calculateVolumePath( oldVolumes, getVolume() ) + File.separatorChar + getLocation(); }