package net.sourceforge.phpeclipse.wiki.xml; // public class Revision { /** * timeStamp represented in XML format from Wikipedia Special:Export pages */ /* package private */String timestamp = null; /* package private */String contributor = null; /* package private */String text = null; /* package private */Revision() { } public Revision(String timeStamp, String text, String contributor) { this.timestamp = timeStamp; this.contributor = contributor; this.text = text; } public Revision(String timeStamp, String text) { this(timeStamp, text, ""); } public Revision(String text) { this("", text, ""); } /* * (non-Javadoc) * * @see java.lang.Object#toString() */ public String toString() { StringBuffer buffer = new StringBuffer(); if (timestamp != null) { buffer.append(" ==>Timestamp: "); buffer.append(timestamp); buffer.append("\n"); } if (contributor != null) { buffer.append(" ==>Contributor: "); buffer.append(contributor); buffer.append("\n"); } if (text != null) { buffer.append(" ==>Body: "); buffer.append(text); buffer.append("\n"); } return buffer.toString(); } /** * @return Returns the timestamp. */ public String getTimestamp() { return timestamp; } /** * @return Returns the contributor. */ public String getContributor() { return contributor; } /** * @return Returns the text. */ public String getText() { return text; } }