1 /* 2 * Copyright 2001-2004 The Apache Software Foundation. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package org.apache.geronimo.ews.ws4j2ee.context.webservices.server; 17 18 import org.apache.geronimo.ews.ws4j2ee.context.webservices.server.interfaces.WSCFConstants; 19 import org.apache.geronimo.ews.ws4j2ee.context.webservices.server.interfaces.WSCFDocument; 20 import org.apache.geronimo.ews.ws4j2ee.context.webservices.server.interfaces.WSCFWebservices; 21 22 /*** 23 * This will encapsulate the webservices.xml document and this is the start of the 24 * parsing tree.This will be used to support the the methods of the WSCFContext. The 25 * class tree and the Interface tree will strat from here and there will be sufficient 26 * functionality provided by each class to expose the information and to further 27 * drill down the element tree. 28 */ 29 public abstract class AsbtractWSCFDocument implements WSCFConstants, WSCFDocument { 30 31 /*** 32 * Will keep a reference to the webservices element which is the document element in the webservices.xml 33 * 34 * @see org.apache.x.ws4j2ee.context.webservices.interfaces.WSCFWebservices 35 */ 36 protected WSCFWebservices webservices; 37 38 // 39 ///////////////////////////////////The jaxb delegation block//////////////////////////////////////////////// 40 // 41 //// //This is kept basically to meet the future demands of the serialising. 42 //// protected Webservices jaxbWebservices; 43 // 44 // public AsbtractWSCFDocumentImpl(InputStream in)throws WSCFException{ 45 // try{ 46 // JAXBContext jc 47 // = JAXBContext.newInstance( 48 // "org.apache.geronimo.ews.ws4j2ee.context.webservices.server.jaxb"); 49 // // create an Unmarshaller 50 // Unmarshaller unmarshaller = jc.createUnmarshaller(); 51 // 52 // // unmarshal a FooBar instance document into a tree of Java content 53 // // objects composed of classes from the example package. 54 // this.webservices = new AbstractWSCFWebservicesImpl((Webservices)unmarshaller.unmarshal(in)); 55 // 56 // 57 // // org.apache.x.ws4j2ee.context.webservices.jaxb.impl.DisplayNameTypeImpl dis = (org.apache.x.ws4j2ee.context.webservices.jaxb.impl.DisplayNameTypeImpl)ws.getDisplayName().get(0); 58 // } catch( JAXBException je ) { 59 // throw new WSCFException(je); 60 // } 61 // 62 // } 63 // 64 // 65 // 66 ////////////////////////////////////////////////////////////////////////////////////////////////////////// 67 68 69 // /*** 70 // * The constructor 71 // * @param doc org.w3c.dom.Document object of the webservices.xml 72 // * @throws WSCFException 73 // */ 74 // public WSCFDocumentImpl(Document doc) throws WSCFException{ 75 // Element documentElement = doc.getDocumentElement(); 76 // this.webservices = new WSCFWebservicesImpl(documentElement); 77 // 78 // 79 // } 80 /*** 81 * Getter fo the Webservices element which is the document element of the 82 * webservices.xml 83 * 84 * @return The Webservices object. 85 * @see org.apache.x.ws4j2ee.context.webservices.interfaces.WSCFWebservices 86 */ 87 public WSCFWebservices getWebservices() { 88 return webservices; 89 } 90 91 ///*** 92 // * @return 93 // */ 94 //public Webservices getJaxbWebservices() { 95 // return jaxbWebservices; 96 //} 97 98 }