Package org.exolab.castor.xml.schema
Class Wildcard
java.lang.Object
org.exolab.castor.xml.schema.Structure
org.exolab.castor.xml.schema.Annotated
org.exolab.castor.xml.schema.Particle
org.exolab.castor.xml.schema.Wildcard
- All Implemented Interfaces:
Serializable
A class that represents an XML Schema Wildcard. A wilcard is represented by the XML elements
<any> and <anyAttribute> and can be hold in a complexType or in a
ModelGroup ().
- 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
ConstructorsConstructorDescriptionWildcard
(AttributeGroup attGroup) The wildcard is embedded in an AttributeGroup.Wildcard
(ComplexType complexType) The wildcard is embedded in a complexTypeThe wildcard is embedded in a ModelGroup () -
Method Summary
Modifier and TypeMethodDescriptionvoid
addNamespace
(String Namespace) add a namespaceReturns the AttributeGroup that contains this wilcard (can return null)Returns the complexType that contains this wildcard, can return null.Returns the model group that contains this wildcard, can return null.Returns an enumeration that contains the different namespaces of this wildcardReturns the processContent of this wildcardReturns the parent schema in which this wildcard is located.short
Returns the type of this Schema Structureboolean
Returns true if this wildcard represents <anyAttribute> otherwise falseboolean
removeNamespace
(String namespace) Removes the given namespace from the namespace collectionvoid
Sets this wildcard to represent <anyAttribute>void
Sets the ID for this Groupvoid
setProcessContents
(String process) Sets the processContent of the wildCardvoid
validate()
Checks the validity of this Schema defintion.Methods inherited from class org.exolab.castor.xml.schema.Particle
getMaxOccurs, getMinOccurs, isEmptiable, isMaxOccursSet, isMinOccursSet, setMaxOccurs, setMinOccurs
Methods inherited from class org.exolab.castor.xml.schema.Annotated
addAnnotation, getAnnotations, removeAnnotation
-
Constructor Details
-
Wildcard
The wildcard is embedded in a complexType- Parameters:
complexType
- the complexType that contains this wildcard
-
Wildcard
The wildcard is embedded in a ModelGroup () - Parameters:
group
- the ModelGoup that contains this wildcard
-
Wildcard
The wildcard is embedded in an AttributeGroup.- Parameters:
attGroup
- the AttributeGroup that contains this wildcard
-
-
Method Details
-
addNamespace
add a namespace- Parameters:
Namespace
- the namespace to add
-
removeNamespace
Removes the given namespace from the namespace collection- Parameters:
namespace
- the namespace to remove.
-
getComplexType
Returns the complexType that contains this wildcard, can return null.- Returns:
- the complexType that contains this wildcard (can be null).
-
getModelGroup
Returns the model group that contains this wildcard, can return null.- Returns:
- the model group that contains this wildcard (can be null).
-
getAttributeGroup
Returns the AttributeGroup that contains this wilcard (can return null)- Returns:
- the AttributeGroup that contains this wilcard (can return null)
-
getSchema
Returns the parent schema in which this wildcard is located.- Returns:
- the schema that contains the parent structure of this wildcard.
-
getNamespaces
Returns an enumeration that contains the different namespaces of this wildcard- Returns:
- an enumeration that contains the different namespaces of this wildcard
-
getProcessContent
Returns the processContent of this wildcard- Returns:
- the processContent of this wildcard
-
isAttributeWildcard
public boolean isAttributeWildcard()Returns true if this wildcard represents <anyAttribute> otherwise false- Returns:
- true if this wildcard represents <anyAttribute> otherwise false
-
setAttributeWildcard
public void setAttributeWildcard()Sets this wildcard to represent <anyAttribute> -
setId
-
setProcessContents
Sets the processContent of the wildCard- Parameters:
process
- the process content to set- Throws:
SchemaException
- thrown when the processContent is not valid
-
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.
-
getStructureType
public short getStructureType()Returns the type of this Schema Structure- Specified by:
getStructureType
in classStructure
- Returns:
- the type of this Schema Structure
-