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

io.legaldocml.akn.element.Blocksreq Maven / Gradle / Ivy

package io.legaldocml.akn.element;

import com.google.common.collect.ImmutableMap;
import io.legaldocml.akn.group.BlockElements;
import io.legaldocml.akn.util.AknList;
import io.legaldocml.akn.util.XmlReaderHelper;
import io.legaldocml.akn.visitor.AknVisitor;
import io.legaldocml.io.XmlReader;
import io.legaldocml.io.XmlWriter;

import java.io.IOException;
import java.util.function.Supplier;

import static io.legaldocml.akn.element.Groups.blockElements;
import static io.legaldocml.akn.element.Groups.convertSuper;

/**
 * the complex type blocksreq defines the content model and attributes shared by all containers. Here the eId attribute
 * is required.
 *
 * 
 *   <xsd:complexType name="blocksreq">
 *     <xsd:sequence minOccurs="0" maxOccurs="unbounded">
 *       <xsd:group ref="blockElements" />
 * 	   <xsd:sequence>
 * 	   <xsd:attributeGroup ref="corereq" />
 *   <xsd:complexType>
 * 
* * @author Jacques Militello */ public abstract class Blocksreq extends CoreReqImpl { private static final ImmutableMap> ELEMS; static { ELEMS = ImmutableMap.>builder() .putAll(convertSuper(blockElements())) .build(); } // Mandatory private final AknList elements = new AknList<>(new BlockElements[8]); /** * {@inheritDoc} */ @Override public void read(XmlReader reader) { super.read(reader); XmlReaderHelper.read(reader, this.elements, ELEMS); } /** * {@inheritDoc} */ @Override public void write(XmlWriter writer) throws IOException { super.write(writer); this.elements.write(writer); } /** * {@inheritDoc} */ @Override public void accept(AknVisitor visitor) { this.elements.accept(visitor); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy