xmltorng.i2s.impl
Class EmptyPatternCategory

java.lang.Object
  extended by xmltorng.i2s.impl.EmptyPatternCategory
All Implemented Interfaces:
PatternCategory

public final class EmptyPatternCategory
extends java.lang.Object
implements PatternCategory

The EmptyPatternCategory contains the empty pattern and the combining of attribute set pattern and text pattern. Formally : attribute ::= attributes ::= attribute | ( attribute+ ) content ::= | attributes | | ( attributes )


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

Constructor Detail

EmptyPatternCategory

public EmptyPatternCategory()
Method Detail

attributesPatternCategory

public AttributesPatternCategory attributesPatternCategory()

hasText

public boolean hasText()

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