001package org.biojava.nbio.structure.io.cif;
002
003/**
004 * Defines a rather generic interface which allows to populate some data structure with data parsed from a CIF file.
005 * @param <S> the type of container an implementing class will return
006 * @author Sebastian Bittrich
007 * @since 5.3.0
008 */
009public interface CifFileConsumer<S> {
010    /**
011     * Setup routine which initializes a new container.
012     */
013    void prepare();
014
015    /**
016     * Ultimate setup which can include steps which require several categories to be available and integrate them into
017     * the final container.
018     */
019    void finish();
020
021    /**
022     * Retrieve the created container representing a CIF file.
023     * @return all desired information wrapped as object of type <code>S</code>
024     */
025    S getContainer();
026}