All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.alphasystem.docx4j.builder.wml.PPrBaseBuilder Maven / Gradle / Ivy

There is a newer version: 0.5.5
Show newest version

package com.alphasystem.docx4j.builder.wml;

import java.math.BigInteger;
import org.docx4j.wml.BooleanDefaultTrue;
import org.docx4j.wml.CTBorder;
import org.docx4j.wml.CTCnf;
import org.docx4j.wml.CTFramePr;
import org.docx4j.wml.CTShd;
import org.docx4j.wml.CTTextboxTightWrap;
import org.docx4j.wml.CTTrackChange;
import org.docx4j.wml.CTTrackChangeNumbering;
import org.docx4j.wml.Jc;
import org.docx4j.wml.JcEnumeration;
import org.docx4j.wml.PPrBase;
import org.docx4j.wml.STLineSpacingRule;
import org.docx4j.wml.STTextboxTightWrap;
import org.docx4j.wml.Tabs;
import org.docx4j.wml.TextDirection;


/**
 * Fluent API builder for org.docx4j.wml.PPrBase.
 * 
 */
public class PPrBaseBuilder
    extends com.alphasystem.docx4j.builder.OpenXmlBuilder
{

    private PPrBaseBuilder.PStyleBuilder pStyleBuilder;
    private PPrBaseBuilder.NumPrBuilder numPrBuilder;
    private PPrBaseBuilder.PBdrBuilder pBdrBuilder;
    private PPrBaseBuilder.SpacingBuilder spacingBuilder;
    private PPrBaseBuilder.IndBuilder indBuilder;
    private PPrBaseBuilder.TextAlignmentBuilder textAlignmentBuilder;
    private PPrBaseBuilder.OutlineLvlBuilder outlineLvlBuilder;
    private PPrBaseBuilder.DivIdBuilder divIdBuilder;

    /**
     * Initialize the underlying object.
     * 
     */
    public PPrBaseBuilder() {
        this(null);
    }

    /**
     * Initialize the builder with given object.
     * 
     * @param object
     *     the given object
     */
    public PPrBaseBuilder(PPrBase object) {
        super(object);
        pStyleBuilder = new PPrBaseBuilder.PStyleBuilder(this.object.getPStyle());
        numPrBuilder = new PPrBaseBuilder.NumPrBuilder(this.object.getNumPr());
        pBdrBuilder = new PPrBaseBuilder.PBdrBuilder(this.object.getPBdr());
        spacingBuilder = new PPrBaseBuilder.SpacingBuilder(this.object.getSpacing());
        indBuilder = new PPrBaseBuilder.IndBuilder(this.object.getInd());
        textAlignmentBuilder = new PPrBaseBuilder.TextAlignmentBuilder(this.object.getTextAlignment());
        outlineLvlBuilder = new PPrBaseBuilder.OutlineLvlBuilder(this.object.getOutlineLvl());
        divIdBuilder = new PPrBaseBuilder.DivIdBuilder(this.object.getDivId());
    }

    /**
     * Copies values fom src into target. Values of target will be overridden by the values from src.
     * 
     * @param src
     *     source object
     * @param target
     *     target object
     */
    public PPrBaseBuilder(PPrBase src, PPrBase target) {
        this(target);
        if (src!= null) {
            PPrBase.PStyle pStyle = src.getPStyle();
            if (pStyle!= null) {
                pStyle = new PPrBaseBuilder.PStyleBuilder(pStyle, object.getPStyle()).getObject();
            }
            CTFramePr framePr = src.getFramePr();
            if (framePr!= null) {
                framePr = new CTFramePrBuilder(framePr, object.getFramePr()).getObject();
            }
            PPrBase.NumPr numPr = src.getNumPr();
            if (numPr!= null) {
                numPr = new PPrBaseBuilder.NumPrBuilder(numPr, object.getNumPr()).getObject();
            }
            PPrBase.PBdr pBdr = src.getPBdr();
            if (pBdr!= null) {
                pBdr = new PPrBaseBuilder.PBdrBuilder(pBdr, object.getPBdr()).getObject();
            }
            CTShd shd = src.getShd();
            if (shd!= null) {
                shd = new CTShdBuilder(shd, object.getShd()).getObject();
            }
            Tabs tabs = src.getTabs();
            if (tabs!= null) {
                tabs = new TabsBuilder(tabs, object.getTabs()).getObject();
            }
            PPrBase.Spacing spacing = src.getSpacing();
            if (spacing!= null) {
                spacing = new PPrBaseBuilder.SpacingBuilder(spacing, object.getSpacing()).getObject();
            }
            PPrBase.Ind ind = src.getInd();
            if (ind!= null) {
                ind = new PPrBaseBuilder.IndBuilder(ind, object.getInd()).getObject();
            }
            Jc jc = src.getJc();
            if (jc!= null) {
                jc = new com.alphasystem.docx4j.builder.wml.JcBuilder(jc, object.getJc()).getObject();
            }
            TextDirection textDirection = src.getTextDirection();
            if (textDirection!= null) {
                textDirection = new com.alphasystem.docx4j.builder.wml.TextDirectionBuilder(textDirection, object.getTextDirection()).getObject();
            }
            PPrBase.TextAlignment textAlignment = src.getTextAlignment();
            if (textAlignment!= null) {
                textAlignment = new PPrBaseBuilder.TextAlignmentBuilder(textAlignment, object.getTextAlignment()).getObject();
            }
            CTTextboxTightWrap textboxTightWrap = src.getTextboxTightWrap();
            if (textboxTightWrap!= null) {
                textboxTightWrap = new com.alphasystem.docx4j.builder.wml.CTTextboxTightWrapBuilder(textboxTightWrap, object.getTextboxTightWrap()).getObject();
            }
            PPrBase.OutlineLvl outlineLvl = src.getOutlineLvl();
            if (outlineLvl!= null) {
                outlineLvl = new PPrBaseBuilder.OutlineLvlBuilder(outlineLvl, object.getOutlineLvl()).getObject();
            }
            PPrBase.DivId divId = src.getDivId();
            if (divId!= null) {
                divId = new PPrBaseBuilder.DivIdBuilder(divId, object.getDivId()).getObject();
            }
            CTCnf cnfStyle = src.getCnfStyle();
            if (cnfStyle!= null) {
                cnfStyle = new com.alphasystem.docx4j.builder.wml.CTCnfBuilder(cnfStyle, object.getCnfStyle()).getObject();
            }
            withPStyle(pStyle).withKeepNext(WmlBuilderFactory.cloneBooleanDefaultTrue(src.getKeepNext())).withKeepLines(WmlBuilderFactory.cloneBooleanDefaultTrue(src.getKeepLines())).withPageBreakBefore(WmlBuilderFactory.cloneBooleanDefaultTrue(src.getPageBreakBefore())).withFramePr(framePr).withWidowControl(WmlBuilderFactory.cloneBooleanDefaultTrue(src.getWidowControl())).withNumPr(numPr).withSuppressLineNumbers(WmlBuilderFactory.cloneBooleanDefaultTrue(src.getSuppressLineNumbers())).withPBdr(pBdr).withShd(shd).withTabs(tabs).withSuppressAutoHyphens(WmlBuilderFactory.cloneBooleanDefaultTrue(src.getSuppressAutoHyphens())).withKinsoku(WmlBuilderFactory.cloneBooleanDefaultTrue(src.getKinsoku())).withWordWrap(WmlBuilderFactory.cloneBooleanDefaultTrue(src.getWordWrap())).withOverflowPunct(WmlBuilderFactory.cloneBooleanDefaultTrue(src.getOverflowPunct())).withTopLinePunct(WmlBuilderFactory.cloneBooleanDefaultTrue(src.getTopLinePunct())).withAutoSpaceDE(WmlBuilderFactory.cloneBooleanDefaultTrue(src.getAutoSpaceDE())).withAutoSpaceDN(WmlBuilderFactory.cloneBooleanDefaultTrue(src.getAutoSpaceDN())).withBidi(WmlBuilderFactory.cloneBooleanDefaultTrue(src.getBidi())).withAdjustRightInd(WmlBuilderFactory.cloneBooleanDefaultTrue(src.getAdjustRightInd())).withSnapToGrid(WmlBuilderFactory.cloneBooleanDefaultTrue(src.getSnapToGrid())).withSpacing(spacing).withInd(ind).withContextualSpacing(WmlBuilderFactory.cloneBooleanDefaultTrue(src.getContextualSpacing())).withMirrorIndents(WmlBuilderFactory.cloneBooleanDefaultTrue(src.getMirrorIndents())).withSuppressOverlap(WmlBuilderFactory.cloneBooleanDefaultTrue(src.getSuppressOverlap())).withJc(jc).withTextDirection(textDirection).withTextAlignment(textAlignment).withTextboxTightWrap(textboxTightWrap).withOutlineLvl(outlineLvl).withDivId(divId).withCnfStyle(cnfStyle).withCollapsed(WmlBuilderFactory.cloneBooleanDefaultTrue(src.getCollapsed()));
        }
    }

    protected PPrBase createObject() {
        return WmlBuilderFactory.OBJECT_FACTORY.createPPrBase();
    }

    public PPrBaseBuilder withPStyle(PPrBase.PStyle value) {
        if (value!= null) {
            object.setPStyle(value);
        }
        return this;
    }

    public PPrBaseBuilder withPStyle(String val) {
        boolean initialized = (val!= null);
        if (initialized) {
            withPStyle(pStyleBuilder.withVal(val).getObject());
        }
        return this;
    }

    public PPrBaseBuilder.PStyleBuilder getPStyleBuilder() {
        return pStyleBuilder;
    }

    public PPrBaseBuilder withKeepNext(BooleanDefaultTrue value) {
        if (value!= null) {
            object.setKeepNext(value);
        }
        return this;
    }

    public PPrBaseBuilder withKeepNext(Boolean val) {
        if (val!= null) {
            object.setKeepNext(new com.alphasystem.docx4j.builder.wml.BooleanDefaultTrueBuilder().withVal(val).getObject());
        }
        return this;
    }

    public PPrBaseBuilder withKeepLines(BooleanDefaultTrue value) {
        if (value!= null) {
            object.setKeepLines(value);
        }
        return this;
    }

    public PPrBaseBuilder withKeepLines(Boolean val) {
        if (val!= null) {
            object.setKeepLines(new com.alphasystem.docx4j.builder.wml.BooleanDefaultTrueBuilder().withVal(val).getObject());
        }
        return this;
    }

    public PPrBaseBuilder withPageBreakBefore(BooleanDefaultTrue value) {
        if (value!= null) {
            object.setPageBreakBefore(value);
        }
        return this;
    }

    public PPrBaseBuilder withPageBreakBefore(Boolean val) {
        if (val!= null) {
            object.setPageBreakBefore(new com.alphasystem.docx4j.builder.wml.BooleanDefaultTrueBuilder().withVal(val).getObject());
        }
        return this;
    }

    public PPrBaseBuilder withFramePr(CTFramePr value) {
        if (value!= null) {
            object.setFramePr(value);
        }
        return this;
    }

    public PPrBaseBuilder withWidowControl(BooleanDefaultTrue value) {
        if (value!= null) {
            object.setWidowControl(value);
        }
        return this;
    }

    public PPrBaseBuilder withWidowControl(Boolean val) {
        if (val!= null) {
            object.setWidowControl(new com.alphasystem.docx4j.builder.wml.BooleanDefaultTrueBuilder().withVal(val).getObject());
        }
        return this;
    }

    public PPrBaseBuilder withNumPr(PPrBase.NumPr value) {
        if (value!= null) {
            object.setNumPr(value);
        }
        return this;
    }

    public PPrBaseBuilder withNumPr(PPrBase.NumPr.Ilvl ilvl, PPrBase.NumPr.NumId numId, CTTrackChangeNumbering numberingChange, CTTrackChange ins) {
        boolean initialized = ((((ilvl!= null)||(numId!= null))||(numberingChange!= null))||(ins!= null));
        if (initialized) {
            withNumPr(numPrBuilder.withIlvl(ilvl).withNumId(numId).withNumberingChange(numberingChange).withIns(ins).getObject());
        }
        return this;
    }

    public PPrBaseBuilder.NumPrBuilder getNumPrBuilder() {
        return numPrBuilder;
    }

    public PPrBaseBuilder withSuppressLineNumbers(BooleanDefaultTrue value) {
        if (value!= null) {
            object.setSuppressLineNumbers(value);
        }
        return this;
    }

    public PPrBaseBuilder withSuppressLineNumbers(Boolean val) {
        if (val!= null) {
            object.setSuppressLineNumbers(new com.alphasystem.docx4j.builder.wml.BooleanDefaultTrueBuilder().withVal(val).getObject());
        }
        return this;
    }

    public PPrBaseBuilder withPBdr(PPrBase.PBdr value) {
        if (value!= null) {
            object.setPBdr(value);
        }
        return this;
    }

    public PPrBaseBuilder.PBdrBuilder getPBdrBuilder() {
        return pBdrBuilder;
    }

    public PPrBaseBuilder withShd(CTShd value) {
        if (value!= null) {
            object.setShd(value);
        }
        return this;
    }

    public PPrBaseBuilder withTabs(Tabs value) {
        if (value!= null) {
            object.setTabs(value);
        }
        return this;
    }

    public PPrBaseBuilder withSuppressAutoHyphens(BooleanDefaultTrue value) {
        if (value!= null) {
            object.setSuppressAutoHyphens(value);
        }
        return this;
    }

    public PPrBaseBuilder withSuppressAutoHyphens(Boolean val) {
        if (val!= null) {
            object.setSuppressAutoHyphens(new com.alphasystem.docx4j.builder.wml.BooleanDefaultTrueBuilder().withVal(val).getObject());
        }
        return this;
    }

    public PPrBaseBuilder withKinsoku(BooleanDefaultTrue value) {
        if (value!= null) {
            object.setKinsoku(value);
        }
        return this;
    }

    public PPrBaseBuilder withKinsoku(Boolean val) {
        if (val!= null) {
            object.setKinsoku(new com.alphasystem.docx4j.builder.wml.BooleanDefaultTrueBuilder().withVal(val).getObject());
        }
        return this;
    }

    public PPrBaseBuilder withWordWrap(BooleanDefaultTrue value) {
        if (value!= null) {
            object.setWordWrap(value);
        }
        return this;
    }

    public PPrBaseBuilder withWordWrap(Boolean val) {
        if (val!= null) {
            object.setWordWrap(new com.alphasystem.docx4j.builder.wml.BooleanDefaultTrueBuilder().withVal(val).getObject());
        }
        return this;
    }

    public PPrBaseBuilder withOverflowPunct(BooleanDefaultTrue value) {
        if (value!= null) {
            object.setOverflowPunct(value);
        }
        return this;
    }

    public PPrBaseBuilder withOverflowPunct(Boolean val) {
        if (val!= null) {
            object.setOverflowPunct(new com.alphasystem.docx4j.builder.wml.BooleanDefaultTrueBuilder().withVal(val).getObject());
        }
        return this;
    }

    public PPrBaseBuilder withTopLinePunct(BooleanDefaultTrue value) {
        if (value!= null) {
            object.setTopLinePunct(value);
        }
        return this;
    }

    public PPrBaseBuilder withTopLinePunct(Boolean val) {
        if (val!= null) {
            object.setTopLinePunct(new com.alphasystem.docx4j.builder.wml.BooleanDefaultTrueBuilder().withVal(val).getObject());
        }
        return this;
    }

    public PPrBaseBuilder withAutoSpaceDE(BooleanDefaultTrue value) {
        if (value!= null) {
            object.setAutoSpaceDE(value);
        }
        return this;
    }

    public PPrBaseBuilder withAutoSpaceDE(Boolean val) {
        if (val!= null) {
            object.setAutoSpaceDE(new com.alphasystem.docx4j.builder.wml.BooleanDefaultTrueBuilder().withVal(val).getObject());
        }
        return this;
    }

    public PPrBaseBuilder withAutoSpaceDN(BooleanDefaultTrue value) {
        if (value!= null) {
            object.setAutoSpaceDN(value);
        }
        return this;
    }

    public PPrBaseBuilder withAutoSpaceDN(Boolean val) {
        if (val!= null) {
            object.setAutoSpaceDN(new com.alphasystem.docx4j.builder.wml.BooleanDefaultTrueBuilder().withVal(val).getObject());
        }
        return this;
    }

    public PPrBaseBuilder withBidi(BooleanDefaultTrue value) {
        if (value!= null) {
            object.setBidi(value);
        }
        return this;
    }

    public PPrBaseBuilder withBidi(Boolean val) {
        if (val!= null) {
            object.setBidi(new com.alphasystem.docx4j.builder.wml.BooleanDefaultTrueBuilder().withVal(val).getObject());
        }
        return this;
    }

    public PPrBaseBuilder withAdjustRightInd(BooleanDefaultTrue value) {
        if (value!= null) {
            object.setAdjustRightInd(value);
        }
        return this;
    }

    public PPrBaseBuilder withAdjustRightInd(Boolean val) {
        if (val!= null) {
            object.setAdjustRightInd(new com.alphasystem.docx4j.builder.wml.BooleanDefaultTrueBuilder().withVal(val).getObject());
        }
        return this;
    }

    public PPrBaseBuilder withSnapToGrid(BooleanDefaultTrue value) {
        if (value!= null) {
            object.setSnapToGrid(value);
        }
        return this;
    }

    public PPrBaseBuilder withSnapToGrid(Boolean val) {
        if (val!= null) {
            object.setSnapToGrid(new com.alphasystem.docx4j.builder.wml.BooleanDefaultTrueBuilder().withVal(val).getObject());
        }
        return this;
    }

    public PPrBaseBuilder withSpacing(PPrBase.Spacing value) {
        if (value!= null) {
            object.setSpacing(value);
        }
        return this;
    }

    public PPrBaseBuilder.SpacingBuilder getSpacingBuilder() {
        return spacingBuilder;
    }

    public PPrBaseBuilder withInd(PPrBase.Ind value) {
        if (value!= null) {
            object.setInd(value);
        }
        return this;
    }

    public PPrBaseBuilder.IndBuilder getIndBuilder() {
        return indBuilder;
    }

    public PPrBaseBuilder withContextualSpacing(BooleanDefaultTrue value) {
        if (value!= null) {
            object.setContextualSpacing(value);
        }
        return this;
    }

    public PPrBaseBuilder withContextualSpacing(Boolean val) {
        if (val!= null) {
            object.setContextualSpacing(new com.alphasystem.docx4j.builder.wml.BooleanDefaultTrueBuilder().withVal(val).getObject());
        }
        return this;
    }

    public PPrBaseBuilder withMirrorIndents(BooleanDefaultTrue value) {
        if (value!= null) {
            object.setMirrorIndents(value);
        }
        return this;
    }

    public PPrBaseBuilder withMirrorIndents(Boolean val) {
        if (val!= null) {
            object.setMirrorIndents(new com.alphasystem.docx4j.builder.wml.BooleanDefaultTrueBuilder().withVal(val).getObject());
        }
        return this;
    }

    public PPrBaseBuilder withSuppressOverlap(BooleanDefaultTrue value) {
        if (value!= null) {
            object.setSuppressOverlap(value);
        }
        return this;
    }

    public PPrBaseBuilder withSuppressOverlap(Boolean val) {
        if (val!= null) {
            object.setSuppressOverlap(new com.alphasystem.docx4j.builder.wml.BooleanDefaultTrueBuilder().withVal(val).getObject());
        }
        return this;
    }

    public PPrBaseBuilder withJc(Jc value) {
        if (value!= null) {
            object.setJc(value);
        }
        return this;
    }

    public PPrBaseBuilder withJc(JcEnumeration val) {
        if (val!= null) {
            object.setJc(new com.alphasystem.docx4j.builder.wml.JcBuilder().withVal(val).getObject());
        }
        return this;
    }

    public PPrBaseBuilder withTextDirection(TextDirection value) {
        if (value!= null) {
            object.setTextDirection(value);
        }
        return this;
    }

    public PPrBaseBuilder withTextDirection(String val) {
        if (val!= null) {
            object.setTextDirection(new com.alphasystem.docx4j.builder.wml.TextDirectionBuilder().withVal(val).getObject());
        }
        return this;
    }

    public PPrBaseBuilder withTextAlignment(PPrBase.TextAlignment value) {
        if (value!= null) {
            object.setTextAlignment(value);
        }
        return this;
    }

    public PPrBaseBuilder withTextAlignment(String val) {
        boolean initialized = (val!= null);
        if (initialized) {
            withTextAlignment(textAlignmentBuilder.withVal(val).getObject());
        }
        return this;
    }

    public PPrBaseBuilder.TextAlignmentBuilder getTextAlignmentBuilder() {
        return textAlignmentBuilder;
    }

    public PPrBaseBuilder withTextboxTightWrap(CTTextboxTightWrap value) {
        if (value!= null) {
            object.setTextboxTightWrap(value);
        }
        return this;
    }

    public PPrBaseBuilder withTextboxTightWrap(STTextboxTightWrap val) {
        if (val!= null) {
            object.setTextboxTightWrap(new com.alphasystem.docx4j.builder.wml.CTTextboxTightWrapBuilder().withVal(val).getObject());
        }
        return this;
    }

    public PPrBaseBuilder withOutlineLvl(PPrBase.OutlineLvl value) {
        if (value!= null) {
            object.setOutlineLvl(value);
        }
        return this;
    }

    public PPrBaseBuilder withOutlineLvl(Long val) {
        boolean initialized = (val!= null);
        if (initialized) {
            withOutlineLvl(outlineLvlBuilder.withVal(val).getObject());
        }
        return this;
    }

    public PPrBaseBuilder.OutlineLvlBuilder getOutlineLvlBuilder() {
        return outlineLvlBuilder;
    }

    public PPrBaseBuilder withDivId(PPrBase.DivId value) {
        if (value!= null) {
            object.setDivId(value);
        }
        return this;
    }

    public PPrBaseBuilder withDivId(Long val) {
        boolean initialized = (val!= null);
        if (initialized) {
            withDivId(divIdBuilder.withVal(val).getObject());
        }
        return this;
    }

    public PPrBaseBuilder.DivIdBuilder getDivIdBuilder() {
        return divIdBuilder;
    }

    public PPrBaseBuilder withCnfStyle(CTCnf value) {
        if (value!= null) {
            object.setCnfStyle(value);
        }
        return this;
    }

    public PPrBaseBuilder withCnfStyle(String val) {
        if (val!= null) {
            object.setCnfStyle(new com.alphasystem.docx4j.builder.wml.CTCnfBuilder().withVal(val).getObject());
        }
        return this;
    }

    public PPrBaseBuilder withCollapsed(BooleanDefaultTrue value) {
        if (value!= null) {
            object.setCollapsed(value);
        }
        return this;
    }

    public PPrBaseBuilder withCollapsed(Boolean val) {
        if (val!= null) {
            object.setCollapsed(new com.alphasystem.docx4j.builder.wml.BooleanDefaultTrueBuilder().withVal(val).getObject());
        }
        return this;
    }


    /**
     * Fluent API builder for org.docx4j.wml.PPrBase$DivId.
     * 
     */
    public static class DivIdBuilder
        extends com.alphasystem.docx4j.builder.OpenXmlBuilder
    {


        /**
         * Initialize the underlying object.
         * 
         */
        public DivIdBuilder() {
            this(null);
        }

        /**
         * Initialize the builder with given object.
         * 
         * @param object
         *     the given object
         */
        public DivIdBuilder(PPrBase.DivId object) {
            super(object);
        }

        /**
         * Copies values fom src into target. Values of target will be overridden by the values from src.
         * 
         * @param src
         *     source object
         * @param target
         *     target object
         */
        public DivIdBuilder(PPrBase.DivId src, PPrBase.DivId target) {
            this(target);
            if (src!= null) {
                withVal(WmlBuilderFactory.cloneBigInteger(src.getVal()));
            }
        }

        protected PPrBase.DivId createObject() {
            return WmlBuilderFactory.OBJECT_FACTORY.createPPrBaseDivId();
        }

        public PPrBaseBuilder.DivIdBuilder withVal(BigInteger value) {
            if (value!= null) {
                object.setVal(value);
            }
            return this;
        }

        /**
         * Calls setVal method.
         * 
         * @param value
         *     Value to set
         * @return
         *     reference to this
         */
        public PPrBaseBuilder.DivIdBuilder withVal(String value) {
            if (value!= null) {
                object.setVal(new BigInteger(value));
            }
            return this;
        }

        /**
         * Calls setVal method.
         * 
         * @param value
         *     Value to set
         * @return
         *     reference to this
         */
        public PPrBaseBuilder.DivIdBuilder withVal(Long value) {
            if (value!= null) {
                object.setVal(BigInteger.valueOf(value));
            }
            return this;
        }

    }


    /**
     * Fluent API builder for org.docx4j.wml.PPrBase$Ind.
     * 
     */
    public static class IndBuilder
        extends com.alphasystem.docx4j.builder.OpenXmlBuilder
    {


        /**
         * Initialize the underlying object.
         * 
         */
        public IndBuilder() {
            this(null);
        }

        /**
         * Initialize the builder with given object.
         * 
         * @param object
         *     the given object
         */
        public IndBuilder(PPrBase.Ind object) {
            super(object);
        }

        /**
         * Copies values fom src into target. Values of target will be overridden by the values from src.
         * 
         * @param src
         *     source object
         * @param target
         *     target object
         */
        public IndBuilder(PPrBase.Ind src, PPrBase.Ind target) {
            this(target);
            if (src!= null) {
                withLeft(WmlBuilderFactory.cloneBigInteger(src.getLeft())).withLeftChars(WmlBuilderFactory.cloneBigInteger(src.getLeftChars())).withRight(WmlBuilderFactory.cloneBigInteger(src.getRight())).withRightChars(WmlBuilderFactory.cloneBigInteger(src.getRightChars())).withHanging(WmlBuilderFactory.cloneBigInteger(src.getHanging())).withHangingChars(WmlBuilderFactory.cloneBigInteger(src.getHangingChars())).withFirstLine(WmlBuilderFactory.cloneBigInteger(src.getFirstLine())).withFirstLineChars(WmlBuilderFactory.cloneBigInteger(src.getFirstLineChars()));
            }
        }

        protected PPrBase.Ind createObject() {
            return WmlBuilderFactory.OBJECT_FACTORY.createPPrBaseInd();
        }

        public PPrBaseBuilder.IndBuilder withLeft(BigInteger value) {
            if (value!= null) {
                object.setLeft(value);
            }
            return this;
        }

        /**
         * Calls setLeft method.
         * 
         * @param value
         *     Value to set
         * @return
         *     reference to this
         */
        public PPrBaseBuilder.IndBuilder withLeft(String value) {
            if (value!= null) {
                object.setLeft(new BigInteger(value));
            }
            return this;
        }

        /**
         * Calls setLeft method.
         * 
         * @param value
         *     Value to set
         * @return
         *     reference to this
         */
        public PPrBaseBuilder.IndBuilder withLeft(Long value) {
            if (value!= null) {
                object.setLeft(BigInteger.valueOf(value));
            }
            return this;
        }

        public PPrBaseBuilder.IndBuilder withLeftChars(BigInteger value) {
            if (value!= null) {
                object.setLeftChars(value);
            }
            return this;
        }

        /**
         * Calls setLeftChars method.
         * 
         * @param value
         *     Value to set
         * @return
         *     reference to this
         */
        public PPrBaseBuilder.IndBuilder withLeftChars(String value) {
            if (value!= null) {
                object.setLeftChars(new BigInteger(value));
            }
            return this;
        }

        /**
         * Calls setLeftChars method.
         * 
         * @param value
         *     Value to set
         * @return
         *     reference to this
         */
        public PPrBaseBuilder.IndBuilder withLeftChars(Long value) {
            if (value!= null) {
                object.setLeftChars(BigInteger.valueOf(value));
            }
            return this;
        }

        public PPrBaseBuilder.IndBuilder withRight(BigInteger value) {
            if (value!= null) {
                object.setRight(value);
            }
            return this;
        }

        /**
         * Calls setRight method.
         * 
         * @param value
         *     Value to set
         * @return
         *     reference to this
         */
        public PPrBaseBuilder.IndBuilder withRight(String value) {
            if (value!= null) {
                object.setRight(new BigInteger(value));
            }
            return this;
        }

        /**
         * Calls setRight method.
         * 
         * @param value
         *     Value to set
         * @return
         *     reference to this
         */
        public PPrBaseBuilder.IndBuilder withRight(Long value) {
            if (value!= null) {
                object.setRight(BigInteger.valueOf(value));
            }
            return this;
        }

        public PPrBaseBuilder.IndBuilder withRightChars(BigInteger value) {
            if (value!= null) {
                object.setRightChars(value);
            }
            return this;
        }

        /**
         * Calls setRightChars method.
         * 
         * @param value
         *     Value to set
         * @return
         *     reference to this
         */
        public PPrBaseBuilder.IndBuilder withRightChars(String value) {
            if (value!= null) {
                object.setRightChars(new BigInteger(value));
            }
            return this;
        }

        /**
         * Calls setRightChars method.
         * 
         * @param value
         *     Value to set
         * @return
         *     reference to this
         */
        public PPrBaseBuilder.IndBuilder withRightChars(Long value) {
            if (value!= null) {
                object.setRightChars(BigInteger.valueOf(value));
            }
            return this;
        }

        public PPrBaseBuilder.IndBuilder withHanging(BigInteger value) {
            if (value!= null) {
                object.setHanging(value);
            }
            return this;
        }

        /**
         * Calls setHanging method.
         * 
         * @param value
         *     Value to set
         * @return
         *     reference to this
         */
        public PPrBaseBuilder.IndBuilder withHanging(String value) {
            if (value!= null) {
                object.setHanging(new BigInteger(value));
            }
            return this;
        }

        /**
         * Calls setHanging method.
         * 
         * @param value
         *     Value to set
         * @return
         *     reference to this
         */
        public PPrBaseBuilder.IndBuilder withHanging(Long value) {
            if (value!= null) {
                object.setHanging(BigInteger.valueOf(value));
            }
            return this;
        }

        public PPrBaseBuilder.IndBuilder withHangingChars(BigInteger value) {
            if (value!= null) {
                object.setHangingChars(value);
            }
            return this;
        }

        /**
         * Calls setHangingChars method.
         * 
         * @param value
         *     Value to set
         * @return
         *     reference to this
         */
        public PPrBaseBuilder.IndBuilder withHangingChars(String value) {
            if (value!= null) {
                object.setHangingChars(new BigInteger(value));
            }
            return this;
        }

        /**
         * Calls setHangingChars method.
         * 
         * @param value
         *     Value to set
         * @return
         *     reference to this
         */
        public PPrBaseBuilder.IndBuilder withHangingChars(Long value) {
            if (value!= null) {
                object.setHangingChars(BigInteger.valueOf(value));
            }
            return this;
        }

        public PPrBaseBuilder.IndBuilder withFirstLine(BigInteger value) {
            if (value!= null) {
                object.setFirstLine(value);
            }
            return this;
        }

        /**
         * Calls setFirstLine method.
         * 
         * @param value
         *     Value to set
         * @return
         *     reference to this
         */
        public PPrBaseBuilder.IndBuilder withFirstLine(String value) {
            if (value!= null) {
                object.setFirstLine(new BigInteger(value));
            }
            return this;
        }

        /**
         * Calls setFirstLine method.
         * 
         * @param value
         *     Value to set
         * @return
         *     reference to this
         */
        public PPrBaseBuilder.IndBuilder withFirstLine(Long value) {
            if (value!= null) {
                object.setFirstLine(BigInteger.valueOf(value));
            }
            return this;
        }

        public PPrBaseBuilder.IndBuilder withFirstLineChars(BigInteger value) {
            if (value!= null) {
                object.setFirstLineChars(value);
            }
            return this;
        }

        /**
         * Calls setFirstLineChars method.
         * 
         * @param value
         *     Value to set
         * @return
         *     reference to this
         */
        public PPrBaseBuilder.IndBuilder withFirstLineChars(String value) {
            if (value!= null) {
                object.setFirstLineChars(new BigInteger(value));
            }
            return this;
        }

        /**
         * Calls setFirstLineChars method.
         * 
         * @param value
         *     Value to set
         * @return
         *     reference to this
         */
        public PPrBaseBuilder.IndBuilder withFirstLineChars(Long value) {
            if (value!= null) {
                object.setFirstLineChars(BigInteger.valueOf(value));
            }
            return this;
        }

    }


    /**
     * Fluent API builder for org.docx4j.wml.PPrBase$NumPr.
     * 
     */
    public static class NumPrBuilder
        extends com.alphasystem.docx4j.builder.OpenXmlBuilder
    {

        private PPrBaseBuilder.NumPrBuilder.IlvlBuilder ilvlBuilder;
        private PPrBaseBuilder.NumPrBuilder.NumIdBuilder numIdBuilder;

        /**
         * Initialize the underlying object.
         * 
         */
        public NumPrBuilder() {
            this(null);
        }

        /**
         * Initialize the builder with given object.
         * 
         * @param object
         *     the given object
         */
        public NumPrBuilder(PPrBase.NumPr object) {
            super(object);
            ilvlBuilder = new PPrBaseBuilder.NumPrBuilder.IlvlBuilder(this.object.getIlvl());
            numIdBuilder = new PPrBaseBuilder.NumPrBuilder.NumIdBuilder(this.object.getNumId());
        }

        /**
         * Copies values fom src into target. Values of target will be overridden by the values from src.
         * 
         * @param src
         *     source object
         * @param target
         *     target object
         */
        public NumPrBuilder(PPrBase.NumPr src, PPrBase.NumPr target) {
            this(target);
            if (src!= null) {
                PPrBase.NumPr.Ilvl ilvl = src.getIlvl();
                if (ilvl!= null) {
                    ilvl = new NumPrBuilder.IlvlBuilder(ilvl, object.getIlvl()).getObject();
                }
                PPrBase.NumPr.NumId numId = src.getNumId();
                if (numId!= null) {
                    numId = new NumPrBuilder.NumIdBuilder(numId, object.getNumId()).getObject();
                }
                CTTrackChangeNumbering numberingChange = src.getNumberingChange();
                if (numberingChange!= null) {
                    numberingChange = new CTTrackChangeNumberingBuilder(numberingChange, object.getNumberingChange()).getObject();
                }
                CTTrackChange ins = src.getIns();
                if (ins!= null) {
                    ins = new CTTrackChangeBuilder(ins, object.getIns()).getObject();
                }
                withIlvl(ilvl).withNumId(numId).withNumberingChange(numberingChange).withIns(ins);
            }
        }

        protected PPrBase.NumPr createObject() {
            return WmlBuilderFactory.OBJECT_FACTORY.createPPrBaseNumPr();
        }

        public PPrBaseBuilder.NumPrBuilder withIlvl(PPrBase.NumPr.Ilvl value) {
            if (value!= null) {
                object.setIlvl(value);
            }
            return this;
        }

        public PPrBaseBuilder.NumPrBuilder withIlvl(Long val) {
            boolean initialized = (val!= null);
            if (initialized) {
                withIlvl(ilvlBuilder.withVal(val).getObject());
            }
            return this;
        }

        public PPrBaseBuilder.NumPrBuilder.IlvlBuilder getIlvlBuilder() {
            return ilvlBuilder;
        }

        public PPrBaseBuilder.NumPrBuilder withNumId(PPrBase.NumPr.NumId value) {
            if (value!= null) {
                object.setNumId(value);
            }
            return this;
        }

        public PPrBaseBuilder.NumPrBuilder withNumId(Long val) {
            boolean initialized = (val!= null);
            if (initialized) {
                withNumId(numIdBuilder.withVal(val).getObject());
            }
            return this;
        }

        public PPrBaseBuilder.NumPrBuilder.NumIdBuilder getNumIdBuilder() {
            return numIdBuilder;
        }

        public PPrBaseBuilder.NumPrBuilder withNumberingChange(CTTrackChangeNumbering value) {
            if (value!= null) {
                object.setNumberingChange(value);
            }
            return this;
        }

        public PPrBaseBuilder.NumPrBuilder withIns(CTTrackChange value) {
            if (value!= null) {
                object.setIns(value);
            }
            return this;
        }


        /**
         * Fluent API builder for org.docx4j.wml.PPrBase$NumPr$Ilvl.
         * 
         */
        public static class IlvlBuilder
            extends com.alphasystem.docx4j.builder.OpenXmlBuilder
        {


            /**
             * Initialize the underlying object.
             * 
             */
            public IlvlBuilder() {
                this(null);
            }

            /**
             * Initialize the builder with given object.
             * 
             * @param object
             *     the given object
             */
            public IlvlBuilder(PPrBase.NumPr.Ilvl object) {
                super(object);
            }

            /**
             * Copies values fom src into target. Values of target will be overridden by the values from src.
             * 
             * @param src
             *     source object
             * @param target
             *     target object
             */
            public IlvlBuilder(PPrBase.NumPr.Ilvl src, PPrBase.NumPr.Ilvl target) {
                this(target);
                if (src!= null) {
                    withVal(WmlBuilderFactory.cloneBigInteger(src.getVal()));
                }
            }

            protected PPrBase.NumPr.Ilvl createObject() {
                return WmlBuilderFactory.OBJECT_FACTORY.createPPrBaseNumPrIlvl();
            }

            public PPrBaseBuilder.NumPrBuilder.IlvlBuilder withVal(BigInteger value) {
                if (value!= null) {
                    object.setVal(value);
                }
                return this;
            }

            /**
             * Calls setVal method.
             * 
             * @param value
             *     Value to set
             * @return
             *     reference to this
             */
            public PPrBaseBuilder.NumPrBuilder.IlvlBuilder withVal(String value) {
                if (value!= null) {
                    object.setVal(new BigInteger(value));
                }
                return this;
            }

            /**
             * Calls setVal method.
             * 
             * @param value
             *     Value to set
             * @return
             *     reference to this
             */
            public PPrBaseBuilder.NumPrBuilder.IlvlBuilder withVal(Long value) {
                if (value!= null) {
                    object.setVal(BigInteger.valueOf(value));
                }
                return this;
            }

        }


        /**
         * Fluent API builder for org.docx4j.wml.PPrBase$NumPr$NumId.
         * 
         */
        public static class NumIdBuilder
            extends com.alphasystem.docx4j.builder.OpenXmlBuilder
        {


            /**
             * Initialize the underlying object.
             * 
             */
            public NumIdBuilder() {
                this(null);
            }

            /**
             * Initialize the builder with given object.
             * 
             * @param object
             *     the given object
             */
            public NumIdBuilder(PPrBase.NumPr.NumId object) {
                super(object);
            }

            /**
             * Copies values fom src into target. Values of target will be overridden by the values from src.
             * 
             * @param src
             *     source object
             * @param target
             *     target object
             */
            public NumIdBuilder(PPrBase.NumPr.NumId src, PPrBase.NumPr.NumId target) {
                this(target);
                if (src!= null) {
                    withVal(WmlBuilderFactory.cloneBigInteger(src.getVal()));
                }
            }

            protected PPrBase.NumPr.NumId createObject() {
                return WmlBuilderFactory.OBJECT_FACTORY.createPPrBaseNumPrNumId();
            }

            public PPrBaseBuilder.NumPrBuilder.NumIdBuilder withVal(BigInteger value) {
                if (value!= null) {
                    object.setVal(value);
                }
                return this;
            }

            /**
             * Calls setVal method.
             * 
             * @param value
             *     Value to set
             * @return
             *     reference to this
             */
            public PPrBaseBuilder.NumPrBuilder.NumIdBuilder withVal(String value) {
                if (value!= null) {
                    object.setVal(new BigInteger(value));
                }
                return this;
            }

            /**
             * Calls setVal method.
             * 
             * @param value
             *     Value to set
             * @return
             *     reference to this
             */
            public PPrBaseBuilder.NumPrBuilder.NumIdBuilder withVal(Long value) {
                if (value!= null) {
                    object.setVal(BigInteger.valueOf(value));
                }
                return this;
            }

        }

    }


    /**
     * Fluent API builder for org.docx4j.wml.PPrBase$OutlineLvl.
     * 
     */
    public static class OutlineLvlBuilder
        extends com.alphasystem.docx4j.builder.OpenXmlBuilder
    {


        /**
         * Initialize the underlying object.
         * 
         */
        public OutlineLvlBuilder() {
            this(null);
        }

        /**
         * Initialize the builder with given object.
         * 
         * @param object
         *     the given object
         */
        public OutlineLvlBuilder(PPrBase.OutlineLvl object) {
            super(object);
        }

        /**
         * Copies values fom src into target. Values of target will be overridden by the values from src.
         * 
         * @param src
         *     source object
         * @param target
         *     target object
         */
        public OutlineLvlBuilder(PPrBase.OutlineLvl src, PPrBase.OutlineLvl target) {
            this(target);
            if (src!= null) {
                withVal(WmlBuilderFactory.cloneBigInteger(src.getVal()));
            }
        }

        protected PPrBase.OutlineLvl createObject() {
            return WmlBuilderFactory.OBJECT_FACTORY.createPPrBaseOutlineLvl();
        }

        public PPrBaseBuilder.OutlineLvlBuilder withVal(BigInteger value) {
            if (value!= null) {
                object.setVal(value);
            }
            return this;
        }

        /**
         * Calls setVal method.
         * 
         * @param value
         *     Value to set
         * @return
         *     reference to this
         */
        public PPrBaseBuilder.OutlineLvlBuilder withVal(String value) {
            if (value!= null) {
                object.setVal(new BigInteger(value));
            }
            return this;
        }

        /**
         * Calls setVal method.
         * 
         * @param value
         *     Value to set
         * @return
         *     reference to this
         */
        public PPrBaseBuilder.OutlineLvlBuilder withVal(Long value) {
            if (value!= null) {
                object.setVal(BigInteger.valueOf(value));
            }
            return this;
        }

    }


    /**
     * Fluent API builder for org.docx4j.wml.PPrBase$PBdr.
     * 
     */
    public static class PBdrBuilder
        extends com.alphasystem.docx4j.builder.OpenXmlBuilder
    {


        /**
         * Initialize the underlying object.
         * 
         */
        public PBdrBuilder() {
            this(null);
        }

        /**
         * Initialize the builder with given object.
         * 
         * @param object
         *     the given object
         */
        public PBdrBuilder(PPrBase.PBdr object) {
            super(object);
        }

        /**
         * Copies values fom src into target. Values of target will be overridden by the values from src.
         * 
         * @param src
         *     source object
         * @param target
         *     target object
         */
        public PBdrBuilder(PPrBase.PBdr src, PPrBase.PBdr target) {
            this(target);
            if (src!= null) {
                CTBorder top = src.getTop();
                if (top!= null) {
                    top = new com.alphasystem.docx4j.builder.wml.CTBorderBuilder(top, object.getTop()).getObject();
                }
                CTBorder left = src.getLeft();
                if (left!= null) {
                    left = new com.alphasystem.docx4j.builder.wml.CTBorderBuilder(left, object.getLeft()).getObject();
                }
                CTBorder bottom = src.getBottom();
                if (bottom!= null) {
                    bottom = new com.alphasystem.docx4j.builder.wml.CTBorderBuilder(bottom, object.getBottom()).getObject();
                }
                CTBorder right = src.getRight();
                if (right!= null) {
                    right = new com.alphasystem.docx4j.builder.wml.CTBorderBuilder(right, object.getRight()).getObject();
                }
                CTBorder between = src.getBetween();
                if (between!= null) {
                    between = new com.alphasystem.docx4j.builder.wml.CTBorderBuilder(between, object.getBetween()).getObject();
                }
                CTBorder bar = src.getBar();
                if (bar!= null) {
                    bar = new com.alphasystem.docx4j.builder.wml.CTBorderBuilder(bar, object.getBar()).getObject();
                }
                withTop(top).withLeft(left).withBottom(bottom).withRight(right).withBetween(between).withBar(bar);
            }
        }

        protected PPrBase.PBdr createObject() {
            return WmlBuilderFactory.OBJECT_FACTORY.createPPrBasePBdr();
        }

        public PPrBaseBuilder.PBdrBuilder withTop(CTBorder value) {
            if (value!= null) {
                object.setTop(value);
            }
            return this;
        }

        public PPrBaseBuilder.PBdrBuilder withLeft(CTBorder value) {
            if (value!= null) {
                object.setLeft(value);
            }
            return this;
        }

        public PPrBaseBuilder.PBdrBuilder withBottom(CTBorder value) {
            if (value!= null) {
                object.setBottom(value);
            }
            return this;
        }

        public PPrBaseBuilder.PBdrBuilder withRight(CTBorder value) {
            if (value!= null) {
                object.setRight(value);
            }
            return this;
        }

        public PPrBaseBuilder.PBdrBuilder withBetween(CTBorder value) {
            if (value!= null) {
                object.setBetween(value);
            }
            return this;
        }

        public PPrBaseBuilder.PBdrBuilder withBar(CTBorder value) {
            if (value!= null) {
                object.setBar(value);
            }
            return this;
        }

    }


    /**
     * Fluent API builder for org.docx4j.wml.PPrBase$PStyle.
     * 
     */
    public static class PStyleBuilder
        extends com.alphasystem.docx4j.builder.OpenXmlBuilder
    {


        /**
         * Initialize the underlying object.
         * 
         */
        public PStyleBuilder() {
            this(null);
        }

        /**
         * Initialize the builder with given object.
         * 
         * @param object
         *     the given object
         */
        public PStyleBuilder(PPrBase.PStyle object) {
            super(object);
        }

        /**
         * Copies values fom src into target. Values of target will be overridden by the values from src.
         * 
         * @param src
         *     source object
         * @param target
         *     target object
         */
        public PStyleBuilder(PPrBase.PStyle src, PPrBase.PStyle target) {
            this(target);
            if (src!= null) {
                withVal(src.getVal());
            }
        }

        protected PPrBase.PStyle createObject() {
            return WmlBuilderFactory.OBJECT_FACTORY.createPPrBasePStyle();
        }

        public PPrBaseBuilder.PStyleBuilder withVal(String value) {
            if (value!= null) {
                object.setVal(value);
            }
            return this;
        }

    }


    /**
     * Fluent API builder for org.docx4j.wml.PPrBase$Spacing.
     * 
     */
    public static class SpacingBuilder
        extends com.alphasystem.docx4j.builder.OpenXmlBuilder
    {


        /**
         * Initialize the underlying object.
         * 
         */
        public SpacingBuilder() {
            this(null);
        }

        /**
         * Initialize the builder with given object.
         * 
         * @param object
         *     the given object
         */
        public SpacingBuilder(PPrBase.Spacing object) {
            super(object);
        }

        /**
         * Copies values fom src into target. Values of target will be overridden by the values from src.
         * 
         * @param src
         *     source object
         * @param target
         *     target object
         */
        public SpacingBuilder(PPrBase.Spacing src, PPrBase.Spacing target) {
            this(target);
            if (src!= null) {
                withBefore(WmlBuilderFactory.cloneBigInteger(src.getBefore())).withBeforeLines(WmlBuilderFactory.cloneBigInteger(src.getBeforeLines())).withBeforeAutospacing(WmlBuilderFactory.cloneBoolean(src, "beforeAutospacing")).withAfter(WmlBuilderFactory.cloneBigInteger(src.getAfter())).withAfterLines(WmlBuilderFactory.cloneBigInteger(src.getAfterLines())).withAfterAutospacing(WmlBuilderFactory.cloneBoolean(src, "afterAutospacing")).withLine(WmlBuilderFactory.cloneBigInteger(src.getLine())).withLineRule(src.getLineRule());
            }
        }

        protected PPrBase.Spacing createObject() {
            return WmlBuilderFactory.OBJECT_FACTORY.createPPrBaseSpacing();
        }

        public PPrBaseBuilder.SpacingBuilder withBefore(BigInteger value) {
            if (value!= null) {
                object.setBefore(value);
            }
            return this;
        }

        /**
         * Calls setBefore method.
         * 
         * @param value
         *     Value to set
         * @return
         *     reference to this
         */
        public PPrBaseBuilder.SpacingBuilder withBefore(String value) {
            if (value!= null) {
                object.setBefore(new BigInteger(value));
            }
            return this;
        }

        /**
         * Calls setBefore method.
         * 
         * @param value
         *     Value to set
         * @return
         *     reference to this
         */
        public PPrBaseBuilder.SpacingBuilder withBefore(Long value) {
            if (value!= null) {
                object.setBefore(BigInteger.valueOf(value));
            }
            return this;
        }

        public PPrBaseBuilder.SpacingBuilder withBeforeLines(BigInteger value) {
            if (value!= null) {
                object.setBeforeLines(value);
            }
            return this;
        }

        /**
         * Calls setBeforeLines method.
         * 
         * @param value
         *     Value to set
         * @return
         *     reference to this
         */
        public PPrBaseBuilder.SpacingBuilder withBeforeLines(String value) {
            if (value!= null) {
                object.setBeforeLines(new BigInteger(value));
            }
            return this;
        }

        /**
         * Calls setBeforeLines method.
         * 
         * @param value
         *     Value to set
         * @return
         *     reference to this
         */
        public PPrBaseBuilder.SpacingBuilder withBeforeLines(Long value) {
            if (value!= null) {
                object.setBeforeLines(BigInteger.valueOf(value));
            }
            return this;
        }

        public PPrBaseBuilder.SpacingBuilder withBeforeAutospacing(Boolean value) {
            if (value!= null) {
                object.setBeforeAutospacing(value);
            }
            return this;
        }

        public PPrBaseBuilder.SpacingBuilder withAfter(BigInteger value) {
            if (value!= null) {
                object.setAfter(value);
            }
            return this;
        }

        /**
         * Calls setAfter method.
         * 
         * @param value
         *     Value to set
         * @return
         *     reference to this
         */
        public PPrBaseBuilder.SpacingBuilder withAfter(String value) {
            if (value!= null) {
                object.setAfter(new BigInteger(value));
            }
            return this;
        }

        /**
         * Calls setAfter method.
         * 
         * @param value
         *     Value to set
         * @return
         *     reference to this
         */
        public PPrBaseBuilder.SpacingBuilder withAfter(Long value) {
            if (value!= null) {
                object.setAfter(BigInteger.valueOf(value));
            }
            return this;
        }

        public PPrBaseBuilder.SpacingBuilder withAfterLines(BigInteger value) {
            if (value!= null) {
                object.setAfterLines(value);
            }
            return this;
        }

        /**
         * Calls setAfterLines method.
         * 
         * @param value
         *     Value to set
         * @return
         *     reference to this
         */
        public PPrBaseBuilder.SpacingBuilder withAfterLines(String value) {
            if (value!= null) {
                object.setAfterLines(new BigInteger(value));
            }
            return this;
        }

        /**
         * Calls setAfterLines method.
         * 
         * @param value
         *     Value to set
         * @return
         *     reference to this
         */
        public PPrBaseBuilder.SpacingBuilder withAfterLines(Long value) {
            if (value!= null) {
                object.setAfterLines(BigInteger.valueOf(value));
            }
            return this;
        }

        public PPrBaseBuilder.SpacingBuilder withAfterAutospacing(Boolean value) {
            if (value!= null) {
                object.setAfterAutospacing(value);
            }
            return this;
        }

        public PPrBaseBuilder.SpacingBuilder withLine(BigInteger value) {
            if (value!= null) {
                object.setLine(value);
            }
            return this;
        }

        /**
         * Calls setLine method.
         * 
         * @param value
         *     Value to set
         * @return
         *     reference to this
         */
        public PPrBaseBuilder.SpacingBuilder withLine(String value) {
            if (value!= null) {
                object.setLine(new BigInteger(value));
            }
            return this;
        }

        /**
         * Calls setLine method.
         * 
         * @param value
         *     Value to set
         * @return
         *     reference to this
         */
        public PPrBaseBuilder.SpacingBuilder withLine(Long value) {
            if (value!= null) {
                object.setLine(BigInteger.valueOf(value));
            }
            return this;
        }

        public PPrBaseBuilder.SpacingBuilder withLineRule(STLineSpacingRule value) {
            if (value!= null) {
                object.setLineRule(value);
            }
            return this;
        }

    }


    /**
     * Fluent API builder for org.docx4j.wml.PPrBase$TextAlignment.
     * 
     */
    public static class TextAlignmentBuilder
        extends com.alphasystem.docx4j.builder.OpenXmlBuilder
    {


        /**
         * Initialize the underlying object.
         * 
         */
        public TextAlignmentBuilder() {
            this(null);
        }

        /**
         * Initialize the builder with given object.
         * 
         * @param object
         *     the given object
         */
        public TextAlignmentBuilder(PPrBase.TextAlignment object) {
            super(object);
        }

        /**
         * Copies values fom src into target. Values of target will be overridden by the values from src.
         * 
         * @param src
         *     source object
         * @param target
         *     target object
         */
        public TextAlignmentBuilder(PPrBase.TextAlignment src, PPrBase.TextAlignment target) {
            this(target);
            if (src!= null) {
                withVal(src.getVal());
            }
        }

        protected PPrBase.TextAlignment createObject() {
            return WmlBuilderFactory.OBJECT_FACTORY.createPPrBaseTextAlignment();
        }

        public PPrBaseBuilder.TextAlignmentBuilder withVal(String value) {
            if (value!= null) {
                object.setVal(value);
            }
            return this;
        }

    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy