Home » xmlbeans-2.5.0-src » org.apache » xmlbeans » [javadoc | source]

    1   /*   Copyright 2004 The Apache Software Foundation
    2    *
    3    *   Licensed under the Apache License, Version 2.0 (the "License");
    4    *   you may not use this file except in compliance with the License.
    5    *   You may obtain a copy of the License at
    6    *
    7    *       http://www.apache.org/licenses/LICENSE-2.0
    8    *
    9    *   Unless required by applicable law or agreed to in writing, software
   10    *   distributed under the License is distributed on an "AS IS" BASIS,
   11    *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   12    *   See the License for the specific language governing permissions and
   13    *  limitations under the License.
   14    */
   15   
   16   package org.apache.xmlbeans;
   17   
   18   import javax.xml.namespace.QName;
   19   
   20   import java.math.BigInteger;
   21   
   22   /**
   23    * Represents an element or an attribute declaration.
   24    * 
   25    * @see SchemaType#getContainerField
   26    * @see SchemaLocalElement
   27    * @see SchemaLocalAttribute
   28    */ 
   29   public interface SchemaField
   30   {
   31       /**
   32        * Returns the form-unqualified-or-qualified name.
   33        */
   34       QName getName();
   35   
   36       /**
   37        * True if this use is an attribute
   38        */
   39       boolean isAttribute();
   40   
   41       /**
   42        * True if nillable; always false for attributes.
   43        */
   44       boolean isNillable();
   45   
   46       /**
   47        * Returns the type of this use.
   48        */
   49       SchemaType getType();
   50   
   51       /**
   52        * Returns the minOccurs value for this particle.
   53        * If it is not specified explicitly, this defaults to BigInteger.ONE.
   54        */
   55       BigInteger getMinOccurs();
   56   
   57       /**
   58        * Returns the maxOccurs value for this particle, or null if it
   59        * is unbounded.
   60        * If it is not specified explicitly, this defaults to BigInteger.ONE.
   61        */
   62       BigInteger getMaxOccurs();
   63   
   64       /**
   65        * The default value as plain text. See {@link #isDefault} and {@link #isFixed}.
   66        */
   67       String getDefaultText();
   68       
   69       /**
   70        * The default value as a strongly-typed value.  See {@link #isDefault} and {@link #isFixed}.
   71        */
   72       XmlAnySimpleType getDefaultValue();
   73   
   74       /**
   75        * True if a default is supplied. If {@link #isFixed}, then isDefault is always true.
   76        */
   77       boolean isDefault();
   78   
   79       /**
   80        * True if the value is fixed.
   81        */
   82       boolean isFixed();
   83   
   84       /**
   85        * Returns user-specific information.
   86        * @see SchemaBookmark
   87        */
   88       Object getUserData();
   89   }

Home » xmlbeans-2.5.0-src » org.apache » xmlbeans » [javadoc | source]