@Test public void getValueTest() { Optional<? extends VTLValue> search = new SDMXEnvironment().getValue(SDMX_ALIAS); assertTrue(search.isPresent(), "Cannot find " + SDMX_ALIAS); assertTrue(DataSet.class.isInstance(search.get()), "CSVALIAS is not a DataSet"); DataSet dataset = (DataSet) search.get(); assertEquals(31, dataset.getMetadata().size(), "Wrong number of columns"); assertEquals(21, dataset.stream().count(), "Wrong number of rows"); }
@Override public Optional<VTLValue> getValue(String name) { return getMatcher(name) .map(matcher -> { String provider = matcher.group(1); String dataflow = matcher.group(2); String query = dataflow + "/" + matcher.group(4); try { List<PortableTimeSeries<Double>> table = SdmxClientHandler.getTimeSeries(provider, query, null, null); return parseSDMXTable(name, table); } catch (SdmxException | DataStructureException e) { throw new VTLNestedException("Fatal error contacting SDMX provider '" + provider + "'", e); } }); }
SDMXEnvironment implements Environment, Serializable { @Override public Optional<VTLValue> getValue(String name) { return getMatcher(name) .map(matcher -> { String provider = matcher.group(1); String dataflow = matcher.group(2); String query = dataflow + "/" + matcher.group(4); try { List<PortableTimeSeries<Double>> table = SdmxClientHandler.getTimeSeries(provider, query, null, null); return parseSDMXTable(name, table); } catch (SdmxException | DataStructureException e) { throw new VTLNestedException("Fatal error contacting SDMX provider '" + provider + "'", e); } }); } }
SDMXEnvironment implements Environment, Serializable { @Override public Optional<VTLValue> getValue(String name) { return getMatcher(name) .map(matcher -> { String provider = matcher.group(1); String dataflow = matcher.group(2); String query = dataflow + "/" + matcher.group(4); try { List<PortableTimeSeries<Double>> table = SdmxClientHandler.getTimeSeries(provider, query, null, null); return parseSDMXTable(name, table); } catch (SdmxException | DataStructureException e) { throw new VTLNestedException("Fatal error contacting SDMX provider '" + provider + "'", e); } }); }  }
SDMXEnvironment implements Environment, Serializable { @Override public Optional<VTLValue> getValue(String name) { return getMatcher(name) .map(matcher -> { String provider = matcher.group(1); String dataflow = matcher.group(2); String query = dataflow + "/" + matcher.group(4); try { List<PortableTimeSeries<Double>> table = SdmxClientHandler.getTimeSeries(provider, query, null, null); return parseSDMXTable(name, table); } catch (SdmxException | DataStructureException e) { throw new VTLNestedException("Fatal error contacting SDMX provider '" + provider + "'", e); } }); }  @Override boolean contains(String name); @Override Optional<VTLValue> getValue(String name); @Override Optional<VTLValueMetadata> getValueMetadata(String name); }
SDMXEnvironment implements Environment, Serializable { @Override public Optional<VTLValue> getValue(String name) { return getMatcher(name) .map(matcher -> { String provider = matcher.group(1); String dataflow = matcher.group(2); String query = dataflow + "/" + matcher.group(4); try { List<PortableTimeSeries<Double>> table = SdmxClientHandler.getTimeSeries(provider, query, null, null); return parseSDMXTable(name, table); } catch (SdmxException | DataStructureException e) { throw new VTLNestedException("Fatal error contacting SDMX provider '" + provider + "'", e); } }); }  @Override boolean contains(String name); @Override Optional<VTLValue> getValue(String name); @Override Optional<VTLValueMetadata> getValueMetadata(String name); static final VTLProperty SDMX_ENVIRONMENT_AUTODROP_IDENTIFIERS; }