Class Wildcard

All Implemented Interfaces:
Serializable

public class Wildcard extends Particle
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:
  • Constructor Details

    • Wildcard

      public Wildcard(ComplexType complexType)
      The wildcard is embedded in a complexType
      Parameters:
      complexType - the complexType that contains this wildcard
    • Wildcard

      public Wildcard(Group group)
      The wildcard is embedded in a ModelGroup ()
      Parameters:
      group - the ModelGoup that contains this wildcard
    • Wildcard

      public Wildcard(AttributeGroup attGroup)
      The wildcard is embedded in an AttributeGroup.
      Parameters:
      attGroup - the AttributeGroup that contains this wildcard
  • Method Details

    • addNamespace

      public void addNamespace(String Namespace)
      add a namespace
      Parameters:
      Namespace - the namespace to add
    • removeNamespace

      public boolean removeNamespace(String namespace)
      Removes the given namespace from the namespace collection
      Parameters:
      namespace - the namespace to remove.
    • getComplexType

      public ComplexType getComplexType()
      Returns the complexType that contains this wildcard, can return null.
      Returns:
      the complexType that contains this wildcard (can be null).
    • getModelGroup

      public Group getModelGroup()
      Returns the model group that contains this wildcard, can return null.
      Returns:
      the model group that contains this wildcard (can be null).
    • getAttributeGroup

      public AttributeGroup getAttributeGroup()
      Returns the AttributeGroup that contains this wilcard (can return null)
      Returns:
      the AttributeGroup that contains this wilcard (can return null)
    • getSchema

      public Schema getSchema()
      Returns the parent schema in which this wildcard is located.
      Returns:
      the schema that contains the parent structure of this wildcard.
    • getNamespaces

      public Enumeration getNamespaces()
      Returns an enumeration that contains the different namespaces of this wildcard
      Returns:
      an enumeration that contains the different namespaces of this wildcard
    • getProcessContent

      public String 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

      public void setId(String id)
      Sets the ID for this Group
      Parameters:
      id - the ID for this Group
    • setProcessContents

      public void setProcessContents(String process) throws SchemaException
      Sets the processContent of the wildCard
      Parameters:
      process - the process content to set
      Throws:
      SchemaException - thrown when the processContent is not valid
    • validate

      public void validate() throws ValidationException
      Description copied from class: Structure
      Checks the validity of this Schema defintion.
      Specified by:
      validate in class Structure
      Throws:
      ValidationException - when this Schema definition is invalid.
    • getStructureType

      public short getStructureType()
      Returns the type of this Schema Structure
      Specified by:
      getStructureType in class Structure
      Returns:
      the type of this Schema Structure