Package org.apache.xmlbeans
Interface SchemaComponent
- All Known Subinterfaces:
SchemaAnnotation,SchemaAttributeGroup,SchemaGlobalAttribute,SchemaGlobalElement,SchemaIdentityConstraint,SchemaModelGroup,SchemaType
- All Known Implementing Classes:
SchemaAnnotationImpl,SchemaAttributeGroupImpl,SchemaGlobalAttributeImpl,SchemaGlobalElementImpl,SchemaIdentityConstraintImpl,SchemaModelGroupImpl,SchemaTypeImpl
public interface SchemaComponent
Represents a global Schema Component. That is, a type, element, attribute,
model group, attribute group, or identity constraint.
Note that not all types, elements, and attributes are global; local types, element, and attributes do not appear in the global lookup table. Also note that other information items such as particles, facets, and so on are not globally indexed, so are not SchemaComponents.
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classSchemaComponent.RefA lazy reference to a component. -
Field Summary
Fields Modifier and Type Field Description static intANNOTATIONAn annotation.static intATTRIBUTEAn attribute definition.static intATTRIBUTE_GROUPAn attribute group definition.static intELEMENTAn element definition.static intIDENTITY_CONSTRAINTAn identity constraint definition.static intMODEL_GROUPA model group definition.static intNOTATIONA notation definition.static intTYPEA type definition. -
Method Summary
Modifier and Type Method Description SchemaComponent.RefgetComponentRef()Used for on-demand loading of schema components.intgetComponentType()Returns the type code for the schema object, eitherTYPE,ELEMENT,ATTRIBUTE,ATTRIBUTE_GROUP,MODEL_GROUP,IDENTITY_CONSTRAINT, orNOTATION.QNamegetName()The name of the schema componentStringgetSourceName()The name of resource that represends the source .xsd in which this component was defined (if known)
See:SchemaTypeLoader.getSourceAsStream(String)
Example:SchemaTypeSystemgetTypeSystem()Returns the typesystem within which this component definition resides
-
Field Details
-
TYPE
static final int TYPEA type definition. SeegetComponentType()- See Also:
- Constant Field Values
-
ELEMENT
static final int ELEMENTAn element definition. SeegetComponentType()- See Also:
- Constant Field Values
-
ATTRIBUTE
static final int ATTRIBUTEAn attribute definition. SeegetComponentType()- See Also:
- Constant Field Values
-
ATTRIBUTE_GROUP
static final int ATTRIBUTE_GROUPAn attribute group definition. SeegetComponentType()- See Also:
- Constant Field Values
-
IDENTITY_CONSTRAINT
static final int IDENTITY_CONSTRAINTAn identity constraint definition. SeegetComponentType()- See Also:
- Constant Field Values
-
MODEL_GROUP
static final int MODEL_GROUPA model group definition. SeegetComponentType()- See Also:
- Constant Field Values
-
NOTATION
static final int NOTATIONA notation definition. SeegetComponentType()- See Also:
- Constant Field Values
-
ANNOTATION
static final int ANNOTATIONAn annotation. SeegetComponentType()- See Also:
- Constant Field Values
-
-
Method Details
-
getComponentType
int getComponentType()Returns the type code for the schema object, eitherTYPE,ELEMENT,ATTRIBUTE,ATTRIBUTE_GROUP,MODEL_GROUP,IDENTITY_CONSTRAINT, orNOTATION. -
getTypeSystem
SchemaTypeSystem getTypeSystem()Returns the typesystem within which this component definition resides -
getName
QName getName()The name of the schema component -
getSourceName
String getSourceName()The name of resource that represends the source .xsd in which this component was defined (if known)
See:SchemaTypeLoader.getSourceAsStream(String)
Example:SchemaType schemaType = ..; InputStream is = schemaType.getTypeSystem().getSourceAsStream(schemaType.getSourceName());
-
getComponentRef
SchemaComponent.Ref getComponentRef()Used for on-demand loading of schema components.
-