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

com.alphasystem.docbook.builder.impl.block.FormalParaBuilder Maven / Gradle / Ivy

The newest version!
package com.alphasystem.docbook.builder.impl.block;

import com.alphasystem.docbook.builder.Builder;
import com.alphasystem.xml.UnmarshallerConstants;
import org.docbook.model.FormalPara;
import org.docbook.model.Title;

import java.util.List;

public class FormalParaBuilder extends AbstractParaBuilder {

    public FormalParaBuilder(FormalPara source, Builder parent) {
        super(null, source, parent);
    }

    @Override
    protected Title getTitle() {
        return (Title) source.getTitleContent().stream().filter(UnmarshallerConstants::isTitleType).findFirst()
                .orElse(null);
    }

    @Override
    protected List createPara(List processedChildContent) {
        return builderFactory.process(source.getPara(), this);
    }
}