public class SchemaAnnotationImpl extends Object implements SchemaAnnotation
SchemaAnnotation.Attribute
SchemaComponent.Ref
ANNOTATION, ATTRIBUTE, ATTRIBUTE_GROUP, ELEMENT, IDENTITY_CONSTRAINT, MODEL_GROUP, NOTATION, TYPE
Modifier and Type | Method and Description |
---|---|
static SchemaAnnotationImpl |
getAnnotation(org.apache.xmlbeans.impl.schema.SchemaContainer c,
org.apache.xmlbeans.impl.xb.xsdschema.Annotated elem) |
static SchemaAnnotationImpl |
getAnnotation(org.apache.xmlbeans.impl.schema.SchemaContainer c,
XmlObject elem,
org.apache.xmlbeans.impl.xb.xsdschema.AnnotationDocument.Annotation ann) |
XmlObject[] |
getApplicationInformation()
Retrieves all application information items from this annotation
|
SchemaAnnotation.Attribute[] |
getAttributes()
Retrieves all attributes that are is a namespace other than
http://www.w3.org/2001/XMLSchema
from the annotation element and from the enclosing Schema component
|
SchemaComponent.Ref |
getComponentRef()
Used for on-demand loading of schema components.
|
int |
getComponentType()
Returns the type code for the schema object, either
SchemaComponent.TYPE ,
SchemaComponent.ELEMENT , SchemaComponent.ATTRIBUTE , SchemaComponent.ATTRIBUTE_GROUP ,
SchemaComponent.MODEL_GROUP , SchemaComponent.IDENTITY_CONSTRAINT , or SchemaComponent.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
|
XmlObject[] |
getUserInformation()
Retrieves all document information items from this annotation
|
void |
setFilename(String filename) |
public void setFilename(String filename)
public String getSourceName()
SchemaComponent
SchemaTypeLoader.getSourceAsStream(String)
SchemaType schemaType = ..; InputStream is = schemaType.getTypeSystem().getSourceAsStream(schemaType.getSourceName());
getSourceName
in interface SchemaComponent
public XmlObject[] getApplicationInformation()
SchemaAnnotation
getApplicationInformation
in interface SchemaAnnotation
public XmlObject[] getUserInformation()
SchemaAnnotation
getUserInformation
in interface SchemaAnnotation
public SchemaAnnotation.Attribute[] getAttributes()
SchemaAnnotation
getAttributes
in interface SchemaAnnotation
public int getComponentType()
SchemaComponent
SchemaComponent.TYPE
,
SchemaComponent.ELEMENT
, SchemaComponent.ATTRIBUTE
, SchemaComponent.ATTRIBUTE_GROUP
,
SchemaComponent.MODEL_GROUP
, SchemaComponent.IDENTITY_CONSTRAINT
, or SchemaComponent.NOTATION
.getComponentType
in interface SchemaComponent
public SchemaTypeSystem getTypeSystem()
SchemaComponent
getTypeSystem
in interface SchemaComponent
public QName getName()
SchemaComponent
getName
in interface SchemaComponent
public SchemaComponent.Ref getComponentRef()
SchemaComponent
getComponentRef
in interface SchemaComponent
public static SchemaAnnotationImpl getAnnotation(org.apache.xmlbeans.impl.schema.SchemaContainer c, org.apache.xmlbeans.impl.xb.xsdschema.Annotated elem)
public static SchemaAnnotationImpl getAnnotation(org.apache.xmlbeans.impl.schema.SchemaContainer c, XmlObject elem, org.apache.xmlbeans.impl.xb.xsdschema.AnnotationDocument.Annotation ann)