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

com.powsybl.dataframe.DataframeMapper Maven / Gradle / Ivy

The newest version!
/**
 * Copyright (c) 2021, RTE (http://www.rte-france.com)
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 * SPDX-License-Identifier: MPL-2.0
 */
package com.powsybl.dataframe;

import com.powsybl.dataframe.update.UpdatingDataframe;

import java.util.List;

/**
 * Provides methods to map an object's data to/from dataframe representation.
 * A dataframe is basically a table of values, where columns have a given type and name,
 * and rows correspond to one item.
 *
 * The dataframe data can be read by a {@link DataframeHandler},
 * and provided by variants of "indexed series".
 *
 * @author Sylvain Leclerc {@literal }
 */
public interface DataframeMapper {

    /**
     * Provides dataframe data to the handler, which is responsible to
     * format it as needed.
     */
    void createDataframe(T object, DataframeHandler dataframeHandler, DataframeFilter dataframeFilter, C context);

    void createDataframe(T object, DataframeHandler dataframeHandler, DataframeFilter dataframeFilter);

    List getSeriesMetadata();

    SeriesMetadata getSeriesMetadata(String seriesName);

    /**
     * Updates object data with the provided series.
     */
    void updateSeries(T object, UpdatingDataframe updatingDataframe, C context);

    void updateSeries(T object, UpdatingDataframe updatingDataframe);

    boolean isSeriesMetaDataExists(String seriesName);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy