001: /*
002: * Portions Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.
003: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
004: *
005: * This code is free software; you can redistribute it and/or modify it
006: * under the terms of the GNU General Public License version 2 only, as
007: * published by the Free Software Foundation. Sun designates this
008: * particular file as subject to the "Classpath" exception as provided
009: * by Sun in the LICENSE file that accompanied this code.
010: *
011: * This code is distributed in the hope that it will be useful, but WITHOUT
012: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
013: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
014: * version 2 for more details (a copy is included in the LICENSE file that
015: * accompanied this code).
016: *
017: * You should have received a copy of the GNU General Public License version
018: * 2 along with this work; if not, write to the Free Software Foundation,
019: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
020: *
021: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
022: * CA 95054 USA or visit www.sun.com if you need additional information or
023: * have any questions.
024: */
025:
026: package com.sun.tools.internal.ws.processor.config;
027:
028: import java.util.Properties;
029:
030: import com.sun.tools.internal.ws.processor.model.Model;
031: import com.sun.tools.internal.ws.processor.modeler.Modeler;
032: import com.sun.xml.internal.ws.util.xml.XmlUtil;
033: import org.xml.sax.EntityResolver;
034:
035: /**
036: * This class contiains information used by {@link com.sun.tools.internal.ws.processor.modeler.Modeler
037: * Modelers} to build {@link com.sun.tools.internal.ws.processor.model.Model Models}.
038: *
039: * @author WS Development Team
040: */
041: public abstract class ModelInfo {
042:
043: protected ModelInfo() {
044: }
045:
046: public Configuration getParent() {
047: return _parent;
048: }
049:
050: public void setParent(Configuration c) {
051: _parent = c;
052: }
053:
054: public String getName() {
055: return _name;
056: }
057:
058: public void setName(String s) {
059: _name = s;
060: }
061:
062: public Configuration getConfiguration() {
063: return _parent;
064: }
065:
066: public HandlerChainInfo getClientHandlerChainInfo() {
067: return _clientHandlerChainInfo;
068: }
069:
070: public void setClientHandlerChainInfo(HandlerChainInfo i) {
071: _clientHandlerChainInfo = i;
072: }
073:
074: public HandlerChainInfo getServerHandlerChainInfo() {
075: return _serverHandlerChainInfo;
076: }
077:
078: public void setServerHandlerChainInfo(HandlerChainInfo i) {
079: _serverHandlerChainInfo = i;
080: }
081:
082: public String getJavaPackageName() {
083: return _javaPackageName;
084: }
085:
086: public void setJavaPackageName(String s) {
087: _javaPackageName = s;
088: }
089:
090: public Model buildModel(Properties options) {
091: return getModeler(options).buildModel();
092: }
093:
094: public EntityResolver getEntityResolver() {
095: return entityResolver;
096: }
097:
098: public void setEntityResolver(EntityResolver entityResolver) {
099: this .entityResolver = entityResolver;
100: }
101:
102: public String getDefaultJavaPackage() {
103: return _defaultJavaPackage;
104: }
105:
106: public void setDefaultJavaPackage(String _defaultJavaPackage) {
107: this ._defaultJavaPackage = _defaultJavaPackage;
108: }
109:
110: protected abstract Modeler getModeler(Properties options);
111:
112: private Configuration _parent;
113: private String _name;
114: private String _javaPackageName;
115: private String _defaultJavaPackage;
116: private HandlerChainInfo _clientHandlerChainInfo;
117: private HandlerChainInfo _serverHandlerChainInfo;
118: private EntityResolver entityResolver;
119: }
|