com.alphasystem.docx4j.builder.wml.NumberingAbstractNumBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of open-xml-builder Show documentation
Show all versions of open-xml-builder Show documentation
Alpha system commons library
package com.alphasystem.docx4j.builder.wml;
import java.math.BigInteger;
import java.util.List;
import org.docx4j.wml.CTLongHexNumber;
import org.docx4j.wml.Lvl;
/**
* Fluent API builder for org.docx4j.wml.Numbering$AbstractNum
.
*
*/
public class NumberingAbstractNumBuilder
extends com.alphasystem.docx4j.builder.OpenXmlBuilder
{
private NumberingAbstractNumBuilder.MultiLevelTypeBuilder multiLevelTypeBuilder;
private NumberingAbstractNumBuilder.NameBuilder nameBuilder;
private NumberingAbstractNumBuilder.StyleLinkBuilder styleLinkBuilder;
private NumberingAbstractNumBuilder.NumStyleLinkBuilder numStyleLinkBuilder;
/**
* Initialize the underlying object.
*
*/
public NumberingAbstractNumBuilder() {
this(null);
}
/**
* Initialize the builder with given object.
*
* @param object
* the given object
*/
public NumberingAbstractNumBuilder(org.docx4j.wml.Numbering.AbstractNum object) {
super(object);
multiLevelTypeBuilder = new NumberingAbstractNumBuilder.MultiLevelTypeBuilder(this.object.getMultiLevelType());
nameBuilder = new NumberingAbstractNumBuilder.NameBuilder(this.object.getName());
styleLinkBuilder = new NumberingAbstractNumBuilder.StyleLinkBuilder(this.object.getStyleLink());
numStyleLinkBuilder = new NumberingAbstractNumBuilder.NumStyleLinkBuilder(this.object.getNumStyleLink());
}
/**
* 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 NumberingAbstractNumBuilder(org.docx4j.wml.Numbering.AbstractNum src, org.docx4j.wml.Numbering.AbstractNum target) {
this(target);
if (src!= null) {
CTLongHexNumber nsid = src.getNsid();
if (nsid!= null) {
nsid = new com.alphasystem.docx4j.builder.wml.CTLongHexNumberBuilder(nsid, object.getNsid()).getObject();
}
org.docx4j.wml.Numbering.AbstractNum.MultiLevelType multiLevelType = src.getMultiLevelType();
if (multiLevelType!= null) {
multiLevelType = new NumberingAbstractNumBuilder.MultiLevelTypeBuilder(multiLevelType, object.getMultiLevelType()).getObject();
}
CTLongHexNumber tmpl = src.getTmpl();
if (tmpl!= null) {
tmpl = new com.alphasystem.docx4j.builder.wml.CTLongHexNumberBuilder(tmpl, object.getTmpl()).getObject();
}
org.docx4j.wml.Numbering.AbstractNum.Name name = src.getName();
if (name!= null) {
name = new NumberingAbstractNumBuilder.NameBuilder(name, object.getName()).getObject();
}
org.docx4j.wml.Numbering.AbstractNum.StyleLink styleLink = src.getStyleLink();
if (styleLink!= null) {
styleLink = new NumberingAbstractNumBuilder.StyleLinkBuilder(styleLink, object.getStyleLink()).getObject();
}
org.docx4j.wml.Numbering.AbstractNum.NumStyleLink numStyleLink = src.getNumStyleLink();
if (numStyleLink!= null) {
numStyleLink = new NumberingAbstractNumBuilder.NumStyleLinkBuilder(numStyleLink, object.getNumStyleLink()).getObject();
}
List lvl = src.getLvl();
for (Lvl o: lvl) {
addLvl(new LvlBuilder(o, null).getObject());
}
withNsid(nsid).withMultiLevelType(multiLevelType).withTmpl(tmpl).withName(name).withStyleLink(styleLink).withNumStyleLink(numStyleLink).withAbstractNumId(WmlBuilderFactory.cloneBigInteger(src.getAbstractNumId()));
}
}
protected org.docx4j.wml.Numbering.AbstractNum createObject() {
return WmlBuilderFactory.OBJECT_FACTORY.createNumberingAbstractNum();
}
public NumberingAbstractNumBuilder withNsid(CTLongHexNumber value) {
if (value!= null) {
object.setNsid(value);
}
return this;
}
public NumberingAbstractNumBuilder withNsid(String val) {
if (val!= null) {
object.setNsid(new com.alphasystem.docx4j.builder.wml.CTLongHexNumberBuilder().withVal(val).getObject());
}
return this;
}
public NumberingAbstractNumBuilder withMultiLevelType(org.docx4j.wml.Numbering.AbstractNum.MultiLevelType value) {
if (value!= null) {
object.setMultiLevelType(value);
}
return this;
}
public NumberingAbstractNumBuilder withMultiLevelType(String val) {
boolean initialized = (val!= null);
if (initialized) {
withMultiLevelType(multiLevelTypeBuilder.withVal(val).getObject());
}
return this;
}
public NumberingAbstractNumBuilder.MultiLevelTypeBuilder getMultiLevelTypeBuilder() {
return multiLevelTypeBuilder;
}
public NumberingAbstractNumBuilder withTmpl(CTLongHexNumber value) {
if (value!= null) {
object.setTmpl(value);
}
return this;
}
public NumberingAbstractNumBuilder withTmpl(String val) {
if (val!= null) {
object.setTmpl(new com.alphasystem.docx4j.builder.wml.CTLongHexNumberBuilder().withVal(val).getObject());
}
return this;
}
public NumberingAbstractNumBuilder withName(org.docx4j.wml.Numbering.AbstractNum.Name value) {
if (value!= null) {
object.setName(value);
}
return this;
}
public NumberingAbstractNumBuilder withName(String val) {
boolean initialized = (val!= null);
if (initialized) {
withName(nameBuilder.withVal(val).getObject());
}
return this;
}
public NumberingAbstractNumBuilder.NameBuilder getNameBuilder() {
return nameBuilder;
}
public NumberingAbstractNumBuilder withStyleLink(org.docx4j.wml.Numbering.AbstractNum.StyleLink value) {
if (value!= null) {
object.setStyleLink(value);
}
return this;
}
public NumberingAbstractNumBuilder withStyleLink(String val) {
boolean initialized = (val!= null);
if (initialized) {
withStyleLink(styleLinkBuilder.withVal(val).getObject());
}
return this;
}
public NumberingAbstractNumBuilder.StyleLinkBuilder getStyleLinkBuilder() {
return styleLinkBuilder;
}
public NumberingAbstractNumBuilder withNumStyleLink(org.docx4j.wml.Numbering.AbstractNum.NumStyleLink value) {
if (value!= null) {
object.setNumStyleLink(value);
}
return this;
}
public NumberingAbstractNumBuilder withNumStyleLink(String val) {
boolean initialized = (val!= null);
if (initialized) {
withNumStyleLink(numStyleLinkBuilder.withVal(val).getObject());
}
return this;
}
public NumberingAbstractNumBuilder.NumStyleLinkBuilder getNumStyleLinkBuilder() {
return numStyleLinkBuilder;
}
public NumberingAbstractNumBuilder addLvl(Lvl... value) {
addContent(object.getLvl(), value);
return this;
}
public NumberingAbstractNumBuilder withAbstractNumId(BigInteger value) {
if (value!= null) {
object.setAbstractNumId(value);
}
return this;
}
/**
* Calls setAbstractNumId
method.
*
* @param value
* Value to set
* @return
* reference to this
*/
public NumberingAbstractNumBuilder withAbstractNumId(String value) {
if (value!= null) {
object.setAbstractNumId(new BigInteger(value));
}
return this;
}
/**
* Calls setAbstractNumId
method.
*
* @param value
* Value to set
* @return
* reference to this
*/
public NumberingAbstractNumBuilder withAbstractNumId(Long value) {
if (value!= null) {
object.setAbstractNumId(BigInteger.valueOf(value));
}
return this;
}
/**
* Fluent API builder for org.docx4j.wml.Numbering$AbstractNum$MultiLevelType
.
*
*/
public static class MultiLevelTypeBuilder
extends com.alphasystem.docx4j.builder.OpenXmlBuilder
{
/**
* Initialize the underlying object.
*
*/
public MultiLevelTypeBuilder() {
this(null);
}
/**
* Initialize the builder with given object.
*
* @param object
* the given object
*/
public MultiLevelTypeBuilder(org.docx4j.wml.Numbering.AbstractNum.MultiLevelType 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 MultiLevelTypeBuilder(org.docx4j.wml.Numbering.AbstractNum.MultiLevelType src, org.docx4j.wml.Numbering.AbstractNum.MultiLevelType target) {
this(target);
if (src!= null) {
withVal(src.getVal());
}
}
protected org.docx4j.wml.Numbering.AbstractNum.MultiLevelType createObject() {
return WmlBuilderFactory.OBJECT_FACTORY.createNumberingAbstractNumMultiLevelType();
}
public NumberingAbstractNumBuilder.MultiLevelTypeBuilder withVal(String value) {
if (value!= null) {
object.setVal(value);
}
return this;
}
}
/**
* Fluent API builder for org.docx4j.wml.Numbering$AbstractNum$Name
.
*
*/
public static class NameBuilder
extends com.alphasystem.docx4j.builder.OpenXmlBuilder
{
/**
* Initialize the underlying object.
*
*/
public NameBuilder() {
this(null);
}
/**
* Initialize the builder with given object.
*
* @param object
* the given object
*/
public NameBuilder(org.docx4j.wml.Numbering.AbstractNum.Name 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 NameBuilder(org.docx4j.wml.Numbering.AbstractNum.Name src, org.docx4j.wml.Numbering.AbstractNum.Name target) {
this(target);
if (src!= null) {
withVal(src.getVal());
}
}
protected org.docx4j.wml.Numbering.AbstractNum.Name createObject() {
return WmlBuilderFactory.OBJECT_FACTORY.createNumberingAbstractNumName();
}
public NumberingAbstractNumBuilder.NameBuilder withVal(String value) {
if (value!= null) {
object.setVal(value);
}
return this;
}
}
/**
* Fluent API builder for org.docx4j.wml.Numbering$AbstractNum$NumStyleLink
.
*
*/
public static class NumStyleLinkBuilder
extends com.alphasystem.docx4j.builder.OpenXmlBuilder
{
/**
* Initialize the underlying object.
*
*/
public NumStyleLinkBuilder() {
this(null);
}
/**
* Initialize the builder with given object.
*
* @param object
* the given object
*/
public NumStyleLinkBuilder(org.docx4j.wml.Numbering.AbstractNum.NumStyleLink 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 NumStyleLinkBuilder(org.docx4j.wml.Numbering.AbstractNum.NumStyleLink src, org.docx4j.wml.Numbering.AbstractNum.NumStyleLink target) {
this(target);
if (src!= null) {
withVal(src.getVal());
}
}
protected org.docx4j.wml.Numbering.AbstractNum.NumStyleLink createObject() {
return WmlBuilderFactory.OBJECT_FACTORY.createNumberingAbstractNumNumStyleLink();
}
public NumberingAbstractNumBuilder.NumStyleLinkBuilder withVal(String value) {
if (value!= null) {
object.setVal(value);
}
return this;
}
}
/**
* Fluent API builder for org.docx4j.wml.Numbering$AbstractNum$StyleLink
.
*
*/
public static class StyleLinkBuilder
extends com.alphasystem.docx4j.builder.OpenXmlBuilder
{
/**
* Initialize the underlying object.
*
*/
public StyleLinkBuilder() {
this(null);
}
/**
* Initialize the builder with given object.
*
* @param object
* the given object
*/
public StyleLinkBuilder(org.docx4j.wml.Numbering.AbstractNum.StyleLink 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 StyleLinkBuilder(org.docx4j.wml.Numbering.AbstractNum.StyleLink src, org.docx4j.wml.Numbering.AbstractNum.StyleLink target) {
this(target);
if (src!= null) {
withVal(src.getVal());
}
}
protected org.docx4j.wml.Numbering.AbstractNum.StyleLink createObject() {
return WmlBuilderFactory.OBJECT_FACTORY.createNumberingAbstractNumStyleLink();
}
public NumberingAbstractNumBuilder.StyleLinkBuilder withVal(String value) {
if (value!= null) {
object.setVal(value);
}
return this;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy