1 17 18 19 20 package org.apache.fop.fo.properties; 21 22 import org.apache.fop.fo.FObj; 23 import org.apache.fop.fo.PropertyList; 24 25 29 public class StringProperty extends Property { 30 31 34 public static class Maker extends PropertyMaker { 35 36 39 public Maker(int propId) { 40 super(propId); 41 } 42 43 50 public Property make(PropertyList propertyList, String value, 51 FObj fo) { 52 int vlen = value.length() - 1; 59 if (vlen > 0) { 60 char q1 = value.charAt(0); 61 if (q1 == '"' || q1 == '\'') { 62 if (value.charAt(vlen) == q1) { 63 return new StringProperty(value.substring(1, vlen)); 64 } 65 log.warn("String-valued property starts with quote" 66 + " but doesn't end with quote: " 67 + value); 68 } 70 String str = checkValueKeywords(value); 71 if (str != null) { 72 value = str; 73 } 74 } 75 return new StringProperty(value); 76 } 77 78 } 80 private String str; 81 82 85 public StringProperty(String str) { 86 this.str = str; 87 } 89 90 93 public Object getObject() { 94 return this.str; 95 } 96 97 100 public String getString() { 101 return this.str; 102 } 103 104 } 105 | Popular Tags |