1 4 package com.tc.config.schema.setup; 5 6 import org.apache.xmlbeans.QNameSet; 7 import org.apache.xmlbeans.SchemaType; 8 import org.apache.xmlbeans.XmlCursor; 9 import org.apache.xmlbeans.XmlDocumentProperties; 10 import org.apache.xmlbeans.XmlObject; 11 import org.apache.xmlbeans.XmlOptions; 12 import org.apache.xmlbeans.xml.stream.XMLInputStream; 13 import org.w3c.dom.Node ; 14 import org.xml.sax.ContentHandler ; 15 import org.xml.sax.ext.LexicalHandler ; 16 17 import java.io.File ; 18 import java.io.InputStream ; 19 import java.io.OutputStream ; 20 import java.io.Reader ; 21 import java.io.Writer ; 22 import java.math.BigInteger ; 23 import java.util.HashMap ; 24 import java.util.Map ; 25 26 import javax.xml.namespace.QName ; 27 import javax.xml.stream.XMLStreamReader; 28 29 32 public class TestXmlObject implements XmlObject { 33 34 private final Object value; 35 private final Map childValues; 36 37 public TestXmlObject(Object value) { 38 this.value = value; 39 this.childValues = new HashMap (); 40 } 41 42 public TestXmlObject() { 43 this(null); 44 } 45 46 public String getStringValue() { 47 return (String ) value; 48 } 49 50 public BigInteger getBigIntegerValue() { 51 return new BigInteger (((Integer ) value).toString()); 52 } 53 54 public boolean getBooleanValue() { 55 return ((Boolean ) value).booleanValue(); 56 } 57 58 public String [] getTheStringArray() { 59 return (String []) value; 60 } 61 62 public void setChildBean(String xpath, XmlObject[] values) { 63 this.childValues.put(xpath, values); 64 } 65 66 public void setChildBean(String xpath, XmlObject value) { 67 setChildBean(xpath, new XmlObject[] { value }); 68 } 69 70 public SchemaType schemaType() { 71 return null; 72 } 73 74 public boolean validate() { 75 return true; 76 } 77 78 public boolean validate(XmlOptions arg0) { 79 return true; 80 } 81 82 public XmlObject[] selectPath(String arg0) { 83 return (XmlObject[]) this.childValues.get(arg0); 84 } 85 86 public XmlObject[] selectPath(String arg0, XmlOptions arg1) { 87 return (XmlObject[]) this.childValues.get(arg0); 88 } 89 90 public XmlObject[] execQuery(String arg0) { 91 return null; 92 } 93 94 public XmlObject[] execQuery(String arg0, XmlOptions arg1) { 95 return null; 96 } 97 98 public XmlObject changeType(SchemaType arg0) { 99 return null; 100 } 101 102 public XmlObject substitute(QName arg0, SchemaType arg1) { 103 return null; 104 } 105 106 public boolean isNil() { 107 return false; 108 } 109 110 public void setNil() { 111 } 112 113 public boolean isImmutable() { 114 return false; 115 } 116 117 public XmlObject set(XmlObject arg0) { 118 return null; 119 } 120 121 public XmlObject copy() { 122 return null; 123 } 124 125 public boolean valueEquals(XmlObject arg0) { 126 return false; 127 } 128 129 public int valueHashCode() { 130 return 0; 131 } 132 133 public int compareTo(Object arg0) { 134 return 0; 135 } 136 137 public int compareValue(XmlObject arg0) { 138 return 0; 139 } 140 141 public XmlObject[] selectChildren(QName arg0) { 142 return null; 143 } 144 145 public XmlObject[] selectChildren(String arg0, String arg1) { 146 return null; 147 } 148 149 public XmlObject[] selectChildren(QNameSet arg0) { 150 return null; 151 } 152 153 public XmlObject selectAttribute(QName arg0) { 154 return null; 155 } 156 157 public XmlObject selectAttribute(String arg0, String arg1) { 158 return null; 159 } 160 161 public XmlObject[] selectAttributes(QNameSet arg0) { 162 return null; 163 } 164 165 public Object monitor() { 166 return null; 167 } 168 169 public XmlDocumentProperties documentProperties() { 170 return null; 171 } 172 173 public XmlCursor newCursor() { 174 return null; 175 } 176 177 public XMLInputStream newXMLInputStream() { 178 return null; 179 } 180 181 public XMLStreamReader newXMLStreamReader() { 182 return null; 183 } 184 185 public String xmlText() { 186 return null; 187 } 188 189 public InputStream newInputStream() { 190 return null; 191 } 192 193 public Reader newReader() { 194 return null; 195 } 196 197 public Node newDomNode() { 198 return null; 199 } 200 201 public Node getDomNode() { 202 return null; 203 } 204 205 public void save(ContentHandler arg0, LexicalHandler arg1) { 206 } 207 208 public void save(File arg0) { 209 } 210 211 public void save(OutputStream arg0) { 212 } 213 214 public void save(Writer arg0) { 215 } 216 217 public XMLInputStream newXMLInputStream(XmlOptions arg0) { 218 return null; 219 } 220 221 public XMLStreamReader newXMLStreamReader(XmlOptions arg0) { 222 return null; 223 } 224 225 public String xmlText(XmlOptions arg0) { 226 return null; 227 } 228 229 public InputStream newInputStream(XmlOptions arg0) { 230 return null; 231 } 232 233 public Reader newReader(XmlOptions arg0) { 234 return null; 235 } 236 237 public Node newDomNode(XmlOptions arg0) { 238 return null; 239 } 240 241 public void save(ContentHandler arg0, LexicalHandler arg1, XmlOptions arg2) { 242 } 243 244 public void save(File arg0, XmlOptions arg1) { 245 } 246 247 public void save(OutputStream arg0, XmlOptions arg1) { 248 } 249 250 public void save(Writer arg0, XmlOptions arg1) { 251 } 252 253 public void dump() { 254 } 255 256 } 257 | Popular Tags |