Package com.ctc.wstx.dtd
Class ChoiceContentSpec
java.lang.Object
com.ctc.wstx.dtd.ContentSpec
com.ctc.wstx.dtd.ChoiceContentSpec
Content specification that defines content model that has
multiple alternative elements; including mixed content model.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final class
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final ContentSpec[]
(package private) final boolean
Whether this is a mixed content model; mostly affects String representation(package private) final boolean
Fields inherited from class com.ctc.wstx.dtd.ContentSpec
mArity
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
ChoiceContentSpec
(boolean nsAware, char arity, boolean mixed, ContentSpec[] specs) private
ChoiceContentSpec
(boolean nsAware, char arity, boolean mixed, Collection<ContentSpec> specs) -
Method Summary
Modifier and TypeMethodDescriptionstatic ChoiceContentSpec
constructChoice
(boolean nsAware, char arity, Collection<ContentSpec> specs) static ChoiceContentSpec
constructMixed
(boolean nsAware, Collection<ContentSpec> specs) 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.protected static PrefixedNameSet
namesetFromSpecs
(boolean nsAware, ContentSpec[] specs) rewrite()
Method called as the first part of DFA construction, if necessary; will usually create simplerModelNode
instances that will match definition this instance contains.toString()
Methods inherited from class com.ctc.wstx.dtd.ContentSpec
getArity, isLeaf, setArity
-
Field Details
-
mNsAware
final boolean mNsAware -
mHasMixed
final boolean mHasMixedWhether this is a mixed content model; mostly affects String representation -
mContentSpecs
-
-
Constructor Details
-
ChoiceContentSpec
-
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
-
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 classContentSpec
- Returns:
- Simple content model validator, if one can be directly constructed, or null to indicate that a DFA needs to be created.
-
rewrite
Description copied from class:ContentSpec
Method called as the first part of DFA construction, if necessary; will usually create simplerModelNode
instances that will match definition this instance contains.- Specified by:
rewrite
in classContentSpec
-
toString
-
namesetFromSpecs
-