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

com.powsybl.sld.cgmes.dl.conversion.SvcDiagramDataExporter Maven / Gradle / Ivy

There is a newer version: 4.6.2
Show newest version
/**
 * Copyright (c) 2019, 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/.
 */
package com.powsybl.sld.cgmes.dl.conversion;

import java.util.Map;
import java.util.Objects;

import com.powsybl.sld.cgmes.dl.iidm.extensions.InjectionDiagramData;
import com.powsybl.iidm.network.StaticVarCompensator;
import com.powsybl.triplestore.api.TripleStore;

/**
 *
 * @author Massimo Ferraro {@literal }
 */
public class SvcDiagramDataExporter extends AbstractInjectionDiagramDataExporter {

    public SvcDiagramDataExporter(TripleStore tripleStore, ExportContext context, Map terminals) {
        super(tripleStore, context, terminals);
    }

    public void exportDiagramData(StaticVarCompensator svc) {
        Objects.requireNonNull(svc);
        InjectionDiagramData generatorDiagramData = svc.getExtension(InjectionDiagramData.class);
        String diagramObjectStyleId = addDiagramObjectStyle(svc.getTerminal().getVoltageLevel().getTopologyKind());
        addDiagramData(svc.getId(), svc.getNameOrId(), generatorDiagramData, diagramObjectStyleId);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy