![JAR search and dependency download from the Maven repository](/logo.png)
internal.sdmxdl.cli.WebConceptOptions Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdmx-dl-cli Show documentation
Show all versions of sdmx-dl-cli Show documentation
Easily download official statistics - CLI
The newest version!
package internal.sdmxdl.cli;
import picocli.CommandLine;
import sdmxdl.Component;
import sdmxdl.Structure;
import sdmxdl.web.SdmxWebManager;
import java.io.IOException;
import java.util.stream.Stream;
@lombok.Getter
@lombok.Setter
public class WebConceptOptions extends WebFlowOptions {
@CommandLine.Parameters(
index = "2",
paramLabel = "",
descriptionKey = "cli.sdmx.concept"
)
private String concept;
public Component loadComponent(SdmxWebManager manager) throws IOException {
Structure dsd = loadStructure(manager);
return Stream.concat(dsd.getDimensions().stream(), dsd.getAttributes().stream())
.filter(component -> component.getId().equals(getConcept()))
.findFirst()
.orElseThrow(() -> new IOException("Cannot find concept '" + getConcept() + "'"));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy