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

sdmxdl.desktop.FlowStruct Maven / Gradle / Ivy

The newest version!
package sdmxdl.desktop;

import lombok.NonNull;
import sdmxdl.Connection;
import sdmxdl.Flow;
import sdmxdl.Structure;
import sdmxdl.Languages;
import sdmxdl.web.SdmxWebManager;

import java.io.IOException;

@lombok.Value
public class FlowStruct {

    @NonNull Flow flow;

    @NonNull Structure structure;

    public static FlowStruct load(SdmxWebManager manager, Languages languages, DataSourceRef ref) throws IOException {
        try (Connection conn = manager.getConnection(ref.getSource(), languages)) {
            return new FlowStruct(conn.getFlow(ref.getFlow()), conn.getStructure(ref.getFlow()));
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy