com.alphasystem.docx4j.builder.wml.StylesBuilder 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.DocDefaults;
import org.docx4j.wml.Style;
import org.docx4j.wml.Styles;
/**
* Fluent API builder for org.docx4j.wml.Styles
.
*
*/
public class StylesBuilder
extends com.alphasystem.docx4j.builder.OpenXmlBuilder
{
private StylesBuilder.LatentStylesBuilder latentStylesBuilder;
/**
* Initialize the underlying object.
*
*/
public StylesBuilder() {
this(null);
}
/**
* Initialize the builder with given object.
*
* @param object
* the given object
*/
public StylesBuilder(Styles object) {
super(object);
latentStylesBuilder = new StylesBuilder.LatentStylesBuilder(this.object.getLatentStyles());
}
/**
* 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 StylesBuilder(Styles src, Styles target) {
this(target);
if (src!= null) {
DocDefaults docDefaults = src.getDocDefaults();
if (docDefaults!= null) {
docDefaults = new DocDefaultsBuilder(docDefaults, object.getDocDefaults()).getObject();
}
Styles.LatentStyles latentStyles = src.getLatentStyles();
if (latentStyles!= null) {
latentStyles = new StylesBuilder.LatentStylesBuilder(latentStyles, object.getLatentStyles()).getObject();
}
List