1 14 package org.wings.header; 15 16 import org.wings.Renderable; 17 import org.wings.io.Device; 18 19 import java.io.IOException ; 20 21 25 public class Meta implements Renderable { 26 protected String httpEquiv; 27 protected String name; 28 protected String lang; 29 protected String content; 30 31 public Meta(String httpEquiv, String name, String lang, String content) { 32 this.httpEquiv = httpEquiv; 33 this.name = name; 34 this.lang = lang; 35 this.content = content; 36 } 37 38 public Meta(String name, String lang, String content) { 39 this(null, name, lang, content); 40 41 } 42 43 public void setName(String name) { 44 this.name = name; 45 } 46 47 public String getName() { 48 return name; 49 } 50 51 public void setLang(String lang) { 52 this.lang = lang; 53 } 54 55 public String getLang() { 56 return lang; 57 } 58 59 public void setContent(String content) { 60 this.content = content; 61 } 62 63 public String getContent() { 64 return content; 65 } 66 67 public String getHttpEquiv() { 68 return httpEquiv; 69 } 70 71 public void setHttpEquiv(String pHttpEquiv) { 72 httpEquiv = pHttpEquiv; 73 } 74 75 public void write(Device d) 76 throws IOException { 77 d.print("<meta"); 78 if (httpEquiv != null) 79 d.print(" http-equiv=\"" + httpEquiv + "\""); 80 if (name != null) 81 d.print(" name=\"" + name + "\""); 82 if (lang != null) 83 d.print(" lang=\"" + lang + "\""); 84 if (content != null) 85 d.print(" content=\"" + content + "\""); 86 d.print("/>"); 87 } 88 } 89 90 91 | Popular Tags |