001: package com.sun.xml.txw2.output;
002:
003: import javax.xml.stream.XMLStreamWriter;
004: import javax.xml.stream.XMLStreamException;
005: import javax.xml.namespace.NamespaceContext;
006:
007: /**
008: * Delegating {@link XMLStreamWriter}.
009: *
010: * @author Kohsuke Kawaguchi
011: */
012: abstract class DelegatingXMLStreamWriter implements XMLStreamWriter {
013: private final XMLStreamWriter writer;
014:
015: public DelegatingXMLStreamWriter(XMLStreamWriter writer) {
016: this .writer = writer;
017: }
018:
019: public void writeStartElement(String localName)
020: throws XMLStreamException {
021: writer.writeStartElement(localName);
022: }
023:
024: public void writeStartElement(String namespaceURI, String localName)
025: throws XMLStreamException {
026: writer.writeStartElement(namespaceURI, localName);
027: }
028:
029: public void writeStartElement(String prefix, String localName,
030: String namespaceURI) throws XMLStreamException {
031: writer.writeStartElement(prefix, localName, namespaceURI);
032: }
033:
034: public void writeEmptyElement(String namespaceURI, String localName)
035: throws XMLStreamException {
036: writer.writeEmptyElement(namespaceURI, localName);
037: }
038:
039: public void writeEmptyElement(String prefix, String localName,
040: String namespaceURI) throws XMLStreamException {
041: writer.writeEmptyElement(prefix, localName, namespaceURI);
042: }
043:
044: public void writeEmptyElement(String localName)
045: throws XMLStreamException {
046: writer.writeEmptyElement(localName);
047: }
048:
049: public void writeEndElement() throws XMLStreamException {
050: writer.writeEndElement();
051: }
052:
053: public void writeEndDocument() throws XMLStreamException {
054: writer.writeEndDocument();
055: }
056:
057: public void close() throws XMLStreamException {
058: writer.close();
059: }
060:
061: public void flush() throws XMLStreamException {
062: writer.flush();
063: }
064:
065: public void writeAttribute(String localName, String value)
066: throws XMLStreamException {
067: writer.writeAttribute(localName, value);
068: }
069:
070: public void writeAttribute(String prefix, String namespaceURI,
071: String localName, String value) throws XMLStreamException {
072: writer.writeAttribute(prefix, namespaceURI, localName, value);
073: }
074:
075: public void writeAttribute(String namespaceURI, String localName,
076: String value) throws XMLStreamException {
077: writer.writeAttribute(namespaceURI, localName, value);
078: }
079:
080: public void writeNamespace(String prefix, String namespaceURI)
081: throws XMLStreamException {
082: writer.writeNamespace(prefix, namespaceURI);
083: }
084:
085: public void writeDefaultNamespace(String namespaceURI)
086: throws XMLStreamException {
087: writer.writeDefaultNamespace(namespaceURI);
088: }
089:
090: public void writeComment(String data) throws XMLStreamException {
091: writer.writeComment(data);
092: }
093:
094: public void writeProcessingInstruction(String target)
095: throws XMLStreamException {
096: writer.writeProcessingInstruction(target);
097: }
098:
099: public void writeProcessingInstruction(String target, String data)
100: throws XMLStreamException {
101: writer.writeProcessingInstruction(target, data);
102: }
103:
104: public void writeCData(String data) throws XMLStreamException {
105: writer.writeCData(data);
106: }
107:
108: public void writeDTD(String dtd) throws XMLStreamException {
109: writer.writeDTD(dtd);
110: }
111:
112: public void writeEntityRef(String name) throws XMLStreamException {
113: writer.writeEntityRef(name);
114: }
115:
116: public void writeStartDocument() throws XMLStreamException {
117: writer.writeStartDocument();
118: }
119:
120: public void writeStartDocument(String version)
121: throws XMLStreamException {
122: writer.writeStartDocument(version);
123: }
124:
125: public void writeStartDocument(String encoding, String version)
126: throws XMLStreamException {
127: writer.writeStartDocument(encoding, version);
128: }
129:
130: public void writeCharacters(String text) throws XMLStreamException {
131: writer.writeCharacters(text);
132: }
133:
134: public void writeCharacters(char[] text, int start, int len)
135: throws XMLStreamException {
136: writer.writeCharacters(text, start, len);
137: }
138:
139: public String getPrefix(String uri) throws XMLStreamException {
140: return writer.getPrefix(uri);
141: }
142:
143: public void setPrefix(String prefix, String uri)
144: throws XMLStreamException {
145: writer.setPrefix(prefix, uri);
146: }
147:
148: public void setDefaultNamespace(String uri)
149: throws XMLStreamException {
150: writer.setDefaultNamespace(uri);
151: }
152:
153: public void setNamespaceContext(NamespaceContext context)
154: throws XMLStreamException {
155: writer.setNamespaceContext(context);
156: }
157:
158: public NamespaceContext getNamespaceContext() {
159: return writer.getNamespaceContext();
160: }
161:
162: public Object getProperty(String name)
163: throws IllegalArgumentException {
164: return writer.getProperty(name);
165: }
166: }
|