1 50 51 package com.lowagie.text.xml.xmp; 52 53 import java.util.ArrayList ; 54 import java.util.Iterator ; 55 56 59 public class XmpArray extends ArrayList { 60 61 private static final long serialVersionUID = 5722854116328732742L; 62 63 public static final String UNORDERED = "rdf:Bag"; 64 65 public static final String ORDERED = "rdf:Seq"; 66 67 public static final String ALTERNATIVE = "rdf:Alt"; 68 69 70 protected String type; 71 72 76 public XmpArray(String type) { 77 this.type = type; 78 } 79 80 84 public String toString() { 85 StringBuffer buf = new StringBuffer ("<"); 86 buf.append(type); 87 buf.append('>'); 88 String s; 89 for (Iterator i = iterator(); i.hasNext(); ) { 90 s = (String ) i.next(); 91 buf.append("<rdf:li>"); 92 buf.append(XmpSchema.escape(s)); 93 buf.append("</rdf:li>"); 94 } 95 buf.append("</"); 96 buf.append(type); 97 buf.append('>'); 98 return buf.toString(); 99 } 100 } | Popular Tags |