1 22 package org.jboss.xb.binding.sunday.unmarshalling; 23 24 import java.io.InputStream ; 25 import java.io.Reader ; 26 27 import org.w3c.dom.ls.LSInput ; 28 29 35 public class LSInputAdaptor 36 implements LSInput 37 { 38 private String baseURI; 39 private String publicId; 40 private String systemId; 41 private String encoding; 42 private InputStream byteStream; 43 private Reader characterStream; 44 private String stringData; 45 private boolean certifiedText; 46 47 public LSInputAdaptor(String publicId, String systemId, String baseURI) 48 { 49 this.publicId = publicId; 50 this.systemId = systemId; 51 this.baseURI = baseURI; 52 } 53 54 public LSInputAdaptor(InputStream is, String encoding) 55 { 56 setByteStream(is); 57 setEncoding(encoding); 58 } 59 60 public LSInputAdaptor(Reader charStream, String encoding) 61 { 62 this.setCharacterStream(charStream); 63 setEncoding(encoding); 64 } 65 66 public LSInputAdaptor(String data, String encoding) 67 { 68 this.setStringData(data); 69 setEncoding(encoding); 70 } 71 72 public String getBaseURI() 73 { 74 return baseURI; 75 } 76 77 public void setBaseURI(String baseURI) 78 { 79 this.baseURI = baseURI; 80 } 81 82 public String getPublicId() 83 { 84 return publicId; 85 } 86 87 public void setPublicId(String publicId) 88 { 89 this.publicId = publicId; 90 } 91 92 public String getSystemId() 93 { 94 return systemId; 95 } 96 97 public void setSystemId(String systemId) 98 { 99 this.systemId = systemId; 100 } 101 102 public InputStream getByteStream() 103 { 104 return byteStream; 105 } 106 107 public void setByteStream(InputStream is) 108 { 109 this.byteStream = is; 110 } 111 112 public Reader getCharacterStream() 113 { 114 return characterStream; 115 } 116 117 public void setCharacterStream(Reader reader) 118 { 119 this.characterStream = reader; 120 } 121 122 public String getStringData() 123 { 124 return stringData; 125 } 126 127 public void setStringData(String stringData) 128 { 129 this.stringData = stringData; 130 } 131 132 public String getEncoding() 133 { 134 return encoding; 135 } 136 137 public void setEncoding(String encoding) 138 { 139 this.encoding = encoding; 140 } 141 142 public boolean getCertifiedText() 143 { 144 return certifiedText; 145 } 146 147 public void setCertifiedText(boolean flag) 148 { 149 this.certifiedText = flag; 150 } 151 } 152 | Popular Tags |