/** * Parses details of the activated channels into the {@link #activeChannels} * data structure from the "channel" entry of the configuration. */ private void parseChannels() { final Value channels = config.get("channel"); if (!(channels instanceof ValueTable)) return; final ValueTable channelsTable = (ValueTable) channels; for (final String key : channelsTable.keySet()) { final Value value = channelsTable.get(key); // verify that the channel is active if (!b(value(value))) continue; // channel not active // parse the channel index (converting to a 1-based index!) final int channelIndex = i(key) + 1; // add the channel index to the active channels list activeChannels.add(channelIndex); } }
/** * Parses details of the activated channels into the {@link #activeChannels} * data structure from the "channel" entry of the configuration. */ private void parseChannels() { final Value channels = config.get("channel"); if (!(channels instanceof ValueTable)) return; final ValueTable channelsTable = (ValueTable) channels; for (final String key : channelsTable.keySet()) { final Value value = channelsTable.get(key); // verify that the channel is active if (!b(value(value))) continue; // channel not active // parse the channel index (converting to a 1-based index!) final int channelIndex = i(key) + 1; // add the channel index to the active channels list activeChannels.add(channelIndex); } }
/** * This steps populates the original metadata table (the tables returned by * {@link #getGlobalMetadata()} and {@link #getSeriesMetadata()}). */ private void populateOriginalMetadata() { final boolean minimumMetadata = isMinimumMetadata(); if (minimumMetadata) return; // populate global metadata addGlobalMeta("cycleCount", meta.getCycleCount()); addGlobalMeta("date", meta.getDate()); addGlobalMeta("waitTime", meta.getWaitTime()); addGlobalMeta("sequenceCount", sequences.size()); final ValueTable config = meta.getConfig(); for (final String key : config.keySet()) { addGlobalMeta(key, config.get(key).toString()); } addGlobalMeta("meta", meta); // populate series metadata final int seriesCount = getSeriesCount(); for (int s = 0; s < seriesCount; s++) { setSeries(s); final Sequence sequence = sequence(s); addSeriesMeta("cycle", sequence.getCycle()); addSeriesMeta("indexCount", sequence.getIndexCount()); addSeriesMeta("type", sequence.getType()); } setSeries(0); }
/** * This steps populates the original metadata table (the tables returned by * {@link #getGlobalMetadata()} and {@link #getSeriesMetadata()}). */ private void populateOriginalMetadata() { final boolean minimumMetadata = isMinimumMetadata(); if (minimumMetadata) return; // populate global metadata addGlobalMeta("cycleCount", meta.getCycleCount()); addGlobalMeta("date", meta.getDate()); addGlobalMeta("waitTime", meta.getWaitTime()); addGlobalMeta("sequenceCount", sequences.size()); final ValueTable config = meta.getConfig(); for (final String key : config.keySet()) { addGlobalMeta(key, config.get(key).toString()); } addGlobalMeta("meta", meta); // populate series metadata final int seriesCount = getSeriesCount(); for (int s = 0; s < seriesCount; s++) { setSeries(s); final Sequence sequence = sequence(s); addSeriesMeta("cycle", sequence.getCycle()); addSeriesMeta("indexCount", sequence.getIndexCount()); addSeriesMeta("type", sequence.getType()); } setSeries(0); }