You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ki...@apache.org on 2020/09/23 22:26:00 UTC

svn commit: r1881967 [1/2] - in /xmlbeans/trunk/src/main/java/org/apache/xmlbeans: ./ impl/schema/ impl/values/

Author: kiwiwings
Date: Wed Sep 23 22:26:00 2020
New Revision: 1881967

URL: http://svn.apache.org/viewvc?rev=1881967&view=rev
Log:
spotbugs fixes

Modified:
    xmlbeans/trunk/src/main/java/org/apache/xmlbeans/SchemaParticle.java
    xmlbeans/trunk/src/main/java/org/apache/xmlbeans/SchemaType.java
    xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/SchemaIdentityConstraintImpl.java
    xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/SchemaLocalElementImpl.java
    xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/SchemaParticleImpl.java
    xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/SchemaTypeImpl.java
    xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/SchemaTypeSystemCompiler.java
    xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/StscChecker.java
    xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/values/XmlObjectBase.java

Modified: xmlbeans/trunk/src/main/java/org/apache/xmlbeans/SchemaParticle.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/main/java/org/apache/xmlbeans/SchemaParticle.java?rev=1881967&r1=1881966&r2=1881967&view=diff
==============================================================================
--- xmlbeans/trunk/src/main/java/org/apache/xmlbeans/SchemaParticle.java (original)
+++ xmlbeans/trunk/src/main/java/org/apache/xmlbeans/SchemaParticle.java Wed Sep 23 22:26:00 2020
@@ -15,9 +15,8 @@
 
 package org.apache.xmlbeans;
 
-import java.math.BigInteger;
-
 import javax.xml.namespace.QName;
+import java.math.BigInteger;
 
 /**
  * Represents a Schema particle definition.
@@ -33,44 +32,43 @@ import javax.xml.namespace.QName;
  * sequences, nonrepeating sequences with only one item, and so on.
  * (<a target="_blank" href="http://www.w3.org/TR/xmlschema-1/#cos-particle-restrict">Pointless particles</a>
  * are defined precisely in the XML Schema specification.)
- * 
+ *
  * @see SchemaType#getContentModel
  */
-public interface SchemaParticle
-{
+public interface SchemaParticle {
     /**
      * Returns the particle type ({@link #ALL}, {@link #CHOICE},
-     * {@link #SEQUENCE}, {@link #ELEMENT}, or {@link #WILDCARD}). 
-     */ 
+     * {@link #SEQUENCE}, {@link #ELEMENT}, or {@link #WILDCARD}).
+     */
     int getParticleType();
-    
+
     /**
      * An <a target="_blank" href="http://www.w3.org/TR/xmlschema-1/#declare-contentModel">xs:all</a> group.
      * See {@link #getParticleType}.
-     */ 
-    static final int ALL = 1;
+     */
+    int ALL = 1;
     /**
      * A <a target="_blank" href="http://www.w3.org/TR/xmlschema-1/#declare-contentModel">xs:choice</a> group.
      * See {@link #getParticleType}.
-     */ 
-    static final int CHOICE = 2;
+     */
+    int CHOICE = 2;
     /**
      * A <a target="_blank" href="http://www.w3.org/TR/xmlschema-1/#declare-contentModel">xs:sequence</a> group.
      * See {@link #getParticleType}.
-     */ 
-    static final int SEQUENCE = 3;
+     */
+    int SEQUENCE = 3;
     /**
      * An <a target="_blank" href="http://www.w3.org/TR/xmlschema-1/#declare-element">xs:element</a> particle.
      * This code means the particle can be coerced to {@link SchemaLocalElement}.
      * See {@link #getParticleType}.
-     */ 
-    static final int ELEMENT = 4;
+     */
+    int ELEMENT = 4;
     /**
      * An <a target="_blank" href="http://www.w3.org/TR/xmlschema-1/#declare-openness">xs:any</a> particle,
      * also known as an element wildcard.
      * See {@link #getParticleType}.
-     */ 
-    static final int WILDCARD = 5;
+     */
+    int WILDCARD = 5;
 
     /**
      * Returns the minOccurs value for this particle.
@@ -90,14 +88,14 @@ public interface SchemaParticle
      * convenience of a validating state machine that doesn't count
      * higher than MAX_INT anyway.
      */
-    public int getIntMinOccurs();
+    int getIntMinOccurs();
 
     /**
      * Returns the maxOccurs value, pegged to a 32-bit int for
      * convenience of a validating state machine that doesn't count
      * higher than MAX_INT anyway. Unbounded is given as MAX_INT.
      */
-    public int getIntMaxOccurs();
+    int getIntMaxOccurs();
 
 
     /**
@@ -151,19 +149,25 @@ public interface SchemaParticle
      */
     int getWildcardProcess();
 
-    /** <a target="_blank" href="http://www.w3.org/TR/xmlschema-1/#Wildcard_details">Strict wildcard</a> processing. See {@link #getWildcardProcess} */
-    static final int STRICT = 1;
-    /** <a target="_blank" href="http://www.w3.org/TR/xmlschema-1/#Wildcard_details">Lax wildcard</a> processing. See {@link #getWildcardProcess} */
-    static final int LAX = 2;
-    /** <a target="_blank" href="http://www.w3.org/TR/xmlschema-1/#Wildcard_details">Skip wildcard</a> processing. See {@link #getWildcardProcess} */
-    static final int SKIP = 3;
+    /**
+     * <a target="_blank" href="http://www.w3.org/TR/xmlschema-1/#Wildcard_details">Strict wildcard</a> processing. See {@link #getWildcardProcess}
+     */
+    int STRICT = 1;
+    /**
+     * <a target="_blank" href="http://www.w3.org/TR/xmlschema-1/#Wildcard_details">Lax wildcard</a> processing. See {@link #getWildcardProcess}
+     */
+    int LAX = 2;
+    /**
+     * <a target="_blank" href="http://www.w3.org/TR/xmlschema-1/#Wildcard_details">Skip wildcard</a> processing. See {@link #getWildcardProcess}
+     */
+    int SKIP = 3;
 
     /**
      * For elements only: the QName for the element use.
      * May be unqualified version of referenced element's name.
      */
     QName getName();
-    
+
     /**
      * For elements only: returns the type of the element.
      */
@@ -178,7 +182,7 @@ public interface SchemaParticle
      * For elements only: returns the default (or fixed) text value
      */
     String getDefaultText();
-    
+
     /**
      * For elements only: returns the default (or fixed) strongly-typed value
      */
@@ -193,5 +197,5 @@ public interface SchemaParticle
      * For elements only: true if is fixed value.
      */
     boolean isFixed();
-    
+
 }

Modified: xmlbeans/trunk/src/main/java/org/apache/xmlbeans/SchemaType.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/main/java/org/apache/xmlbeans/SchemaType.java?rev=1881967&r1=1881966&r2=1881967&view=diff
==============================================================================
--- xmlbeans/trunk/src/main/java/org/apache/xmlbeans/SchemaType.java (original)
+++ xmlbeans/trunk/src/main/java/org/apache/xmlbeans/SchemaType.java Wed Sep 23 22:26:00 2020
@@ -44,10 +44,10 @@ import javax.xml.namespace.QName;
  * {@link SchemaGlobalElement Global Elements}, {@link SchemaGlobalAttribute Global Attributes},
  * {@link SchemaModelGroup Named Model Groups}, or {@link SchemaAttributeGroup Attribute Groups}.
  * SchemaType represents a Type component, not any of the other kinds of components.
- * There are different kinds of metadata objects for the different Schema components. 
+ * There are different kinds of metadata objects for the different Schema components.
  * <p>
  * The space of SchemaTypes is divided as follows:
- * 
+ *
  * <ul>
  * <li>First, there is the universal base type and the universal
  *     subtype.  These are {@link XmlObject#type}
@@ -109,7 +109,7 @@ import javax.xml.namespace.QName;
  * <li>If a complex type has {@link #EMPTY_CONTENT}, the content model will be null.
  * <li>If a complex type has {@link #SIMPLE_CONTENT}, then it will extend the
  *     simple type that describes the content.  In addition, the type
- *     may impose additional simple type facet restrictions; these can 
+ *     may impose additional simple type facet restrictions; these can
  *     be determined in the same way they are for a simple type.
  * <li>If a complex type has {@link #ELEMENT_CONTENT} or {@link #MIXED_CONTENT}, then
  *     the detailed content model can be determined by examining
@@ -121,24 +121,23 @@ import javax.xml.namespace.QName;
  *     {@link #getAttributeProperties}, and related methods rather than
  *     examining the particle tree and attribute model directly.
  * </ul>
- * 
+ *
  * @see SchemaTypeLoader
  * @see XmlObject#schemaType
  * @see SimpleValue#instanceType
- */ 
-public interface SchemaType extends SchemaComponent, SchemaAnnotated
-{
+ */
+public interface SchemaType extends SchemaComponent, SchemaAnnotated {
     /**
      * The name used to describe the type in the schema.
      * Null if the type is anonymous (nested), or if it is a document type.
      */
-    public abstract QName getName();
+    QName getName();
 
     /**
      * The parent schema element.
      * Null for top-level (named) types and document types.
      */
-    public abstract SchemaField getContainerField();
+    SchemaField getContainerField();
 
     /**
      * True if this is a document type.
@@ -149,7 +148,7 @@ public interface SchemaType extends Sche
      * which contain the defined global elements, and they all turn into
      * Java types. (Named ElementnameDocument.)
      */
-    public boolean isDocumentType();
+    boolean isDocumentType();
 
     /**
      * True if this is a attribute type.
@@ -160,252 +159,357 @@ public interface SchemaType extends Sche
      * which contain the defined global attribute, and they all turn into
      * Java types. (Named AttributenameAttribute.)
      */
-    public boolean isAttributeType();
+    boolean isAttributeType();
 
 
     /**
      * Returns the document element name if this is a document type,
      * or null otherwise.
      */
-    public QName getDocumentElementName();
+    QName getDocumentElementName();
 
     /**
      * Returns the attribute qname if this is a attribute type,
      * or null otherwise.
      */
-    public QName getAttributeTypeAttributeName();
+    QName getAttributeTypeAttributeName();
 
     /**
      * The outer schema type.
      * Null for top-level (named) types.
      */
-    public abstract SchemaType getOuterType();
+    SchemaType getOuterType();
 
     /**
      * True if this anonymous type has no corresponding Java type. True for
      * anonymous types nested within simple type restrictions.
      */
-    public abstract boolean isSkippedAnonymousType();
+    boolean isSkippedAnonymousType();
 
     /**
      * True if this schema type was compiled to have a corresponding
      * Java class.
      */
-    public abstract boolean isCompiled();
+    boolean isCompiled();
 
     /**
      * The fully-qualified Java type name of the class.
      */
-    public abstract String getFullJavaName();
+    String getFullJavaName();
 
     /**
      * The short unqualfiied Java name for the class.
      */
-    public abstract String getShortJavaName();
+    String getShortJavaName();
 
     /**
      * The fully-qualified Java type name of the implementation class.
      */
-    public abstract String getFullJavaImplName();
+    String getFullJavaImplName();
 
     /**
      * The short unqualfiied Java name for the implementation class.
      */
-    public abstract String getShortJavaImplName();
+    String getShortJavaImplName();
 
     /**
      * The Java class corresponding to this schema type.
      */
-    public abstract Class getJavaClass();
+    Class<? extends XmlObject> getJavaClass();
 
     /**
      * The Java class corresponding to the enumeration type for this schema type,
      * if applicable (or null if not an enumeration).
      */
-    public abstract Class getEnumJavaClass();
+    Class<? extends StringEnumAbstractBase> getEnumJavaClass();
 
     /**
      * Returns user-specific information.
+     *
      * @see SchemaBookmark
      */
-    public Object getUserData();
+    Object getUserData();
 
     /**
      * True if the Xsd type is anonymous (i.e., not top-level).
      */
-    public abstract boolean isAnonymousType();
+    boolean isAnonymousType();
 
     /**
      * True for any of the 40+ built-in types.
      */
-    public abstract boolean isBuiltinType();
+    boolean isBuiltinType();
 
     /**
      * True for the anySimpleType and any restrictions/unions/lists.
      */
-    public abstract boolean isSimpleType();
+    boolean isSimpleType();
 
     /**
      * Returns base restriction or extension type. Unions and lists
      * return the anySimpleType.
      */
-    public abstract SchemaType getBaseType();
+    SchemaType getBaseType();
 
     /**
      * Returns common base type with the given type. The returned
      * type is the most specific declared base type of both types.
      */
-    public abstract SchemaType getCommonBaseType(SchemaType type);
+    SchemaType getCommonBaseType(SchemaType type);
 
     /**
      * True if the specified type derives from this type (or if
      * it is the same type).
-     *
+     * <p>
      * Note that XmlObject.type (the anyType) is assignable
      * from all type, and the XmlBeans.noType (the absence of
      * a type) is assignable to all types.
      */
-    public abstract boolean isAssignableFrom(SchemaType type);
+    boolean isAssignableFrom(SchemaType type);
 
     /**
-     * Returns an integer for the derivation type, either 
+     * Returns an integer for the derivation type, either
      * {@link #DT_EXTENSION}, {@link #DT_RESTRICTION}, {@link #DT_NOT_DERIVED}.
      */
-    public int getDerivationType();
-    
-    /** Not derived.  True for XmlObject.type only. See {@link #getDerivationType}. */
-    public static final int DT_NOT_DERIVED = 0;
-    /** Derived by restriction. See {@link #getDerivationType}. */
-    public static final int DT_RESTRICTION = 1;
-    /** Derived by extension. See {@link #getDerivationType}. */
-    public static final int DT_EXTENSION = 2;
+    int getDerivationType();
+
+    /**
+     * Not derived.  True for XmlObject.type only. See {@link #getDerivationType}.
+     */
+    int DT_NOT_DERIVED = 0;
+    /**
+     * Derived by restriction. See {@link #getDerivationType}.
+     */
+    int DT_RESTRICTION = 1;
+    /**
+     * Derived by extension. See {@link #getDerivationType}.
+     */
+    int DT_EXTENSION = 2;
 
     /**
      * Returns an integer for builtin types that can be used
      * for quick comparison.
      */
-    public abstract int getBuiltinTypeCode();
+    int getBuiltinTypeCode();
+
+    /**
+     * Not a builtin type
+     */
+    int BTC_NOT_BUILTIN = 0;
+    /**
+     * xs:anyType, aka {@link XmlObject#type}
+     */
+    int BTC_ANY_TYPE = 1;
+
+    /**
+     * The primitive types have codes between BTC_FIRST_PRIMITIVE and BTC_LAST_PRIMITIVE inclusive
+     */
+    int BTC_FIRST_PRIMITIVE = 2;
+
+    /**
+     * xs:anySimpleType, aka {@link XmlAnySimpleType#type}
+     */
+    int BTC_ANY_SIMPLE = 2;
+
+    /**
+     * xs:boolean, aka {@link XmlBoolean#type}
+     */
+    int BTC_BOOLEAN = 3;
+    /**
+     * xs:base64Binary, aka {@link XmlBase64Binary#type}
+     */
+    int BTC_BASE_64_BINARY = 4;
+    /**
+     * xs:hexBinary, aka {@link XmlBase64Binary#type}
+     */
+    int BTC_HEX_BINARY = 5;
+    /**
+     * xs:anyURI, aka {@link XmlAnyURI#type}
+     */
+    int BTC_ANY_URI = 6;
+    /**
+     * xs:QName, aka {@link XmlQName#type}
+     */
+    int BTC_QNAME = 7;
+    /**
+     * xs:NOTATION, aka {@link XmlNOTATION#type}
+     */
+    int BTC_NOTATION = 8;
+    /**
+     * xs:float, aka {@link XmlFloat#type}
+     */
+    int BTC_FLOAT = 9;
+    /**
+     * xs:double, aka {@link XmlDouble#type}
+     */
+    int BTC_DOUBLE = 10;
+    /**
+     * xs:decimal, aka {@link XmlDecimal#type}
+     */
+    int BTC_DECIMAL = 11;
+    /**
+     * xs:string, aka {@link XmlString#type}
+     */
+    int BTC_STRING = 12;
 
-    /** Not a builtin type */ 
-    public static final int BTC_NOT_BUILTIN = 0;
-    /** xs:anyType, aka {@link XmlObject#type} */ 
-    public static final int BTC_ANY_TYPE = 1;
-    
-    /** The primitive types have codes between BTC_FIRST_PRIMITIVE and BTC_LAST_PRIMITIVE inclusive */
-    public static final int BTC_FIRST_PRIMITIVE = 2;
-
-    /** xs:anySimpleType, aka {@link XmlAnySimpleType#type} */ 
-    public static final int BTC_ANY_SIMPLE = 2;
-
-    /** xs:boolean, aka {@link XmlBoolean#type} */ 
-    public static final int BTC_BOOLEAN = 3;
-    /** xs:base64Binary, aka {@link XmlBase64Binary#type} */ 
-    public static final int BTC_BASE_64_BINARY = 4;
-    /** xs:hexBinary, aka {@link XmlBase64Binary#type} */ 
-    public static final int BTC_HEX_BINARY = 5;
-    /** xs:anyURI, aka {@link XmlAnyURI#type} */ 
-    public static final int BTC_ANY_URI = 6;
-    /** xs:QName, aka {@link XmlQName#type} */ 
-    public static final int BTC_QNAME = 7;
-    /** xs:NOTATION, aka {@link XmlNOTATION#type} */ 
-    public static final int BTC_NOTATION = 8;
-    /** xs:float, aka {@link XmlFloat#type} */ 
-    public static final int BTC_FLOAT = 9;
-    /** xs:double, aka {@link XmlDouble#type} */ 
-    public static final int BTC_DOUBLE = 10;
-    /** xs:decimal, aka {@link XmlDecimal#type} */ 
-    public static final int BTC_DECIMAL = 11;
-    /** xs:string, aka {@link XmlString#type} */ 
-    public static final int BTC_STRING = 12;
-
-    /** xs:duration, aka {@link XmlDuration#type} */ 
-    public static final int BTC_DURATION = 13;
-    /** xs:dateTime, aka {@link XmlDateTime#type} */ 
-    public static final int BTC_DATE_TIME = 14;
-    /** xs:time, aka {@link XmlTime#type} */ 
-    public static final int BTC_TIME = 15;
-    /** xs:date, aka {@link XmlDate#type} */ 
-    public static final int BTC_DATE = 16;
-    /** xs:gYearMonth, aka {@link XmlGYearMonth#type} */ 
-    public static final int BTC_G_YEAR_MONTH = 17;
-    /** xs:gYear, aka {@link XmlGYear#type} */ 
-    public static final int BTC_G_YEAR = 18;
-    /** xs:gMonthDay, aka {@link XmlGMonthDay#type} */ 
-    public static final int BTC_G_MONTH_DAY = 19;
-    /** xs:gDay, aka {@link XmlGDay#type} */ 
-    public static final int BTC_G_DAY = 20;
-    /** xs:gMonth, aka {@link XmlGMonth#type} */ 
-    public static final int BTC_G_MONTH = 21;
+    /**
+     * xs:duration, aka {@link XmlDuration#type}
+     */
+    int BTC_DURATION = 13;
+    /**
+     * xs:dateTime, aka {@link XmlDateTime#type}
+     */
+    int BTC_DATE_TIME = 14;
+    /**
+     * xs:time, aka {@link XmlTime#type}
+     */
+    int BTC_TIME = 15;
+    /**
+     * xs:date, aka {@link XmlDate#type}
+     */
+    int BTC_DATE = 16;
+    /**
+     * xs:gYearMonth, aka {@link XmlGYearMonth#type}
+     */
+    int BTC_G_YEAR_MONTH = 17;
+    /**
+     * xs:gYear, aka {@link XmlGYear#type}
+     */
+    int BTC_G_YEAR = 18;
+    /**
+     * xs:gMonthDay, aka {@link XmlGMonthDay#type}
+     */
+    int BTC_G_MONTH_DAY = 19;
+    /**
+     * xs:gDay, aka {@link XmlGDay#type}
+     */
+    int BTC_G_DAY = 20;
+    /**
+     * xs:gMonth, aka {@link XmlGMonth#type}
+     */
+    int BTC_G_MONTH = 21;
 
-    /** The primitive types have codes between BTC_FIRST_PRIMITIVE and BTC_LAST_PRIMITIVE inclusive */
-    public static final int BTC_LAST_PRIMITIVE = 21;
+    /**
+     * The primitive types have codes between BTC_FIRST_PRIMITIVE and BTC_LAST_PRIMITIVE inclusive
+     */
+    int BTC_LAST_PRIMITIVE = 21;
 
     // derived numerics
-    /** xs:integer, aka {@link XmlInteger#type} */ 
-    public static final int BTC_INTEGER = 22;
-    /** xs:long, aka {@link XmlLong#type} */ 
-    public static final int BTC_LONG = 23;
-    /** xs:int, aka {@link XmlInt#type} */ 
-    public static final int BTC_INT = 24;
-    /** xs:short, aka {@link XmlShort#type} */ 
-    public static final int BTC_SHORT = 25;
-    /** xs:byte, aka {@link XmlByte#type} */ 
-    public static final int BTC_BYTE = 26;
-    /** xs:nonPositiveInteger, aka {@link XmlNonPositiveInteger#type} */ 
-    public static final int BTC_NON_POSITIVE_INTEGER = 27;
-    /** xs:NegativeInteger, aka {@link XmlNegativeInteger#type} */ 
-    public static final int BTC_NEGATIVE_INTEGER = 28;
-    /** xs:nonNegativeInteger, aka {@link XmlNonNegativeInteger#type} */ 
-    public static final int BTC_NON_NEGATIVE_INTEGER = 29;
-    /** xs:positiveInteger, aka {@link XmlPositiveInteger#type} */ 
-    public static final int BTC_POSITIVE_INTEGER = 30;
-    /** xs:unsignedLong, aka {@link XmlUnsignedLong#type} */
-    public static final int BTC_UNSIGNED_LONG = 31;
-    /** xs:unsignedInt, aka {@link XmlUnsignedInt#type} */
-    public static final int BTC_UNSIGNED_INT = 32;
-    /** xs:unsignedShort, aka {@link XmlUnsignedShort#type} */
-    public static final int BTC_UNSIGNED_SHORT = 33;
-    /** xs:unsignedByte, aka {@link XmlUnsignedByte#type} */
-    public static final int BTC_UNSIGNED_BYTE = 34;
+    /**
+     * xs:integer, aka {@link XmlInteger#type}
+     */
+    int BTC_INTEGER = 22;
+    /**
+     * xs:long, aka {@link XmlLong#type}
+     */
+    int BTC_LONG = 23;
+    /**
+     * xs:int, aka {@link XmlInt#type}
+     */
+    int BTC_INT = 24;
+    /**
+     * xs:short, aka {@link XmlShort#type}
+     */
+    int BTC_SHORT = 25;
+    /**
+     * xs:byte, aka {@link XmlByte#type}
+     */
+    int BTC_BYTE = 26;
+    /**
+     * xs:nonPositiveInteger, aka {@link XmlNonPositiveInteger#type}
+     */
+    int BTC_NON_POSITIVE_INTEGER = 27;
+    /**
+     * xs:NegativeInteger, aka {@link XmlNegativeInteger#type}
+     */
+    int BTC_NEGATIVE_INTEGER = 28;
+    /**
+     * xs:nonNegativeInteger, aka {@link XmlNonNegativeInteger#type}
+     */
+    int BTC_NON_NEGATIVE_INTEGER = 29;
+    /**
+     * xs:positiveInteger, aka {@link XmlPositiveInteger#type}
+     */
+    int BTC_POSITIVE_INTEGER = 30;
+    /**
+     * xs:unsignedLong, aka {@link XmlUnsignedLong#type}
+     */
+    int BTC_UNSIGNED_LONG = 31;
+    /**
+     * xs:unsignedInt, aka {@link XmlUnsignedInt#type}
+     */
+    int BTC_UNSIGNED_INT = 32;
+    /**
+     * xs:unsignedShort, aka {@link XmlUnsignedShort#type}
+     */
+    int BTC_UNSIGNED_SHORT = 33;
+    /**
+     * xs:unsignedByte, aka {@link XmlUnsignedByte#type}
+     */
+    int BTC_UNSIGNED_BYTE = 34;
 
     // derived strings
-    /** xs:normalizedString, aka {@link XmlNormalizedString#type} */
-    public static final int BTC_NORMALIZED_STRING = 35;
-    /** xs:token, aka {@link XmlToken#type} */
-    public static final int BTC_TOKEN = 36;
-    /** xs:Name, aka {@link XmlName#type} */
-    public static final int BTC_NAME = 37;
-    /** xs:NCName, aka {@link XmlNCName#type} */
-    public static final int BTC_NCNAME = 38;
-    /** xs:language, aka {@link XmlLanguage#type} */
-    public static final int BTC_LANGUAGE = 39;
-    /** xs:ID, aka {@link XmlID#type} */
-    public static final int BTC_ID = 40;
-    /** xs:IDREF, aka {@link XmlIDREF#type} */
-    public static final int BTC_IDREF = 41;
-    /** xs:IDREFS, aka {@link XmlIDREFS#type} */
-    public static final int BTC_IDREFS = 42;
-    /** xs:ENTITY, aka {@link XmlENTITY#type} */
-    public static final int BTC_ENTITY = 43;
-    /** xs:ENTITIES, aka {@link XmlENTITIES#type} */
-    public static final int BTC_ENTITIES = 44;
-    /** xs:NMTOKEN, aka {@link XmlNMTOKEN#type} */
-    public static final int BTC_NMTOKEN = 45;
-    /** xs:NMTOKENS, aka {@link XmlNMTOKENS#type} */
-    public static final int BTC_NMTOKENS = 46;
+    /**
+     * xs:normalizedString, aka {@link XmlNormalizedString#type}
+     */
+    int BTC_NORMALIZED_STRING = 35;
+    /**
+     * xs:token, aka {@link XmlToken#type}
+     */
+    int BTC_TOKEN = 36;
+    /**
+     * xs:Name, aka {@link XmlName#type}
+     */
+    int BTC_NAME = 37;
+    /**
+     * xs:NCName, aka {@link XmlNCName#type}
+     */
+    int BTC_NCNAME = 38;
+    /**
+     * xs:language, aka {@link XmlLanguage#type}
+     */
+    int BTC_LANGUAGE = 39;
+    /**
+     * xs:ID, aka {@link XmlID#type}
+     */
+    int BTC_ID = 40;
+    /**
+     * xs:IDREF, aka {@link XmlIDREF#type}
+     */
+    int BTC_IDREF = 41;
+    /**
+     * xs:IDREFS, aka {@link XmlIDREFS#type}
+     */
+    int BTC_IDREFS = 42;
+    /**
+     * xs:ENTITY, aka {@link XmlENTITY#type}
+     */
+    int BTC_ENTITY = 43;
+    /**
+     * xs:ENTITIES, aka {@link XmlENTITIES#type}
+     */
+    int BTC_ENTITIES = 44;
+    /**
+     * xs:NMTOKEN, aka {@link XmlNMTOKEN#type}
+     */
+    int BTC_NMTOKEN = 45;
+    /**
+     * xs:NMTOKENS, aka {@link XmlNMTOKENS#type}
+     */
+    int BTC_NMTOKENS = 46;
 
-    public static final int BTC_LAST_BUILTIN = 46;
+    int BTC_LAST_BUILTIN = 46;
 
     /**
      * True for anyType and anySimpleType.
      */
-    public boolean isURType();
+    boolean isURType();
 
     /**
      * True for the type object that represents a the absence of a determined type.
      * XML Objects whose type isNoType() are never valid.
      */
-    public boolean isNoType();
+    boolean isNoType();
 
     /**
      * Returns the SchemaTypeLoader in which this type was defined.
@@ -415,46 +519,70 @@ public interface SchemaType extends Sche
      * the builtin types, which are defined in the builtin type system
      * and used elsewhere.
      */
-    public SchemaTypeSystem getTypeSystem();
+    SchemaTypeSystem getTypeSystem();
 
-    /** True if this type cannot be used directly in instances */
-    public boolean isAbstract();
+    /**
+     * True if this type cannot be used directly in instances
+     */
+    boolean isAbstract();
 
-    /** True if other types cannot extend this type (only for complex types) */
-    public boolean finalExtension();
+    /**
+     * True if other types cannot extend this type (only for complex types)
+     */
+    boolean finalExtension();
 
-    /** True if other types cannot restrict this type */
-    public boolean finalRestriction();
+    /**
+     * True if other types cannot restrict this type
+     */
+    boolean finalRestriction();
 
-    /** True if list derivation of this type is prohibited (only for simple types) */
-    public boolean finalList();
+    /**
+     * True if list derivation of this type is prohibited (only for simple types)
+     */
+    boolean finalList();
 
-    /** True if union derivation of this type is prohibited (only for simple types) */
-    public boolean finalUnion();
+    /**
+     * True if union derivation of this type is prohibited (only for simple types)
+     */
+    boolean finalUnion();
 
-    /** True if extensions of this type cannot be substituted for this type */
-    public boolean blockExtension();
+    /**
+     * True if extensions of this type cannot be substituted for this type
+     */
+    boolean blockExtension();
 
-    /** True if restrictions of this type cannot be substituted for this type */
-    public boolean blockRestriction();
+    /**
+     * True if restrictions of this type cannot be substituted for this type
+     */
+    boolean blockRestriction();
 
     /**
      * Returns {@link #EMPTY_CONTENT}, {@link #SIMPLE_CONTENT}, {@link #ELEMENT_CONTENT}, or
      * {@link #MIXED_CONTENT} for complex types. For noncomplex types, returns
      * {@link #NOT_COMPLEX_TYPE}.
      */
-    public abstract int getContentType();
-    
-    /** Not a complex type.  See {@link #getContentType()}. */
-    public static final int NOT_COMPLEX_TYPE = 0;
-    /** Empty content.  See {@link #getContentType()}. */
-    public static final int EMPTY_CONTENT = 1;
-    /** Simple content.  See {@link #getContentType()}. */
-    public static final int SIMPLE_CONTENT = 2;
-    /** Element-only content.  See {@link #getContentType()}. */
-    public static final int ELEMENT_CONTENT = 3;
-    /** Mixed content.  See {@link #getContentType()}. */
-    public static final int MIXED_CONTENT = 4;
+    int getContentType();
+
+    /**
+     * Not a complex type.  See {@link #getContentType()}.
+     */
+    int NOT_COMPLEX_TYPE = 0;
+    /**
+     * Empty content.  See {@link #getContentType()}.
+     */
+    int EMPTY_CONTENT = 1;
+    /**
+     * Simple content.  See {@link #getContentType()}.
+     */
+    int SIMPLE_CONTENT = 2;
+    /**
+     * Element-only content.  See {@link #getContentType()}.
+     */
+    int ELEMENT_CONTENT = 3;
+    /**
+     * Mixed content.  See {@link #getContentType()}.
+     */
+    int MIXED_CONTENT = 4;
 
 
     /**
@@ -476,35 +604,35 @@ public interface SchemaType extends Sche
      * The array of inner (anonymous) types defined
      * within this type.
      */
-    public abstract SchemaType[] getAnonymousTypes();
+    SchemaType[] getAnonymousTypes();
 
     /**
      * Returns a SchemaProperty corresponding to an element within this
      * complex type by looking up the element name.
      */
-    public abstract SchemaProperty getElementProperty(QName eltName);
+    SchemaProperty getElementProperty(QName eltName);
 
     /**
      * Returns all the SchemaProperties corresponding to elements.
      */
-    public abstract SchemaProperty[] getElementProperties();
+    SchemaProperty[] getElementProperties();
 
     /**
      * Returns a SchemaProperty corresponding to an attribute within this
      * complex type by looking up the attribute name.
      */
-    public abstract SchemaProperty getAttributeProperty(QName attrName);
+    SchemaProperty getAttributeProperty(QName attrName);
 
     /**
      * Returns all the SchemaProperties corresponding to attributes.
      */
-    public abstract SchemaProperty[] getAttributeProperties();
+    SchemaProperty[] getAttributeProperties();
 
     /**
      * Returns all the SchemaProperties within this complex type,
      * elements followed by attributes.
      */
-    public abstract SchemaProperty[] getProperties();
+    SchemaProperty[] getProperties();
 
     /**
      * Returns the SchemaProperties defined by this complex type,
@@ -515,224 +643,274 @@ public interface SchemaType extends Sche
     /**
      * Returns the attribute model for this complex type (with simple or complex content).
      */
-    public abstract SchemaAttributeModel getAttributeModel();
+    SchemaAttributeModel getAttributeModel();
 
     /**
      * True if this type permits wildcard attributes. See the attribute model for
      * more information about which wildcards are allowed.
      */
-    public abstract boolean hasAttributeWildcards();
+    boolean hasAttributeWildcards();
 
     /**
      * Returns the complex content model for this complex type (with complex content).
      */
-    public abstract SchemaParticle getContentModel();
+    SchemaParticle getContentModel();
 
     /**
      * True if this type permits element wildcards. See the content model for
      * more information about which wildcards are allowed, and where.
      */
-    public abstract boolean hasElementWildcards();
+    boolean hasElementWildcards();
 
     /**
      * For document types, true if the given name can be substituted for the
      * document element name.
      */
-    public boolean isValidSubstitution(QName name);
+    boolean isValidSubstitution(QName name);
 
     /**
      * True if the complex content model for this complex type is an "all" group.
      */
-    public abstract boolean hasAllContent();
+    boolean hasAllContent();
 
     /**
      * True if particles have same defaults, nillability, etc, that are
      * invariant when order changes. Computed only for Javaized types.
      */
-    public abstract boolean isOrderSensitive();
+    boolean isOrderSensitive();
 
     /**
      * Returns the type of a child element based on the element name and
      * an xsi:type attribute (and the type system within which names are
      * resolved).
      */
-    public abstract SchemaType getElementType(QName eltName, QName xsiType, SchemaTypeLoader wildcardTypeLoader);
+    SchemaType getElementType(QName eltName, QName xsiType, SchemaTypeLoader wildcardTypeLoader);
 
     /**
      * Returns the type of an attribute based on the attribute name and
      * the type system within which (wildcard) names are resolved.
      */
-    public abstract SchemaType getAttributeType(QName eltName, SchemaTypeLoader wildcardTypeLoader);
+    SchemaType getAttributeType(QName eltName, SchemaTypeLoader wildcardTypeLoader);
+
+    /* *********************************************************** */
+    /* SIMPLE TYPE MODEL BELOW                                     */
+    /* *********************************************************** */
+
+    /**
+     * xs:length facet
+     */
+    int FACET_LENGTH = 0;
+    /**
+     * xs:minLength facet
+     */
+    int FACET_MIN_LENGTH = 1;
+    /**
+     * xs:maxLength facet
+     */
+    int FACET_MAX_LENGTH = 2;
+    /**
+     * xs:minExclusive facet
+     */
+    int FACET_MIN_EXCLUSIVE = 3;
+    /**
+     * xs:minInclusive facet
+     */
+    int FACET_MIN_INCLUSIVE = 4;
+    /**
+     * xs:maxInclusive facet
+     */
+    int FACET_MAX_INCLUSIVE = 5;
+    /**
+     * xs:maxExclusive facet
+     */
+    int FACET_MAX_EXCLUSIVE = 6;
+    /**
+     * xs:totalDigits facet
+     */
+    int FACET_TOTAL_DIGITS = 7;
+    /**
+     * xs:fractionDigits facet
+     */
+    int FACET_FRACTION_DIGITS = 8;
+
+    int LAST_BASIC_FACET = 8;
 
-    /*************************************************************/
-    /* SIMPLE TYPE MODEL BELOW                                   */
-    /*************************************************************/
-
-    /** xs:length facet */
-    public static final int FACET_LENGTH = 0;
-    /** xs:minLength facet */
-    public static final int FACET_MIN_LENGTH = 1;
-    /** xs:maxLength facet */
-    public static final int FACET_MAX_LENGTH = 2;
-    /** xs:minExclusive facet */
-    public static final int FACET_MIN_EXCLUSIVE = 3;
-    /** xs:minInclusive facet */
-    public static final int FACET_MIN_INCLUSIVE = 4;
-    /** xs:maxInclusive facet */
-    public static final int FACET_MAX_INCLUSIVE = 5;
-    /** xs:maxExclusive facet */
-    public static final int FACET_MAX_EXCLUSIVE = 6;
-    /** xs:totalDigits facet */
-    public static final int FACET_TOTAL_DIGITS = 7;
-    /** xs:fractionDigits facet */
-    public static final int FACET_FRACTION_DIGITS = 8;
-
-    public static final int LAST_BASIC_FACET = 8;
-
-    /** xs:whiteSpace facet - use {@link #getWhiteSpaceRule} instead */
-    public static final int FACET_WHITE_SPACE = 9;
-    /** xs:pattern facet - use {@link #matchPatternFacet} instead */
-    public static final int FACET_PATTERN = 10;
-    /** xs:enumeration facet - use {@link #getEnumerationValues} instead */
-    public static final int FACET_ENUMERATION = 11;
-
-    /** The last ordinary facet code */ 
-    public static final int LAST_FACET = 11;
-    
-    /** @see #ordered */
-    public static final int PROPERTY_ORDERED = 12;
-    /** @see #isBounded */
-    public static final int PROPERTY_BOUNDED = 13;
-    /** @see #isFinite */
-    public static final int PROPERTY_CARDINALITY = 14;
-    /** @see #isNumeric */
-    public static final int PROPERTY_NUMERIC = 15;
-    
-    /** The last property code */
-    public static final int LAST_PROPERTY = 15;
+    /**
+     * xs:whiteSpace facet - use {@link #getWhiteSpaceRule} instead
+     */
+    int FACET_WHITE_SPACE = 9;
+    /**
+     * xs:pattern facet - use {@link #matchPatternFacet} instead
+     */
+    int FACET_PATTERN = 10;
+    /**
+     * xs:enumeration facet - use {@link #getEnumerationValues} instead
+     */
+    int FACET_ENUMERATION = 11;
+
+    /**
+     * The last ordinary facet code
+     */
+    int LAST_FACET = 11;
+
+    /**
+     * @see #ordered
+     */
+    int PROPERTY_ORDERED = 12;
+    /**
+     * @see #isBounded
+     */
+    int PROPERTY_BOUNDED = 13;
+    /**
+     * @see #isFinite
+     */
+    int PROPERTY_CARDINALITY = 14;
+    /**
+     * @see #isNumeric
+     */
+    int PROPERTY_NUMERIC = 15;
+
+    /**
+     * The last property code
+     */
+    int LAST_PROPERTY = 15;
 
 
     /**
      * Returns the value of the given facet, or null if
      * none is set.
      */
-    public abstract XmlAnySimpleType getFacet(int facetCode);
+    XmlAnySimpleType getFacet(int facetCode);
 
     /**
      * True if the given facet is fixed.
      */
-    public abstract boolean isFacetFixed(int facetCode);
+    boolean isFacetFixed(int facetCode);
 
     /**
      * True if ordered.  Returns either {@link #UNORDERED},
      * {@link #PARTIAL_ORDER}, or {@link #TOTAL_ORDER}.
      */
-    public abstract int ordered();
+    int ordered();
 
-    /** Unordered. See {@link #ordered}. */
-    public static int UNORDERED = 0;
-    /** Partially ordered. See {@link #ordered}. */
-    public static int PARTIAL_ORDER = 1;
-    /** Totally ordered. See {@link #ordered}. */
-    public static int TOTAL_ORDER = 2;
+    /**
+     * Unordered. See {@link #ordered}.
+     */
+    int UNORDERED = 0;
+    /**
+     * Partially ordered. See {@link #ordered}.
+     */
+    int PARTIAL_ORDER = 1;
+    /**
+     * Totally ordered. See {@link #ordered}.
+     */
+    int TOTAL_ORDER = 2;
 
     /**
      * True if bounded.
      */
-    public abstract boolean isBounded();
+    boolean isBounded();
 
     /**
      * True if finite.
      */
-    public abstract boolean isFinite();
+    boolean isFinite();
 
     /**
      * True if numeric.
      */
-    public abstract boolean isNumeric();
+    boolean isNumeric();
 
     /**
      * True if there are regex pattern facents
      */
-    public abstract boolean hasPatternFacet();
-    
+    boolean hasPatternFacet();
+
     /**
-     * True 
+     * True
      */
-    public abstract String[] getPatterns();
+    String[] getPatterns();
 
     /**
      * True if the given string matches the pattern facets.
      * Always true if there are no pattern facets.
      */
-    public abstract boolean matchPatternFacet(String s);
+    boolean matchPatternFacet(String s);
 
     /**
      * Returns the array of valid objects from the
      * enumeration facet, null if no enumeration defined.
      */
-    public abstract XmlAnySimpleType[] getEnumerationValues();
+    XmlAnySimpleType[] getEnumerationValues();
 
     /**
      * True if this is a string enum where an integer
      * is assigned to each enumerated value.
      */
-    public abstract boolean hasStringEnumValues();
+    boolean hasStringEnumValues();
 
     /**
      * If this is a string enumeration, returns the most basic base schema
      * type that this enuemration is based on. Otherwise returns null.
      */
-    public abstract SchemaType getBaseEnumType();
+    SchemaType getBaseEnumType();
 
     /**
      * Returns the array of SchemaStringEnumEntries for this type: this
      * array includes information about the java constant names used for
      * each string enum entry.
      */
-    public SchemaStringEnumEntry[] getStringEnumEntries();
+    SchemaStringEnumEntry[] getStringEnumEntries();
 
     /**
      * Returns the string enum entry corresponding to the given enumerated
      * string, or null if there is no match or this type is not
      * a string enumeration.
      */
-    public SchemaStringEnumEntry enumEntryForString(String s);
+    SchemaStringEnumEntry enumEntryForString(String s);
 
     /**
      * Returns the string enum value corresponding to the given enumerated
      * string, or null if there is no match or this type is not
      * a string enumeration.
      */
-    public abstract StringEnumAbstractBase enumForString(String s);
+    StringEnumAbstractBase enumForString(String s);
 
     /**
      * Returns the string enum value corresponding to the given enumerated
      * string, or null if there is no match or this type is not
      * a string enumeration.
      */
-    public abstract StringEnumAbstractBase enumForInt(int i);
+    StringEnumAbstractBase enumForInt(int i);
 
     /**
      * True for any of the 20 primitive types (plus anySimpleType)
      */
-    public abstract boolean isPrimitiveType();
+    boolean isPrimitiveType();
 
     /**
      * Returns whether the simple type is ATOMIC, UNION, or LIST.
      * Returns {@link #NOT_SIMPLE}, {@link #ATOMIC}, {@link #UNION},
      * or {@link #LIST}.
      */
-    public abstract int getSimpleVariety();
-    
-    /** Not a simple type or simple content. See {@link #getSimpleVariety}. */
-    public static final int NOT_SIMPLE = 0;
-    /** Atomic type.  See {@link #getSimpleVariety} */
-    public static final int ATOMIC = 1;
-    /** Union type.  See {@link #getSimpleVariety} */
-    public static final int UNION = 2;
-    /** Simple list type.  See {@link #getSimpleVariety} */
-    public static final int LIST = 3;
+    int getSimpleVariety();
+
+    /**
+     * Not a simple type or simple content. See {@link #getSimpleVariety}.
+     */
+    int NOT_SIMPLE = 0;
+    /**
+     * Atomic type.  See {@link #getSimpleVariety}
+     */
+    int ATOMIC = 1;
+    /**
+     * Union type.  See {@link #getSimpleVariety}
+     */
+    int UNION = 2;
+    /**
+     * Simple list type.  See {@link #getSimpleVariety}
+     */
+    int LIST = 3;
 
 
     /**
@@ -740,7 +918,7 @@ public interface SchemaType extends Sche
      * <p>
      * Returns null if this is not an atomic type.
      */
-    public abstract SchemaType getPrimitiveType();
+    SchemaType getPrimitiveType();
 
     /**
      * For atomic numeric restrictions of decimal only: the
@@ -753,22 +931,36 @@ public interface SchemaType extends Sche
      * {@link #SIZE_LONG}, {@link #SIZE_BIG_INTEGER}, or
      * {@link #SIZE_BIG_DECIMAL}.
      */
-    public abstract int getDecimalSize();
+    int getDecimalSize();
 
-    /** Not a decimal restriction. See {@link #getDecimalSize}. */
-    public static final int NOT_DECIMAL = 0;
-    /** Fits in a byte. See {@link #getDecimalSize}. */
-    public static final int SIZE_BYTE = 8;
-    /** Fits in a short. See {@link #getDecimalSize}. */
-    public static final int SIZE_SHORT = 16;
-    /** Fits in an int. See {@link #getDecimalSize}. */
-    public static final int SIZE_INT = 32;
-    /** Fits in a long. See {@link #getDecimalSize}. */
-    public static final int SIZE_LONG = 64;
-    /** Fits in a {@link java.math.BigInteger}. See {@link #getDecimalSize}. */
-    public static final int SIZE_BIG_INTEGER = 1000000; // "millions"
-    /** Fits in a {@link java.math.BigDecimal}. See {@link #getDecimalSize}. */
-    public static final int SIZE_BIG_DECIMAL = 1000001; // "even more"
+    /**
+     * Not a decimal restriction. See {@link #getDecimalSize}.
+     */
+    int NOT_DECIMAL = 0;
+    /**
+     * Fits in a byte. See {@link #getDecimalSize}.
+     */
+    int SIZE_BYTE = 8;
+    /**
+     * Fits in a short. See {@link #getDecimalSize}.
+     */
+    int SIZE_SHORT = 16;
+    /**
+     * Fits in an int. See {@link #getDecimalSize}.
+     */
+    int SIZE_INT = 32;
+    /**
+     * Fits in a long. See {@link #getDecimalSize}.
+     */
+    int SIZE_LONG = 64;
+    /**
+     * Fits in a {@link java.math.BigInteger}. See {@link #getDecimalSize}.
+     */
+    int SIZE_BIG_INTEGER = 1000000; // "millions"
+    /**
+     * Fits in a {@link java.math.BigDecimal}. See {@link #getDecimalSize}.
+     */
+    int SIZE_BIG_DECIMAL = 1000001; // "even more"
 
     /**
      * For union types only: get the shallow member types. This
@@ -778,7 +970,7 @@ public interface SchemaType extends Sche
      * <p>
      * Returns null if this type is not a union.
      */
-    public abstract SchemaType[] getUnionMemberTypes();
+    SchemaType[] getUnionMemberTypes();
 
     /**
      * For union types only: gets the full tree of member types.
@@ -791,7 +983,7 @@ public interface SchemaType extends Sche
      * <p>
      * Returns null if this type is not a union.
      */
-    public abstract SchemaType[] getUnionSubTypes();
+    SchemaType[] getUnionSubTypes();
 
     /**
      * For union types only: get the constituent member types. This
@@ -801,7 +993,7 @@ public interface SchemaType extends Sche
      * <p>
      * Returns null if this type is not a union.
      */
-    public abstract SchemaType[] getUnionConstituentTypes();
+    SchemaType[] getUnionConstituentTypes();
 
     /**
      * For union types only: get the most specific common base
@@ -809,7 +1001,7 @@ public interface SchemaType extends Sche
      * <p>
      * Returns null if this type is not a union.
      */
-    public abstract SchemaType getUnionCommonBaseType();
+    SchemaType getUnionCommonBaseType();
 
     /**
      * For anonymous types defined inside a union only: gets
@@ -819,7 +1011,7 @@ public interface SchemaType extends Sche
      * a union type is numbered "1". Used to differentiate
      * between different anonymous types.
      */
-    public abstract int getAnonymousUnionMemberOrdinal();
+    int getAnonymousUnionMemberOrdinal();
 
     /**
      * For list types only: get the item type. This is the atomic
@@ -827,7 +1019,7 @@ public interface SchemaType extends Sche
      * <p>
      * Returns null if this type is not a list.
      */
-    public abstract SchemaType getListItemType();
+    SchemaType getListItemType();
 
     /**
      * For nonunion simple types: get the whitespace rule. This is
@@ -835,74 +1027,85 @@ public interface SchemaType extends Sche
      * {@link #WS_COLLAPSE}. Returns {@link #WS_UNSPECIFIED}
      * for unions and complex types.
      */
-    public abstract int getWhiteSpaceRule();
+    int getWhiteSpaceRule();
 
-    /** Whitespace rule unspecified.  See {@link #getWhiteSpaceRule}. */
-    public static final int WS_UNSPECIFIED = 0;
-    /** Whitespace preserved.  See {@link #getWhiteSpaceRule}. */
-    public static final int WS_PRESERVE = 1;
-    /** Whitespace replaced by ordinary space.  See {@link #getWhiteSpaceRule}. */
-    public static final int WS_REPLACE = 2;
-    /** Whitespace collapsed and trimmed.  See {@link #getWhiteSpaceRule}. */
-    public static final int WS_COLLAPSE = 3;
+    /**
+     * Whitespace rule unspecified.  See {@link #getWhiteSpaceRule}.
+     */
+    int WS_UNSPECIFIED = 0;
+    /**
+     * Whitespace preserved.  See {@link #getWhiteSpaceRule}.
+     */
+    int WS_PRESERVE = 1;
+    /**
+     * Whitespace replaced by ordinary space.  See {@link #getWhiteSpaceRule}.
+     */
+    int WS_REPLACE = 2;
+    /**
+     * Whitespace collapsed and trimmed.  See {@link #getWhiteSpaceRule}.
+     */
+    int WS_COLLAPSE = 3;
 
     /**
      * Creates an immutable simple type value that does not reside in a tree.
      */
-    public abstract XmlAnySimpleType newValue(Object v);
-    
+    XmlAnySimpleType newValue(Object v);
+
 
     /**
      * Used to allow on-demand loading of types.
-     * 
-     * @exclude
      */
-    public final static class Ref extends SchemaComponent.Ref
-    {
-        public Ref(SchemaType type)
-            { super(type); }
-
-        public Ref(SchemaTypeSystem system, String handle)
-            { super(system, handle); }
-
-        public final int getComponentType()
-            { return SchemaComponent.TYPE; }
-
-        public final SchemaType get()
-            { return (SchemaType)getComponent(); }
+    final class Ref extends SchemaComponent.Ref {
+        public Ref(SchemaType type) {
+            super(type);
+        }
+
+        public Ref(SchemaTypeSystem system, String handle) {
+            super(system, handle);
+        }
+
+        public final int getComponentType() {
+            return SchemaComponent.TYPE;
+        }
+
+        public final SchemaType get() {
+            return (SchemaType) getComponent();
+        }
     }
 
     /**
      * Retruns a SchemaType.Ref pointing to this schema type itself.
      */
-    public Ref getRef();
+    Ref getRef();
 
     /**
      * Returns a QNameSet of elements that may exist in wildcard
      * buchets and are not explicitly defined in this schema type.
      * Note: In this example:
-     *  <xs:complexType name="exampleType">
-     *    <xs:sequence>
-     *      <xs:element name="someElement" type='xs:string' />
-     *      <xs:any namespace="##targetNamespace" />
-     *    </xs:sequence>
-     *  </xs:complexType>
-     *  the returned QNameSet will not contain the qname of 'someElement'.
+     * <xs:complexType name="exampleType">
+     * <xs:sequence>
+     * <xs:element name="someElement" type='xs:string' />
+     * <xs:any namespace="##targetNamespace" />
+     * </xs:sequence>
+     * </xs:complexType>
+     * the returned QNameSet will not contain the qname of 'someElement'.
+     *
      * @return the constructed QNameSet
      */
-    public QNameSet qnameSetForWildcardElements();
+    QNameSet qnameSetForWildcardElements();
 
     /**
      * Returns a QNameSet of attributes that may exist in wildcard
      * buchets and are not explicitly defined in this schema type.
      * Note: In this example:
-     *  <xs:complexType name="exampleType">
-     *    ...
-     *    <xs:attribute name='someAttribute' type='xs:string' />
-     *    <xs:anyAttribute namespace="##targetNamespace" />
-     *  </xs:complexType>
-     *  the returned QNameSet will not contain the qname of 'someAttribute'.
+     * <xs:complexType name="exampleType">
+     * ...
+     * <xs:attribute name='someAttribute' type='xs:string' />
+     * <xs:anyAttribute namespace="##targetNamespace" />
+     * </xs:complexType>
+     * the returned QNameSet will not contain the qname of 'someAttribute'.
+     *
      * @return the constructed QNameSet
      */
-    public QNameSet qnameSetForWildcardAttributes();
+    QNameSet qnameSetForWildcardAttributes();
 }

Modified: xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/SchemaIdentityConstraintImpl.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/SchemaIdentityConstraintImpl.java?rev=1881967&r1=1881966&r2=1881967&view=diff
==============================================================================
--- xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/SchemaIdentityConstraintImpl.java (original)
+++ xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/SchemaIdentityConstraintImpl.java Wed Sep 23 22:26:00 2020
@@ -23,7 +23,7 @@ import java.util.Collections;
 import java.util.Map;
 
 public class SchemaIdentityConstraintImpl implements SchemaIdentityConstraint {
-    private SchemaContainer _container;
+    private final SchemaContainer _container;
     private String _selector;
     private String[] _fields;
     private SchemaIdentityConstraint.Ref _key;
@@ -32,7 +32,7 @@ public class SchemaIdentityConstraintImp
     private XmlObject _parse;
     private Object _userData;
     private SchemaAnnotation _annotation;
-    private Map _nsMap = Collections.EMPTY_MAP;
+    private Map<String,String> _nsMap = Collections.emptyMap();
     private String _parseTNS;
     private boolean _chameleon;
     private String _filename;
@@ -80,11 +80,11 @@ public class SchemaIdentityConstraintImp
         return _annotation;
     }
 
-    public void setNSMap(Map nsMap) {
+    public void setNSMap(Map<String,String> nsMap) {
         _nsMap = nsMap;
     }
 
-    public Map getNSMap() {
+    public Map<String,String> getNSMap() {
         return Collections.unmodifiableMap(_nsMap);
     }
 
@@ -95,7 +95,7 @@ public class SchemaIdentityConstraintImp
 
     public void setFields(String[] fields) {
         assert fields != null && fields.length > 0;
-        _fields = fields;
+        _fields = fields.clone();
     }
 
     public String[] getFields() {
@@ -192,7 +192,7 @@ public class SchemaIdentityConstraintImp
         return getConstraintCategory() != CC_KEYREF || _key != null;
     }
 
-    private SchemaIdentityConstraint.Ref _selfref = new SchemaIdentityConstraint.Ref(this);
+    private final SchemaIdentityConstraint.Ref _selfref = new SchemaIdentityConstraint.Ref(this);
 
     public SchemaIdentityConstraint.Ref getRef() {
         return _selfref;

Modified: xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/SchemaLocalElementImpl.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/SchemaLocalElementImpl.java?rev=1881967&r1=1881966&r2=1881967&view=diff
==============================================================================
--- xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/SchemaLocalElementImpl.java (original)
+++ xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/SchemaLocalElementImpl.java Wed Sep 23 22:26:00 2020
@@ -16,15 +16,14 @@
 package org.apache.xmlbeans.impl.schema;
 
 import org.apache.xmlbeans.SchemaAnnotation;
+import org.apache.xmlbeans.SchemaIdentityConstraint;
 import org.apache.xmlbeans.SchemaLocalElement;
 import org.apache.xmlbeans.SchemaParticle;
-import org.apache.xmlbeans.SchemaIdentityConstraint;
 import org.apache.xmlbeans.soap.SOAPArrayType;
 import org.apache.xmlbeans.soap.SchemaWSDLArrayType;
 
 public class SchemaLocalElementImpl extends SchemaParticleImpl
-        implements SchemaLocalElement, SchemaWSDLArrayType
-{
+    implements SchemaLocalElement, SchemaWSDLArrayType {
     private boolean _blockExt;
     private boolean _blockRest;
     private boolean _blockSubst;
@@ -34,73 +33,63 @@ public class SchemaLocalElementImpl exte
     private SchemaIdentityConstraint.Ref[] _constraints = new SchemaIdentityConstraint.Ref[0];
 
 
-    public SchemaLocalElementImpl()
-    {
+    public SchemaLocalElementImpl() {
         setParticleType(SchemaParticle.ELEMENT);
     }
 
-    public boolean blockExtension()
-    {
+    public boolean blockExtension() {
         return _blockExt;
     }
 
-    public boolean blockRestriction()
-    {
+    public boolean blockRestriction() {
         return _blockRest;
     }
 
-    public boolean blockSubstitution()
-    {
+    public boolean blockSubstitution() {
         return _blockSubst;
     }
 
-    public boolean isAbstract()
-    {
+    public boolean isAbstract() {
         return _abs;
     }
 
-    public void setAbstract(boolean abs)
-    {
+    public void setAbstract(boolean abs) {
         _abs = abs;
     }
 
-    public void setBlock(boolean extension, boolean restriction, boolean substitution)
-    {
+    public void setBlock(boolean extension, boolean restriction, boolean substitution) {
         mutate();
         _blockExt = extension;
         _blockRest = restriction;
         _blockSubst = substitution;
     }
 
-    public void setAnnotation(SchemaAnnotation ann)
-    {
+    public void setAnnotation(SchemaAnnotation ann) {
         _annotation = ann;
     }
 
-    public void setWsdlArrayType(SOAPArrayType arrayType)
-    {
+    public void setWsdlArrayType(SOAPArrayType arrayType) {
         _wsdlArrayType = arrayType;
     }
 
-    public SchemaAnnotation getAnnotation()
-    {
+    public SchemaAnnotation getAnnotation() {
         return _annotation;
     }
 
-    public SOAPArrayType getWSDLArrayType()
-    {
+    public SOAPArrayType getWSDLArrayType() {
         return _wsdlArrayType;
     }
 
     public void setIdentityConstraints(SchemaIdentityConstraint.Ref[] constraints) {
         mutate();
-        _constraints = constraints;
+        _constraints = (constraints == null) ? null : constraints.clone();
     }
 
     public SchemaIdentityConstraint[] getIdentityConstraints() {
         SchemaIdentityConstraint[] result = new SchemaIdentityConstraint[_constraints.length];
-        for (int i = 0 ; i < result.length ; i++)
+        for (int i = 0; i < result.length; i++) {
             result[i] = _constraints[i].get();
+        }
         return result;
     }
 

Modified: xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/SchemaParticleImpl.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/SchemaParticleImpl.java?rev=1881967&r1=1881966&r2=1881967&view=diff
==============================================================================
--- xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/SchemaParticleImpl.java (original)
+++ xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/schema/SchemaParticleImpl.java Wed Sep 23 22:26:00 2020
@@ -15,20 +15,13 @@
 
 package org.apache.xmlbeans.impl.schema;
 
-import org.apache.xmlbeans.SchemaParticle;
-import org.apache.xmlbeans.QNameSet;
-import org.apache.xmlbeans.SchemaType;
-import org.apache.xmlbeans.XmlObject;
-import org.apache.xmlbeans.XmlAnySimpleType;
-import org.apache.xmlbeans.XmlQName;
+import org.apache.xmlbeans.*;
 import org.apache.xmlbeans.impl.values.NamespaceContext;
 
-import java.math.BigInteger;
-
 import javax.xml.namespace.QName;
+import java.math.BigInteger;
 
-public class SchemaParticleImpl implements SchemaParticle
-{
+public class SchemaParticleImpl implements SchemaParticle {
     private int _particleType;
     private BigInteger _minOccurs;
     private BigInteger _maxOccurs;
@@ -52,82 +45,104 @@ public class SchemaParticleImpl implemen
     private Object _userData;
     private XmlValueRef _defaultValue;
 
-    protected void mutate()
-        { if (_isImmutable) throw new IllegalStateException(); }
+    protected void mutate() {
+        if (_isImmutable) {
+            throw new IllegalStateException();
+        }
+    }
 
-    public void setImmutable()
-        { mutate(); _isImmutable = true; }
+    public void setImmutable() {
+        mutate();
+        _isImmutable = true;
+    }
 
-    public boolean hasTransitionRules()
-        { return (_startSet != null); }
+    public boolean hasTransitionRules() {
+        return (_startSet != null);
+    }
 
-    public boolean hasTransitionNotes()
-        { return (_excludeNextSet != null); }
+    public boolean hasTransitionNotes() {
+        return (_excludeNextSet != null);
+    }
 
     public void setTransitionRules(QNameSet start,
-                                   boolean isSkippable)
-    {
+                                   boolean isSkippable) {
         _startSet = start;
         _isSkippable = isSkippable;
     }
 
-    public void setTransitionNotes(QNameSet excludeNext, boolean isDeterministic)
-    {
+    public void setTransitionNotes(QNameSet excludeNext, boolean isDeterministic) {
         _excludeNextSet = excludeNext;
         _isDeterministic = isDeterministic;
     }
 
-    public boolean canStartWithElement(QName name)
-        { return name != null && _startSet.contains(name); }
+    public boolean canStartWithElement(QName name) {
+        return name != null && _startSet.contains(name);
+    }
 
-    public QNameSet acceptedStartNames()
-        { return _startSet; }
+    public QNameSet acceptedStartNames() {
+        return _startSet;
+    }
 
-    public QNameSet getExcludeNextSet()
-        { return _excludeNextSet; }
+    public QNameSet getExcludeNextSet() {
+        return _excludeNextSet;
+    }
 
-    public boolean isSkippable()
-        { return _isSkippable; }
+    public boolean isSkippable() {
+        return _isSkippable;
+    }
 
-    public boolean isDeterministic()
-        { return _isDeterministic; }
+    public boolean isDeterministic() {
+        return _isDeterministic;
+    }
 
-    public int getParticleType()
-        { return _particleType; }
+    public int getParticleType() {
+        return _particleType;
+    }
 
-    public void setParticleType(int pType)
-        { mutate(); _particleType = pType; }
+    public void setParticleType(int pType) {
+        mutate();
+        _particleType = pType;
+    }
 
-    public boolean isSingleton()
-        { return _maxOccurs != null &&
-                 _maxOccurs.compareTo(BigInteger.ONE) == 0 &&
-                 _minOccurs.compareTo(BigInteger.ONE) == 0; }
+    public boolean isSingleton() {
+        return _maxOccurs != null &&
+               _maxOccurs.compareTo(BigInteger.ONE) == 0 &&
+               _minOccurs.compareTo(BigInteger.ONE) == 0;
+    }
 
-    public BigInteger getMinOccurs()
-        { return _minOccurs; }
+    public BigInteger getMinOccurs() {
+        return _minOccurs;
+    }
 
-    public void setMinOccurs(BigInteger min)
-        { mutate(); _minOccurs = min; _intMinOccurs = pegBigInteger(min); }
+    public void setMinOccurs(BigInteger min) {
+        mutate();
+        _minOccurs = min;
+        _intMinOccurs = pegBigInteger(min);
+    }
 
-    public int getIntMinOccurs()
-        { return _intMinOccurs; }
+    public int getIntMinOccurs() {
+        return _intMinOccurs;
+    }
 
-    public BigInteger getMaxOccurs()
-        { return _maxOccurs; }
+    public BigInteger getMaxOccurs() {
+        return _maxOccurs;
+    }
 
-    public int getIntMaxOccurs()
-        { return _intMaxOccurs; }
+    public int getIntMaxOccurs() {
+        return _intMaxOccurs;
+    }
 
-    public void setMaxOccurs(BigInteger max)
-        { mutate(); _maxOccurs = max; _intMaxOccurs = pegBigInteger(max); }
+    public void setMaxOccurs(BigInteger max) {
+        mutate();
+        _maxOccurs = max;
+        _intMaxOccurs = pegBigInteger(max);
+    }
 
-    public SchemaParticle[] getParticleChildren()
-    {
-        if (_particleChildren == null)
-        {
+    public SchemaParticle[] getParticleChildren() {
+        if (_particleChildren == null) {
             assert _particleType != SchemaParticle.ALL &&
-                _particleType != SchemaParticle.SEQUENCE &&
-                _particleType != SchemaParticle.CHOICE;
+                   _particleType != SchemaParticle.SEQUENCE &&
+                   _particleType != SchemaParticle.CHOICE;
             return null;
         }
         SchemaParticle[] result = new SchemaParticle[_particleChildren.length];
@@ -135,75 +150,97 @@ public class SchemaParticleImpl implemen
         return result;
     }
 
-    public void setParticleChildren(SchemaParticle[] children)
-        { mutate(); _particleChildren = children; }
+    public void setParticleChildren(SchemaParticle[] children) {
+        mutate();
+        _particleChildren = (children == null) ? null : children.clone();
+    }
 
-    public SchemaParticle getParticleChild(int i)
-        { return _particleChildren[i]; }
+    public SchemaParticle getParticleChild(int i) {
+        return _particleChildren[i];
+    }
 
-    public int countOfParticleChild()
-        { return _particleChildren == null ? 0 : _particleChildren.length; }
+    public int countOfParticleChild() {
+        return _particleChildren == null ? 0 : _particleChildren.length;
+    }
 
-    public void setWildcardSet(QNameSet set)
-        { mutate(); _wildcardSet = set; }
+    public void setWildcardSet(QNameSet set) {
+        mutate();
+        _wildcardSet = set;
+    }
 
-    public QNameSet getWildcardSet()
-        { return _wildcardSet; }
+    public QNameSet getWildcardSet() {
+        return _wildcardSet;
+    }
 
-    public void setWildcardProcess(int process)
-        { mutate(); _wildcardProcess = process; }
+    public void setWildcardProcess(int process) {
+        mutate();
+        _wildcardProcess = process;
+    }
 
-    public int getWildcardProcess()
-        { return _wildcardProcess; }
+    public int getWildcardProcess() {
+        return _wildcardProcess;
+    }
 
     private static final BigInteger _maxint = BigInteger.valueOf(Integer.MAX_VALUE);
 
-    private static final int pegBigInteger(BigInteger bi)
-    {
-        if (bi == null)
+    private static int pegBigInteger(BigInteger bi) {
+        if (bi == null) {
             return Integer.MAX_VALUE;
-        if (bi.signum() <= 0)
+        }
+        if (bi.signum() <= 0) {
             return 0;
-        if (bi.compareTo(_maxint) >= 0)
+        }
+        if (bi.compareTo(_maxint) >= 0) {
             return Integer.MAX_VALUE;
+        }
         return bi.intValue();
     }
 
-    public QName getName()
-        { return _qName; }
+    public QName getName() {
+        return _qName;
+    }
 
-    public void setNameAndTypeRef(QName formname, SchemaType.Ref typeref)
-        { mutate(); _qName = formname; _typeref = typeref; }
+    public void setNameAndTypeRef(QName formname, SchemaType.Ref typeref) {
+        mutate();
+        _qName = formname;
+        _typeref = typeref;
+    }
 
-    public boolean isTypeResolved()
-    {
+    public boolean isTypeResolved() {
         return (_typeref != null);
     }
 
-    public void resolveTypeRef(SchemaType.Ref typeref)
-    {
-        if (_typeref != null)
+    public void resolveTypeRef(SchemaType.Ref typeref) {
+        if (_typeref != null) {
             throw new IllegalStateException();
+        }
         _typeref = typeref;
     }
 
-    public boolean isAttribute()
-        { return false; }
+    public boolean isAttribute() {
+        return false;
+    }
 
-    public SchemaType getType()
-        { if (_typeref == null) return null; return _typeref.get(); }
+    public SchemaType getType() {
+        if (_typeref == null) {
+            return null;
+        }
+        return _typeref.get();
+    }
 
-    public String getDefaultText()
-        { return _defaultText; }
+    public String getDefaultText() {
+        return _defaultText;
+    }
 
-    public boolean isDefault()
-        { return _isDefault; }
+    public boolean isDefault() {
+        return _isDefault;
+    }
 
-    public boolean isFixed()
-        { return _isFixed; }
+    public boolean isFixed() {
+        return _isFixed;
+    }
 
-    public void setDefault(String deftext, boolean isFixed, XmlObject parseObject)
-    {
+    public void setDefault(String deftext, boolean isFixed, XmlObject parseObject) {
         mutate();
         _defaultText = deftext;
         _isDefault = (deftext != null);
@@ -211,27 +248,25 @@ public class SchemaParticleImpl implemen
         _parseObject = parseObject;
     }
 
-    public boolean isNillable()
-        { return _isNillable; }
+    public boolean isNillable() {
+        return _isNillable;
+    }
 
-    public void setNillable(boolean nillable)
-        { mutate(); _isNillable = nillable; }
+    public void setNillable(boolean nillable) {
+        mutate();
+        _isNillable = nillable;
+    }
 
-    public XmlAnySimpleType getDefaultValue()
-    {
-        if (_defaultValue != null)
+    public XmlAnySimpleType getDefaultValue() {
+        if (_defaultValue != null) {
             return _defaultValue.get();
-        if (_defaultText != null && XmlAnySimpleType.type.isAssignableFrom(getType()))
-        {
-            if (_parseObject != null && XmlQName.type.isAssignableFrom(getType()))
-            {
-                try
-                {
+        }
+        if (_defaultText != null && XmlAnySimpleType.type.isAssignableFrom(getType())) {
+            if (_parseObject != null && XmlQName.type.isAssignableFrom(getType())) {
+                try {
                     NamespaceContext.push(new NamespaceContext(_parseObject));
                     return getType().newValue(_defaultText);
-                }
-                finally
-                {
+                } finally {
                     NamespaceContext.pop();
                 }
             }
@@ -239,20 +274,17 @@ public class SchemaParticleImpl implemen
         }
         return null;
     }
-    
-    public void setDefaultValue(XmlValueRef defaultRef)
-    {
+
+    public void setDefaultValue(XmlValueRef defaultRef) {
         mutate();
         _defaultValue = defaultRef;
     }
 
-    public Object getUserData()
-    {
+    public Object getUserData() {
         return _userData;
     }
 
-    public void setUserData(Object data)
-    {
+    public void setUserData(Object data) {
         _userData = data;
     }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org