@Override void checkRestrictions(int context, DuplicateAttributeDetector dad, Alphabet alpha) throws RestrictionViolationException { switch (context) { case START_CONTEXT: throw new RestrictionViolationException("start_contains_one_or_more"); case DATA_EXCEPT_CONTEXT: throw new RestrictionViolationException("data_except_contains_one_or_more"); } p.checkRestrictions(context == ELEMENT_CONTEXT ? ELEMENT_REPEAT_CONTEXT : context, dad, alpha); if (context != LIST_CONTEXT && !contentTypeGroupable(p.getContentType(), p.getContentType())) throw new RestrictionViolationException("one_or_more_string"); }
OneOrMorePattern(Pattern p) { super(p.isNullable(), p.getContentType(), combineHashCode(ONE_OR_MORE_HASH_CODE, p.hashCode())); this.p = p; }