X-Git-Url: http://git.phpeclipse.com diff --git a/archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/actions/mediawiki/connect/Parsed.java b/archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/actions/mediawiki/connect/Parsed.java index 8adf257..153572e 100644 --- a/archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/actions/mediawiki/connect/Parsed.java +++ b/archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/actions/mediawiki/connect/Parsed.java @@ -10,85 +10,101 @@ import java.io.InputStream; public class Parsed { /** - * 6lt;page6gt; XML data from Wikipedia Special:Export pages - * may be null - * + * 6lt;page6gt; XML data from Wikipedia Special:Export pages may be null + * */ - /*package private*/ String xmlData=null; + /* package private */String xmlData = null; + /** * timeStamp represented in XML format from Wikipedia Special:Export pages */ - /*package private*/ String timestamp=null; + /* package private */String timestamp = null; - /*package private*/ String title=null; + /* package private */String editToken = null; - /*package private*/ String body=null; + /* package private */String title = null; - /*package private*/ Parsed() { + /* package private */String body = null; + + /* package private */Parsed() { } - public Parsed(String timeStamp, String title, String body) { + public Parsed(String timeStamp, String title, String body, String editToken) { this.xmlData = ""; this.timestamp = timeStamp; this.title = title; this.body = body; + this.editToken = editToken; } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ - public String toString() { + public String toString() { StringBuffer buffer = new StringBuffer(); buffer.append("==>Title:\n"); - if (title!=null) { + if (title != null) { buffer.append(title); } buffer.append("==>Timestamp:\n"); - if (timestamp!=null) { + if (timestamp != null) { buffer.append(timestamp); } buffer.append("==>Body:\n"); - if (body!=null) { + if (body != null) { buffer.append(body); } return buffer.toString(); } + /** * @return Returns the body. */ public String getBody() { return body; } + /** * @return Returns the timestamp. */ public String getTimestamp() { return timestamp; } - + public String getDateTimestamp() { - if (timestamp!=null) { + if (timestamp != null) { StringBuffer buffer = new StringBuffer(); // 2004-11-22T12:41:10Z - buffer.append(timestamp.substring(0,4)); //year - buffer.append(timestamp.substring(5,7)); //month - buffer.append(timestamp.substring(8,10)); //day - buffer.append(timestamp.substring(11,13));//hour - buffer.append(timestamp.substring(14,16));//minute - buffer.append(timestamp.substring(17,19));//second + buffer.append(timestamp.substring(0, 4)); //year + buffer.append(timestamp.substring(5, 7)); //month + buffer.append(timestamp.substring(8, 10)); //day + buffer.append(timestamp.substring(11, 13));//hour + buffer.append(timestamp.substring(14, 16));//minute + buffer.append(timestamp.substring(17, 19));//second return buffer.toString(); - } + } return ""; } + /** * @return Returns the title. */ public String getTitle() { return title; } + /** * @return Returns the xmlData. */ public String getXmlData() { return xmlData; } + /** + * @return Returns the editToken. + */ + public String getEditToken() { + return editToken; + } } \ No newline at end of file