001 package jp.osdl.jbento2.report; 002 003 import java.io.File; 004 005 import jp.osdl.jbento2.PathUtils; 006 007 public class AbstractReportBuilder { 008 private File dataDir = null; 009 010 private File destDir = null; 011 012 private File destRootDir = null; 013 014 private String relativePath = null; 015 016 private String relativeRoot = null; 017 018 public AbstractReportBuilder(File dataDir, File destDir, File destRootDir) { 019 this.dataDir = dataDir; 020 this.destDir = destDir; 021 this.destRootDir = destRootDir; 022 this.relativePath = PathUtils.calculateRelativePath(destDir, dataDir); 023 relativePath = (relativePath.equals("")) ? "./" : relativePath; 024 relativeRoot = PathUtils.calculateRelativePath(destDir, destRootDir); 025 } 026 027 public String getRelativePath() { 028 return relativePath; 029 } 030 031 public String getRelativeRoot() { 032 return relativeRoot; 033 } 034 035 public File getDataDir() { 036 return dataDir; 037 } 038 039 public void setDataDir(File dataDir) { 040 this.dataDir = dataDir; 041 } 042 043 public File getDestDir() { 044 return destDir; 045 } 046 047 public void setDestDir(File destDir) { 048 this.destDir = destDir; 049 } 050 051 public File getDestRootDir() { 052 return destRootDir; 053 } 054 055 public void setDestRootDir(File destRootDir) { 056 this.destRootDir = destRootDir; 057 } 058 059 }