Class ChoiceContentSpec

java.lang.Object
com.ctc.wstx.dtd.ContentSpec
com.ctc.wstx.dtd.ChoiceContentSpec

public class ChoiceContentSpec extends ContentSpec
Content specification that defines content model that has multiple alternative elements; including mixed content model.
  • Field Details

    • mNsAware

      final boolean mNsAware
    • mHasMixed

      final boolean mHasMixed
      Whether this is a mixed content model; mostly affects String representation
    • mContentSpecs

      final ContentSpec[] mContentSpecs
  • Constructor Details

    • ChoiceContentSpec

      private ChoiceContentSpec(boolean nsAware, char arity, boolean mixed, ContentSpec[] specs)
    • ChoiceContentSpec

      private ChoiceContentSpec(boolean nsAware, char arity, boolean mixed, Collection<ContentSpec> specs)
  • Method Details

    • constructChoice

      public static ChoiceContentSpec constructChoice(boolean nsAware, char arity, Collection<ContentSpec> specs)
    • constructMixed

      public static ChoiceContentSpec constructMixed(boolean nsAware, Collection<ContentSpec> specs)
    • getSimpleValidator

      public StructValidator getSimpleValidator()
      Description copied from class: ContentSpec
      Method called by input element stack to get validator for this content specification, if this specification is simple enough not to need full DFA-based validator.
      Specified by:
      getSimpleValidator in class ContentSpec
      Returns:
      Simple content model validator, if one can be directly constructed, or null to indicate that a DFA needs to be created.
    • rewrite

      public ModelNode rewrite()
      Description copied from class: ContentSpec
      Method called as the first part of DFA construction, if necessary; will usually create simpler ModelNode instances that will match definition this instance contains.
      Specified by:
      rewrite in class ContentSpec
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • namesetFromSpecs

      protected static PrefixedNameSet namesetFromSpecs(boolean nsAware, ContentSpec[] specs)