1   /***
2   * Copyright 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.ws.jaxme.examples.misc.address;
17  
18  public class ObjectFactory {
19    private org.apache.ws.jaxme.impl.JAXBContextImpl jaxbContext;
20  
21    private java.util.Map properties;
22  
23  
24    public ObjectFactory() throws javax.xml.bind.JAXBException {
25      jaxbContext = (org.apache.ws.jaxme.impl.JAXBContextImpl) javax.xml.bind.JAXBContext.newInstance("org.apache.ws.jaxme.examples.misc.address");
26    }
27  
28    public java.lang.Object newInstance(java.lang.Class pElementInterface) throws javax.xml.bind.JAXBException {
29      return jaxbContext.getElement(pElementInterface);
30    }
31  
32    public java.lang.Object getProperty(java.lang.String pName) {
33      if (properties == null) {
34        return null;
35      }
36      return properties.get(pName);
37    }
38  
39    public void setProperty(java.lang.String pName, java.lang.Object pValue) {
40      if (properties == null) {
41        properties = new java.util.HashMap();
42      }
43      properties.put(pName, pValue);
44    }
45  
46    public org.apache.ws.jaxme.examples.misc.address.Address createAddress() throws javax.xml.bind.JAXBException {
47      return (org.apache.ws.jaxme.examples.misc.address.Address) newInstance(org.apache.ws.jaxme.examples.misc.address.Address.class);
48    }
49  
50    public org.apache.ws.jaxme.examples.misc.address.AddressType createAddressType() throws javax.xml.bind.JAXBException {
51      return (org.apache.ws.jaxme.examples.misc.address.AddressType) newInstance(org.apache.ws.jaxme.examples.misc.address.AddressType.class);
52    }
53  
54  }