Source Code Cross Referenced for ProxyReceiver.java in  » XML » saxonb » net » sf » saxon » event » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » XML » saxonb » net.sf.saxon.event 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package net.sf.saxon.event;
002:
003:        import net.sf.saxon.Configuration;
004:        import net.sf.saxon.om.NamePool;
005:        import net.sf.saxon.trans.XPathException;
006:
007:        /**
008:         * A ProxyReceiver is an Receiver that filters data before passing it to another
009:         * underlying Receiver.
010:         */
011:
012:        public abstract class ProxyReceiver extends SequenceReceiver {
013:            protected Receiver nextReceiver;
014:            protected String systemId;
015:
016:            public void setSystemId(String systemId) {
017:                if (systemId != this .systemId) {
018:                    this .systemId = systemId;
019:                    if (nextReceiver != null) {
020:                        nextReceiver.setSystemId(systemId);
021:                    }
022:                }
023:            }
024:
025:            public String getSystemId() {
026:                return systemId;
027:            }
028:
029:            /**
030:             * Set the underlying receiver. This call is mandatory before using the Receiver.
031:             */
032:
033:            public void setUnderlyingReceiver(Receiver receiver) {
034:                if (receiver != nextReceiver) {
035:                    nextReceiver = receiver;
036:                    if (pipelineConfiguration != null) {
037:                        nextReceiver
038:                                .setPipelineConfiguration(pipelineConfiguration);
039:                    }
040:                }
041:            }
042:
043:            /**
044:             * Get the underlying Receiver (that is, the next one in the pipeline)
045:             */
046:
047:            public Receiver getUnderlyingReceiver() {
048:                return nextReceiver;
049:            }
050:
051:            public void setPipelineConfiguration(PipelineConfiguration config) {
052:                if (this .pipelineConfiguration != config) {
053:                    this .pipelineConfiguration = config;
054:                    if (nextReceiver != null) {
055:                        nextReceiver.setPipelineConfiguration(config);
056:                    }
057:                }
058:            }
059:
060:            public Configuration getConfiguration() {
061:                return pipelineConfiguration.getConfiguration();
062:            }
063:
064:            /**
065:             * Get the namepool for this configuration
066:             */
067:
068:            public NamePool getNamePool() {
069:                return getConfiguration().getNamePool();
070:            }
071:
072:            /**
073:             * Start of event stream
074:             */
075:
076:            public void open() throws XPathException {
077:                if (nextReceiver == null) {
078:                    throw new IllegalStateException(
079:                            "ProxyReceiver.open(): no underlying emitter provided");
080:                }
081:                nextReceiver.open();
082:            }
083:
084:            /**
085:             * End of document
086:             */
087:
088:            public void close() throws XPathException {
089:                nextReceiver.close();
090:            }
091:
092:            /**
093:             * Start of a document node.
094:             */
095:
096:            public void startDocument(int properties) throws XPathException {
097:                nextReceiver.startDocument(properties);
098:            }
099:
100:            /**
101:             * Notify the end of a document node
102:             */
103:
104:            public void endDocument() throws XPathException {
105:                nextReceiver.endDocument();
106:            }
107:
108:            /**
109:             * Notify the start of an element
110:             *
111:             * @param nameCode   integer code identifying the name of the element within the name pool.
112:             * @param typeCode   integer code identifying the element's type within the name pool.
113:             * @param properties properties of the element node
114:             */
115:
116:            public void startElement(int nameCode, int typeCode,
117:                    int locationId, int properties) throws XPathException {
118:                nextReceiver.startElement(nameCode, typeCode, locationId,
119:                        properties);
120:            }
121:
122:            /**
123:             * Notify a namespace. Namespaces are notified <b>after</b> the startElement event, and before
124:             * any children for the element. The namespaces that are reported are only required
125:             * to include those that are different from the parent element; however, duplicates may be reported.
126:             * A namespace must not conflict with any namespaces already used for element or attribute names.
127:             *
128:             * @param namespaceCode an integer: the top half is a prefix code, the bottom half a URI code.
129:             *                      These may be translated into an actual prefix and URI using the name pool. A prefix code of
130:             *                      zero represents the empty prefix (that is, the default namespace). A URI code of zero represents
131:             *                      a URI of "", that is, a namespace undeclaration.
132:             * @throws IllegalStateException: attempt to output a namespace when there is no open element
133:             *                                start tag
134:             */
135:
136:            public void namespace(int namespaceCode, int properties)
137:                    throws XPathException {
138:                nextReceiver.namespace(namespaceCode, properties);
139:            }
140:
141:            /**
142:             * Notify an attribute. Attributes are notified after the startElement event, and before any
143:             * children. Namespaces and attributes may be intermingled.
144:             *
145:             * @param nameCode   The name of the attribute, as held in the name pool
146:             * @param typeCode   The type of the attribute, as held in the name pool
147:             * @param properties Bit significant value. The following bits are defined:
148:             *                   <dd>DISABLE_ESCAPING</dd>    <dt>Disable escaping for this attribute</dt>
149:             *                   <dd>NO_SPECIAL_CHARACTERS</dd>      <dt>Attribute value contains no special characters</dt>
150:             * @throws IllegalStateException: attempt to output an attribute when there is no open element
151:             *                                start tag
152:             */
153:
154:            public void attribute(int nameCode, int typeCode,
155:                    CharSequence value, int locationId, int properties)
156:                    throws XPathException {
157:                nextReceiver.attribute(nameCode, typeCode, value, locationId,
158:                        properties);
159:            }
160:
161:            /**
162:             * Notify the start of the content, that is, the completion of all attributes and namespaces.
163:             * Note that the initial receiver of output from XSLT instructions will not receive this event,
164:             * it has to detect it itself. Note that this event is reported for every element even if it has
165:             * no attributes, no namespaces, and no content.
166:             */
167:
168:            public void startContent() throws XPathException {
169:                nextReceiver.startContent();
170:            }
171:
172:            /**
173:             * End of element
174:             */
175:
176:            public void endElement() throws XPathException {
177:                nextReceiver.endElement();
178:            }
179:
180:            /**
181:             * Character data
182:             */
183:
184:            public void characters(CharSequence chars, int locationId,
185:                    int properties) throws XPathException {
186:                nextReceiver.characters(chars, locationId, properties);
187:            }
188:
189:            /**
190:             * Processing Instruction
191:             */
192:
193:            public void processingInstruction(String target, CharSequence data,
194:                    int locationId, int properties) throws XPathException {
195:                nextReceiver.processingInstruction(target, data, locationId,
196:                        properties);
197:            }
198:
199:            /**
200:             * Output a comment
201:             */
202:
203:            public void comment(CharSequence chars, int locationId,
204:                    int properties) throws XPathException {
205:                nextReceiver.comment(chars, locationId, properties);
206:            }
207:
208:            /**
209:             * Set the URI for an unparsed entity in the document.
210:             */
211:
212:            public void setUnparsedEntity(String name, String uri,
213:                    String publicId) throws XPathException {
214:                nextReceiver.setUnparsedEntity(name, uri, publicId);
215:            }
216:
217:            /**
218:             * Get the Document Locator
219:             */
220:
221:            public LocationProvider getDocumentLocator() {
222:                return pipelineConfiguration.getLocationProvider();
223:            }
224:        }
225:
226:        //
227:        // The contents of this file are subject to the Mozilla Public License Version 1.0 (the "License");
228:        // you may not use this file except in compliance with the License. You may obtain a copy of the
229:        // License at http://www.mozilla.org/MPL/
230:        //
231:        // Software distributed under the License is distributed on an "AS IS" basis,
232:        // WITHOUT WARRANTY OF ANY KIND, either express or implied.
233:        // See the License for the specific language governing rights and limitations under the License.
234:        //
235:        // The Original Code is: all this file.
236:        //
237:        // The Initial Developer of the Original Code is Michael H. Kay
238:        //
239:        // Portions created by (your name) are Copyright (C) (your legal entity). All Rights Reserved.
240:        //
241:        // Contributor(s): none.
242:        //
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.