xmltorng.i2s.framework
Interface PatternCategory

All Known Subinterfaces:
AttributesPatternCategory, ChoicePatternCategory, GroupPatternCategory
All Known Implementing Classes:
AttributesPatternCategoryImpl, ElementPatternCategory, EmptyPatternCategory, GroupPatternCategoryImpl, InterleavePatternCategoryImpl, OptionalRepeatableElementPatternCategory, RepeatableElementPatternCategory

public interface PatternCategory

A pattern category represents a set of RELAX NG patterns.


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.
 

Method Detail

addPattern

boolean addPattern(Name[] attributeNames,
                   boolean hasText,
                   RepeatableName[] repeatableElementNames)
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.


fullPattern

Pattern fullPattern(java.util.Map fromNameToElementDefinition)
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.