1 package net.sourceforge.phpeclipse.wiki.actions.mediawiki.connect;
3 import java.io.InputStream;
5 //Parts of this sources are copied and modified from the jEdit Wikipedia plugin:
6 //http://www.djini.de/software/wikipedia/index.html
8 //The modified sources are available under the "Common Public License"
9 //with permission from the original author: Daniel Wunsch
13 * 6lt;page6gt; XML data from Wikipedia Special:Export pages
14 * may be <code>null</code>
17 /*package private*/ String xmlData=null;
19 * timeStamp represented in XML format from Wikipedia Special:Export pages
21 /*package private*/ String timestamp=null;
23 /*package private*/ String title=null;
25 /*package private*/ String body=null;
27 /*package private*/ Parsed() {
30 public Parsed(String timeStamp, String title, String body) {
32 this.timestamp = timeStamp;
37 * @see java.lang.Object#toString()
39 public String toString() {
40 StringBuffer buffer = new StringBuffer();
41 buffer.append("==>Title:\n");
45 buffer.append("==>Timestamp:\n");
46 if (timestamp!=null) {
47 buffer.append(timestamp);
49 buffer.append("==>Body:\n");
53 return buffer.toString();
56 * @return Returns the body.
58 public String getBody() {
62 * @return Returns the timestamp.
64 public String getTimestamp() {
68 public String getDateTimestamp() {
69 if (timestamp!=null) {
70 StringBuffer buffer = new StringBuffer();
71 // 2004-11-22T12:41:10Z
72 buffer.append(timestamp.substring(0,4)); //year
73 buffer.append(timestamp.substring(5,7)); //month
74 buffer.append(timestamp.substring(8,10)); //day
75 buffer.append(timestamp.substring(11,13));//hour
76 buffer.append(timestamp.substring(14,16));//minute
77 buffer.append(timestamp.substring(17,19));//second
78 return buffer.toString();
83 * @return Returns the title.
85 public String getTitle() {
89 * @return Returns the xmlData.
91 public String getXmlData() {