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

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

package io.legaldocml.akn.element;

import com.google.common.collect.ImmutableMap;
import io.legaldocml.akn.AknObject;
import io.legaldocml.akn.util.AknList;
import io.legaldocml.akn.util.XmlReaderHelper;
import io.legaldocml.io.XmlReader;
import io.legaldocml.io.XmlWriter;

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

/**
 * The complex type parliamentaryAnalysis is a list of all the parliamentary analysis elements that can be used on the
 * analysis of a debate.
 *
 * 
 *   <xsd:complexType name="parliamentaryAnalysis">
 *     <xsd:choice minOccurs="1" maxOccurs="unbounded">
 *       <xsd:element ref="quorumVerification"/>
 *       <xsd:element ref="voting"/>
 * 	     <xsd:element ref="recount"/>
 * 	   <xsd:choice>
 *   <xsd:complexType>
 * 
* * @author Jacques Militello */ public abstract class ParliamentaryAnalysis implements AknObject { // Mandatory (min 1). private final AknList elements = new AknList<>(new ParliamentaryAnalysisElement[6]); private static final ImmutableMap> ELEMS; static { ELEMS = ImmutableMap.>builder() .put(QuorumVerification.ELEMENT, QuorumVerification::new) .put(Voting.ELEMENT, Voting::new) .put(Recount.ELEMENT, Recount::new) .build(); } /** * {@inheritDoc} */ @Override public void write(XmlWriter writer) throws IOException { this.elements.write(writer); } /** * {@inheritDoc} */ @Override public void read(XmlReader reader) { XmlReaderHelper.read(reader, this.elements, ELEMS); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy