Class SequenceModelGroup

All Implemented Interfaces:
Term, UserSchemaComponent, SourceLocator, Location, SchemaComponent, Locator

public class SequenceModelGroup extends ModelGroup
A SequenceCompositor represents an xs:sequence element in the schema
  • Constructor Details

    • SequenceModelGroup

      public SequenceModelGroup()
  • Method Details

    • isEmptiable

      public boolean isEmptiable() throws MissingComponentException
      Determine if empty content is allowed
      Specified by:
      isEmptiable in class ModelGroup
      Returns:
      true if the content model of the model group allows empty content
      Throws:
      MissingComponentException - if the schema contains unresolved references to required components
    • isPointless

      public boolean isPointless(ModelGroup container)
      Test whether the compositor is pointless, as described in XML Schema Part 1 Schema Component Constraint: Particle Valid (Restriction)
      Overrides:
      isPointless in class ModelGroup
      Parameters:
      container - not used
      Returns:
      true if the particle is pointless (which effectively means it can't match anything)
    • validate

      public boolean validate(SchemaCompiler compiler) throws SchemaException
      Checks the validity of this Compositor definition.
      Specified by:
      validate in interface UserSchemaComponent
      Overrides:
      validate in class ModelGroup
      Parameters:
      compiler - the schema compiler
      Returns:
      true when this Schema definition is valid, otherwise false.
      Throws:
      SchemaException - when the error listener decides an error is fatal
    • getCompositorName

      public String getCompositorName()
      Get the name of this compositor
      Specified by:
      getCompositorName in class ModelGroup
      Returns:
      one of "sequence", "choice", or "all"