KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > ws > jaxme > xs > jaxb > impl > JAXBClassImpl


1 /*
2  * Copyright 2003, 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  */

17 package org.apache.ws.jaxme.xs.jaxb.impl;
18
19 import org.apache.ws.jaxme.xs.jaxb.JAXBClass;
20 import org.apache.ws.jaxme.xs.jaxb.JAXBJavadoc;
21 import org.apache.ws.jaxme.xs.xml.XsObject;
22
23
24 /**
25  * @author <a HREF="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
26  * @version $Id: JAXBClassImpl.java,v 1.2 2004/02/16 23:39:56 jochen Exp $
27  */

28 public class JAXBClassImpl extends JAXBXsObjectImpl implements JAXBClass {
29   /** <p>Creates a new instance of ClassImpl.</p>
30    */

31   protected JAXBClassImpl(XsObject pParent) {
32     super(pParent);
33   }
34
35   private String JavaDoc name;
36   private String JavaDoc implClass;
37   private JAXBJavadoc javadoc;
38
39   /** <p>Sets the interfaces class name, not including the package name.
40    * The package name is set in the schema bindings or
41    * derived from the target namespace.</p>
42    */

43   public void setName(String JavaDoc pName) {
44     name = pName;
45   }
46
47   /** <p>Returns the interfaces class name, not including the package name.
48    * The package name is set in the schema bindings or
49    * derived from the target namespace.</p>
50    */

51   public String JavaDoc getName() {
52     return name;
53   }
54
55   /** <p>Sets the implementation classes name, including the package
56    * name.</p>
57    */

58   public void setImplClass(String JavaDoc pImplClass) {
59     implClass = pImplClass;
60   }
61
62   /** <p>Returns the implementation classes name, including the package
63    * name.</p>
64    */

65   public String JavaDoc getImplClass() {
66     return implClass;
67   }
68
69   /** <p>Sets the classes Javadoc documentation.</p>
70    */

71   public JAXBJavadoc createJavadoc() {
72     if (javadoc == null) {
73       javadoc = getJAXBXsObjectFactory().newJAXBJavadoc(this);
74       return javadoc;
75     } else {
76       throw new IllegalStateException JavaDoc("Multiple Javadoc elements are not supported.");
77     }
78   }
79
80   /** <p>Returns the classes Javadoc documentation.</p>
81    */

82   public JAXBJavadoc getJavadoc() {
83     return javadoc;
84   }
85 }
86
Popular Tags