1 31 package org.blojsom.plugin.syndication.module; 32 33 import java.util.Date ; 34 import java.util.List ; 35 import java.util.ArrayList ; 36 37 44 public class SimplePingback implements Cloneable { 45 46 private String title; 47 private String excerpt; 48 private String url; 49 private String blogName; 50 private Date pingbackDate; 51 private String ip; 52 private String status; 53 private String sourceURI; 54 private String targetURI; 55 private List metadata; 56 57 public SimplePingback() { 58 } 59 60 public String getTitle() { 61 return title; 62 } 63 64 public void setTitle(String title) { 65 this.title = title; 66 } 67 68 public String getExcerpt() { 69 return excerpt; 70 } 71 72 public void setExcerpt(String excerpt) { 73 this.excerpt = excerpt; 74 } 75 76 public String getUrl() { 77 return url; 78 } 79 80 public void setUrl(String url) { 81 this.url = url; 82 } 83 84 public String getBlogName() { 85 return blogName; 86 } 87 88 public void setBlogName(String blogName) { 89 this.blogName = blogName; 90 } 91 92 public Date getPingbackDate() { 93 return pingbackDate; 94 } 95 96 public void setPingbackDate(Date pingbackDate) { 97 this.pingbackDate = pingbackDate; 98 } 99 100 public String getIp() { 101 return ip; 102 } 103 104 public void setIp(String ip) { 105 this.ip = ip; 106 } 107 108 public String getStatus() { 109 return status; 110 } 111 112 public void setStatus(String status) { 113 this.status = status; 114 } 115 116 public String getSourceURI() { 117 return sourceURI; 118 } 119 120 public void setSourceURI(String sourceURI) { 121 this.sourceURI = sourceURI; 122 } 123 124 public String getTargetURI() { 125 return targetURI; 126 } 127 128 public void setTargetURI(String targetURI) { 129 this.targetURI = targetURI; 130 } 131 132 public List getMetadata() { 133 return metadata; 134 } 135 136 public void setMetadata(List metadata) { 137 this.metadata = metadata; 138 } 139 140 public Object clone() throws CloneNotSupportedException { 141 SimplePingback cloned = new SimplePingback(); 142 143 cloned.setBlogName(blogName); 144 cloned.setExcerpt(excerpt); 145 cloned.setIp(ip); 146 cloned.setStatus(status); 147 cloned.setTitle(title); 148 cloned.setPingbackDate(pingbackDate); 149 cloned.setUrl(url); 150 cloned.setSourceURI(sourceURI); 151 cloned.setTargetURI(targetURI); 152 153 List copiedMetadata = new ArrayList (); 155 if (metadata != null) { 156 for (int i = 0; i < metadata.size(); i++) { 157 Metadata metadataItem = (Metadata) metadata.get(i); 158 Metadata copiedMetadataItem = new Metadata(); 159 copiedMetadataItem.setKey(metadataItem.getKey()); 160 copiedMetadataItem.setValue(metadataItem.getValue()); 161 162 copiedMetadata.add(copiedMetadataItem); 163 } 164 } 165 cloned.setMetadata(copiedMetadata); 166 167 return cloned; 168 } 169 } 170 | Popular Tags |