Package org.exolab.castor.xml.schema
Class RedefineSchema
java.lang.Object
org.exolab.castor.xml.schema.Structure
org.exolab.castor.xml.schema.Annotated
org.exolab.castor.xml.schema.RedefineSchema
- All Implemented Interfaces:
Serializable
This class is a wrapper used to save meta information concerning redefined structures from an XML schema.
This wrapper is identified by:
- a reference to the schema redefined
- the schema location of the redefined schema
- A vector containing the names of the structures redefined
- Version:
- $Revision: 8667 $ $Date: 2006-04-13 06:47:36 -0600 (Thu, 13 Apr 2006) $
- Author:
- Arnaud Blandin
- See Also:
-
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
ConstructorsConstructorDescriptionRedefineSchema
(Schema parentSchema) Default constructor to create a RedefineSchema that contains only AnnotationsRedefineSchema
(Schema parentSchema, Schema originalSchema) Constructs a new RedefineSchema structure -
Method Summary
Modifier and TypeMethodDescriptionvoid
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.Enumerates the attributeGroup names.Enumerates the complexType names.Enumerates the group names.Enumerates the simpleType names.getAttributeGroup
(String name) Returns the AttributeGroup corresponding to the given canonical name (unqualified name).getComplexType
(String name) Returns the ComplexType corresponding to the given name.getModelGroup
(String name) Returns the Model Group of the given name that is contained in this RedefineSchema.Returns the schema imported used for the redefinitions.Returns the parent schema in which this RedefineSchema is used.Returns the URI of the imported schema.getSimpleType
(String name) Returns the SimpleType corresponding to the given name.short
Returns the type of this Redefine Structureboolean
Returns true if this redefinition contains a redefinition for an AttributeGroup with the given name.boolean
Returns true if this redefinition contains a redefinition for a complexType with the given name.boolean
hasGroupRedefinition
(String name) Returns true if this redefinition contains a redefinition for a group with the given name.boolean
Returns true if at least one structure other than an annotation is present.boolean
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
-
Constructor Details
-
RedefineSchema
Default constructor to create a RedefineSchema that contains only Annotations -
RedefineSchema
Constructs a new RedefineSchema structure
-
-
Method Details
-
addComplexType
Adds the given complexType in the list of redefined complexTypes.- Parameters:
complexType
- the ComplexType to add.- Throws:
SchemaException
-
enumerateComplexTypes
Enumerates the complexType names.- Returns:
- an enumeration of the names of the redefined ComplexTypes
-
getComplexType
Returns the ComplexType corresponding to the given name.- Parameters:
name
- the name of the ComplexType to look for.- Returns:
- the ComplexType corresponding to the gven name.
-
hasComplexTypeRedefinition
Returns true if this redefinition contains a redefinition for a complexType with the given name.- Parameters:
name
- the canonical name of the complexType.
-
removeComplexType
Removes the complexType with the given name from the redefine structure.- Parameters:
complexType
- The complexType to be removed from this Redefined Structure.
-
addSimpleType
Adds a simpleType in the list of redefined simpleTypes.- Parameters:
simpleType
- the SimpleType to add.- Throws:
SchemaException
-
enumerateSimpleTypes
Enumerates the simpleType names.- Returns:
- an enumeration of the names of the redefined SimpleTypes.
-
getSimpleType
Returns the SimpleType corresponding to the given name.- Parameters:
name
- the name of the SimpleType to look for.- Returns:
- the SimpleType corresponding to the gven name.
-
hasSimpleTypeRedefinition
Returns true if this redefinition contains a redefinition for a simpleType with the given name.- Parameters:
name
- the canonical name of the simpleType.
-
removeSimpleType
Removes the given simpleType from the redefine structure.- Parameters:
simpleType
- the simpleType to be removed from this Redefined Structure.
-
addGroup
Adds a group name in the list of redefined groups.- Throws:
SchemaException
-
getModelGroup
Returns the Model Group of the given name that is contained in this RedefineSchema.- Parameters:
name
- the name of the ModelGroup to retrieve.- Returns:
- the ModelGroup of the given name contained in this RedefineSchema.
-
enumerateGroups
Enumerates the group names.- Returns:
- an enumeration of the names of the redefined groups.
-
hasGroupRedefinition
Returns true if this redefinition contains a redefinition for a group with the given name.- Parameters:
name
- the canonical name of the complexType.
-
removeGroup
Removes the given ModelGroup from the redefine structure.- Parameters:
group
- the ModelGroup to be removed from this Redefined Structure.
-
addAttributeGroup
Adds a AttributeGroup name in the list of redefined attributeGroups.- Throws:
SchemaException
-
getAttributeGroup
Returns the AttributeGroup corresponding to the given canonical name (unqualified name).- Returns:
- the AttributeGroup corresponding to the given canonical name (unqualified name).
-
enumerateAttributeGroups
Enumerates the attributeGroup names.- Returns:
- an enumeration of the names of the redefined AttributeGroups.
-
hasAttributeGroupRedefinition
Returns true if this redefinition contains a redefinition for an AttributeGroup with the given name.- Parameters:
name
- the canonical name of the complexType.
-
removeAttributeGroup
Removes the attributeGroup with the given name from the redefine structure.- Parameters:
attrGroup
- the attributeGroup to be removed from this Redefined Structure.
-
hasRedefinition
public boolean hasRedefinition()Returns true if at least one structure other than an annotation is present.- Returns:
- true if at least one structure other than an annotation is present.
-
getSchemaLocation
Returns the URI of the imported schema.- Returns:
- the URI of the imported schema.
-
getOriginalSchema
Returns the schema imported used for the redefinitions.- Returns:
- the original schema imported.
-
getParentSchema
Returns the parent schema in which this RedefineSchema is used.- Returns:
- the parent schema in which this Redefined Schema is used.
-
getStructureType
public short getStructureType()Returns the type of this Redefine Structure- Specified by:
getStructureType
in classStructure
- Returns:
- the type of this Redefin Structure
-
validate
Description copied from class:Structure
Checks the validity of this Schema defintion.- Specified by:
validate
in classStructure
- Throws:
ValidationException
- when this Schema definition is invalid.
-