Class ChoiceModelGroup

    • Constructor Detail

      • ChoiceModelGroup

        public ChoiceModelGroup()
    • Method Detail

      • isEmptiable

        public boolean isEmptiable()
                            throws MissingComponentException
        Determine if empty content is allowed
        Specified by:
        isEmptiable in class ModelGroup
        Returns:
        true if empty content matches this compositor, which is true if the compositor as a whole has minOccurs=0, or if any of the choices 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)
      • markVulnerableSubParticles

        public void markVulnerableSubParticles​(boolean isRepeatable)
                                        throws MissingComponentException
        Mark contained particles as vulnerable. A particle is marked as vulnerable if everything both before and after it in the content model is optional. This contributes to the algorithm for deciding whether counting states can be used for this particle in the finite state machine
        Overrides:
        markVulnerableSubParticles in class ModelGroup
        Parameters:
        isRepeatable - set to true if this part of the content model can be repeated
        Throws:
        MissingComponentException
      • getCompositorName

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