// Path: java2word/src/main/java/word/api/interfaces/IFluentElement.java
// public interface IFluentElement <F>{
// 
// 	/**
// 	 * This method is just to keep the API consistent when you do something like:
// 	 * 		Heading1 myHEading = Heading1.with("h3333").<b>create();</b>
// 	 * It is just to have that "create()" at the end but the following code is the same:
// 	 * 		Heading1 myHEading = Heading1.with("h3333");
// 	 * 
// 	 * Anyway, it is here for sake of consistency or semantic
// 	 * 
// 	 * @return
// 	 * 
// 	 */
// 	public F create();
// 	
// }
// 
// Path: java2word/src/main/java/word/w2004/style/HeadingStyle.java
// public class HeadingStyle extends AbstractStyle implements ISuperStylin{
// 
//     /**
//      * Default align is left
//      */
//     private Align align = Align.LEFT;
//     private boolean bold = false;
//     private boolean italic = false;
// 
//     //we could abstract this or not... if we want to apply style to one word inside a the Heading, you can NOT apply align JUSTIFIED, for example.
//     //For this reason I will leave this here for instance...
//     public enum Align {
//         CENTER("center"), LEFT("left"), RIGHT("right"), JUSTIFIED("both");
// 
//         private String value;
// 
//         Align(String value) {
//             this.value = value;
//         }
// 
//         public String getValue() {
//             return value;
//         }
//     }
// 
// 
//     //This method holds the logic to replace all place holders for styling.
//     //I also noticed if you don't replace the place holder, it doesn't cause any error!
//     //But we should try to replace in order to keep the result xml clean.
//     @Override
//     public String getNewContentWithStyle(String txt) {
//         String alignValue = "\n            	<w:jc w:val=\"" + align.getValue()+ "\" />";
//         txt = txt.replace("{styleAlign}", alignValue);
// 
//         StringBuilder sbText = new StringBuilder("");
// 
//         applyBoldAndItalic(sbText);
// 
//         if(!"".equals(sbText.toString())) {
//             sbText.insert(0, "\n	 <w:rPr>");
//             sbText.append("\n	 </w:rPr>");
//         }
// 
//         txt = txt.replace("{styleText}", sbText.toString());//Convention: apply styles
//         txt = txt.replaceAll("[{]style(.*)[}]", ""); //Convention: remove unused styles after...
// 
//         return txt;
//     }
// 
// 
//     private void applyBoldAndItalic(StringBuilder sbText) {
//         if(bold) {
//             sbText.append("\n            	<w:b/><w:b-cs/>");
//         }
//         if(italic) {
//             sbText.append("\n            	<w:i/>");
//         }
//     }
// 
// 
//     //### Getters  setters... ###
// 
//     /**
//      * Heading alignment
//      * @param align
//      * @return fluent @HeadingStyle
//      */
//     public HeadingStyle align(Align align) {
//         this.align = align;
//         return this;
//     }
// 
//     /**
//      * Set Heading font to bold
//      * @return fluent @HeadingStyle
//      */
//     public HeadingStyle bold() {
//         bold = true;
//         return this;
//     }
// 
//     /**
//      * Set Heading font to italic
//      * @return fluent @HeadingStyle
//      */
//     public HeadingStyle italic() {
//         italic = true;
//         return this;
//     }
// 
// 
// }


import word.api.interfaces.IFluentElement;
import word.w2004.style.HeadingStyle;
package word.w2004.elements;


public class Heading2 extends AbstractHeading<HeadingStyle> implements IFluentElement<Heading2>{

    //Constructor
    private Heading2(String value){
        super("Heading2", value);
    }

    /***
     * @param The value of the paragraph
     * @return the Fluent @Heading2
     */
    public static Heading2 with(String string) {
        return new Heading2(string);
    }


// Path: java2word/src/main/java/word/api/interfaces/IFluentElement.java
// public interface IFluentElement <F>{
// 
// 	/**
// 	 * This method is just to keep the API consistent when you do something like:
// 	 * 		Heading1 myHEading = Heading1.with("h3333").<b>create();</b>
// 	 * It is just to have that "create()" at the end but the following code is the same:
// 	 * 		Heading1 myHEading = Heading1.with("h3333");
// 	 * 
// 	 * Anyway, it is here for sake of consistency or semantic
// 	 * 
// 	 * @return
// 	 * 
// 	 */
// 	public F create();
// 	
// }
// 
// Path: java2word/src/main/java/word/w2004/style/HeadingStyle.java
// public class HeadingStyle extends AbstractStyle implements ISuperStylin{
// 
//     /**
//      * Default align is left
//      */
//     private Align align = Align.LEFT;
//     private boolean bold = false;
//     private boolean italic = false;
// 
//     //we could abstract this or not... if we want to apply style to one word inside a the Heading, you can NOT apply align JUSTIFIED, for example.
//     //For this reason I will leave this here for instance...
//     public enum Align {
//         CENTER("center"), LEFT("left"), RIGHT("right"), JUSTIFIED("both");
// 
//         private String value;
// 
//         Align(String value) {
//             this.value = value;
//         }
// 
//         public String getValue() {
//             return value;
//         }
//     }
// 
// 
//     //This method holds the logic to replace all place holders for styling.
//     //I also noticed if you don't replace the place holder, it doesn't cause any error!
//     //But we should try to replace in order to keep the result xml clean.
//     @Override
//     public String getNewContentWithStyle(String txt) {
//         String alignValue = "\n            	<w:jc w:val=\"" + align.getValue()+ "\" />";
//         txt = txt.replace("{styleAlign}", alignValue);
// 
//         StringBuilder sbText = new StringBuilder("");
// 
//         applyBoldAndItalic(sbText);
// 
//         if(!"".equals(sbText.toString())) {
//             sbText.insert(0, "\n	 <w:rPr>");
//             sbText.append("\n	 </w:rPr>");
//         }
// 
//         txt = txt.replace("{styleText}", sbText.toString());//Convention: apply styles
//         txt = txt.replaceAll("[{]style(.*)[}]", ""); //Convention: remove unused styles after...
// 
//         return txt;
//     }
// 
// 
//     private void applyBoldAndItalic(StringBuilder sbText) {
//         if(bold) {
//             sbText.append("\n            	<w:b/><w:b-cs/>");
//         }
//         if(italic) {
//             sbText.append("\n            	<w:i/>");
//         }
//     }
// 
// 
//     //### Getters  setters... ###
// 
//     /**
//      * Heading alignment
//      * @param align
//      * @return fluent @HeadingStyle
//      */
//     public HeadingStyle align(Align align) {
//         this.align = align;
//         return this;
//     }
// 
//     /**
//      * Set Heading font to bold
//      * @return fluent @HeadingStyle
//      */
//     public HeadingStyle bold() {
//         bold = true;
//         return this;
//     }
// 
//     /**
//      * Set Heading font to italic
//      * @return fluent @HeadingStyle
//      */
//     public HeadingStyle italic() {
//         italic = true;
//         return this;
//     }
// 
// 
// }


// Path: java2word/src/main/java/word/w2004/elements/Heading2.java
import word.api.interfaces.IFluentElement;
import word.w2004.style.HeadingStyle;

package word.w2004.elements;


public class Heading2 extends AbstractHeading<HeadingStyle> implements IFluentElement<Heading2>{

    //Constructor
    private Heading2(String value){
        super("Heading2", value);
    }

    /***
     * @param The value of the paragraph
     * @return the Fluent @Heading2
     */
    public static Heading2 with(String string) {
        return new Heading2(string);
    }


    @Override