xmltorng.i2s.impl
Class AttributesPatternCategoryImpl

java.lang.Object
  extended by xmltorng.i2s.impl.AttributesPatternCategoryImpl
All Implemented Interfaces:
AttributesPatternCategory, PatternCategory

public final class AttributesPatternCategoryImpl
extends java.lang.Object
implements AttributesPatternCategory

A pattern category for attribute patterns, disregarding elements. Formally : attribute ::= attributes ::= | attribute | ( attribute+ )


Constructor Summary
AttributesPatternCategoryImpl()
           
 
Method Summary
 void addAttributeNames(Name[] attributeNames)
          Add a pattern as an attribute name set.
 boolean addPattern(Name[] attributeNames, boolean hasText, RepeatableName[] repeatableElementNames)
          Add a pattern to this pattern category.
 Pattern fullPattern()
          Return a pattern that meets all the entered patterns.
 Pattern fullPattern(java.util.Map fromNameToElementDefinition)
          Return a pattern that meets all the entered patterns.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributesPatternCategoryImpl

public AttributesPatternCategoryImpl()
Method Detail

fullPattern

public final 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 final 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

addAttributeNames

public void addAttributeNames(Name[] attributeNames)
Description copied from interface: AttributesPatternCategory
Add a pattern as an attribute name set.

Specified by:
addAttributeNames in interface AttributesPatternCategory

fullPattern

public final Pattern fullPattern()
Description copied from interface: AttributesPatternCategory
Return a pattern that meets all the entered patterns.

Specified by:
fullPattern in interface AttributesPatternCategory