001: package net.sf.saxon.event;
002:
003: import net.sf.saxon.Configuration;
004: import net.sf.saxon.Controller;
005:
006: import javax.xml.transform.ErrorListener;
007: import javax.xml.transform.URIResolver;
008:
009: /**
010: * A PipelineConfiguration sets options that apply to all the operations in a pipeline.
011: * Unlike the global Configuration, these options are always local to a process.
012: */
013:
014: public class PipelineConfiguration {
015:
016: private Configuration config;
017: private LocationProvider locationProvider;
018: private ErrorListener errorListener;
019: private URIResolver uriResolver;
020: private Controller controller;
021: private boolean isSerializing;
022:
023: public PipelineConfiguration() {
024: }
025:
026: public PipelineConfiguration(PipelineConfiguration p) {
027: config = p.config;
028: locationProvider = p.locationProvider;
029: errorListener = p.errorListener;
030: uriResolver = p.uriResolver;
031: controller = p.controller;
032: isSerializing = p.isSerializing;
033: }
034:
035: public Configuration getConfiguration() {
036: return config;
037: }
038:
039: public void setConfiguration(Configuration config) {
040: this .config = config;
041: }
042:
043: public LocationProvider getLocationProvider() {
044: return locationProvider;
045: }
046:
047: public void setLocationProvider(LocationProvider locationProvider) {
048: this .locationProvider = locationProvider;
049: }
050:
051: public ErrorListener getErrorListener() {
052: return errorListener;
053: }
054:
055: public void setErrorListener(ErrorListener errorListener) {
056: this .errorListener = errorListener;
057: }
058:
059: public URIResolver getURIResolver() {
060: return uriResolver;
061: }
062:
063: public void setURIResolver(URIResolver uriResolver) {
064: this .uriResolver = uriResolver;
065: }
066:
067: public void setController(Controller controller) {
068: this .controller = controller;
069: }
070:
071: public void setSerializing(boolean isSerializing) {
072: this .isSerializing = isSerializing;
073: }
074:
075: public boolean isSerializing() {
076: return isSerializing;
077: }
078:
079: /**
080: * Get the controller associated with this pipelineConfiguration
081: *
082: * @return the controller if it is known; otherwise null.
083: */
084:
085: public Controller getController() {
086: return controller;
087: }
088:
089: }
090:
091: //
092: // The contents of this file are subject to the Mozilla Public License Version 1.0 (the "License");
093: // you may not use this file except in compliance with the License. You may obtain a copy of the
094: // License at http://www.mozilla.org/MPL/
095: //
096: // Software distributed under the License is distributed on an "AS IS" basis,
097: // WITHOUT WARRANTY OF ANY KIND, either express or implied.
098: // See the License for the specific language governing rights and limitations under the License.
099: //
100: // The Original Code is: all this file.
101: //
102: // The Initial Developer of the Original Code is Michael H. Kay
103: //
104: // Portions created by (your name) are Copyright (C) (your legal entity). All Rights Reserved.
105: //
106: // Contributor(s): none.
107: //
|