1 17 18 19 20 package org.apache.lenya.cms.publication; 21 22 26 public class DublinCoreProxy implements DublinCore { 27 28 private DublinCoreImpl dcCore; 29 private Document cmsDocument; 30 31 32 37 public DublinCoreProxy(Document aDocument) { 38 this.cmsDocument = aDocument; 39 } 40 41 47 protected DublinCoreImpl instance() throws DocumentException { 48 if (dcCore == null) { 49 dcCore = new DublinCoreImpl(this.cmsDocument); 50 } 51 return dcCore; 52 } 53 54 57 public String getCreator() throws DocumentException { 58 return instance().getFirstValue(DublinCore.ELEMENT_CREATOR); 59 } 60 61 64 public String getDateCreated() throws DocumentException { 65 return instance().getFirstValue(DublinCore.TERM_CREATED); 66 } 67 68 71 public String getDateIssued() throws DocumentException { 72 return instance().getFirstValue(DublinCore.TERM_ISSUED); 73 } 74 75 78 public String getDescription() throws DocumentException { 79 return instance().getFirstValue(DublinCore.ELEMENT_DESCRIPTION); 80 } 81 82 85 public String getIdentifier() throws DocumentException { 86 return instance().getFirstValue(DublinCore.ELEMENT_IDENTIFIER); 87 } 88 89 92 public String getPublisher() throws DocumentException { 93 return instance().getFirstValue(DublinCore.ELEMENT_PUBLISHER); 94 } 95 96 99 public String getRights() throws DocumentException { 100 return instance().getFirstValue(DublinCore.ELEMENT_RIGHTS); 101 } 102 103 106 public String getIsReferencedBy() throws DocumentException { 107 return instance().getFirstValue(DublinCore.TERM_ISREFERENCEDBY); 108 } 109 110 113 public String getSubject() throws DocumentException { 114 return instance().getFirstValue(DublinCore.ELEMENT_SUBJECT); 115 } 116 117 120 public String getTitle() throws DocumentException { 121 return instance().getFirstValue(DublinCore.ELEMENT_TITLE); 122 } 123 124 127 public void setCreator(String creator) throws DocumentException { 128 instance().setValue(DublinCore.ELEMENT_CREATOR, creator); 129 } 130 131 134 public void setDateCreated(String dateCreated) throws DocumentException { 135 instance().setValue(DublinCore.TERM_CREATED, dateCreated); 136 } 137 138 141 public void setDateIssued(String dateIssued) throws DocumentException { 142 instance().setValue(DublinCore.TERM_ISSUED, dateIssued); 143 } 144 145 148 public void setDescription(String description) throws DocumentException { 149 instance().setValue(DublinCore.ELEMENT_DESCRIPTION, description); 150 } 151 152 155 public void setIdentifier(String identifier) throws DocumentException { 156 instance().setValue(DublinCore.ELEMENT_IDENTIFIER, identifier); 157 } 158 159 162 public void setPublisher(String publisher) throws DocumentException { 163 instance().setValue(DublinCore.ELEMENT_PUBLISHER, publisher); 164 } 165 166 169 public void setRights(String rights) throws DocumentException { 170 instance().setValue(DublinCore.ELEMENT_RIGHTS, rights); 171 } 172 173 176 public void setIsReferencedBy(String isReferencedBy) throws DocumentException { 177 instance().setValue(DublinCore.TERM_ISREFERENCEDBY, isReferencedBy); 178 } 179 180 183 public void setSubject(String subject) throws DocumentException { 184 instance().setValue(DublinCore.ELEMENT_SUBJECT, subject); 185 } 186 187 190 public void setTitle(String title) throws DocumentException { 191 instance().setValue(DublinCore.ELEMENT_TITLE, title); 192 } 193 194 197 public void save() throws DocumentException { 198 instance().save(); 199 } 200 201 204 public String [] getValues(String key) throws DocumentException { 205 return instance().getValues(key); 206 } 207 208 211 public String getFirstValue(String key) throws DocumentException { 212 return instance().getFirstValue(key); 213 } 214 215 218 public void addValue(String key, String value) throws DocumentException { 219 instance().addValue(key, value); 220 221 } 222 223 226 public void removeValue(String key, String value) throws DocumentException { 227 instance().removeValue(key, value); 228 } 229 230 233 public void removeAllValues(String key) throws DocumentException { 234 instance().removeAllValues(key); 235 } 236 237 240 public void replaceBy(DublinCore other) throws DocumentException { 241 instance().replaceBy(other); 242 243 } 244 245 248 public void addValues(String key, String [] values) throws DocumentException { 249 instance().addValues(key, values); 250 251 } 252 253 256 public void setValue(String key, String value) throws DocumentException { 257 instance().setValue(key, value); 258 } 259 260 } 261 | Popular Tags |