Add maxSize constraints to domain class Content and TextSegment.