1 16 package org.apache.cocoon.components.validation.jaxp; 17 18 import java.io.InputStream ; 19 import java.io.Reader ; 20 21 import org.w3c.dom.ls.LSInput ; 22 import org.xml.sax.InputSource ; 23 24 30 public class JaxpInput implements LSInput { 31 32 33 private final InputSource input; 34 35 private boolean cert = false; 36 37 private String data = null; 38 39 private String base = null; 40 41 47 public JaxpInput(InputSource input) { 48 if (input == null) throw new NullPointerException ("Null InputSource"); 49 this.input = input; 50 } 51 52 public Reader getCharacterStream() { 53 return this.input.getCharacterStream(); 54 } 55 56 public void setCharacterStream(Reader reader) { 57 this.input.setCharacterStream(reader); 58 } 59 60 public InputStream getByteStream() { 61 return this.input.getByteStream(); 62 } 63 64 public void setByteStream(InputStream stream) { 65 this.input.setByteStream(stream); 66 } 67 68 public String getStringData() { 69 return this.data; 70 } 71 72 public void setStringData(String data) { 73 this.data = data; 74 } 75 76 public String getSystemId() { 77 return this.input.getSystemId(); 78 } 79 80 public void setSystemId(String systemId) { 81 this.input.setSystemId(systemId); 82 } 83 84 public String getPublicId() { 85 return this.input.getPublicId(); 86 } 87 88 public void setPublicId(String publicId) { 89 this.input.setPublicId(publicId); 90 } 91 92 public String getBaseURI() { 93 if (this.base != null) return this.base; 94 return this.input.getSystemId(); 95 } 96 97 public void setBaseURI(String base) { 98 this.base = base; 99 } 100 101 public String getEncoding() { 102 return this.input.getEncoding(); 103 } 104 105 public void setEncoding(String encoding) { 106 this.input.setEncoding(encoding); 107 } 108 109 public boolean getCertifiedText() { 110 return this.cert; 111 } 112 113 public void setCertifiedText(boolean cert) { 114 this.cert = cert; 115 } 116 } | Popular Tags |