package org.gcube.informationsystem.utils.documentation.rst; /** * @author Luca Frosini (ISTI - CNR) */ public class Section { public enum SectionType { HEADING_1(true, "#"), HEADING_2(true, "*"), HEADING_3(false, "="), HEADING_4(false, "-"), HEADING_5(false, "^"), HEADING_6(false, "\""); boolean overline; String separator; private SectionType(boolean overline, String separator) { this.overline = overline; this.separator = separator; } } protected SectionType sectionType; public Section() { this.sectionType = SectionType.HEADING_1; } public Section(SectionType sectionType) { this.sectionType = sectionType; } public SectionType getSectionType() { return sectionType; } public void setSectionType(SectionType sectionType) { this.sectionType = sectionType; } protected StringBuffer getSectionSeparation(String separator, int lenght) { StringBuffer stringBuffer = new StringBuffer(); for(int i=0; i