    001    package org.maltparser.core.propagation;
    002
    003    import java.util.ArrayList;
    004
    005    import org.maltparser.core.exception.MaltChainedException;
    006    import org.maltparser.core.io.dataformat.DataFormatInstance;
    007    import org.maltparser.core.propagation.spec.PropagationSpec;
    008    import org.maltparser.core.propagation.spec.PropagationSpecs;
    009    import org.maltparser.core.symbol.SymbolTableHandler;
    010    import org.maltparser.core.syntaxgraph.edge.Edge;
    011
    012    public class Propagations {
    013            private ArrayList<Propagation> propagations;
    014
    015
    016            public Propagations(PropagationSpecs specs,DataFormatInstance dataFormatInstance) throws MaltChainedException {
    017                    propagations = new ArrayList<Propagation>(specs.size());
    018                    for (PropagationSpec spec : specs) {
    019                            propagations.add(new Propagation(spec, dataFormatInstance));
    020                    }
    021            }
    022
    023            public void propagate(Edge e) throws MaltChainedException {
    024                    for (Propagation propagation : propagations) {
    025                            propagation.propagate(e);
    026                    }
    027            }
    028
    029
    030
    031            public ArrayList<Propagation> getPropagations() {
    032                    return propagations;
    033            }
    034
    035            @Override
    036            public String toString() {
    037                    return "Propagations [propagations=" + propagations + "]";
    038            }
    039
    040
    041    }