1 57 58 package org.apache.commons.jrcs.diff.print; 59 60 import java.util.Date ; 61 62 import org.apache.commons.jrcs.diff.AddDelta; 63 import org.apache.commons.jrcs.diff.ChangeDelta; 64 import org.apache.commons.jrcs.diff.DeleteDelta; 65 import org.apache.commons.jrcs.diff.Diff; 66 import org.apache.commons.jrcs.diff.Revision; 67 import org.apache.commons.jrcs.diff.RevisionVisitor; 68 69 76 public class BasePrint implements RevisionVisitor { 77 78 private StringBuffer sb; 79 private String command; 80 private String fileName; 81 private String rcsFileName; 82 private String originalVersion; 83 private String revisedVersion; 84 private Date originalModifDate; 85 private Date revisedModifDate; 86 private String EOL = Diff.RCS_EOL; 87 88 92 public BasePrint(StringBuffer sb) { 93 super(); 94 this.sb = sb; 95 } 96 97 101 public String getCommand() { 102 return command; 103 } 104 105 109 public void setCommand(String command) { 110 this.command = command; 111 } 112 113 117 public String getFileName() { 118 return fileName; 119 } 120 121 125 public void setFileName(String fileName) { 126 this.fileName = fileName; 127 } 128 129 133 public String getRCSFileName() { 134 return rcsFileName; 135 } 136 137 141 public void setRCSFileName(String rcsFileName) { 142 this.rcsFileName = rcsFileName; 143 } 144 145 149 public String getOriginalVersion() { 150 return originalVersion; 151 } 152 153 157 public void setOriginalVersion(String originalVersion) { 158 this.originalVersion = originalVersion; 159 } 160 161 165 public String getRevisedVersion() { 166 return revisedVersion; 167 } 168 169 173 public void setRevisedVersion(String revisedVersion) { 174 this.revisedVersion = revisedVersion; 175 } 176 177 181 public Date getOriginalModifDate() { 182 return originalModifDate; 183 } 184 185 189 public void setOriginalModifDate(Date originalModifDate) { 190 this.originalModifDate = originalModifDate; 191 } 192 193 197 public Date getRevisedModifDate() { 198 return revisedModifDate; 199 } 200 201 205 public void setRevisedModifDate(Date revisedModifDate) { 206 this.revisedModifDate = revisedModifDate; 207 } 208 209 213 public String getEOL() { 214 return EOL; 215 } 216 217 221 public void setEOL(String eol) { 222 EOL = eol; 223 } 224 225 229 public void visit(Revision revision) { 230 printHeader(); 231 } 232 233 237 public void visit(DeleteDelta delta) { 238 } 240 241 245 public void visit(ChangeDelta delta) { 246 } 248 249 253 public void visit(AddDelta delta) { 254 } 256 257 protected void printHeader() { 258 } 260 261 protected StringBuffer getStringBuffer() { 262 return sb; 263 } 264 265 } 266 | Popular Tags |