Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## xmltorng.i2s.impl
Class GroupPatternCategoryImpl

    java.lang.Object
      xmltorng.i2s.impl.GroupPatternCategoryImpl

All Implemented Interfaces:
  GroupPatternCategory, PatternCategory

    public final class GroupPatternCategoryImpl

extends java.lang.Object
implements GroupPatternCategory

A group pattern category is a pattern category for group patterns whose child patterns are supported by the choice pattern category or choice patterns whose child patterns are such group patterns. May also contain attributes and/or text. Formally : attribute ::= attributes ::= attribute | ( attribute+ ) element ::= any oneOrMoreElement ::= element | ( element ) | ( (element* & ( element )+) ) zerorOrMoreElement ::= oneOrMoreElement | ( oneOrMoreElement ) group ::= zeroOrMoreElement | ( zeroOrMoreElement+ ) choice ::= group | ( group+ ) elementsAndText ::= choice | ( choice ) content ::= elementsAndText | ( attributes elementsAndText ) Additional constraint : an element with a given name may appear at most in one child pattern.

Constructor Summary
`GroupPatternCategoryImpl()`
`GroupPatternCategoryImpl(AttributesPatternCategory attributesPatternCategory, boolean hasText)`
`GroupPatternCategoryImpl(ChoicePatternCategory patternCategory, AttributesPatternCategory attributesPatternCategory, boolean hasText)`

Method Summary
`boolean` | `addPattern(Name[] attributeNames, boolean hasText, RepeatableName[] repeatableElementNames)` Add a pattern to this pattern category.
`AttributesPatternCategory` | `attributesPatternCategory()`
`java.util.Set` | `elementNameSet()` Return the set of element names.
`Pattern` | `fullPattern(java.util.Map fromNameToElementDefinition)` Return a pattern that meets all the entered patterns.
`boolean` | `hasText()`
`boolean` | `isOptional(Name elementName)` The returned value say if the element with that name may be ommited or not.
`boolean` | `isRepeatable(Name elementName)` The returned value say if the element with that name may be repeated or not.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### GroupPatternCategoryImpl

    public GroupPatternCategoryImpl()

### GroupPatternCategoryImpl

    public GroupPatternCategoryImpl(AttributesPatternCategory attributesPatternCategory,
                                    boolean hasText)

### GroupPatternCategoryImpl

    public GroupPatternCategoryImpl(ChoicePatternCategory patternCategory,
                                    AttributesPatternCategory attributesPatternCategory,
                                    boolean hasText)

Method Detail

### attributesPatternCategory

    public AttributesPatternCategory attributesPatternCategory()

### hasText

    public boolean hasText()

### fullPattern

    public Pattern fullPattern(java.util.Map fromNameToElementDefinition)

  Description copied from interface: `PatternCategory`
  Return a pattern that meets all the entered patterns. May fail, then return null. If successfull then may use and update the given map between element name and element definition.

  Specified by:
    `fullPattern` in interface `PatternCategory`

### addPattern

    public boolean addPattern(Name[] attributeNames,
                              boolean hasText,
                              RepeatableName[] repeatableElementNames)

  Description copied from interface: `PatternCategory`
  Add a pattern to this pattern category. The pattern is given as a text presence flag, an attribute name set and an element name sequence, where each element may or may not be repeated. Returns true in case of success or if the pattern category already includes the pattern. Returns false if the pattern is out of the pattern category but the pattern category might be affected in that case too.

  Specified by:
    `addPattern` in interface `PatternCategory`

### elementNameSet

    public java.util.Set elementNameSet()

  Description copied from interface: `GroupPatternCategory`
  Return the set of element names. It is neither empty nor null.

  Specified by:
    `elementNameSet` in interface `GroupPatternCategory`

### isRepeatable

    public boolean isRepeatable(Name elementName)

  Description copied from interface: `GroupPatternCategory`
  The returned value say if the element with that name may be repeated or not.

  Specified by:
    `isRepeatable` in interface `GroupPatternCategory`

### isOptional

    public boolean isOptional(Name elementName)

  Description copied from interface: `GroupPatternCategory`
  The returned value say if the element with that name may be ommited or not.

  Specified by:
    `isOptional` in interface `GroupPatternCategory`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD