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 OptionalRepeatableElementPatternCategory

    java.lang.Object
      xmltorng.i2s.impl.RepeatableElementPatternCategory
          xmltorng.i2s.impl.OptionalRepeatableElementPatternCategory

All Implemented Interfaces:
  ChoicePatternCategory, PatternCategory

    public final class OptionalRepeatableElementPatternCategory

extends RepeatableElementPatternCategory
implements ChoicePatternCategory

The `OptionalRepeatableElementPatterncategory` is a pattern category that contains optional or not optional choice patterns between repeatable or not repeatable named elements. It may also contain attributes and/or text. It may not contain only the empty pattern. Formally: attribute ::= attributes ::= attribute | ( attribute+ ) element ::= any oneOrMoreElement ::= element | ( element ) | (choice> (element* & ( element )+) ) zerorOrMoreElement ::= oneOrMoreElement | ( oneOrMoreElement ) zerorOrMoreElementAndText ::= zerorOrMoreElement | ( zerorOrMoreElement ) content ::= zerorOrMoreElementAndText | ( attributes zerorOrMoreElementAndText )

Field Summary

Fields inherited from class xmltorng.i2s.impl.RepeatableElementPatternCategory
`attributesPatternCategory, fromElementNameToRepeatable, hasText`

Constructor Summary
`OptionalRepeatableElementPatternCategory()`
`OptionalRepeatableElementPatternCategory(AttributesPatternCategory attributesPatternCategory, boolean hasText)`
`OptionalRepeatableElementPatternCategory(Name elementName, boolean isRepeatable, boolean isOptional)`

Method Summary
`boolean` | `addPattern(Name[] attributeNames, boolean hasText, RepeatableName[] repeatableElementNames)` Add a pattern to this pattern category.
`Pattern` | `fullPattern(java.util.Map fromNameToElementDefinition)` Return a pattern that meets all the entered patterns.
`boolean` | `isPatternOptional()` The returned value say if the element may be ommited or not.
`void` | `setPatternOptional(boolean isOptional)`
`java.lang.String` | `toString()`

Methods inherited from class xmltorng.i2s.impl.RepeatableElementPatternCategory
`addElementName, attributesPatternCategory, fromElementNameToRepeatable, hasText`

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

Methods inherited from interface xmltorng.i2s.framework.ChoicePatternCategory
`fromElementNameToRepeatable`

Constructor Detail

### OptionalRepeatableElementPatternCategory

    public OptionalRepeatableElementPatternCategory()

### OptionalRepeatableElementPatternCategory

    public OptionalRepeatableElementPatternCategory(AttributesPatternCategory attributesPatternCategory,
                                                    boolean hasText)

### OptionalRepeatableElementPatternCategory

    public OptionalRepeatableElementPatternCategory(Name elementName,
                                                    boolean isRepeatable,
                                                    boolean isOptional)

Method Detail

### setPatternOptional

    public void setPatternOptional(boolean isOptional)

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `RepeatableElementPatternCategory`

### 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`
  Overrides:
    `fullPattern` in class `RepeatableElementPatternCategory`

### 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`
  Overrides:
    `addPattern` in class `RepeatableElementPatternCategory`

### isPatternOptional

    public boolean isPatternOptional()

  Description copied from interface: `ChoicePatternCategory`
  The returned value say if the element may be ommited or not.

  Specified by:
    `isPatternOptional` in interface `ChoicePatternCategory`
  Overrides:
    `isPatternOptional` in class `RepeatableElementPatternCategory`

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