KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > ws > jaxme > xs > jaxb > JAXBGlobalBindings


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;
18
19 import org.apache.ws.jaxme.xs.xml.XsQName;
20
21
22 /** <p>This interface implements the JAXB global bindings.</p>
23  *
24  * @author <a HREF="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
25  * @version $Id: JAXBGlobalBindings.java,v 1.2 2004/02/16 23:39:50 jochen Exp $
26  */

27 public interface JAXBGlobalBindings {
28   /** <p>Enumeration class holding possible values for {@link JAXBGlobalBindings#getUnderscoreBinding()}.</p>
29    */

30   public class UnderscoreBinding {
31     private final String JavaDoc name;
32     private UnderscoreBinding(String JavaDoc pName) {
33       name = pName;
34     }
35     public String JavaDoc toString() { return name; }
36     public String JavaDoc getName() { return name; }
37     public static final UnderscoreBinding AS_WORD_SEPARATOR = new UnderscoreBinding("asWordSeparator");
38     public static final UnderscoreBinding AS_CHAR_IN_WORD = new UnderscoreBinding("asCharInWord");
39     public static UnderscoreBinding valueOf(String JavaDoc pName) {
40       if (AS_WORD_SEPARATOR.name.equals(pName)) {
41         return AS_WORD_SEPARATOR;
42       } else if (AS_CHAR_IN_WORD.name.equals(pName)) {
43         return AS_CHAR_IN_WORD;
44       } else {
45         throw new IllegalArgumentException JavaDoc("Invalid value for underscoreBinding: " + pName +
46                                             ", expected either of asWordSeparator|asCharInWord");
47       }
48     }
49   }
50
51   /** <p>Returns the collection type; either of null ("indexed",
52    * default) or an implementation of <code>java.util.List</code>.</p>
53    */

54   public String JavaDoc getCollectionType();
55
56   /** <p>Returns whether fixed attributes are implemented as a
57    * constant property. Defaults to false.</p>
58    */

59   public boolean isFixedAttributeAsConstantProperty();
60
61   /** <p>Returns whether a <code>isSet()</code> method is being
62    * generated. Defaults to false.</p>
63    */

64   public boolean isGenerateIsSetMethod();
65
66   /** <p>Returns whether FailFastCheck is enabled. Defaults to
67    * false.</p>
68    */

69   public boolean isEnableFailFastCheck();
70
71   /** <p>Returns the <code>choiceContentProperty</code> value. Defaults
72    * to false. This value is ignored, if <code>bindingStyle</code> is
73    * defined as <code>elementBinding</code>. In this case, setting
74    * <code>choiceContentProperty</code> is an error. Defaults to false.</p>
75    */

76   public boolean isChoiceContentProperty();
77
78   /** <p>Returns the binding of underscores. Defaults to "asWordSeparator"
79    * (false). The value true indicates "asCharInWord".
80    */

81   public UnderscoreBinding getUnderscoreBinding();
82
83   /** <p>Returns whether Java naming conventions are enabled. Defaults to
84    * true.</p>
85    */

86   public boolean isEnableJavaNamingConventions();
87
88   /** <p>Returns a list of QNames, which are being implemented as type
89    * safe enumerations, if the <code>xs:enumeration</code> facet is
90    * used. Defaults to <code>xs:NCName</code> (single element list).</p>
91    */

92   public XsQName[] getTypesafeEnumBase();
93
94   /** <p>Returns whether the typesafeEnumMemberName generates an
95    * error (false, default) or a name.</p>
96    */

97   public boolean isTypesafeEnumMemberName();
98
99   /** <p>Returns whether the <code>elementBinding</code> style is
100    * being used (true, default) or not.</p>
101    */

102   public boolean isBindingStyleModelGroup();
103
104   /** <p>Returns the list of <code>javaType</code> declarations.</p>
105    */

106   public JAXBJavaType.JAXBGlobalJavaType[] getJavaType();
107 }
108
Popular Tags