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

io.legaldocml.business.builder.element.TocBuilder Maven / Gradle / Ivy

The newest version!
package io.legaldocml.business.builder.element;

import io.legaldocml.akn.element.Toc;
import io.legaldocml.akn.element.TocItem;
import io.legaldocml.business.builder.AbstractBusinessPartBuilder;
import io.legaldocml.business.builder.BusinessBuilder;
import io.legaldocml.akn.type.Uri;

/**
 * @author Jacques Militello
 */
public final class TocBuilder extends AbstractBusinessPartBuilder {

    public TocBuilder(BusinessBuilder businessBuilder, Toc parent) {
        super(businessBuilder, parent);
    }

    @SuppressWarnings("unchecked")
    public InlineTypeBuilder item(Uri href, String level) {
        TocItem tocItem = new TocItem();
        tocItem.setHref(href);
        tocItem.setLevel(level);
        parent().add(tocItem);
        return new InlineTypeBuilder(getBusinessBuilder(), tocItem);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy