Package com.ctc.wstx.dtd
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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
ChoiceContentSpec.Validator
-
Field Summary
Fields Modifier and Type Field Description (package private) ContentSpec[]
mContentSpecs
(package private) boolean
mHasMixed
Whether this is a mixed content model; mostly affects String representation(package private) boolean
mNsAware
-
Fields inherited from class com.ctc.wstx.dtd.ContentSpec
mArity
-
-
Constructor Summary
Constructors Modifier Constructor Description private
ChoiceContentSpec(boolean nsAware, char arity, boolean mixed, ContentSpec[] specs)
private
ChoiceContentSpec(boolean nsAware, char arity, boolean mixed, java.util.Collection<ContentSpec> specs)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ChoiceContentSpec
constructChoice(boolean nsAware, char arity, java.util.Collection<ContentSpec> specs)
static ChoiceContentSpec
constructMixed(boolean nsAware, java.util.Collection<ContentSpec> specs)
StructValidator
getSimpleValidator()
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)
ModelNode
rewrite()
Method called as the first part of DFA construction, if necessary; will usually create simplerModelNode
instances that will match definition this instance contains.java.lang.String
toString()
-
Methods inherited from class com.ctc.wstx.dtd.ContentSpec
getArity, isLeaf, setArity
-
-
-
-
Field Detail
-
mNsAware
final boolean mNsAware
-
mHasMixed
final boolean mHasMixed
Whether this is a mixed content model; mostly affects String representation
-
mContentSpecs
final ContentSpec[] mContentSpecs
-
-
Constructor Detail
-
ChoiceContentSpec
private ChoiceContentSpec(boolean nsAware, char arity, boolean mixed, ContentSpec[] specs)
-
ChoiceContentSpec
private ChoiceContentSpec(boolean nsAware, char arity, boolean mixed, java.util.Collection<ContentSpec> specs)
-
-
Method Detail
-
constructChoice
public static ChoiceContentSpec constructChoice(boolean nsAware, char arity, java.util.Collection<ContentSpec> specs)
-
constructMixed
public static ChoiceContentSpec constructMixed(boolean nsAware, java.util.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 classContentSpec
- 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 simplerModelNode
instances that will match definition this instance contains.- Specified by:
rewrite
in classContentSpec
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
namesetFromSpecs
protected static PrefixedNameSet namesetFromSpecs(boolean nsAware, ContentSpec[] specs)
-
-