|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exolab.castor.xml.schema.Structure
org.exolab.castor.xml.schema.Annotated
org.exolab.castor.xml.schema.RedefineSchema
public class RedefineSchema
This class is a wrapper used to save meta information concerning redefined structures from an XML schema.
This wrapper is identified by:
Nested Class Summary | |
---|---|
(package private) class |
RedefineSchema.EmptyEnumeration
|
Field Summary |
---|
Fields inherited from class org.exolab.castor.xml.schema.Structure |
---|
ANNOTATION, ANYTYPE, APPINFO, ATTRIBUTE, ATTRIBUTE_GROUP, COMPLEX_CONTENT, COMPLEX_TYPE, DOCUMENTATION, ELEMENT, FACET, GROUP, IDENTITY_FIELD, IDENTITY_SELECTOR, KEY, KEYREF, LIST, MODELGROUP, MODELGROUP_REF, REDEFINE, SCHEMA, SIMPLE_CONTENT, SIMPLE_TYPE, UNION, UNIQUE, UNKNOWN, WILDCARD |
Constructor Summary | |
---|---|
RedefineSchema(Schema parentSchema)
Default constructor to create a RedefineSchema that contains only Annotations |
|
RedefineSchema(Schema parentSchema,
Schema originalSchema)
Constructs a new RedefineSchema structure |
Method Summary | |
---|---|
void |
addAttributeGroup(AttributeGroupDecl attrGroup)
Adds a AttributeGroup name in the list of redefined attributeGroups. |
void |
addComplexType(ComplexType complexType)
Adds the given complexType in the list of redefined complexTypes. |
void |
addGroup(ModelGroup group)
Adds a group name in the list of redefined groups. |
void |
addSimpleType(SimpleType simpleType)
Adds a simpleType in the list of redefined simpleTypes. |
java.util.Enumeration |
enumerateAttributeGroups()
Enumerates the attributeGroup names. |
java.util.Enumeration |
enumerateComplexTypes()
Enumerates the complexType names. |
java.util.Enumeration |
enumerateGroups()
Enumerates the group names. |
java.util.Enumeration |
enumerateSimpleTypes()
Enumerates the simpleType names. |
AttributeGroupDecl |
getAttributeGroup(java.lang.String name)
Returns the AttributeGroup corresponding to the given canonical name (unqualified name). |
ComplexType |
getComplexType(java.lang.String name)
Returns the ComplexType corresponding to the given name. |
ModelGroup |
getModelGroup(java.lang.String name)
Returns the Model Group of the given name that is contained in this RedefineSchema. |
Schema |
getOriginalSchema()
Returns the schema imported used for the redefinitions. |
Schema |
getParentSchema()
Returns the parent schema in which this RedefineSchema is used. |
java.lang.String |
getSchemaLocation()
Returns the URI of the imported schema. |
SimpleType |
getSimpleType(java.lang.String name)
Returns the SimpleType corresponding to the given name. |
short |
getStructureType()
Returns the type of this Redefine Structure |
boolean |
hasAttributeGroupRedefinition(java.lang.String name)
Returns true if this redefinition contains a redefinition for an AttributeGroup with the given name. |
boolean |
hasComplexTypeRedefinition(java.lang.String name)
Returns true if this redefinition contains a redefinition for a complexType with the given name. |
boolean |
hasGroupRedefinition(java.lang.String name)
Returns true if this redefinition contains a redefinition for a group with the given name. |
boolean |
hasRedefinition()
Returns true if at least one structure other than an annotation is present. |
boolean |
hasSimpleTypeRedefinition(java.lang.String name)
Returns true if this redefinition contains a redefinition for a simpleType with the given name. |
boolean |
removeAttributeGroup(AttributeGroupDecl attrGroup)
Removes the attributeGroup with the given name from the redefine structure. |
boolean |
removeComplexType(ComplexType complexType)
Removes the complexType with the given name from the redefine structure. |
boolean |
removeGroup(ModelGroup group)
Removes the given ModelGroup from the redefine structure. |
boolean |
removeSimpleType(SimpleType simpleType)
Removes the given simpleType from the redefine structure. |
void |
validate()
Checks the validity of this Schema defintion. |
Methods inherited from class org.exolab.castor.xml.schema.Annotated |
---|
addAnnotation, getAnnotations, removeAnnotation |
Methods inherited from class org.exolab.castor.xml.schema.Structure |
---|
isValid |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RedefineSchema(Schema parentSchema)
public RedefineSchema(Schema parentSchema, Schema originalSchema)
uri
- the URI identifying the SchemaMethod Detail |
---|
public void addComplexType(ComplexType complexType) throws SchemaException
complexType
- the ComplexType to add.
SchemaException
public java.util.Enumeration enumerateComplexTypes()
public ComplexType getComplexType(java.lang.String name)
name
- the name of the ComplexType to look for.
public boolean hasComplexTypeRedefinition(java.lang.String name)
name
- the canonical name of the complexType.public boolean removeComplexType(ComplexType complexType)
complexType
- The complexType to be removed from this Redefined Structure.public void addSimpleType(SimpleType simpleType) throws SchemaException
SimpleType
- the SimpleType to add.
SchemaException
public java.util.Enumeration enumerateSimpleTypes()
public SimpleType getSimpleType(java.lang.String name)
name
- the name of the SimpleType to look for.
public boolean hasSimpleTypeRedefinition(java.lang.String name)
name
- the canonical name of the simpleType.public boolean removeSimpleType(SimpleType simpleType)
simpleType
- the simpleType to be removed from this Redefined Structure.public void addGroup(ModelGroup group) throws SchemaException
name
- the Group name
SchemaException
public ModelGroup getModelGroup(java.lang.String name)
name
- the name of the ModelGroup to retrieve.
public java.util.Enumeration enumerateGroups()
public boolean hasGroupRedefinition(java.lang.String name)
name
- the canonical name of the complexType.public boolean removeGroup(ModelGroup group)
group
- the ModelGroup to be removed from this Redefined Structure.public void addAttributeGroup(AttributeGroupDecl attrGroup) throws SchemaException
name
- the AttributeGroup name
SchemaException
public AttributeGroupDecl getAttributeGroup(java.lang.String name)
public java.util.Enumeration enumerateAttributeGroups()
public boolean hasAttributeGroupRedefinition(java.lang.String name)
name
- the canonical name of the complexType.public boolean removeAttributeGroup(AttributeGroupDecl attrGroup)
name
- the name of the attributeGroup to be removed from this Redefined Structure.public boolean hasRedefinition()
public java.lang.String getSchemaLocation()
public Schema getOriginalSchema()
public Schema getParentSchema()
public short getStructureType()
getStructureType
in class Structure
public void validate() throws ValidationException
Structure
validate
in class Structure
ValidationException
- when this Schema definition
is invalid.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |