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   /**
   21    * Represents a global element definition.
   22    * 
   23    * @see SchemaTypeLoader#findElement
   24    */
   25   public interface SchemaGlobalElement extends SchemaLocalElement, SchemaComponent
   26   {
   27       /**
   28        * Set of QNames for elements that are the members of the
   29        * substitution group for which this element is the head,
   30        * not including this element.
   31        */
   32       QName[] substitutionGroupMembers();
   33   
   34       /**
   35        * The element that is the head of this element's substitution
   36        * group, or <code>null</code> if this element is not a member
   37        * of a substitution group.
   38        */
   39       SchemaGlobalElement substitutionGroup();
   40   
   41       /**
   42        * True if using this element as the head of a substitution
   43        * group for a substitution via type extension is prohibited.
   44        * If both finalExtension and finalRestriction are true, this
   45        * element cannot be head of a substitution group.
   46        * Sensible only for global elements.
   47        */
   48       public boolean finalExtension();
   49   
   50       /**
   51        * True if using this element as the head of a substitution
   52        * group for a substitution via type restriction is prohibited.
   53        * If both finalExtension and finalRestriction are true, this
   54        * element cannot be head of a substitution group.
   55        * Sensible only for global elements.
   56        */
   57       public boolean finalRestriction();
   58   
   59       /**
   60        * Used to allow on-demand loading of elements.
   61        * 
   62        * @exclude
   63        */
   64       public final static class Ref extends SchemaComponent.Ref
   65       {
   66           public Ref(SchemaGlobalElement element)
   67               { super(element); }
   68   
   69           public Ref(SchemaTypeSystem system, String handle)
   70               { super(system, handle); }
   71   
   72           public final int getComponentType()
   73               { return SchemaComponent.ELEMENT; }
   74   
   75           public final SchemaGlobalElement get()
   76               { return (SchemaGlobalElement)getComponent(); }
   77       }
   78   
   79       /**
   80        * Retruns a SchemaGlobalElement.Ref pointing to this element itself.
   81        */
   82       public Ref getRef();
   83   
   84   
   85   }

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