Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.xmlbeans
Interface SchemaComponent

All Known Subinterfaces:
  SchemaAnnotation, SchemaAttributeGroup, SchemaGlobalAttribute, SchemaGlobalElement, SchemaIdentityConstraint, SchemaModelGroup, SchemaType

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.

See Also:
  `SchemaType`, `SchemaGlobalElement`, `SchemaGlobalAttribute`, `SchemaAttributeGroup`, `SchemaModelGroup`, `SchemaIdentityConstraint`

Nested Class Summary
`static class` | `SchemaComponent.Ref` A lazy reference to a component.

Field Summary
`static int` | `ANNOTATION` An annotation.
`static int` | `ATTRIBUTE` An attribute definition.
`static int` | `ATTRIBUTE_GROUP` An attribute group definition.
`static int` | `ELEMENT` An element definition.
`static int` | `IDENTITY_CONSTRAINT` An identity constraint definition.
`static int` | `MODEL_GROUP` A model group definition.
`static int` | `NOTATION` A notation definition.
`static int` | `TYPE` A type definition.

Method Summary
`SchemaComponent.Ref` | `getComponentRef()` Used for on-demand loading of schema components.
`int` | `getComponentType()` Returns the type code for the schema object, either `TYPE`, `ELEMENT`, `ATTRIBUTE`, `ATTRIBUTE_GROUP`, `MODEL_GROUP`, `IDENTITY_CONSTRAINT`, or `NOTATION`.
`QName` | `getName()` The name of the schema component
`String` | `getSourceName()` The name of resource that represends the source .xsd in which this component was defined (if known) See: `SchemaTypeLoader.getSourceAsStream(String)` Example:
`SchemaTypeSystem` | `getTypeSystem()` Returns the typesystem within which this component definition resides

Field Detail

### TYPE

    public static final int TYPE

  A type definition. See `getComponentType()`

  See Also:
    Constant Field Values

### ELEMENT

    public static final int ELEMENT

  An element definition. See `getComponentType()`

  See Also:
    Constant Field Values

### ATTRIBUTE

    public static final int ATTRIBUTE

  An attribute definition. See `getComponentType()`

  See Also:
    Constant Field Values

### ATTRIBUTE_GROUP

    public static final int ATTRIBUTE_GROUP

  An attribute group definition. See `getComponentType()`

  See Also:
    Constant Field Values

### IDENTITY_CONSTRAINT

    public static final int IDENTITY_CONSTRAINT

  An identity constraint definition. See `getComponentType()`

  See Also:
    Constant Field Values

### MODEL_GROUP

    public static final int MODEL_GROUP

  A model group definition. See `getComponentType()`

  See Also:
    Constant Field Values

### NOTATION

    public static final int NOTATION

  A notation definition. See `getComponentType()`

  See Also:
    Constant Field Values

### ANNOTATION

    public static final int ANNOTATION

  An annotation. See `getComponentType()`

  See Also:
    Constant Field Values

Method Detail

### getComponentType

    public int getComponentType()

  Returns the type code for the schema object, either `TYPE`, `ELEMENT`, `ATTRIBUTE`, `ATTRIBUTE_GROUP`, `MODEL_GROUP`, `IDENTITY_CONSTRAINT`, or `NOTATION`.

### getTypeSystem

    public SchemaTypeSystem getTypeSystem()

  Returns the typesystem within which this component definition resides

### getName

    public QName getName()

  The name of the schema component

### getSourceName

    public 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

    public SchemaComponent.Ref getComponentRef()

  Used for on-demand loading of schema components.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD