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 an attribute group. 22 * <p> 23 * An attribute group is a syntactic construct, not a part 24 * of the logical model. For example, types declared within an 25 * attribute group become local to the type that uses the group - 26 * they're not local to the attribute group itself. Therefore 27 * in the logical model of a schema type system, an attribute 28 * group doesn't represent anything. Its contents are merged 29 * into the logical model at parse time. 30 * 31 * @see SchemaTypeLoader#findAttributeGroup 32 */ 33 public interface SchemaAttributeGroup extends SchemaComponent, SchemaAnnotated 34 { 35 /** 36 * Returns SchemaComponent.ATTRIBUTE_GROUP. 37 */ 38 int getComponentType(); 39 40 /** 41 * The name of the model group. 42 */ 43 QName getName(); 44 45 /** 46 * Used to allow on-demand loading of attribute groups. 47 * 48 * @exclude 49 */ 50 public final static class Ref extends SchemaComponent.Ref 51 { 52 public Ref(SchemaAttributeGroup attributeGroup) 53 { super(attributeGroup); } 54 55 public Ref(SchemaTypeSystem system, String handle) 56 { super(system, handle); } 57 58 public final int getComponentType() 59 { return SchemaComponent.ATTRIBUTE_GROUP; } 60 61 public final SchemaAttributeGroup get() 62 { return (SchemaAttributeGroup)getComponent(); } 63 } 64 65 /** 66 * Returns user-specific information. 67 * @see SchemaBookmark 68 */ 69 Object getUserData(); 70 }