target
stringlengths
20
113k
src_fm
stringlengths
11
86.3k
src_fm_fc
stringlengths
21
86.4k
src_fm_fc_co
stringlengths
30
86.4k
src_fm_fc_ms
stringlengths
42
86.8k
src_fm_fc_ms_ff
stringlengths
43
86.8k
@Test(expected = AssertionError.class) public void cannot_lock_with_null_lock() throws Exception { m_filter.lock(null); }
public synchronized void lock(Object l) { Ensure.not_null(l); Ensure.is_null(m_lock); m_lock = l; }
EventFilter implements EventSink { public synchronized void lock(Object l) { Ensure.not_null(l); Ensure.is_null(m_lock); m_lock = l; } }
EventFilter implements EventSink { public synchronized void lock(Object l) { Ensure.not_null(l); Ensure.is_null(m_lock); m_lock = l; } EventFilter(); }
EventFilter implements EventSink { public synchronized void lock(Object l) { Ensure.not_null(l); Ensure.is_null(m_lock); m_lock = l; } EventFilter(); synchronized void connect(EventSink s); synchronized EventSink connected(); EventFilterInfo info(); synchronized void lock(Object l); synchronized void unlock(Object l); ...
EventFilter implements EventSink { public synchronized void lock(Object l) { Ensure.not_null(l); Ensure.is_null(m_lock); m_lock = l; } EventFilter(); synchronized void connect(EventSink s); synchronized EventSink connected(); EventFilterInfo info(); synchronized void lock(Object l); synchronized void unlock(Object l); ...
@Test(expected = AssertionError.class) public void cannot_unlock_with_null_lock() throws Exception { m_filter.unlock(null); }
public synchronized void unlock(Object l) { Ensure.not_null(l); Ensure.equals(m_lock, l); m_lock = null; }
EventFilter implements EventSink { public synchronized void unlock(Object l) { Ensure.not_null(l); Ensure.equals(m_lock, l); m_lock = null; } }
EventFilter implements EventSink { public synchronized void unlock(Object l) { Ensure.not_null(l); Ensure.equals(m_lock, l); m_lock = null; } EventFilter(); }
EventFilter implements EventSink { public synchronized void unlock(Object l) { Ensure.not_null(l); Ensure.equals(m_lock, l); m_lock = null; } EventFilter(); synchronized void connect(EventSink s); synchronized EventSink connected(); EventFilterInfo info(); synchronized void lock(Object l); synchronized void unlock(Obje...
EventFilter implements EventSink { public synchronized void unlock(Object l) { Ensure.not_null(l); Ensure.equals(m_lock, l); m_lock = null; } EventFilter(); synchronized void connect(EventSink s); synchronized EventSink connected(); EventFilterInfo info(); synchronized void lock(Object l); synchronized void unlock(Obje...
@Test public void can_unblock_unblocked() throws Exception { assertEquals(BlockedUnblockedState.UNBLOCK, m_buf.state()); m_buf.unblock(); assertEquals(BlockedUnblockedState.UNBLOCK, m_buf.state()); }
public void unblock() { state(BlockedUnblockedState.UNBLOCK); }
BlockUnblockFilter extends StateBasedBlockerFilter<BlockedUnblockedState> { public void unblock() { state(BlockedUnblockedState.UNBLOCK); } }
BlockUnblockFilter extends StateBasedBlockerFilter<BlockedUnblockedState> { public void unblock() { state(BlockedUnblockedState.UNBLOCK); } BlockUnblockFilter(BlockedUnblockedState initial); }
BlockUnblockFilter extends StateBasedBlockerFilter<BlockedUnblockedState> { public void unblock() { state(BlockedUnblockedState.UNBLOCK); } BlockUnblockFilter(BlockedUnblockedState initial); void block(); void unblock(); }
BlockUnblockFilter extends StateBasedBlockerFilter<BlockedUnblockedState> { public void unblock() { state(BlockedUnblockedState.UNBLOCK); } BlockUnblockFilter(BlockedUnblockedState initial); void block(); void unblock(); }
@Test public void can_block_blocked() throws Exception { m_buf.block(); assertEquals(BlockedUnblockedState.BLOCK, m_buf.state()); m_buf.block(); assertEquals(BlockedUnblockedState.BLOCK, m_buf.state()); }
public void block() { state(BlockedUnblockedState.BLOCK); }
BlockUnblockFilter extends StateBasedBlockerFilter<BlockedUnblockedState> { public void block() { state(BlockedUnblockedState.BLOCK); } }
BlockUnblockFilter extends StateBasedBlockerFilter<BlockedUnblockedState> { public void block() { state(BlockedUnblockedState.BLOCK); } BlockUnblockFilter(BlockedUnblockedState initial); }
BlockUnblockFilter extends StateBasedBlockerFilter<BlockedUnblockedState> { public void block() { state(BlockedUnblockedState.BLOCK); } BlockUnblockFilter(BlockedUnblockedState initial); void block(); void unblock(); }
BlockUnblockFilter extends StateBasedBlockerFilter<BlockedUnblockedState> { public void block() { state(BlockedUnblockedState.BLOCK); } BlockUnblockFilter(BlockedUnblockedState initial); void block(); void unblock(); }
@Test public void blocked_events_are_rejected() throws Exception { m_buf.block(); m_buf.connect(m_sink); m_buf.sink(bus_data()); assertEquals(0, m_sink.m_data.size()); }
public void block() { state(BlockedUnblockedState.BLOCK); }
BlockUnblockFilter extends StateBasedBlockerFilter<BlockedUnblockedState> { public void block() { state(BlockedUnblockedState.BLOCK); } }
BlockUnblockFilter extends StateBasedBlockerFilter<BlockedUnblockedState> { public void block() { state(BlockedUnblockedState.BLOCK); } BlockUnblockFilter(BlockedUnblockedState initial); }
BlockUnblockFilter extends StateBasedBlockerFilter<BlockedUnblockedState> { public void block() { state(BlockedUnblockedState.BLOCK); } BlockUnblockFilter(BlockedUnblockedState initial); void block(); void unblock(); }
BlockUnblockFilter extends StateBasedBlockerFilter<BlockedUnblockedState> { public void block() { state(BlockedUnblockedState.BLOCK); } BlockUnblockFilter(BlockedUnblockedState initial); void block(); void unblock(); }
@Test public void obtaining_blocked_info() throws Exception { m_buf.block(); @SuppressWarnings("unchecked") StateBasedBlockerFilterInfo<BlockedUnblockedState> st = (StateBasedBlockerFilterInfo<BlockedUnblockedState>) m_buf.info(); assertEquals(BlockedUnblockedState.BLOCK, st.state()); }
public void block() { state(BlockedUnblockedState.BLOCK); }
BlockUnblockFilter extends StateBasedBlockerFilter<BlockedUnblockedState> { public void block() { state(BlockedUnblockedState.BLOCK); } }
BlockUnblockFilter extends StateBasedBlockerFilter<BlockedUnblockedState> { public void block() { state(BlockedUnblockedState.BLOCK); } BlockUnblockFilter(BlockedUnblockedState initial); }
BlockUnblockFilter extends StateBasedBlockerFilter<BlockedUnblockedState> { public void block() { state(BlockedUnblockedState.BLOCK); } BlockUnblockFilter(BlockedUnblockedState initial); void block(); void unblock(); }
BlockUnblockFilter extends StateBasedBlockerFilter<BlockedUnblockedState> { public void block() { state(BlockedUnblockedState.BLOCK); } BlockUnblockFilter(BlockedUnblockedState initial); void block(); void unblock(); }
@Test public void createSVP() { assertNotNull(provider.getHistoryProvider()); assertNotNull(provider.getTimer()); assertNotNull(provider.getSystemConfig()); assertNotNull(provider.getEventStore()); assertNotNull(provider.getUi()); assertEquals(true, provider.isCurrent()); assertEquals(sysConfig.getUpdateRate(), provide...
@Override public boolean isCurrent() { return this.isCurrent; }
AcmeSystemViewProvider implements ISystemViewProvider { @Override public boolean isCurrent() { return this.isCurrent; } }
AcmeSystemViewProvider implements ISystemViewProvider { @Override public boolean isCurrent() { return this.isCurrent; } protected AcmeSystemViewProvider( IRuntimeAggregator<IAcmeSystem> runtimeAggregator, AbstractRainbowVaadinUI ui, ISystemConfiguration systemConfig, IHistoryProvide...
AcmeSystemViewProvider implements ISystemViewProvider { @Override public boolean isCurrent() { return this.isCurrent; } protected AcmeSystemViewProvider( IRuntimeAggregator<IAcmeSystem> runtimeAggregator, AbstractRainbowVaadinUI ui, ISystemConfiguration systemConfig, IHistoryProvide...
AcmeSystemViewProvider implements ISystemViewProvider { @Override public boolean isCurrent() { return this.isCurrent; } protected AcmeSystemViewProvider( IRuntimeAggregator<IAcmeSystem> runtimeAggregator, AbstractRainbowVaadinUI ui, ISystemConfiguration systemConfig, IHistoryProvide...
@Test(expected = InvalidVariableException.class) public void invalidVariable() throws Exception { List<Variable> variables = Collections.singletonList(new Variable("allowed")); (new ConfigurationLoader(variables)).loadConfiguration(testYML); }
public Map<String, Object> loadConfiguration(File file) throws IOException { Map<String, Object> config = new HashMap<>(defaultConfig); Map<String, Object> tmpConfig; try (InputStream input = new FileInputStream(file)) { Yaml yaml = new Yaml(); tmpConfig = yaml.load(input); if (tmpConfig == null) { return config; } for...
ConfigurationLoader { public Map<String, Object> loadConfiguration(File file) throws IOException { Map<String, Object> config = new HashMap<>(defaultConfig); Map<String, Object> tmpConfig; try (InputStream input = new FileInputStream(file)) { Yaml yaml = new Yaml(); tmpConfig = yaml.load(input); if (tmpConfig == null) ...
ConfigurationLoader { public Map<String, Object> loadConfiguration(File file) throws IOException { Map<String, Object> config = new HashMap<>(defaultConfig); Map<String, Object> tmpConfig; try (InputStream input = new FileInputStream(file)) { Yaml yaml = new Yaml(); tmpConfig = yaml.load(input); if (tmpConfig == null) ...
ConfigurationLoader { public Map<String, Object> loadConfiguration(File file) throws IOException { Map<String, Object> config = new HashMap<>(defaultConfig); Map<String, Object> tmpConfig; try (InputStream input = new FileInputStream(file)) { Yaml yaml = new Yaml(); tmpConfig = yaml.load(input); if (tmpConfig == null) ...
ConfigurationLoader { public Map<String, Object> loadConfiguration(File file) throws IOException { Map<String, Object> config = new HashMap<>(defaultConfig); Map<String, Object> tmpConfig; try (InputStream input = new FileInputStream(file)) { Yaml yaml = new Yaml(); tmpConfig = yaml.load(input); if (tmpConfig == null) ...
@Test public void process_empty_event_chain() throws Exception { BusData d = bus_data(); m_chain.sink(d); assertEquals(1, m_sink.m_data.size()); assertSame(d, m_sink.m_data.get(0)); }
@Override public synchronized void sink(BusData data) throws IOException { Ensure.not_null(data); first().sink(data); }
EventFilterChain implements EventSink { @Override public synchronized void sink(BusData data) throws IOException { Ensure.not_null(data); first().sink(data); } }
EventFilterChain implements EventSink { @Override public synchronized void sink(BusData data) throws IOException { Ensure.not_null(data); first().sink(data); } EventFilterChain(EventSink sink); }
EventFilterChain implements EventSink { @Override public synchronized void sink(BusData data) throws IOException { Ensure.not_null(data); first().sink(data); } EventFilterChain(EventSink sink); synchronized EventSink chain_sink(); synchronized List<EventFilter> filters(); synchronized void add_filter(EventFilter f); sy...
EventFilterChain implements EventSink { @Override public synchronized void sink(BusData data) throws IOException { Ensure.not_null(data); first().sink(data); } EventFilterChain(EventSink sink); synchronized EventSink chain_sink(); synchronized List<EventFilter> filters(); synchronized void add_filter(EventFilter f); sy...
@Test public void obtain_chain_sink() throws Exception { assertSame(m_sink, m_chain.chain_sink()); }
public synchronized EventSink chain_sink() { return m_sink; }
EventFilterChain implements EventSink { public synchronized EventSink chain_sink() { return m_sink; } }
EventFilterChain implements EventSink { public synchronized EventSink chain_sink() { return m_sink; } EventFilterChain(EventSink sink); }
EventFilterChain implements EventSink { public synchronized EventSink chain_sink() { return m_sink; } EventFilterChain(EventSink sink); synchronized EventSink chain_sink(); synchronized List<EventFilter> filters(); synchronized void add_filter(EventFilter f); synchronized void remove_filter(EventFilter f); synchronized...
EventFilterChain implements EventSink { public synchronized EventSink chain_sink() { return m_sink; } EventFilterChain(EventSink sink); synchronized EventSink chain_sink(); synchronized List<EventFilter> filters(); synchronized void add_filter(EventFilter f); synchronized void remove_filter(EventFilter f); synchronized...
@Test public void multiple_chains_same_sink() throws Exception { assertSame(m_sink, m_chain.chain_sink()); assertSame(m_sink, new EventFilterChain(m_sink).chain_sink()); }
public synchronized EventSink chain_sink() { return m_sink; }
EventFilterChain implements EventSink { public synchronized EventSink chain_sink() { return m_sink; } }
EventFilterChain implements EventSink { public synchronized EventSink chain_sink() { return m_sink; } EventFilterChain(EventSink sink); }
EventFilterChain implements EventSink { public synchronized EventSink chain_sink() { return m_sink; } EventFilterChain(EventSink sink); synchronized EventSink chain_sink(); synchronized List<EventFilter> filters(); synchronized void add_filter(EventFilter f); synchronized void remove_filter(EventFilter f); synchronized...
EventFilterChain implements EventSink { public synchronized EventSink chain_sink() { return m_sink; } EventFilterChain(EventSink sink); synchronized EventSink chain_sink(); synchronized List<EventFilter> filters(); synchronized void add_filter(EventFilter f); synchronized void remove_filter(EventFilter f); synchronized...
@Test(expected = AssertionError.class) public void adding_null_filter_to_chain() throws Exception { m_chain.add_filter(null); }
public synchronized void add_filter(EventFilter f) { Ensure.not_null(f); Ensure.is_false(f.locked()); f.connect(first()); m_filters.add(f); f.lock(m_filters); }
EventFilterChain implements EventSink { public synchronized void add_filter(EventFilter f) { Ensure.not_null(f); Ensure.is_false(f.locked()); f.connect(first()); m_filters.add(f); f.lock(m_filters); } }
EventFilterChain implements EventSink { public synchronized void add_filter(EventFilter f) { Ensure.not_null(f); Ensure.is_false(f.locked()); f.connect(first()); m_filters.add(f); f.lock(m_filters); } EventFilterChain(EventSink sink); }
EventFilterChain implements EventSink { public synchronized void add_filter(EventFilter f) { Ensure.not_null(f); Ensure.is_false(f.locked()); f.connect(first()); m_filters.add(f); f.lock(m_filters); } EventFilterChain(EventSink sink); synchronized EventSink chain_sink(); synchronized List<EventFilter> filters(); synchr...
EventFilterChain implements EventSink { public synchronized void add_filter(EventFilter f) { Ensure.not_null(f); Ensure.is_false(f.locked()); f.connect(first()); m_filters.add(f); f.lock(m_filters); } EventFilterChain(EventSink sink); synchronized EventSink chain_sink(); synchronized List<EventFilter> filters(); synchr...
@Test(expected = AssertionError.class) public void adding_filter_twice_to_same_chain() throws Exception { m_chain.add_filter(m_filter); m_chain.add_filter(m_filter); }
public synchronized void add_filter(EventFilter f) { Ensure.not_null(f); Ensure.is_false(f.locked()); f.connect(first()); m_filters.add(f); f.lock(m_filters); }
EventFilterChain implements EventSink { public synchronized void add_filter(EventFilter f) { Ensure.not_null(f); Ensure.is_false(f.locked()); f.connect(first()); m_filters.add(f); f.lock(m_filters); } }
EventFilterChain implements EventSink { public synchronized void add_filter(EventFilter f) { Ensure.not_null(f); Ensure.is_false(f.locked()); f.connect(first()); m_filters.add(f); f.lock(m_filters); } EventFilterChain(EventSink sink); }
EventFilterChain implements EventSink { public synchronized void add_filter(EventFilter f) { Ensure.not_null(f); Ensure.is_false(f.locked()); f.connect(first()); m_filters.add(f); f.lock(m_filters); } EventFilterChain(EventSink sink); synchronized EventSink chain_sink(); synchronized List<EventFilter> filters(); synchr...
EventFilterChain implements EventSink { public synchronized void add_filter(EventFilter f) { Ensure.not_null(f); Ensure.is_false(f.locked()); f.connect(first()); m_filters.add(f); f.lock(m_filters); } EventFilterChain(EventSink sink); synchronized EventSink chain_sink(); synchronized List<EventFilter> filters(); synchr...
@Test(expected = AssertionError.class) public void adding_filter_in_another_chain() throws Exception { m_chain.add_filter(m_filter); new EventFilterChain(m_sink).add_filter(m_filter); }
public synchronized void add_filter(EventFilter f) { Ensure.not_null(f); Ensure.is_false(f.locked()); f.connect(first()); m_filters.add(f); f.lock(m_filters); }
EventFilterChain implements EventSink { public synchronized void add_filter(EventFilter f) { Ensure.not_null(f); Ensure.is_false(f.locked()); f.connect(first()); m_filters.add(f); f.lock(m_filters); } }
EventFilterChain implements EventSink { public synchronized void add_filter(EventFilter f) { Ensure.not_null(f); Ensure.is_false(f.locked()); f.connect(first()); m_filters.add(f); f.lock(m_filters); } EventFilterChain(EventSink sink); }
EventFilterChain implements EventSink { public synchronized void add_filter(EventFilter f) { Ensure.not_null(f); Ensure.is_false(f.locked()); f.connect(first()); m_filters.add(f); f.lock(m_filters); } EventFilterChain(EventSink sink); synchronized EventSink chain_sink(); synchronized List<EventFilter> filters(); synchr...
EventFilterChain implements EventSink { public synchronized void add_filter(EventFilter f) { Ensure.not_null(f); Ensure.is_false(f.locked()); f.connect(first()); m_filters.add(f); f.lock(m_filters); } EventFilterChain(EventSink sink); synchronized EventSink chain_sink(); synchronized List<EventFilter> filters(); synchr...
@Test(expected = AssertionError.class) public void removing_null_filter_from_chain() throws Exception { m_chain.remove_filter(null); }
public synchronized void remove_filter(EventFilter f) { Ensure.not_null(f); Ensure.is_true(m_filters.contains(f)); int idx = m_filters.indexOf(f); EventFilter prev = null; if (idx != (m_filters.size() - 1)) { prev = m_filters.get(idx + 1); } if (prev != null) { prev.unlock(m_filters); prev.connect(null); prev.connect(f...
EventFilterChain implements EventSink { public synchronized void remove_filter(EventFilter f) { Ensure.not_null(f); Ensure.is_true(m_filters.contains(f)); int idx = m_filters.indexOf(f); EventFilter prev = null; if (idx != (m_filters.size() - 1)) { prev = m_filters.get(idx + 1); } if (prev != null) { prev.unlock(m_filt...
EventFilterChain implements EventSink { public synchronized void remove_filter(EventFilter f) { Ensure.not_null(f); Ensure.is_true(m_filters.contains(f)); int idx = m_filters.indexOf(f); EventFilter prev = null; if (idx != (m_filters.size() - 1)) { prev = m_filters.get(idx + 1); } if (prev != null) { prev.unlock(m_filt...
EventFilterChain implements EventSink { public synchronized void remove_filter(EventFilter f) { Ensure.not_null(f); Ensure.is_true(m_filters.contains(f)); int idx = m_filters.indexOf(f); EventFilter prev = null; if (idx != (m_filters.size() - 1)) { prev = m_filters.get(idx + 1); } if (prev != null) { prev.unlock(m_filt...
EventFilterChain implements EventSink { public synchronized void remove_filter(EventFilter f) { Ensure.not_null(f); Ensure.is_true(m_filters.contains(f)); int idx = m_filters.indexOf(f); EventFilter prev = null; if (idx != (m_filters.size() - 1)) { prev = m_filters.get(idx + 1); } if (prev != null) { prev.unlock(m_filt...
@Test(expected = AssertionError.class) public void removed_filter_not_in_chain() throws Exception { m_chain.remove_filter(m_filter); }
public synchronized void remove_filter(EventFilter f) { Ensure.not_null(f); Ensure.is_true(m_filters.contains(f)); int idx = m_filters.indexOf(f); EventFilter prev = null; if (idx != (m_filters.size() - 1)) { prev = m_filters.get(idx + 1); } if (prev != null) { prev.unlock(m_filters); prev.connect(null); prev.connect(f...
EventFilterChain implements EventSink { public synchronized void remove_filter(EventFilter f) { Ensure.not_null(f); Ensure.is_true(m_filters.contains(f)); int idx = m_filters.indexOf(f); EventFilter prev = null; if (idx != (m_filters.size() - 1)) { prev = m_filters.get(idx + 1); } if (prev != null) { prev.unlock(m_filt...
EventFilterChain implements EventSink { public synchronized void remove_filter(EventFilter f) { Ensure.not_null(f); Ensure.is_true(m_filters.contains(f)); int idx = m_filters.indexOf(f); EventFilter prev = null; if (idx != (m_filters.size() - 1)) { prev = m_filters.get(idx + 1); } if (prev != null) { prev.unlock(m_filt...
EventFilterChain implements EventSink { public synchronized void remove_filter(EventFilter f) { Ensure.not_null(f); Ensure.is_true(m_filters.contains(f)); int idx = m_filters.indexOf(f); EventFilter prev = null; if (idx != (m_filters.size() - 1)) { prev = m_filters.get(idx + 1); } if (prev != null) { prev.unlock(m_filt...
EventFilterChain implements EventSink { public synchronized void remove_filter(EventFilter f) { Ensure.not_null(f); Ensure.is_true(m_filters.contains(f)); int idx = m_filters.indexOf(f); EventFilter prev = null; if (idx != (m_filters.size() - 1)) { prev = m_filters.get(idx + 1); } if (prev != null) { prev.unlock(m_filt...
@Test(expected = AssertionError.class) public void processing_null() throws Exception { m_chain.sink(null); }
@Override public synchronized void sink(BusData data) throws IOException { Ensure.not_null(data); first().sink(data); }
EventFilterChain implements EventSink { @Override public synchronized void sink(BusData data) throws IOException { Ensure.not_null(data); first().sink(data); } }
EventFilterChain implements EventSink { @Override public synchronized void sink(BusData data) throws IOException { Ensure.not_null(data); first().sink(data); } EventFilterChain(EventSink sink); }
EventFilterChain implements EventSink { @Override public synchronized void sink(BusData data) throws IOException { Ensure.not_null(data); first().sink(data); } EventFilterChain(EventSink sink); synchronized EventSink chain_sink(); synchronized List<EventFilter> filters(); synchronized void add_filter(EventFilter f); sy...
EventFilterChain implements EventSink { @Override public synchronized void sink(BusData data) throws IOException { Ensure.not_null(data); first().sink(data); } EventFilterChain(EventSink sink); synchronized EventSink chain_sink(); synchronized List<EventFilter> filters(); synchronized void add_filter(EventFilter f); sy...
@Test public void equals_and_hash_code() throws Exception { SaveSink ss = new SaveSink(); EventFilterChain c1 = new EventFilterChain(ss); EventFilterChain c2 = new EventFilterChain(ss); EventFilterChainInfo i1 = new EventFilterChainInfo(c1); EventFilterChainInfo i2 = new EventFilterChainInfo(c2); assertEquals(i1, i2); ...
public synchronized void add_filter(EventFilter f) { Ensure.not_null(f); Ensure.is_false(f.locked()); f.connect(first()); m_filters.add(f); f.lock(m_filters); }
EventFilterChain implements EventSink { public synchronized void add_filter(EventFilter f) { Ensure.not_null(f); Ensure.is_false(f.locked()); f.connect(first()); m_filters.add(f); f.lock(m_filters); } }
EventFilterChain implements EventSink { public synchronized void add_filter(EventFilter f) { Ensure.not_null(f); Ensure.is_false(f.locked()); f.connect(first()); m_filters.add(f); f.lock(m_filters); } EventFilterChain(EventSink sink); }
EventFilterChain implements EventSink { public synchronized void add_filter(EventFilter f) { Ensure.not_null(f); Ensure.is_false(f.locked()); f.connect(first()); m_filters.add(f); f.lock(m_filters); } EventFilterChain(EventSink sink); synchronized EventSink chain_sink(); synchronized List<EventFilter> filters(); synchr...
EventFilterChain implements EventSink { public synchronized void add_filter(EventFilter f) { Ensure.not_null(f); Ensure.is_false(f.locked()); f.connect(first()); m_filters.add(f); f.lock(m_filters); } EventFilterChain(EventSink sink); synchronized EventSink chain_sink(); synchronized List<EventFilter> filters(); synchr...
@Test public void getValue() throws AcmeConversionException, ValueConversionException { DataValue value = provider.getValue("Znn.Server0.load"); assertEquals(new Float(0.0), DataValueSupport.converter.to_java(value, Float.class)); value = provider.getValue("Znn.Server0.fidelity"); assertEquals(new Integer(5), DataValue...
public DataValue getValue(String mapping) throws AcmeConversionException { IAcmeProperty property = (IAcmeProperty) ModelHelper .getElementFromQualifiedName(internalModel.getModelInstance(), mapping); return AcmeConverterSupport.convertToDataValue(property); }
AcmeSystemViewProvider implements ISystemViewProvider { public DataValue getValue(String mapping) throws AcmeConversionException { IAcmeProperty property = (IAcmeProperty) ModelHelper .getElementFromQualifiedName(internalModel.getModelInstance(), mapping); return AcmeConverterSupport.convertToDataValue(property); } }
AcmeSystemViewProvider implements ISystemViewProvider { public DataValue getValue(String mapping) throws AcmeConversionException { IAcmeProperty property = (IAcmeProperty) ModelHelper .getElementFromQualifiedName(internalModel.getModelInstance(), mapping); return AcmeConverterSupport.convertToDataValue(property); } pro...
AcmeSystemViewProvider implements ISystemViewProvider { public DataValue getValue(String mapping) throws AcmeConversionException { IAcmeProperty property = (IAcmeProperty) ModelHelper .getElementFromQualifiedName(internalModel.getModelInstance(), mapping); return AcmeConverterSupport.convertToDataValue(property); } pro...
AcmeSystemViewProvider implements ISystemViewProvider { public DataValue getValue(String mapping) throws AcmeConversionException { IAcmeProperty property = (IAcmeProperty) ModelHelper .getElementFromQualifiedName(internalModel.getModelInstance(), mapping); return AcmeConverterSupport.convertToDataValue(property); } pro...
@Test public void sink_data_is_written_to_connection() throws Exception { m_sc_sink.sink(bus_data()); assertEquals(1, m_written.size()); }
@Override public void sink(BusData data) throws IOException { Ensure.not_null(data); m_dts.write(data); }
DataTypeSocketConnectionSink implements EventSink { @Override public void sink(BusData data) throws IOException { Ensure.not_null(data); m_dts.write(data); } }
DataTypeSocketConnectionSink implements EventSink { @Override public void sink(BusData data) throws IOException { Ensure.not_null(data); m_dts.write(data); } DataTypeSocketConnectionSink(DataTypeSocketConnection c); }
DataTypeSocketConnectionSink implements EventSink { @Override public void sink(BusData data) throws IOException { Ensure.not_null(data); m_dts.write(data); } DataTypeSocketConnectionSink(DataTypeSocketConnection c); @Override void sink(BusData data); }
DataTypeSocketConnectionSink implements EventSink { @Override public void sink(BusData data) throws IOException { Ensure.not_null(data); m_dts.write(data); } DataTypeSocketConnectionSink(DataTypeSocketConnection c); @Override void sink(BusData data); }
@Test(expected = AssertionError.class) public void cannot_sink_null_data() throws Exception { m_sc_sink.sink(null); }
@Override public void sink(BusData data) throws IOException { Ensure.not_null(data); m_dts.write(data); }
DataTypeSocketConnectionSink implements EventSink { @Override public void sink(BusData data) throws IOException { Ensure.not_null(data); m_dts.write(data); } }
DataTypeSocketConnectionSink implements EventSink { @Override public void sink(BusData data) throws IOException { Ensure.not_null(data); m_dts.write(data); } DataTypeSocketConnectionSink(DataTypeSocketConnection c); }
DataTypeSocketConnectionSink implements EventSink { @Override public void sink(BusData data) throws IOException { Ensure.not_null(data); m_dts.write(data); } DataTypeSocketConnectionSink(DataTypeSocketConnection c); @Override void sink(BusData data); }
DataTypeSocketConnectionSink implements EventSink { @Override public void sink(BusData data) throws IOException { Ensure.not_null(data); m_dts.write(data); } DataTypeSocketConnectionSink(DataTypeSocketConnection c); @Override void sink(BusData data); }
@Test public void sink() throws Exception { BusDataQueueGroupImpl qg = new BusDataQueueGroupImpl(); BusDataQueue q = new BusDataQueue(); qg.add(q); BusDataQueueGroupSink s = new BusDataQueueGroupSink(qg); s.sink(bus_data()); m_dh.wait_dispatch_clear(); assertNotNull(q.poll()); assertNull(q.poll()); }
@Override public void sink(BusData data) { Ensure.not_null(data); m_qg.add(data); }
BusDataQueueGroupSink implements EventSink { @Override public void sink(BusData data) { Ensure.not_null(data); m_qg.add(data); } }
BusDataQueueGroupSink implements EventSink { @Override public void sink(BusData data) { Ensure.not_null(data); m_qg.add(data); } BusDataQueueGroupSink(BusDataQueueGroupImpl qg); }
BusDataQueueGroupSink implements EventSink { @Override public void sink(BusData data) { Ensure.not_null(data); m_qg.add(data); } BusDataQueueGroupSink(BusDataQueueGroupImpl qg); @Override void sink(BusData data); }
BusDataQueueGroupSink implements EventSink { @Override public void sink(BusData data) { Ensure.not_null(data); m_qg.add(data); } BusDataQueueGroupSink(BusDataQueueGroupImpl qg); @Override void sink(BusData data); }
@Test(expected = AssertionError.class) public void cannot_sink_null() throws Exception { BusDataQueueGroupImpl qg = new BusDataQueueGroupImpl(); BusDataQueue q = new BusDataQueue(); qg.add(q); BusDataQueueGroupSink s = new BusDataQueueGroupSink(qg); s.sink(null); }
@Override public void sink(BusData data) { Ensure.not_null(data); m_qg.add(data); }
BusDataQueueGroupSink implements EventSink { @Override public void sink(BusData data) { Ensure.not_null(data); m_qg.add(data); } }
BusDataQueueGroupSink implements EventSink { @Override public void sink(BusData data) { Ensure.not_null(data); m_qg.add(data); } BusDataQueueGroupSink(BusDataQueueGroupImpl qg); }
BusDataQueueGroupSink implements EventSink { @Override public void sink(BusData data) { Ensure.not_null(data); m_qg.add(data); } BusDataQueueGroupSink(BusDataQueueGroupImpl qg); @Override void sink(BusData data); }
BusDataQueueGroupSink implements EventSink { @Override public void sink(BusData data) { Ensure.not_null(data); m_qg.add(data); } BusDataQueueGroupSink(BusDataQueueGroupImpl qg); @Override void sink(BusData data); }
@Test public void testEvalTokensReplacements () { Properties properties = new Properties (); properties.setProperty ("XXX", "testSucceeds"); assertNull (Util.evalTokens (null, properties)); assertEquals (Util.evalTokens ("xxx", null), "xxx"); String testCase = "${XXX}"; String t1 = Util.evalTokens (testCase, properties...
public static String evalTokens (String str, Properties props) { if (str == null) return str; if (props == null) return str; String result = str; Matcher m = m_substitutePattern.matcher (str); while (m.find ()) { String subsKey = m.group (1); String tgt = TOKEN_BEGIN + subsKey + TOKEN_END; String tgtVal = props.getProp...
Util { public static String evalTokens (String str, Properties props) { if (str == null) return str; if (props == null) return str; String result = str; Matcher m = m_substitutePattern.matcher (str); while (m.find ()) { String subsKey = m.group (1); String tgt = TOKEN_BEGIN + subsKey + TOKEN_END; String tgtVal = props....
Util { public static String evalTokens (String str, Properties props) { if (str == null) return str; if (props == null) return str; String result = str; Matcher m = m_substitutePattern.matcher (str); while (m.find ()) { String subsKey = m.group (1); String tgt = TOKEN_BEGIN + subsKey + TOKEN_END; String tgtVal = props....
Util { public static String evalTokens (String str, Properties props) { if (str == null) return str; if (props == null) return str; String result = str; Matcher m = m_substitutePattern.matcher (str); while (m.find ()) { String subsKey = m.group (1); String tgt = TOKEN_BEGIN + subsKey + TOKEN_END; String tgtVal = props....
Util { public static String evalTokens (String str, Properties props) { if (str == null) return str; if (props == null) return str; String result = str; Matcher m = m_substitutePattern.matcher (str); while (m.find ()) { String subsKey = m.group (1); String tgt = TOKEN_BEGIN + subsKey + TOKEN_END; String tgtVal = props....
@Test public void testEvalTokensBadFormats () { Properties props = new Properties (); props.setProperty ("XXX", "testSucceeds"); props.setProperty ("yYy", "123"); String test = "${XXX"; assertEquals (Util.evalTokens (test, props), "${XXX"); test = "${XX${XXX}}"; assertEquals (Util.evalTokens (test, props), "${XX${XXX}}...
public static String evalTokens (String str, Properties props) { if (str == null) return str; if (props == null) return str; String result = str; Matcher m = m_substitutePattern.matcher (str); while (m.find ()) { String subsKey = m.group (1); String tgt = TOKEN_BEGIN + subsKey + TOKEN_END; String tgtVal = props.getProp...
Util { public static String evalTokens (String str, Properties props) { if (str == null) return str; if (props == null) return str; String result = str; Matcher m = m_substitutePattern.matcher (str); while (m.find ()) { String subsKey = m.group (1); String tgt = TOKEN_BEGIN + subsKey + TOKEN_END; String tgtVal = props....
Util { public static String evalTokens (String str, Properties props) { if (str == null) return str; if (props == null) return str; String result = str; Matcher m = m_substitutePattern.matcher (str); while (m.find ()) { String subsKey = m.group (1); String tgt = TOKEN_BEGIN + subsKey + TOKEN_END; String tgtVal = props....
Util { public static String evalTokens (String str, Properties props) { if (str == null) return str; if (props == null) return str; String result = str; Matcher m = m_substitutePattern.matcher (str); while (m.find ()) { String subsKey = m.group (1); String tgt = TOKEN_BEGIN + subsKey + TOKEN_END; String tgtVal = props....
Util { public static String evalTokens (String str, Properties props) { if (str == null) return str; if (props == null) return str; String result = str; Matcher m = m_substitutePattern.matcher (str); while (m.find ()) { String subsKey = m.group (1); String tgt = TOKEN_BEGIN + subsKey + TOKEN_END; String tgtVal = props....
@Test public void testSequence () throws InterruptedException { AdaptationTree root = new AdaptationTree<> (AdaptationExecutionOperatorT.SEQUENCE); root.addLeaf (new ExecutableTest (1)); root.addLeaf (new ExecutableTest (2)); root.addLeaf (new ExecutableTest (3)); CountDownLatch countdownLatch = new CountDownLatch (1);...
public void addLeaf (T root, T leaf) { addLeaf (root).addLeaf (leaf); }
AdaptationTree { public void addLeaf (T root, T leaf) { addLeaf (root).addLeaf (leaf); } }
AdaptationTree { public void addLeaf (T root, T leaf) { addLeaf (root).addLeaf (leaf); } AdaptationTree(T head); AdaptationTree(AdaptationExecutionOperatorT operator); }
AdaptationTree { public void addLeaf (T root, T leaf) { addLeaf (root).addLeaf (leaf); } AdaptationTree(T head); AdaptationTree(AdaptationExecutionOperatorT operator); void setId(String id); String getId(); void addLeaf(T root, T leaf); AdaptationTree<T> addLeaf(T leaf); AdaptationTree<T> setAsParent(T parentRoot); T ...
AdaptationTree { public void addLeaf (T root, T leaf) { addLeaf (root).addLeaf (leaf); } AdaptationTree(T head); AdaptationTree(AdaptationExecutionOperatorT operator); void setId(String id); String getId(); void addLeaf(T root, T leaf); AdaptationTree<T> addLeaf(T leaf); AdaptationTree<T> setAsParent(T parentRoot); T ...
@Test public void testSequenceFail () throws InterruptedException { AdaptationTree root = new AdaptationTree<> (AdaptationExecutionOperatorT.SEQUENCE_STOP_FAILURE); root.addLeaf (new ExecutableTest (1)); root.addLeaf (new ExecutableTest (2, false)); root.addLeaf (new ExecutableTest (3)); CountDownLatch countdownLatch =...
public void addLeaf (T root, T leaf) { addLeaf (root).addLeaf (leaf); }
AdaptationTree { public void addLeaf (T root, T leaf) { addLeaf (root).addLeaf (leaf); } }
AdaptationTree { public void addLeaf (T root, T leaf) { addLeaf (root).addLeaf (leaf); } AdaptationTree(T head); AdaptationTree(AdaptationExecutionOperatorT operator); }
AdaptationTree { public void addLeaf (T root, T leaf) { addLeaf (root).addLeaf (leaf); } AdaptationTree(T head); AdaptationTree(AdaptationExecutionOperatorT operator); void setId(String id); String getId(); void addLeaf(T root, T leaf); AdaptationTree<T> addLeaf(T leaf); AdaptationTree<T> setAsParent(T parentRoot); T ...
AdaptationTree { public void addLeaf (T root, T leaf) { addLeaf (root).addLeaf (leaf); } AdaptationTree(T head); AdaptationTree(AdaptationExecutionOperatorT operator); void setId(String id); String getId(); void addLeaf(T root, T leaf); AdaptationTree<T> addLeaf(T leaf); AdaptationTree<T> setAsParent(T parentRoot); T ...
@Test public void testSequenceSuccess () throws InterruptedException { AdaptationTree root = new AdaptationTree<> (AdaptationExecutionOperatorT.SEQUENCE_STOP_SUCCESS); root.addLeaf (new ExecutableTest (1)); root.addLeaf (new ExecutableTest (2, false)); root.addLeaf (new ExecutableTest (3)); CountDownLatch countdownLatc...
public void addLeaf (T root, T leaf) { addLeaf (root).addLeaf (leaf); }
AdaptationTree { public void addLeaf (T root, T leaf) { addLeaf (root).addLeaf (leaf); } }
AdaptationTree { public void addLeaf (T root, T leaf) { addLeaf (root).addLeaf (leaf); } AdaptationTree(T head); AdaptationTree(AdaptationExecutionOperatorT operator); }
AdaptationTree { public void addLeaf (T root, T leaf) { addLeaf (root).addLeaf (leaf); } AdaptationTree(T head); AdaptationTree(AdaptationExecutionOperatorT operator); void setId(String id); String getId(); void addLeaf(T root, T leaf); AdaptationTree<T> addLeaf(T leaf); AdaptationTree<T> setAsParent(T parentRoot); T ...
AdaptationTree { public void addLeaf (T root, T leaf) { addLeaf (root).addLeaf (leaf); } AdaptationTree(T head); AdaptationTree(AdaptationExecutionOperatorT operator); void setId(String id); String getId(); void addLeaf(T root, T leaf); AdaptationTree<T> addLeaf(T leaf); AdaptationTree<T> setAsParent(T parentRoot); T ...
@Test public void testParallel () throws InterruptedException { AdaptationTree root = new AdaptationTree<> (AdaptationExecutionOperatorT.PARALLEL); int number = 20; for (int i = 0; i < number; i++) { root.addLeaf (new ExecutableTest (i)); } CountDownLatch countdownLatch = new CountDownLatch (1); DefaultAdaptationExecut...
public void addLeaf (T root, T leaf) { addLeaf (root).addLeaf (leaf); }
AdaptationTree { public void addLeaf (T root, T leaf) { addLeaf (root).addLeaf (leaf); } }
AdaptationTree { public void addLeaf (T root, T leaf) { addLeaf (root).addLeaf (leaf); } AdaptationTree(T head); AdaptationTree(AdaptationExecutionOperatorT operator); }
AdaptationTree { public void addLeaf (T root, T leaf) { addLeaf (root).addLeaf (leaf); } AdaptationTree(T head); AdaptationTree(AdaptationExecutionOperatorT operator); void setId(String id); String getId(); void addLeaf(T root, T leaf); AdaptationTree<T> addLeaf(T leaf); AdaptationTree<T> setAsParent(T parentRoot); T ...
AdaptationTree { public void addLeaf (T root, T leaf) { addLeaf (root).addLeaf (leaf); } AdaptationTree(T head); AdaptationTree(AdaptationExecutionOperatorT operator); void setId(String id); String getId(); void addLeaf(T root, T leaf); AdaptationTree<T> addLeaf(T leaf); AdaptationTree<T> setAsParent(T parentRoot); T ...
@Test public void addPage() { dashboard.newPageBtn.click(); dashboard.txtPageName.setValue("Test"); dashboard.btnCreate.click(); assertEquals(dashboard.tabs.size(), 2); boolean test = false; for (int i = 0; i < dashboard.pageContentArea.getComponentCount(); i++) { if (dashboard.pageContentArea.getTab(i).getCaption().eq...
public void addPage(String pageName) { final HorizontalLayout newLayout = new HorizontalLayout(); DragAndDropWrapper layoutWrapper = new DragAndDropWrapper(newLayout); setDropHandler(newLayout, layoutWrapper); tabs.add(layoutWrapper); pageContentArea.addTab(layoutWrapper, pageName); pageContentArea.setSelectedTab(layou...
Dashboard extends VerticalLayout { public void addPage(String pageName) { final HorizontalLayout newLayout = new HorizontalLayout(); DragAndDropWrapper layoutWrapper = new DragAndDropWrapper(newLayout); setDropHandler(newLayout, layoutWrapper); tabs.add(layoutWrapper); pageContentArea.addTab(layoutWrapper, pageName); p...
Dashboard extends VerticalLayout { public void addPage(String pageName) { final HorizontalLayout newLayout = new HorizontalLayout(); DragAndDropWrapper layoutWrapper = new DragAndDropWrapper(newLayout); setDropHandler(newLayout, layoutWrapper); tabs.add(layoutWrapper); pageContentArea.addTab(layoutWrapper, pageName); p...
Dashboard extends VerticalLayout { public void addPage(String pageName) { final HorizontalLayout newLayout = new HorizontalLayout(); DragAndDropWrapper layoutWrapper = new DragAndDropWrapper(newLayout); setDropHandler(newLayout, layoutWrapper); tabs.add(layoutWrapper); pageContentArea.addTab(layoutWrapper, pageName); p...
Dashboard extends VerticalLayout { public void addPage(String pageName) { final HorizontalLayout newLayout = new HorizontalLayout(); DragAndDropWrapper layoutWrapper = new DragAndDropWrapper(newLayout); setDropHandler(newLayout, layoutWrapper); tabs.add(layoutWrapper); pageContentArea.addTab(layoutWrapper, pageName); p...
@Test public void runAction() throws Exception { StandaloneResource resource = StandaloneResourceProvider.instance ().acmeResourceForString("src/test/resources/acme/znn.acme"); IAcmeSystem sys = resource.getModel ().getSystems ().iterator ().next (); ZNNModelUpdateOperatorsImpl model = new ZNNModelUpdateOperatorsImpl(s...
@Override protected void runAction () { final ZNNModelUpdateOperatorsImpl model = m_modelCheckQ.poll (); if (model != null) { Stack<AcmeError> errors = new Stack<> (); IAcmeSystem system = model.getModelInstance (); if (m_clientsSelection != null && m_maliciousSelection != null) { NodeScopeLookup lookup = new NodeScope...
ZNNStateAnalyzer extends AbstractRainbowRunnable implements IRainbowAnalysis, IModelChangeBusSubscriberPort.IRainbowModelChangeCallback { @Override protected void runAction () { final ZNNModelUpdateOperatorsImpl model = m_modelCheckQ.poll (); if (model != null) { Stack<AcmeError> errors = new Stack<> (); IAcmeSystem sy...
ZNNStateAnalyzer extends AbstractRainbowRunnable implements IRainbowAnalysis, IModelChangeBusSubscriberPort.IRainbowModelChangeCallback { @Override protected void runAction () { final ZNNModelUpdateOperatorsImpl model = m_modelCheckQ.poll (); if (model != null) { Stack<AcmeError> errors = new Stack<> (); IAcmeSystem sy...
ZNNStateAnalyzer extends AbstractRainbowRunnable implements IRainbowAnalysis, IModelChangeBusSubscriberPort.IRainbowModelChangeCallback { @Override protected void runAction () { final ZNNModelUpdateOperatorsImpl model = m_modelCheckQ.poll (); if (model != null) { Stack<AcmeError> errors = new Stack<> (); IAcmeSystem sy...
ZNNStateAnalyzer extends AbstractRainbowRunnable implements IRainbowAnalysis, IModelChangeBusSubscriberPort.IRainbowModelChangeCallback { @Override protected void runAction () { final ZNNModelUpdateOperatorsImpl model = m_modelCheckQ.poll (); if (model != null) { Stack<AcmeError> errors = new Stack<> (); IAcmeSystem sy...
@Test public void testDoMatchDesired() throws Exception { GaugeDescription gdl = YamlUtil.loadGaugeSpecs(new File("src/test/resources/ServerEnablementGaugeTest/gauges.yml")); assertTrue(gdl.instDescList().size() == 1); GaugeInstanceDescription gd = gdl.instDescList().iterator().next(); Map<String, IRainbowOperation> ma...
private AcmeModelInstance getModel () { if (m_model == null) { m_model = (AcmeModelInstance) m_modelsPort.<IAcmeSystem>getModelInstance (new ModelReference (m_modelDesc .getName (), m_modelDesc.getType ())); } return m_model; }
ServerEnablementGauge extends RegularPatternGauge { private AcmeModelInstance getModel () { if (m_model == null) { m_model = (AcmeModelInstance) m_modelsPort.<IAcmeSystem>getModelInstance (new ModelReference (m_modelDesc .getName (), m_modelDesc.getType ())); } return m_model; } }
ServerEnablementGauge extends RegularPatternGauge { private AcmeModelInstance getModel () { if (m_model == null) { m_model = (AcmeModelInstance) m_modelsPort.<IAcmeSystem>getModelInstance (new ModelReference (m_modelDesc .getName (), m_modelDesc.getType ())); } return m_model; } ServerEnablementGauge(String id, long be...
ServerEnablementGauge extends RegularPatternGauge { private AcmeModelInstance getModel () { if (m_model == null) { m_model = (AcmeModelInstance) m_modelsPort.<IAcmeSystem>getModelInstance (new ModelReference (m_modelDesc .getName (), m_modelDesc.getType ())); } return m_model; } ServerEnablementGauge(String id, long be...
ServerEnablementGauge extends RegularPatternGauge { private AcmeModelInstance getModel () { if (m_model == null) { m_model = (AcmeModelInstance) m_modelsPort.<IAcmeSystem>getModelInstance (new ModelReference (m_modelDesc .getName (), m_modelDesc.getType ())); } return m_model; } ServerEnablementGauge(String id, long be...
@Test public void removePage() { addPage(); dashboard.removePageBtn.click(); assertEquals(dashboard.tabs.size(), 1); boolean test = false; for (int i = 0; i < dashboard.pageContentArea.getComponentCount(); i++) { if (dashboard.pageContentArea.getTab(i).getCaption().equals("Test")) { test = true; } } assertEquals(test, ...
public void removePage(int pageId) { for (int i = 0; i < pageWidgets.get(pageId).size(); i++) { viewControl.removeWidget(pageWidgets.get(pageId).get(i)); } pageWidgets.remove(pageId); pageContentArea.removeTab(pageContentArea.getTab(pageContentArea .getSelectedTab())); tabs.remove(pageId); }
Dashboard extends VerticalLayout { public void removePage(int pageId) { for (int i = 0; i < pageWidgets.get(pageId).size(); i++) { viewControl.removeWidget(pageWidgets.get(pageId).get(i)); } pageWidgets.remove(pageId); pageContentArea.removeTab(pageContentArea.getTab(pageContentArea .getSelectedTab())); tabs.remove(pag...
Dashboard extends VerticalLayout { public void removePage(int pageId) { for (int i = 0; i < pageWidgets.get(pageId).size(); i++) { viewControl.removeWidget(pageWidgets.get(pageId).get(i)); } pageWidgets.remove(pageId); pageContentArea.removeTab(pageContentArea.getTab(pageContentArea .getSelectedTab())); tabs.remove(pag...
Dashboard extends VerticalLayout { public void removePage(int pageId) { for (int i = 0; i < pageWidgets.get(pageId).size(); i++) { viewControl.removeWidget(pageWidgets.get(pageId).get(i)); } pageWidgets.remove(pageId); pageContentArea.removeTab(pageContentArea.getTab(pageContentArea .getSelectedTab())); tabs.remove(pag...
Dashboard extends VerticalLayout { public void removePage(int pageId) { for (int i = 0; i < pageWidgets.get(pageId).size(); i++) { viewControl.removeWidget(pageWidgets.get(pageId).get(i)); } pageWidgets.remove(pageId); pageContentArea.removeTab(pageContentArea.getTab(pageContentArea .getSelectedTab())); tabs.remove(pag...
@Test public void setPage() { for (int i = 0; i < 5; i++) { dashboard.newPageBtn.click(); dashboard.txtPageName.setValue("Test" + i); dashboard.btnCreate.click(); } assertEquals(dashboard.tabs.size(), 6); dashboard.setPage(3); assertEquals( dashboard.pageContentArea.getTab( dashboard.pageContentArea.getSelectedTab()) ....
public void setPage(int pageId) { pageContentArea.setSelectedTab(pageId); }
Dashboard extends VerticalLayout { public void setPage(int pageId) { pageContentArea.setSelectedTab(pageId); } }
Dashboard extends VerticalLayout { public void setPage(int pageId) { pageContentArea.setSelectedTab(pageId); } Dashboard(AbstractRainbowVaadinUI rui); }
Dashboard extends VerticalLayout { public void setPage(int pageId) { pageContentArea.setSelectedTab(pageId); } Dashboard(AbstractRainbowVaadinUI rui); void addPage(String pageName); void setPage(int pageId); void removePage(int pageId); void loadViewConfiguration(); void saveViewConfiguration(); void resetDashboard(); ...
Dashboard extends VerticalLayout { public void setPage(int pageId) { pageContentArea.setSelectedTab(pageId); } Dashboard(AbstractRainbowVaadinUI rui); void addPage(String pageName); void setPage(int pageId); void removePage(int pageId); void loadViewConfiguration(); void saveViewConfiguration(); void resetDashboard(); ...
@Test public void setPageOutsideBouds() { for (int i = 0; i < 5; i++) { dashboard.newPageBtn.click(); dashboard.txtPageName.setValue("Test" + i); dashboard.btnCreate.click(); } assertEquals(dashboard.tabs.size(), 6); dashboard.setPage(3); assertEquals( dashboard.pageContentArea.getTab( dashboard.pageContentArea.getSele...
public void setPage(int pageId) { pageContentArea.setSelectedTab(pageId); }
Dashboard extends VerticalLayout { public void setPage(int pageId) { pageContentArea.setSelectedTab(pageId); } }
Dashboard extends VerticalLayout { public void setPage(int pageId) { pageContentArea.setSelectedTab(pageId); } Dashboard(AbstractRainbowVaadinUI rui); }
Dashboard extends VerticalLayout { public void setPage(int pageId) { pageContentArea.setSelectedTab(pageId); } Dashboard(AbstractRainbowVaadinUI rui); void addPage(String pageName); void setPage(int pageId); void removePage(int pageId); void loadViewConfiguration(); void saveViewConfiguration(); void resetDashboard(); ...
Dashboard extends VerticalLayout { public void setPage(int pageId) { pageContentArea.setSelectedTab(pageId); } Dashboard(AbstractRainbowVaadinUI rui); void addPage(String pageName); void setPage(int pageId); void removePage(int pageId); void loadViewConfiguration(); void saveViewConfiguration(); void resetDashboard(); ...
@Test public void currentHistorical() { CheckBox currentCheckBox = timelineView.getCurrentCheckBox(); DateField timeDisplay = timelineView.getTimeDisplay(); CheckBox autoScrollCheckBox = timelineView.getAutoScrollCheckBox(); currentCheckBox.setValue(true); assertEquals(true, currentCheckBox.getValue()); assertEquals(tr...
boolean isCurrent() { return this.currentCheckBox.getValue(); }
TimelineView extends CustomComponent implements IUpdatableWidget { boolean isCurrent() { return this.currentCheckBox.getValue(); } }
TimelineView extends CustomComponent implements IUpdatableWidget { boolean isCurrent() { return this.currentCheckBox.getValue(); } TimelineView(ISystemViewProvider systemViewProvider); TimelineView(ISystemViewProvider systemViewProvider, Class<? extends Timeline> tlClass); }
TimelineView extends CustomComponent implements IUpdatableWidget { boolean isCurrent() { return this.currentCheckBox.getValue(); } TimelineView(ISystemViewProvider systemViewProvider); TimelineView(ISystemViewProvider systemViewProvider, Class<? extends Timeline> tlClass); @Override void update(); @Overri...
TimelineView extends CustomComponent implements IUpdatableWidget { boolean isCurrent() { return this.currentCheckBox.getValue(); } TimelineView(ISystemViewProvider systemViewProvider); TimelineView(ISystemViewProvider systemViewProvider, Class<? extends Timeline> tlClass); @Override void update(); @Overri...
@Test public void timelineViewTimeDisplay() { DateField timeDisplay = timelineView.getTimeDisplay(); Date date = new Date(); timelineView.setTimeDisplay(date); assertEquals(date, timeDisplay.getValue()); }
public void setTimeDisplay(Date date) { this.timeDisplay.setValue(date); }
TimelineView extends CustomComponent implements IUpdatableWidget { public void setTimeDisplay(Date date) { this.timeDisplay.setValue(date); } }
TimelineView extends CustomComponent implements IUpdatableWidget { public void setTimeDisplay(Date date) { this.timeDisplay.setValue(date); } TimelineView(ISystemViewProvider systemViewProvider); TimelineView(ISystemViewProvider systemViewProvider, Class<? extends Timeline> tlClass); }
TimelineView extends CustomComponent implements IUpdatableWidget { public void setTimeDisplay(Date date) { this.timeDisplay.setValue(date); } TimelineView(ISystemViewProvider systemViewProvider); TimelineView(ISystemViewProvider systemViewProvider, Class<? extends Timeline> tlClass); @Override void update...
TimelineView extends CustomComponent implements IUpdatableWidget { public void setTimeDisplay(Date date) { this.timeDisplay.setValue(date); } TimelineView(ISystemViewProvider systemViewProvider); TimelineView(ISystemViewProvider systemViewProvider, Class<? extends Timeline> tlClass); @Override void update...
@Test public void testGetInternalModel() throws RuntimeAggregatorException { System.out.println("getInternalModel"); AcmeRuntimeAggregator instance = new AcmeRuntimeAggregator(systemConfig, new DummyDatabaseConnector()); IModelInstance<IAcmeSystem> modelInstance = instance.getInternalModel(); assertNotNull(modelInstanc...
@Override public IModelInstance<IAcmeSystem> getInternalModel() { return internalModel; }
AcmeRuntimeAggregator implements IRuntimeAggregator<IAcmeSystem> { @Override public IModelInstance<IAcmeSystem> getInternalModel() { return internalModel; } }
AcmeRuntimeAggregator implements IRuntimeAggregator<IAcmeSystem> { @Override public IModelInstance<IAcmeSystem> getInternalModel() { return internalModel; } AcmeRuntimeAggregator(ISystemConfiguration config); AcmeRuntimeAggregator(ISystemConfiguration config, IDatabaseConnector dbConn); }
AcmeRuntimeAggregator implements IRuntimeAggregator<IAcmeSystem> { @Override public IModelInstance<IAcmeSystem> getInternalModel() { return internalModel; } AcmeRuntimeAggregator(ISystemConfiguration config); AcmeRuntimeAggregator(ISystemConfiguration config, IDatabaseConnector dbConn); @Override void star...
AcmeRuntimeAggregator implements IRuntimeAggregator<IAcmeSystem> { @Override public IModelInstance<IAcmeSystem> getInternalModel() { return internalModel; } AcmeRuntimeAggregator(ISystemConfiguration config); AcmeRuntimeAggregator(ISystemConfiguration config, IDatabaseConnector dbConn); @Override void star...
@Test public void testCopyInternalModel() throws Exception { System.out.println("copyInternalModel"); AcmeRuntimeAggregator instance = new AcmeRuntimeAggregator(systemConfig, new DummyDatabaseConnector()); double value1 = 99.9; double value2 = 0.0; IModelInstance<IAcmeSystem> modelInstance = instance.getInternalModel()...
@Override public IModelInstance<IAcmeSystem> copyInternalModel() throws RainbowCopyException { synchronized (copyLock) { return internalModel.copyModelInstance("Acme"); } }
AcmeRuntimeAggregator implements IRuntimeAggregator<IAcmeSystem> { @Override public IModelInstance<IAcmeSystem> copyInternalModel() throws RainbowCopyException { synchronized (copyLock) { return internalModel.copyModelInstance("Acme"); } } }
AcmeRuntimeAggregator implements IRuntimeAggregator<IAcmeSystem> { @Override public IModelInstance<IAcmeSystem> copyInternalModel() throws RainbowCopyException { synchronized (copyLock) { return internalModel.copyModelInstance("Acme"); } } AcmeRuntimeAggregator(ISystemConfiguration config); AcmeRuntimeAggregator(ISyst...
AcmeRuntimeAggregator implements IRuntimeAggregator<IAcmeSystem> { @Override public IModelInstance<IAcmeSystem> copyInternalModel() throws RainbowCopyException { synchronized (copyLock) { return internalModel.copyModelInstance("Acme"); } } AcmeRuntimeAggregator(ISystemConfiguration config); AcmeRuntimeAggregator(ISyst...
AcmeRuntimeAggregator implements IRuntimeAggregator<IAcmeSystem> { @Override public IModelInstance<IAcmeSystem> copyInternalModel() throws RainbowCopyException { synchronized (copyLock) { return internalModel.copyModelInstance("Acme"); } } AcmeRuntimeAggregator(ISystemConfiguration config); AcmeRuntimeAggregator(ISyst...
@Test public void testGetEventBuffer() throws RuntimeAggregatorException { System.out.println("getEventBuffer"); AcmeRuntimeAggregator instance = new AcmeRuntimeAggregator(systemConfig, new DummyDatabaseConnector()); IEventBuffer buffer = instance.getEventBuffer(); assertNotNull(buffer); }
@Override public IEventBuffer getEventBuffer() { return eventBuffer; }
AcmeRuntimeAggregator implements IRuntimeAggregator<IAcmeSystem> { @Override public IEventBuffer getEventBuffer() { return eventBuffer; } }
AcmeRuntimeAggregator implements IRuntimeAggregator<IAcmeSystem> { @Override public IEventBuffer getEventBuffer() { return eventBuffer; } AcmeRuntimeAggregator(ISystemConfiguration config); AcmeRuntimeAggregator(ISystemConfiguration config, IDatabaseConnector dbConn); }
AcmeRuntimeAggregator implements IRuntimeAggregator<IAcmeSystem> { @Override public IEventBuffer getEventBuffer() { return eventBuffer; } AcmeRuntimeAggregator(ISystemConfiguration config); AcmeRuntimeAggregator(ISystemConfiguration config, IDatabaseConnector dbConn); @Override void start(); @Override void...
AcmeRuntimeAggregator implements IRuntimeAggregator<IAcmeSystem> { @Override public IEventBuffer getEventBuffer() { return eventBuffer; } AcmeRuntimeAggregator(ISystemConfiguration config); AcmeRuntimeAggregator(ISystemConfiguration config, IDatabaseConnector dbConn); @Override void start(); @Override void...
@Test public void loadY() throws Exception { String input = "yes"; InputStream in = new ByteArrayInputStream(input.getBytes()); System.setIn(in); configLoader.loadConfiguration(); }
public boolean loadConfiguration() throws IOException { for (Map.Entry<String, Object> entry : defaultConfig.entrySet()) { System.out.printf("'%s' will be initiated as: (%s)%n", entry.getKey(), entry.getValue()); } System.out.println("Is it OK(y/n)?"); Scanner scanner = new Scanner(System.in); String answer = scanner.n...
UIConfigurationLoader extends ConfigurationLoader { public boolean loadConfiguration() throws IOException { for (Map.Entry<String, Object> entry : defaultConfig.entrySet()) { System.out.printf("'%s' will be initiated as: (%s)%n", entry.getKey(), entry.getValue()); } System.out.println("Is it OK(y/n)?"); Scanner scanner...
UIConfigurationLoader extends ConfigurationLoader { public boolean loadConfiguration() throws IOException { for (Map.Entry<String, Object> entry : defaultConfig.entrySet()) { System.out.printf("'%s' will be initiated as: (%s)%n", entry.getKey(), entry.getValue()); } System.out.println("Is it OK(y/n)?"); Scanner scanner...
UIConfigurationLoader extends ConfigurationLoader { public boolean loadConfiguration() throws IOException { for (Map.Entry<String, Object> entry : defaultConfig.entrySet()) { System.out.printf("'%s' will be initiated as: (%s)%n", entry.getKey(), entry.getValue()); } System.out.println("Is it OK(y/n)?"); Scanner scanner...
UIConfigurationLoader extends ConfigurationLoader { public boolean loadConfiguration() throws IOException { for (Map.Entry<String, Object> entry : defaultConfig.entrySet()) { System.out.printf("'%s' will be initiated as: (%s)%n", entry.getKey(), entry.getValue()); } System.out.println("Is it OK(y/n)?"); Scanner scanner...
@Test public void testProcessEvent() throws EventProcessingException, RainbowException, RuntimeAggregatorException { System.out.println("processEvent"); AcmeRuntimeAggregator instance = new AcmeRuntimeAggregator(systemConfig, new DummyDatabaseConnector()); String channel = "MODEL_CHANGE"; Float expRes = (float) 99.9; I...
@Override synchronized public void processEvent(String channel, IRainbowMessage event) throws EventProcessingException { if (!isRunning) { return; } switch (channel) { case "MODEL_CHANGE": processModelUpdate(event); break; case "MODEL_DS": case "MODEL_US": processStreamingEvent(channel, event); break; default: throw ne...
AcmeRuntimeAggregator implements IRuntimeAggregator<IAcmeSystem> { @Override synchronized public void processEvent(String channel, IRainbowMessage event) throws EventProcessingException { if (!isRunning) { return; } switch (channel) { case "MODEL_CHANGE": processModelUpdate(event); break; case "MODEL_DS": case "MODEL_U...
AcmeRuntimeAggregator implements IRuntimeAggregator<IAcmeSystem> { @Override synchronized public void processEvent(String channel, IRainbowMessage event) throws EventProcessingException { if (!isRunning) { return; } switch (channel) { case "MODEL_CHANGE": processModelUpdate(event); break; case "MODEL_DS": case "MODEL_U...
AcmeRuntimeAggregator implements IRuntimeAggregator<IAcmeSystem> { @Override synchronized public void processEvent(String channel, IRainbowMessage event) throws EventProcessingException { if (!isRunning) { return; } switch (channel) { case "MODEL_CHANGE": processModelUpdate(event); break; case "MODEL_DS": case "MODEL_U...
AcmeRuntimeAggregator implements IRuntimeAggregator<IAcmeSystem> { @Override synchronized public void processEvent(String channel, IRainbowMessage event) throws EventProcessingException { if (!isRunning) { return; } switch (channel) { case "MODEL_CHANGE": processModelUpdate(event); break; case "MODEL_DS": case "MODEL_U...
@Test public void testTimestampCoversion() throws RainbowException, RuntimeAggregatorException { System.out.println("getEventTimestamp"); AcmeRuntimeAggregator instance = new AcmeRuntimeAggregator(systemConfig, new DummyDatabaseConnector()); IRainbowMessage event = new RainbowESEBMessage(); Date expResult = new Date(Sy...
Date getEventTimestamp(IRainbowMessage event) { long sent = Long.parseLong((String) event.getProperty(ESEBConstants.MSG_SENT)); Date timestamp = new Date(sent); return timestamp; }
AcmeRuntimeAggregator implements IRuntimeAggregator<IAcmeSystem> { Date getEventTimestamp(IRainbowMessage event) { long sent = Long.parseLong((String) event.getProperty(ESEBConstants.MSG_SENT)); Date timestamp = new Date(sent); return timestamp; } }
AcmeRuntimeAggregator implements IRuntimeAggregator<IAcmeSystem> { Date getEventTimestamp(IRainbowMessage event) { long sent = Long.parseLong((String) event.getProperty(ESEBConstants.MSG_SENT)); Date timestamp = new Date(sent); return timestamp; } AcmeRuntimeAggregator(ISystemConfiguration config); AcmeRuntimeAggregat...
AcmeRuntimeAggregator implements IRuntimeAggregator<IAcmeSystem> { Date getEventTimestamp(IRainbowMessage event) { long sent = Long.parseLong((String) event.getProperty(ESEBConstants.MSG_SENT)); Date timestamp = new Date(sent); return timestamp; } AcmeRuntimeAggregator(ISystemConfiguration config); AcmeRuntimeAggregat...
AcmeRuntimeAggregator implements IRuntimeAggregator<IAcmeSystem> { Date getEventTimestamp(IRainbowMessage event) { long sent = Long.parseLong((String) event.getProperty(ESEBConstants.MSG_SENT)); Date timestamp = new Date(sent); return timestamp; } AcmeRuntimeAggregator(ISystemConfiguration config); AcmeRuntimeAggregat...
@Test public void testProcessStreamingEvent() throws RuntimeAggregatorException, RainbowException, EventProcessingException { System.out.println("processStreamingEvent"); AcmeRuntimeAggregator instance = new AcmeRuntimeAggregator(systemConfig, new DummyDatabaseConnector()); instance.start(); IEventBuffer buffer = insta...
protected void processStreamingEvent(String channel, IRainbowMessage event) { eventBuffer.add(event); databaseConnector.writeEvent(channel, event, getEventTimestamp(event)); }
AcmeRuntimeAggregator implements IRuntimeAggregator<IAcmeSystem> { protected void processStreamingEvent(String channel, IRainbowMessage event) { eventBuffer.add(event); databaseConnector.writeEvent(channel, event, getEventTimestamp(event)); } }
AcmeRuntimeAggregator implements IRuntimeAggregator<IAcmeSystem> { protected void processStreamingEvent(String channel, IRainbowMessage event) { eventBuffer.add(event); databaseConnector.writeEvent(channel, event, getEventTimestamp(event)); } AcmeRuntimeAggregator(ISystemConfiguration config); AcmeRuntimeAggregator(IS...
AcmeRuntimeAggregator implements IRuntimeAggregator<IAcmeSystem> { protected void processStreamingEvent(String channel, IRainbowMessage event) { eventBuffer.add(event); databaseConnector.writeEvent(channel, event, getEventTimestamp(event)); } AcmeRuntimeAggregator(ISystemConfiguration config); AcmeRuntimeAggregator(IS...
AcmeRuntimeAggregator implements IRuntimeAggregator<IAcmeSystem> { protected void processStreamingEvent(String channel, IRainbowMessage event) { eventBuffer.add(event); databaseConnector.writeEvent(channel, event, getEventTimestamp(event)); } AcmeRuntimeAggregator(ISystemConfiguration config); AcmeRuntimeAggregator(IS...
@Test public void testDrainToCollection() throws RainbowException { System.out.println("drainToCollection"); List<IRainbowMessage> collection = new ArrayList<>(); EventBuffer instance = new EventBuffer(10); instance.activate(); IRainbowMessage event1 = new RainbowESEBMessage(); IRainbowMessage event2 = new RainbowESEBM...
@Override public int drainToCollection(Collection<IRainbowMessage> collection) { return queue.drainTo(collection); }
EventBuffer implements IEventBuffer { @Override public int drainToCollection(Collection<IRainbowMessage> collection) { return queue.drainTo(collection); } }
EventBuffer implements IEventBuffer { @Override public int drainToCollection(Collection<IRainbowMessage> collection) { return queue.drainTo(collection); } EventBuffer(int size); }
EventBuffer implements IEventBuffer { @Override public int drainToCollection(Collection<IRainbowMessage> collection) { return queue.drainTo(collection); } EventBuffer(int size); @Override int drainToCollection(Collection<IRainbowMessage> collection); @Override void add(IRainbowMessage event); @Override void clear(); @O...
EventBuffer implements IEventBuffer { @Override public int drainToCollection(Collection<IRainbowMessage> collection) { return queue.drainTo(collection); } EventBuffer(int size); @Override int drainToCollection(Collection<IRainbowMessage> collection); @Override void add(IRainbowMessage event); @Override void clear(); @O...
@Test public void testAdd() throws RainbowException { System.out.println("add"); IRainbowMessage event1 = new RainbowESEBMessage(); IRainbowMessage event2 = new RainbowESEBMessage(); event1.setProperty(ESEBConstants.MSG_CHANNEL_KEY, "MODEL_DS"); event2.setProperty(ESEBConstants.MSG_CHANNEL_KEY, "MODEL_US"); EventBuffer...
@Override public void add(IRainbowMessage event) { if (isActive) { if (!queue.offer(event)) { Logger.getLogger(EventBuffer.class.getName()).warning( "Cannot add an event. The buffer is full."); } } }
EventBuffer implements IEventBuffer { @Override public void add(IRainbowMessage event) { if (isActive) { if (!queue.offer(event)) { Logger.getLogger(EventBuffer.class.getName()).warning( "Cannot add an event. The buffer is full."); } } } }
EventBuffer implements IEventBuffer { @Override public void add(IRainbowMessage event) { if (isActive) { if (!queue.offer(event)) { Logger.getLogger(EventBuffer.class.getName()).warning( "Cannot add an event. The buffer is full."); } } } EventBuffer(int size); }
EventBuffer implements IEventBuffer { @Override public void add(IRainbowMessage event) { if (isActive) { if (!queue.offer(event)) { Logger.getLogger(EventBuffer.class.getName()).warning( "Cannot add an event. The buffer is full."); } } } EventBuffer(int size); @Override int drainToCollection(Collection<IRainbowMessage>...
EventBuffer implements IEventBuffer { @Override public void add(IRainbowMessage event) { if (isActive) { if (!queue.offer(event)) { Logger.getLogger(EventBuffer.class.getName()).warning( "Cannot add an event. The buffer is full."); } } } EventBuffer(int size); @Override int drainToCollection(Collection<IRainbowMessage>...
@Test public void testGetRainbowHost() throws IOException { System.out.println("getRainbowHost"); String expResult = "127.0.0.1"; String result = instance.getRainbowHost(); assertEquals(expResult, result); }
@Override public String getRainbowHost() { String prop = getProperty("rainbow.host"); return prop; }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public String getRainbowHost() { String prop = getProperty("rainbow.host"); return prop; } }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public String getRainbowHost() { String prop = getProperty("rainbow.host"); return prop; } SystemConfiguration(String filename); }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public String getRainbowHost() { String prop = getProperty("rainbow.host"); return prop; } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String host); @Override short getRa...
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public String getRainbowHost() { String prop = getProperty("rainbow.host"); return prop; } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String host); @Override short getRa...
@Test public void testGetRainbowPort() { System.out.println("getRainbowPort"); short expResult = 1100; short result = instance.getRainbowPort(); assertEquals(expResult, result); }
@Override public short getRainbowPort() { String prop = getProperty("rainbow.port"); return Short.valueOf(prop); }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public short getRainbowPort() { String prop = getProperty("rainbow.port"); return Short.valueOf(prop); } }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public short getRainbowPort() { String prop = getProperty("rainbow.port"); return Short.valueOf(prop); } SystemConfiguration(String filename); }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public short getRainbowPort() { String prop = getProperty("rainbow.port"); return Short.valueOf(prop); } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String host); @Overri...
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public short getRainbowPort() { String prop = getProperty("rainbow.port"); return Short.valueOf(prop); } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String host); @Overri...
@Test public void testGetModelPath() { System.out.println("getModelPath"); String expResult = "ZNewsSys.acme"; String result = instance.getModelPath(); assertEquals(expResult, result); }
@Override public String getModelPath() { String prop = getProperty("ingestion.model.path"); return prop; }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public String getModelPath() { String prop = getProperty("ingestion.model.path"); return prop; } }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public String getModelPath() { String prop = getProperty("ingestion.model.path"); return prop; } SystemConfiguration(String filename); }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public String getModelPath() { String prop = getProperty("ingestion.model.path"); return prop; } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String host); @Override short...
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public String getModelPath() { String prop = getProperty("ingestion.model.path"); return prop; } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String host); @Override short...
@Test public void testGetNode() { System.out.println("getNode"); String expResult = "127.0.0.1"; String result = instance.getNode(); assertEquals(expResult, result); }
@Override public String getNode() { String prop = getProperty("storage.cassandra.node"); return prop; }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public String getNode() { String prop = getProperty("storage.cassandra.node"); return prop; } }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public String getNode() { String prop = getProperty("storage.cassandra.node"); return prop; } SystemConfiguration(String filename); }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public String getNode() { String prop = getProperty("storage.cassandra.node"); return prop; } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String host); @Override short ge...
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public String getNode() { String prop = getProperty("storage.cassandra.node"); return prop; } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String host); @Override short ge...
@Test public void testIsAttached() { System.out.println("isAttached"); boolean expResult = true; boolean result = instance.isAttached(); assertEquals(expResult, result); }
@Override public boolean isAttached() { String prop = getProperty("ingestion.attach.onstartup"); return Boolean.valueOf(prop); }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public boolean isAttached() { String prop = getProperty("ingestion.attach.onstartup"); return Boolean.valueOf(prop); } }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public boolean isAttached() { String prop = getProperty("ingestion.attach.onstartup"); return Boolean.valueOf(prop); } SystemConfiguration(String filename); }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public boolean isAttached() { String prop = getProperty("ingestion.attach.onstartup"); return Boolean.valueOf(prop); } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String ...
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public boolean isAttached() { String prop = getProperty("ingestion.attach.onstartup"); return Boolean.valueOf(prop); } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String ...
@Test public void loadN() throws Exception { String input = "no"; InputStream in = new ByteArrayInputStream(input.getBytes()); System.setIn(in); configLoader.loadConfiguration(); tearDown(); }
public boolean loadConfiguration() throws IOException { for (Map.Entry<String, Object> entry : defaultConfig.entrySet()) { System.out.printf("'%s' will be initiated as: (%s)%n", entry.getKey(), entry.getValue()); } System.out.println("Is it OK(y/n)?"); Scanner scanner = new Scanner(System.in); String answer = scanner.n...
UIConfigurationLoader extends ConfigurationLoader { public boolean loadConfiguration() throws IOException { for (Map.Entry<String, Object> entry : defaultConfig.entrySet()) { System.out.printf("'%s' will be initiated as: (%s)%n", entry.getKey(), entry.getValue()); } System.out.println("Is it OK(y/n)?"); Scanner scanner...
UIConfigurationLoader extends ConfigurationLoader { public boolean loadConfiguration() throws IOException { for (Map.Entry<String, Object> entry : defaultConfig.entrySet()) { System.out.printf("'%s' will be initiated as: (%s)%n", entry.getKey(), entry.getValue()); } System.out.println("Is it OK(y/n)?"); Scanner scanner...
UIConfigurationLoader extends ConfigurationLoader { public boolean loadConfiguration() throws IOException { for (Map.Entry<String, Object> entry : defaultConfig.entrySet()) { System.out.printf("'%s' will be initiated as: (%s)%n", entry.getKey(), entry.getValue()); } System.out.println("Is it OK(y/n)?"); Scanner scanner...
UIConfigurationLoader extends ConfigurationLoader { public boolean loadConfiguration() throws IOException { for (Map.Entry<String, Object> entry : defaultConfig.entrySet()) { System.out.printf("'%s' will be initiated as: (%s)%n", entry.getKey(), entry.getValue()); } System.out.println("Is it OK(y/n)?"); Scanner scanner...
@Test public void testSetAttached() { System.out.println("setAttached"); boolean attached = false; instance.setAttached(attached); boolean result = instance.isAttached(); assertEquals(attached, result); }
@Override public void setAttached(boolean attached) { setProperty("ingestion.attach.onstartup", Boolean.toString(attached)); }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public void setAttached(boolean attached) { setProperty("ingestion.attach.onstartup", Boolean.toString(attached)); } }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public void setAttached(boolean attached) { setProperty("ingestion.attach.onstartup", Boolean.toString(attached)); } SystemConfiguration(String filename); }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public void setAttached(boolean attached) { setProperty("ingestion.attach.onstartup", Boolean.toString(attached)); } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String ho...
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public void setAttached(boolean attached) { setProperty("ingestion.attach.onstartup", Boolean.toString(attached)); } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String ho...
@Test public void testSetRainbowHost() { System.out.println("setRainbowHost"); String host = "192.168.0.1"; instance.setRainbowHost(host); String result = instance.getRainbowHost(); assertEquals(host, result); }
@Override public void setRainbowHost(String host) { setProperty("rainbow.host", host); }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public void setRainbowHost(String host) { setProperty("rainbow.host", host); } }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public void setRainbowHost(String host) { setProperty("rainbow.host", host); } SystemConfiguration(String filename); }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public void setRainbowHost(String host) { setProperty("rainbow.host", host); } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String host); @Override short getRainbowPort();...
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public void setRainbowHost(String host) { setProperty("rainbow.host", host); } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String host); @Override short getRainbowPort();...
@Test public void testSetRainbowPort() { System.out.println("setRainbowPort"); short port = 2200; instance.setRainbowPort(port); short result = instance.getRainbowPort(); assertEquals(port, result); }
@Override public void setRainbowPort(short port) { setProperty("rainbow.port", Short.toString(port)); }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public void setRainbowPort(short port) { setProperty("rainbow.port", Short.toString(port)); } }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public void setRainbowPort(short port) { setProperty("rainbow.port", Short.toString(port)); } SystemConfiguration(String filename); }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public void setRainbowPort(short port) { setProperty("rainbow.port", Short.toString(port)); } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String host); @Override short ge...
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public void setRainbowPort(short port) { setProperty("rainbow.port", Short.toString(port)); } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String host); @Override short ge...
@Test public void testSetModelPath() { System.out.println("setModelPath"); String path = "Model.acme"; instance.setModelPath(path); String result = instance.getModelPath(); assertEquals(path, result); }
@Override public void setModelPath(String path) { setProperty("ingestion.model.path", path); }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public void setModelPath(String path) { setProperty("ingestion.model.path", path); } }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public void setModelPath(String path) { setProperty("ingestion.model.path", path); } SystemConfiguration(String filename); }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public void setModelPath(String path) { setProperty("ingestion.model.path", path); } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String host); @Override short getRainbowP...
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public void setModelPath(String path) { setProperty("ingestion.model.path", path); } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String host); @Override short getRainbowP...
@Test public void testSetNode() { System.out.println("setNode"); String node = ""; instance.setNode(node); String result = instance.getNode(); assertEquals(result, result); }
@Override public void setNode(String node) { setProperty("storage.cassandra.node", node); }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public void setNode(String node) { setProperty("storage.cassandra.node", node); } }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public void setNode(String node) { setProperty("storage.cassandra.node", node); } SystemConfiguration(String filename); }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public void setNode(String node) { setProperty("storage.cassandra.node", node); } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String host); @Override short getRainbowPort...
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public void setNode(String node) { setProperty("storage.cassandra.node", node); } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String host); @Override short getRainbowPort...
@Test public void testGetConfigDir() { System.out.println("getConfigDir"); String expResult = "./"; String result = instance.getConfigDir(); assertEquals(expResult, result); }
@Override public String getConfigDir() { return configDir; }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public String getConfigDir() { return configDir; } }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public String getConfigDir() { return configDir; } SystemConfiguration(String filename); }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public String getConfigDir() { return configDir; } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String host); @Override short getRainbowPort(); @Override void setRainbowPo...
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public String getConfigDir() { return configDir; } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String host); @Override short getRainbowPort(); @Override void setRainbowPo...
@Test public void testSetConfigDir() { System.out.println("setConfigDir"); String path = "dir"; instance.setConfigDir(path); String result = instance.getConfigDir(); assertEquals(path, result); }
@Override public void setConfigDir(String path) { configDir = path; }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public void setConfigDir(String path) { configDir = path; } }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public void setConfigDir(String path) { configDir = path; } SystemConfiguration(String filename); }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public void setConfigDir(String path) { configDir = path; } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String host); @Override short getRainbowPort(); @Override void set...
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public void setConfigDir(String path) { configDir = path; } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String host); @Override short getRainbowPort(); @Override void set...
@Test public void testGetSnapshotRate() { System.out.println("getSnapshotRate"); int expResult = 10; int result = instance.getSnapshotRate(); assertEquals(expResult, result); }
@Override public int getSnapshotRate() { String prop = getProperty("ingestion.snapshot.rate"); return Integer.valueOf(prop); }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public int getSnapshotRate() { String prop = getProperty("ingestion.snapshot.rate"); return Integer.valueOf(prop); } }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public int getSnapshotRate() { String prop = getProperty("ingestion.snapshot.rate"); return Integer.valueOf(prop); } SystemConfiguration(String filename); }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public int getSnapshotRate() { String prop = getProperty("ingestion.snapshot.rate"); return Integer.valueOf(prop); } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String ho...
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public int getSnapshotRate() { String prop = getProperty("ingestion.snapshot.rate"); return Integer.valueOf(prop); } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String ho...
@Test public void testSetSnapshotRate() { System.out.println("setSnapshotRate"); int rate = 100; instance.setSnapshotRate(rate); int result = instance.getSnapshotRate(); assertEquals(rate, result); }
@Override public void setSnapshotRate(int rate) { setProperty("ingestion.snapshot.rate", Integer.toString(rate)); }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public void setSnapshotRate(int rate) { setProperty("ingestion.snapshot.rate", Integer.toString(rate)); } }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public void setSnapshotRate(int rate) { setProperty("ingestion.snapshot.rate", Integer.toString(rate)); } SystemConfiguration(String filename); }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public void setSnapshotRate(int rate) { setProperty("ingestion.snapshot.rate", Integer.toString(rate)); } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String host); @Overr...
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public void setSnapshotRate(int rate) { setProperty("ingestion.snapshot.rate", Integer.toString(rate)); } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String host); @Overr...
@Test public void testIsModelLocal() { System.out.println("isModelLocal"); boolean expResult = true; boolean result = instance.isModelLocal(); assertEquals(expResult, result); instance.remove("ingestion.model.local"); expResult = false; result = instance.isModelLocal(); assertEquals(expResult, result); }
@Override public boolean isModelLocal() { String prop = getProperty("ingestion.model.local", "false"); return Boolean.valueOf(prop); }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public boolean isModelLocal() { String prop = getProperty("ingestion.model.local", "false"); return Boolean.valueOf(prop); } }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public boolean isModelLocal() { String prop = getProperty("ingestion.model.local", "false"); return Boolean.valueOf(prop); } SystemConfiguration(String filename); }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public boolean isModelLocal() { String prop = getProperty("ingestion.model.local", "false"); return Boolean.valueOf(prop); } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(S...
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public boolean isModelLocal() { String prop = getProperty("ingestion.model.local", "false"); return Boolean.valueOf(prop); } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(S...
@Test public void loadOther() throws Exception { String input = "other\nother\nother"; InputStream in = new ByteArrayInputStream(input.getBytes()); System.setIn(in); configLoader.loadConfiguration(); }
public boolean loadConfiguration() throws IOException { for (Map.Entry<String, Object> entry : defaultConfig.entrySet()) { System.out.printf("'%s' will be initiated as: (%s)%n", entry.getKey(), entry.getValue()); } System.out.println("Is it OK(y/n)?"); Scanner scanner = new Scanner(System.in); String answer = scanner.n...
UIConfigurationLoader extends ConfigurationLoader { public boolean loadConfiguration() throws IOException { for (Map.Entry<String, Object> entry : defaultConfig.entrySet()) { System.out.printf("'%s' will be initiated as: (%s)%n", entry.getKey(), entry.getValue()); } System.out.println("Is it OK(y/n)?"); Scanner scanner...
UIConfigurationLoader extends ConfigurationLoader { public boolean loadConfiguration() throws IOException { for (Map.Entry<String, Object> entry : defaultConfig.entrySet()) { System.out.printf("'%s' will be initiated as: (%s)%n", entry.getKey(), entry.getValue()); } System.out.println("Is it OK(y/n)?"); Scanner scanner...
UIConfigurationLoader extends ConfigurationLoader { public boolean loadConfiguration() throws IOException { for (Map.Entry<String, Object> entry : defaultConfig.entrySet()) { System.out.printf("'%s' will be initiated as: (%s)%n", entry.getKey(), entry.getValue()); } System.out.println("Is it OK(y/n)?"); Scanner scanner...
UIConfigurationLoader extends ConfigurationLoader { public boolean loadConfiguration() throws IOException { for (Map.Entry<String, Object> entry : defaultConfig.entrySet()) { System.out.printf("'%s' will be initiated as: (%s)%n", entry.getKey(), entry.getValue()); } System.out.println("Is it OK(y/n)?"); Scanner scanner...
@Test public void testSetModelLocal() { System.out.println("setModelLocal"); boolean local = false; instance.setModelLocal(local); boolean result = instance.isModelLocal(); assertEquals(local, result); }
@Override public void setModelLocal(boolean local) { setProperty("ingestion.model.local", Boolean.toString(local)); }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public void setModelLocal(boolean local) { setProperty("ingestion.model.local", Boolean.toString(local)); } }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public void setModelLocal(boolean local) { setProperty("ingestion.model.local", Boolean.toString(local)); } SystemConfiguration(String filename); }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public void setModelLocal(boolean local) { setProperty("ingestion.model.local", Boolean.toString(local)); } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String host); @Ove...
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public void setModelLocal(boolean local) { setProperty("ingestion.model.local", Boolean.toString(local)); } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String host); @Ove...
@Test public void testGetModelName() { System.out.println("getModelName"); String expResult = "ZNewsSys"; String result = instance.getModelName(); assertEquals(expResult, result); }
@Override public String getModelName() { return getProperty("ingestion.model.name"); }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public String getModelName() { return getProperty("ingestion.model.name"); } }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public String getModelName() { return getProperty("ingestion.model.name"); } SystemConfiguration(String filename); }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public String getModelName() { return getProperty("ingestion.model.name"); } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String host); @Override short getRainbowPort(); @...
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public String getModelName() { return getProperty("ingestion.model.name"); } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String host); @Override short getRainbowPort(); @...
@Test public void testSetModelName() { System.out.println("setModelName"); String name = "ZNN"; instance.setModelName(name); String result = instance.getModelName(); assertEquals(name, result); }
@Override public void setModelName(String name) { setProperty("ingestion.model.name", name); }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public void setModelName(String name) { setProperty("ingestion.model.name", name); } }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public void setModelName(String name) { setProperty("ingestion.model.name", name); } SystemConfiguration(String filename); }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public void setModelName(String name) { setProperty("ingestion.model.name", name); } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String host); @Override short getRainbowP...
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public void setModelName(String name) { setProperty("ingestion.model.name", name); } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String host); @Override short getRainbowP...
@Test public void testGetModelFactoryClass() { System.out.println("getModelFactoryClass"); String expResult = "edu.cmu.rainbow_ui.ingestion.AcmeInternalCommandFactory"; String result = instance.getModelFactoryClass(); assertEquals(expResult, result); }
@Override public String getModelFactoryClass() { return getProperty("ingestion.model.factory"); }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public String getModelFactoryClass() { return getProperty("ingestion.model.factory"); } }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public String getModelFactoryClass() { return getProperty("ingestion.model.factory"); } SystemConfiguration(String filename); }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public String getModelFactoryClass() { return getProperty("ingestion.model.factory"); } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String host); @Override short getRainb...
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public String getModelFactoryClass() { return getProperty("ingestion.model.factory"); } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String host); @Override short getRainb...
@Test public void testSetModelFactoryClass() { System.out.println("setModelFactoryClass"); String cls = "org.sa.rainbow.model.acme.znn.commands.ZNNCommandFactory"; instance.setModelFactoryClass(cls); String result = instance.getModelFactoryClass(); assertEquals(cls, result); }
@Override public void setModelFactoryClass(String cls) { setProperty("ingestion.model.factory", cls); }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public void setModelFactoryClass(String cls) { setProperty("ingestion.model.factory", cls); } }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public void setModelFactoryClass(String cls) { setProperty("ingestion.model.factory", cls); } SystemConfiguration(String filename); }
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public void setModelFactoryClass(String cls) { setProperty("ingestion.model.factory", cls); } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String host); @Override short ge...
SystemConfiguration extends Properties implements ISystemConfiguration { @Override public void setModelFactoryClass(String cls) { setProperty("ingestion.model.factory", cls); } SystemConfiguration(String filename); @Override String getRainbowHost(); @Override void setRainbowHost(String host); @Override short ge...
@Test public void testgetModelState() { IModelInstance<?> modelstate = null; Calendar cal = Calendar.getInstance(); Date date = cal.getTime(); modelstate = hp.getModelState(date); assertNotNull(modelstate); }
@Override public IModelInstance<?> getModelState(Date time) { Logger.getLogger(HistoryProvider.class.getName()).log( Level.INFO, "Model Requested for time: {0}", time.toString()); Pair<Date, IModelInstance<?>> modelraw = databaseconn .getLatestSnapshot(time); Logger.getLogger(HistoryProvider.class.getName()).log( Level...
HistoryProvider implements IHistoryProvider { @Override public IModelInstance<?> getModelState(Date time) { Logger.getLogger(HistoryProvider.class.getName()).log( Level.INFO, "Model Requested for time: {0}", time.toString()); Pair<Date, IModelInstance<?>> modelraw = databaseconn .getLatestSnapshot(time); Logger.getLogg...
HistoryProvider implements IHistoryProvider { @Override public IModelInstance<?> getModelState(Date time) { Logger.getLogger(HistoryProvider.class.getName()).log( Level.INFO, "Model Requested for time: {0}", time.toString()); Pair<Date, IModelInstance<?>> modelraw = databaseconn .getLatestSnapshot(time); Logger.getLogg...
HistoryProvider implements IHistoryProvider { @Override public IModelInstance<?> getModelState(Date time) { Logger.getLogger(HistoryProvider.class.getName()).log( Level.INFO, "Model Requested for time: {0}", time.toString()); Pair<Date, IModelInstance<?>> modelraw = databaseconn .getLatestSnapshot(time); Logger.getLogg...
HistoryProvider implements IHistoryProvider { @Override public IModelInstance<?> getModelState(Date time) { Logger.getLogger(HistoryProvider.class.getName()).log( Level.INFO, "Model Requested for time: {0}", time.toString()); Pair<Date, IModelInstance<?>> modelraw = databaseconn .getLatestSnapshot(time); Logger.getLogg...
@Test public void testgetEventRange() { List<IRainbowMessage> events = null; Calendar cal1 = Calendar.getInstance(); Date date1 = cal1.getTime(); Calendar cal2 = Calendar.getInstance(); Date date2 = cal2.getTime(); events = hp.getEventRange(date1, date2); assertNotNull(events); }
@Override public ArrayList<IRainbowMessage> getEventRange(Date startTime, Date endTime) { ArrayList<IRainbowMessage> model; model = (ArrayList<IRainbowMessage>) databaseconn.getEventRange( startTime, endTime); return model; }
HistoryProvider implements IHistoryProvider { @Override public ArrayList<IRainbowMessage> getEventRange(Date startTime, Date endTime) { ArrayList<IRainbowMessage> model; model = (ArrayList<IRainbowMessage>) databaseconn.getEventRange( startTime, endTime); return model; } }
HistoryProvider implements IHistoryProvider { @Override public ArrayList<IRainbowMessage> getEventRange(Date startTime, Date endTime) { ArrayList<IRainbowMessage> model; model = (ArrayList<IRainbowMessage>) databaseconn.getEventRange( startTime, endTime); return model; } HistoryProvider(IDatabaseConnector databaseCon);...
HistoryProvider implements IHistoryProvider { @Override public ArrayList<IRainbowMessage> getEventRange(Date startTime, Date endTime) { ArrayList<IRainbowMessage> model; model = (ArrayList<IRainbowMessage>) databaseconn.getEventRange( startTime, endTime); return model; } HistoryProvider(IDatabaseConnector databaseCon);...
HistoryProvider implements IHistoryProvider { @Override public ArrayList<IRainbowMessage> getEventRange(Date startTime, Date endTime) { ArrayList<IRainbowMessage> model; model = (ArrayList<IRainbowMessage>) databaseconn.getEventRange( startTime, endTime); return model; } HistoryProvider(IDatabaseConnector databaseCon);...
@Test public void testgetEventRangeByType() { List<IRainbowMessage> events = null; Calendar cal1 = Calendar.getInstance(); Date date1 = cal1.getTime(); Calendar cal2 = Calendar.getInstance(); Date date2 = cal2.getTime(); events = hp.getEventRangeByType("channel", date1, date2); assertNotNull(events); }
@Override public ArrayList<IRainbowMessage> getEventRangeByType(String channel, Date startTime, Date endTime) { ArrayList<IRainbowMessage> model; model = (ArrayList<IRainbowMessage>) databaseconn.getEventRangeByType( channel, startTime, endTime); return model; }
HistoryProvider implements IHistoryProvider { @Override public ArrayList<IRainbowMessage> getEventRangeByType(String channel, Date startTime, Date endTime) { ArrayList<IRainbowMessage> model; model = (ArrayList<IRainbowMessage>) databaseconn.getEventRangeByType( channel, startTime, endTime); return model; } }
HistoryProvider implements IHistoryProvider { @Override public ArrayList<IRainbowMessage> getEventRangeByType(String channel, Date startTime, Date endTime) { ArrayList<IRainbowMessage> model; model = (ArrayList<IRainbowMessage>) databaseconn.getEventRangeByType( channel, startTime, endTime); return model; } HistoryProv...
HistoryProvider implements IHistoryProvider { @Override public ArrayList<IRainbowMessage> getEventRangeByType(String channel, Date startTime, Date endTime) { ArrayList<IRainbowMessage> model; model = (ArrayList<IRainbowMessage>) databaseconn.getEventRangeByType( channel, startTime, endTime); return model; } HistoryProv...
HistoryProvider implements IHistoryProvider { @Override public ArrayList<IRainbowMessage> getEventRangeByType(String channel, Date startTime, Date endTime) { ArrayList<IRainbowMessage> model; model = (ArrayList<IRainbowMessage>) databaseconn.getEventRangeByType( channel, startTime, endTime); return model; } HistoryProv...
@Test public void testgetModelEventRange() { List<IRainbowMessage> events = null; Calendar cal1 = Calendar.getInstance(); Date date1 = cal1.getTime(); Calendar cal2 = Calendar.getInstance(); Date date2 = cal2.getTime(); events = hp.getModelEventRange(date1, date2); assertNotNull(events); }
@Override public ArrayList<IRainbowMessage> getModelEventRange(Date startTime, Date endTime) { ArrayList<IRainbowMessage> model; model = (ArrayList<IRainbowMessage>) databaseconn.getModelEventRange( startTime, endTime); return model; }
HistoryProvider implements IHistoryProvider { @Override public ArrayList<IRainbowMessage> getModelEventRange(Date startTime, Date endTime) { ArrayList<IRainbowMessage> model; model = (ArrayList<IRainbowMessage>) databaseconn.getModelEventRange( startTime, endTime); return model; } }
HistoryProvider implements IHistoryProvider { @Override public ArrayList<IRainbowMessage> getModelEventRange(Date startTime, Date endTime) { ArrayList<IRainbowMessage> model; model = (ArrayList<IRainbowMessage>) databaseconn.getModelEventRange( startTime, endTime); return model; } HistoryProvider(IDatabaseConnector dat...
HistoryProvider implements IHistoryProvider { @Override public ArrayList<IRainbowMessage> getModelEventRange(Date startTime, Date endTime) { ArrayList<IRainbowMessage> model; model = (ArrayList<IRainbowMessage>) databaseconn.getModelEventRange( startTime, endTime); return model; } HistoryProvider(IDatabaseConnector dat...
HistoryProvider implements IHistoryProvider { @Override public ArrayList<IRainbowMessage> getModelEventRange(Date startTime, Date endTime) { ArrayList<IRainbowMessage> model; model = (ArrayList<IRainbowMessage>) databaseconn.getModelEventRange( startTime, endTime); return model; } HistoryProvider(IDatabaseConnector dat...
@Test public void testgetEvent() { IRainbowMessage event = null; Calendar cal = Calendar.getInstance(); Date date = cal.getTime(); event = hp.getEvent(date); assertNotNull(event); }
@Override public IRainbowMessage getEvent(Date time) { IRainbowMessage event; event = databaseconn.getEvent(time); return event; }
HistoryProvider implements IHistoryProvider { @Override public IRainbowMessage getEvent(Date time) { IRainbowMessage event; event = databaseconn.getEvent(time); return event; } }
HistoryProvider implements IHistoryProvider { @Override public IRainbowMessage getEvent(Date time) { IRainbowMessage event; event = databaseconn.getEvent(time); return event; } HistoryProvider(IDatabaseConnector databaseCon); HistoryProvider(ISystemViewProvider acmeSystemViewProvider, ISystemConfiguration ...
HistoryProvider implements IHistoryProvider { @Override public IRainbowMessage getEvent(Date time) { IRainbowMessage event; event = databaseconn.getEvent(time); return event; } HistoryProvider(IDatabaseConnector databaseCon); HistoryProvider(ISystemViewProvider acmeSystemViewProvider, ISystemConfiguration ...
HistoryProvider implements IHistoryProvider { @Override public IRainbowMessage getEvent(Date time) { IRainbowMessage event; event = databaseconn.getEvent(time); return event; } HistoryProvider(IDatabaseConnector databaseCon); HistoryProvider(ISystemViewProvider acmeSystemViewProvider, ISystemConfiguration ...
@Test public void loadOtherY() throws Exception { String input = "other\nother\nyes"; InputStream in = new ByteArrayInputStream(input.getBytes()); System.setIn(in); configLoader.loadConfiguration(); }
public boolean loadConfiguration() throws IOException { for (Map.Entry<String, Object> entry : defaultConfig.entrySet()) { System.out.printf("'%s' will be initiated as: (%s)%n", entry.getKey(), entry.getValue()); } System.out.println("Is it OK(y/n)?"); Scanner scanner = new Scanner(System.in); String answer = scanner.n...
UIConfigurationLoader extends ConfigurationLoader { public boolean loadConfiguration() throws IOException { for (Map.Entry<String, Object> entry : defaultConfig.entrySet()) { System.out.printf("'%s' will be initiated as: (%s)%n", entry.getKey(), entry.getValue()); } System.out.println("Is it OK(y/n)?"); Scanner scanner...
UIConfigurationLoader extends ConfigurationLoader { public boolean loadConfiguration() throws IOException { for (Map.Entry<String, Object> entry : defaultConfig.entrySet()) { System.out.printf("'%s' will be initiated as: (%s)%n", entry.getKey(), entry.getValue()); } System.out.println("Is it OK(y/n)?"); Scanner scanner...
UIConfigurationLoader extends ConfigurationLoader { public boolean loadConfiguration() throws IOException { for (Map.Entry<String, Object> entry : defaultConfig.entrySet()) { System.out.printf("'%s' will be initiated as: (%s)%n", entry.getKey(), entry.getValue()); } System.out.println("Is it OK(y/n)?"); Scanner scanner...
UIConfigurationLoader extends ConfigurationLoader { public boolean loadConfiguration() throws IOException { for (Map.Entry<String, Object> entry : defaultConfig.entrySet()) { System.out.printf("'%s' will be initiated as: (%s)%n", entry.getKey(), entry.getValue()); } System.out.println("Is it OK(y/n)?"); Scanner scanner...
@Test public void testSerialize() throws IOException, ParsingFailureException { System.out.println("serialize"); StandaloneResource resource = StandaloneResourceProvider.instance().acmeResourceForString( "ZNewsSys.acme"); AcmeSystem sys = resource.getModel().getSystems().iterator().next(); IModelInstance<IAcmeSystem> i...
public String serialize(IModelInstance<IAcmeSystem> instance) { String serial = null; try { DataValue value = converter.from_java(instance, null); ByteArrayOutputStream baos = new ByteArrayOutputStream(); encoding.encode(value, new DataOutputStream(baos)); serial = baos.toString(); } catch (ValueConversionException | I...
AcmeModelSerializer { public String serialize(IModelInstance<IAcmeSystem> instance) { String serial = null; try { DataValue value = converter.from_java(instance, null); ByteArrayOutputStream baos = new ByteArrayOutputStream(); encoding.encode(value, new DataOutputStream(baos)); serial = baos.toString(); } catch (ValueC...
AcmeModelSerializer { public String serialize(IModelInstance<IAcmeSystem> instance) { String serial = null; try { DataValue value = converter.from_java(instance, null); ByteArrayOutputStream baos = new ByteArrayOutputStream(); encoding.encode(value, new DataOutputStream(baos)); serial = baos.toString(); } catch (ValueC...
AcmeModelSerializer { public String serialize(IModelInstance<IAcmeSystem> instance) { String serial = null; try { DataValue value = converter.from_java(instance, null); ByteArrayOutputStream baos = new ByteArrayOutputStream(); encoding.encode(value, new DataOutputStream(baos)); serial = baos.toString(); } catch (ValueC...
AcmeModelSerializer { public String serialize(IModelInstance<IAcmeSystem> instance) { String serial = null; try { DataValue value = converter.from_java(instance, null); ByteArrayOutputStream baos = new ByteArrayOutputStream(); encoding.encode(value, new DataOutputStream(baos)); serial = baos.toString(); } catch (ValueC...
@Test public void detects_optional_data_type() throws Exception { assertTrue(Optionality.is_optional(m_odt)); }
public static boolean is_optional(DataType dt) { Ensure.not_null(dt); return (dt instanceof OptionalDataType); }
Optionality { public static boolean is_optional(DataType dt) { Ensure.not_null(dt); return (dt instanceof OptionalDataType); } }
Optionality { public static boolean is_optional(DataType dt) { Ensure.not_null(dt); return (dt instanceof OptionalDataType); } private Optionality(); }
Optionality { public static boolean is_optional(DataType dt) { Ensure.not_null(dt); return (dt instanceof OptionalDataType); } private Optionality(); static boolean is_optional(DataType dt); static boolean is_optional(DataValue dv); static DataType unoptionalize(DataType dt); static DataType deep_unoptionalize(DataTyp...
Optionality { public static boolean is_optional(DataType dt) { Ensure.not_null(dt); return (dt instanceof OptionalDataType); } private Optionality(); static boolean is_optional(DataType dt); static boolean is_optional(DataValue dv); static DataType unoptionalize(DataType dt); static DataType deep_unoptionalize(DataTyp...
@Test public void detects_non_optional_data_type() throws Exception { assertFalse(Optionality.is_optional(m_dt)); }
public static boolean is_optional(DataType dt) { Ensure.not_null(dt); return (dt instanceof OptionalDataType); }
Optionality { public static boolean is_optional(DataType dt) { Ensure.not_null(dt); return (dt instanceof OptionalDataType); } }
Optionality { public static boolean is_optional(DataType dt) { Ensure.not_null(dt); return (dt instanceof OptionalDataType); } private Optionality(); }
Optionality { public static boolean is_optional(DataType dt) { Ensure.not_null(dt); return (dt instanceof OptionalDataType); } private Optionality(); static boolean is_optional(DataType dt); static boolean is_optional(DataValue dv); static DataType unoptionalize(DataType dt); static DataType deep_unoptionalize(DataTyp...
Optionality { public static boolean is_optional(DataType dt) { Ensure.not_null(dt); return (dt instanceof OptionalDataType); } private Optionality(); static boolean is_optional(DataType dt); static boolean is_optional(DataValue dv); static DataType unoptionalize(DataType dt); static DataType deep_unoptionalize(DataTyp...
@Test public void detects_optional_data_value() throws Exception { assertTrue(Optionality.is_optional(m_odv)); }
public static boolean is_optional(DataType dt) { Ensure.not_null(dt); return (dt instanceof OptionalDataType); }
Optionality { public static boolean is_optional(DataType dt) { Ensure.not_null(dt); return (dt instanceof OptionalDataType); } }
Optionality { public static boolean is_optional(DataType dt) { Ensure.not_null(dt); return (dt instanceof OptionalDataType); } private Optionality(); }
Optionality { public static boolean is_optional(DataType dt) { Ensure.not_null(dt); return (dt instanceof OptionalDataType); } private Optionality(); static boolean is_optional(DataType dt); static boolean is_optional(DataValue dv); static DataType unoptionalize(DataType dt); static DataType deep_unoptionalize(DataTyp...
Optionality { public static boolean is_optional(DataType dt) { Ensure.not_null(dt); return (dt instanceof OptionalDataType); } private Optionality(); static boolean is_optional(DataType dt); static boolean is_optional(DataValue dv); static DataType unoptionalize(DataType dt); static DataType deep_unoptionalize(DataTyp...
@Test public void detects_non_optional_data_value() throws Exception { assertFalse(Optionality.is_optional(m_dv)); }
public static boolean is_optional(DataType dt) { Ensure.not_null(dt); return (dt instanceof OptionalDataType); }
Optionality { public static boolean is_optional(DataType dt) { Ensure.not_null(dt); return (dt instanceof OptionalDataType); } }
Optionality { public static boolean is_optional(DataType dt) { Ensure.not_null(dt); return (dt instanceof OptionalDataType); } private Optionality(); }
Optionality { public static boolean is_optional(DataType dt) { Ensure.not_null(dt); return (dt instanceof OptionalDataType); } private Optionality(); static boolean is_optional(DataType dt); static boolean is_optional(DataValue dv); static DataType unoptionalize(DataType dt); static DataType deep_unoptionalize(DataTyp...
Optionality { public static boolean is_optional(DataType dt) { Ensure.not_null(dt); return (dt instanceof OptionalDataType); } private Optionality(); static boolean is_optional(DataType dt); static boolean is_optional(DataValue dv); static DataType unoptionalize(DataType dt); static DataType deep_unoptionalize(DataTyp...
@Test public void unoptionalize_optional_data_type() throws Exception { assertEquals(m_dt, Optionality.unoptionalize(m_odt)); }
public static DataType unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return ((OptionalDataType) dt).inner_type(); } return dt; }
Optionality { public static DataType unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return ((OptionalDataType) dt).inner_type(); } return dt; } }
Optionality { public static DataType unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return ((OptionalDataType) dt).inner_type(); } return dt; } private Optionality(); }
Optionality { public static DataType unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return ((OptionalDataType) dt).inner_type(); } return dt; } private Optionality(); static boolean is_optional(DataType dt); static boolean is_optional(DataValue dv); static DataType unoptionalize(DataType dt);...
Optionality { public static DataType unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return ((OptionalDataType) dt).inner_type(); } return dt; } private Optionality(); static boolean is_optional(DataType dt); static boolean is_optional(DataValue dv); static DataType unoptionalize(DataType dt);...
@Test public void unoptionalize_non_optional_data_type() throws Exception { assertEquals(m_dt, Optionality.unoptionalize(m_dt)); }
public static DataType unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return ((OptionalDataType) dt).inner_type(); } return dt; }
Optionality { public static DataType unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return ((OptionalDataType) dt).inner_type(); } return dt; } }
Optionality { public static DataType unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return ((OptionalDataType) dt).inner_type(); } return dt; } private Optionality(); }
Optionality { public static DataType unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return ((OptionalDataType) dt).inner_type(); } return dt; } private Optionality(); static boolean is_optional(DataType dt); static boolean is_optional(DataValue dv); static DataType unoptionalize(DataType dt);...
Optionality { public static DataType unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return ((OptionalDataType) dt).inner_type(); } return dt; } private Optionality(); static boolean is_optional(DataType dt); static boolean is_optional(DataValue dv); static DataType unoptionalize(DataType dt);...
@Test public void unoptionalize_deep_optional_data_type() throws Exception { assertEquals(m_odt, Optionality.unoptionalize(m_oodt)); }
public static DataType unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return ((OptionalDataType) dt).inner_type(); } return dt; }
Optionality { public static DataType unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return ((OptionalDataType) dt).inner_type(); } return dt; } }
Optionality { public static DataType unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return ((OptionalDataType) dt).inner_type(); } return dt; } private Optionality(); }
Optionality { public static DataType unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return ((OptionalDataType) dt).inner_type(); } return dt; } private Optionality(); static boolean is_optional(DataType dt); static boolean is_optional(DataValue dv); static DataType unoptionalize(DataType dt);...
Optionality { public static DataType unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return ((OptionalDataType) dt).inner_type(); } return dt; } private Optionality(); static boolean is_optional(DataType dt); static boolean is_optional(DataValue dv); static DataType unoptionalize(DataType dt);...
@Test public void unoptionalize_non_null_optional_data_value() throws Exception { assertEquals(m_dv, Optionality.unoptionalize(m_odv)); }
public static DataType unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return ((OptionalDataType) dt).inner_type(); } return dt; }
Optionality { public static DataType unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return ((OptionalDataType) dt).inner_type(); } return dt; } }
Optionality { public static DataType unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return ((OptionalDataType) dt).inner_type(); } return dt; } private Optionality(); }
Optionality { public static DataType unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return ((OptionalDataType) dt).inner_type(); } return dt; } private Optionality(); static boolean is_optional(DataType dt); static boolean is_optional(DataValue dv); static DataType unoptionalize(DataType dt);...
Optionality { public static DataType unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return ((OptionalDataType) dt).inner_type(); } return dt; } private Optionality(); static boolean is_optional(DataType dt); static boolean is_optional(DataValue dv); static DataType unoptionalize(DataType dt);...
@Test public void unoptionalize_non_optional_data_value() throws Exception { assertEquals(m_dv, Optionality.unoptionalize(m_dv)); }
public static DataType unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return ((OptionalDataType) dt).inner_type(); } return dt; }
Optionality { public static DataType unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return ((OptionalDataType) dt).inner_type(); } return dt; } }
Optionality { public static DataType unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return ((OptionalDataType) dt).inner_type(); } return dt; } private Optionality(); }
Optionality { public static DataType unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return ((OptionalDataType) dt).inner_type(); } return dt; } private Optionality(); static boolean is_optional(DataType dt); static boolean is_optional(DataValue dv); static DataType unoptionalize(DataType dt);...
Optionality { public static DataType unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return ((OptionalDataType) dt).inner_type(); } return dt; } private Optionality(); static boolean is_optional(DataType dt); static boolean is_optional(DataValue dv); static DataType unoptionalize(DataType dt);...
@Test public void scaffold() throws Exception { final String DEFAULT_MAPPING_TEMPLATE_PATH = "mapping.yml.ftl"; Map<String, Template> templates = new HashMap<>(); templates.put("example.txt.ftl", configuration.getTemplate("example.txt.ftl")); templates.put(DEFAULT_MAPPING_TEMPLATE_PATH, configuration.getTemplate(DEFAUL...
public void scaffold() throws IOException, ScaffoldingException { try { Map<String, Template> mapping = loadMapping(); for (Map.Entry<String, Template> entry : mapping.entrySet()) { String s = entry.getKey(); Template template = entry.getValue(); Path path = baseDirectory.resolve(s); Path parentDirectory = path.getPare...
Scaffolder { public void scaffold() throws IOException, ScaffoldingException { try { Map<String, Template> mapping = loadMapping(); for (Map.Entry<String, Template> entry : mapping.entrySet()) { String s = entry.getKey(); Template template = entry.getValue(); Path path = baseDirectory.resolve(s); Path parentDirectory =...
Scaffolder { public void scaffold() throws IOException, ScaffoldingException { try { Map<String, Template> mapping = loadMapping(); for (Map.Entry<String, Template> entry : mapping.entrySet()) { String s = entry.getKey(); Template template = entry.getValue(); Path path = baseDirectory.resolve(s); Path parentDirectory =...
Scaffolder { public void scaffold() throws IOException, ScaffoldingException { try { Map<String, Template> mapping = loadMapping(); for (Map.Entry<String, Template> entry : mapping.entrySet()) { String s = entry.getKey(); Template template = entry.getValue(); Path path = baseDirectory.resolve(s); Path parentDirectory =...
Scaffolder { public void scaffold() throws IOException, ScaffoldingException { try { Map<String, Template> mapping = loadMapping(); for (Map.Entry<String, Template> entry : mapping.entrySet()) { String s = entry.getKey(); Template template = entry.getValue(); Path path = baseDirectory.resolve(s); Path parentDirectory =...
@Test public void unoptionalize_non_null_deep_optional_data_value() throws Exception { assertEquals(m_odv, Optionality.unoptionalize(m_oodv)); assertEquals(m_odvn, Optionality.unoptionalize(m_oodvin)); }
public static DataType unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return ((OptionalDataType) dt).inner_type(); } return dt; }
Optionality { public static DataType unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return ((OptionalDataType) dt).inner_type(); } return dt; } }
Optionality { public static DataType unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return ((OptionalDataType) dt).inner_type(); } return dt; } private Optionality(); }
Optionality { public static DataType unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return ((OptionalDataType) dt).inner_type(); } return dt; } private Optionality(); static boolean is_optional(DataType dt); static boolean is_optional(DataValue dv); static DataType unoptionalize(DataType dt);...
Optionality { public static DataType unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return ((OptionalDataType) dt).inner_type(); } return dt; } private Optionality(); static boolean is_optional(DataType dt); static boolean is_optional(DataValue dv); static DataType unoptionalize(DataType dt);...
@Test public void unoptionalize_null_optional_data_value() throws Exception { assertNull(Optionality.unoptionalize(m_odvn)); }
public static DataType unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return ((OptionalDataType) dt).inner_type(); } return dt; }
Optionality { public static DataType unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return ((OptionalDataType) dt).inner_type(); } return dt; } }
Optionality { public static DataType unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return ((OptionalDataType) dt).inner_type(); } return dt; } private Optionality(); }
Optionality { public static DataType unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return ((OptionalDataType) dt).inner_type(); } return dt; } private Optionality(); static boolean is_optional(DataType dt); static boolean is_optional(DataValue dv); static DataType unoptionalize(DataType dt);...
Optionality { public static DataType unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return ((OptionalDataType) dt).inner_type(); } return dt; } private Optionality(); static boolean is_optional(DataType dt); static boolean is_optional(DataValue dv); static DataType unoptionalize(DataType dt);...
@Test public void unoptionalize_null_deep_optional_data_value() throws Exception { assertNull(Optionality.unoptionalize(m_oodvn)); }
public static DataType unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return ((OptionalDataType) dt).inner_type(); } return dt; }
Optionality { public static DataType unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return ((OptionalDataType) dt).inner_type(); } return dt; } }
Optionality { public static DataType unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return ((OptionalDataType) dt).inner_type(); } return dt; } private Optionality(); }
Optionality { public static DataType unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return ((OptionalDataType) dt).inner_type(); } return dt; } private Optionality(); static boolean is_optional(DataType dt); static boolean is_optional(DataValue dv); static DataType unoptionalize(DataType dt);...
Optionality { public static DataType unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return ((OptionalDataType) dt).inner_type(); } return dt; } private Optionality(); static boolean is_optional(DataType dt); static boolean is_optional(DataValue dv); static DataType unoptionalize(DataType dt);...
@Test public void deep_unoptionalize_optional_data_type() throws Exception { assertEquals(m_dt, Optionality.deep_unoptionalize(m_odt)); }
public static DataType deep_unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return deep_unoptionalize(((OptionalDataType) dt).inner_type()); } return dt; }
Optionality { public static DataType deep_unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return deep_unoptionalize(((OptionalDataType) dt).inner_type()); } return dt; } }
Optionality { public static DataType deep_unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return deep_unoptionalize(((OptionalDataType) dt).inner_type()); } return dt; } private Optionality(); }
Optionality { public static DataType deep_unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return deep_unoptionalize(((OptionalDataType) dt).inner_type()); } return dt; } private Optionality(); static boolean is_optional(DataType dt); static boolean is_optional(DataValue dv); static DataType un...
Optionality { public static DataType deep_unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return deep_unoptionalize(((OptionalDataType) dt).inner_type()); } return dt; } private Optionality(); static boolean is_optional(DataType dt); static boolean is_optional(DataValue dv); static DataType un...
@Test public void deep_unoptionalize_non_optional_data_type() throws Exception { assertEquals(m_dt, Optionality.deep_unoptionalize(m_dt)); }
public static DataType deep_unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return deep_unoptionalize(((OptionalDataType) dt).inner_type()); } return dt; }
Optionality { public static DataType deep_unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return deep_unoptionalize(((OptionalDataType) dt).inner_type()); } return dt; } }
Optionality { public static DataType deep_unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return deep_unoptionalize(((OptionalDataType) dt).inner_type()); } return dt; } private Optionality(); }
Optionality { public static DataType deep_unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return deep_unoptionalize(((OptionalDataType) dt).inner_type()); } return dt; } private Optionality(); static boolean is_optional(DataType dt); static boolean is_optional(DataValue dv); static DataType un...
Optionality { public static DataType deep_unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return deep_unoptionalize(((OptionalDataType) dt).inner_type()); } return dt; } private Optionality(); static boolean is_optional(DataType dt); static boolean is_optional(DataValue dv); static DataType un...
@Test public void deep_unoptionalize_deep_optional_data_type() throws Exception { assertEquals(m_dt, Optionality.deep_unoptionalize(m_oodt)); }
public static DataType deep_unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return deep_unoptionalize(((OptionalDataType) dt).inner_type()); } return dt; }
Optionality { public static DataType deep_unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return deep_unoptionalize(((OptionalDataType) dt).inner_type()); } return dt; } }
Optionality { public static DataType deep_unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return deep_unoptionalize(((OptionalDataType) dt).inner_type()); } return dt; } private Optionality(); }
Optionality { public static DataType deep_unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return deep_unoptionalize(((OptionalDataType) dt).inner_type()); } return dt; } private Optionality(); static boolean is_optional(DataType dt); static boolean is_optional(DataValue dv); static DataType un...
Optionality { public static DataType deep_unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return deep_unoptionalize(((OptionalDataType) dt).inner_type()); } return dt; } private Optionality(); static boolean is_optional(DataType dt); static boolean is_optional(DataValue dv); static DataType un...
@Test public void deep_unoptionalize_non_null_optional_data_value() throws Exception { assertEquals(m_dv, Optionality.deep_unoptionalize(m_odv)); }
public static DataType deep_unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return deep_unoptionalize(((OptionalDataType) dt).inner_type()); } return dt; }
Optionality { public static DataType deep_unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return deep_unoptionalize(((OptionalDataType) dt).inner_type()); } return dt; } }
Optionality { public static DataType deep_unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return deep_unoptionalize(((OptionalDataType) dt).inner_type()); } return dt; } private Optionality(); }
Optionality { public static DataType deep_unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return deep_unoptionalize(((OptionalDataType) dt).inner_type()); } return dt; } private Optionality(); static boolean is_optional(DataType dt); static boolean is_optional(DataValue dv); static DataType un...
Optionality { public static DataType deep_unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return deep_unoptionalize(((OptionalDataType) dt).inner_type()); } return dt; } private Optionality(); static boolean is_optional(DataType dt); static boolean is_optional(DataValue dv); static DataType un...
@Test public void deep_unoptionalize_non_optional_data_value() throws Exception { assertEquals(m_dv, Optionality.deep_unoptionalize(m_dv)); }
public static DataType deep_unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return deep_unoptionalize(((OptionalDataType) dt).inner_type()); } return dt; }
Optionality { public static DataType deep_unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return deep_unoptionalize(((OptionalDataType) dt).inner_type()); } return dt; } }
Optionality { public static DataType deep_unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return deep_unoptionalize(((OptionalDataType) dt).inner_type()); } return dt; } private Optionality(); }
Optionality { public static DataType deep_unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return deep_unoptionalize(((OptionalDataType) dt).inner_type()); } return dt; } private Optionality(); static boolean is_optional(DataType dt); static boolean is_optional(DataValue dv); static DataType un...
Optionality { public static DataType deep_unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return deep_unoptionalize(((OptionalDataType) dt).inner_type()); } return dt; } private Optionality(); static boolean is_optional(DataType dt); static boolean is_optional(DataValue dv); static DataType un...
@Test public void deep_unoptionalize_non_null_deep_optional_data_value() throws Exception { assertEquals(m_dv, Optionality.deep_unoptionalize(m_oodv)); }
public static DataType deep_unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return deep_unoptionalize(((OptionalDataType) dt).inner_type()); } return dt; }
Optionality { public static DataType deep_unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return deep_unoptionalize(((OptionalDataType) dt).inner_type()); } return dt; } }
Optionality { public static DataType deep_unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return deep_unoptionalize(((OptionalDataType) dt).inner_type()); } return dt; } private Optionality(); }
Optionality { public static DataType deep_unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return deep_unoptionalize(((OptionalDataType) dt).inner_type()); } return dt; } private Optionality(); static boolean is_optional(DataType dt); static boolean is_optional(DataValue dv); static DataType un...
Optionality { public static DataType deep_unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return deep_unoptionalize(((OptionalDataType) dt).inner_type()); } return dt; } private Optionality(); static boolean is_optional(DataType dt); static boolean is_optional(DataValue dv); static DataType un...
@Test public void deep_unoptionalize_null_optional_data_value() throws Exception { assertNull(Optionality.deep_unoptionalize(m_odvn)); }
public static DataType deep_unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return deep_unoptionalize(((OptionalDataType) dt).inner_type()); } return dt; }
Optionality { public static DataType deep_unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return deep_unoptionalize(((OptionalDataType) dt).inner_type()); } return dt; } }
Optionality { public static DataType deep_unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return deep_unoptionalize(((OptionalDataType) dt).inner_type()); } return dt; } private Optionality(); }
Optionality { public static DataType deep_unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return deep_unoptionalize(((OptionalDataType) dt).inner_type()); } return dt; } private Optionality(); static boolean is_optional(DataType dt); static boolean is_optional(DataValue dv); static DataType un...
Optionality { public static DataType deep_unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return deep_unoptionalize(((OptionalDataType) dt).inner_type()); } return dt; } private Optionality(); static boolean is_optional(DataType dt); static boolean is_optional(DataValue dv); static DataType un...
@Test public void handleTemplate() { OptionParser optionParser = new OptionParser(); Path dir = optionParser.handleTemplateOption(cmd); assertEquals(templateDir.toString(), dir.toString()); }
public Path handleTemplateOption(CommandLine cmd) { Path templatePath = Paths.get(cmd.getOptionValue("t")); if (!templatePath.toFile().isDirectory()) { throw new IllegalArgumentException("the input template path does not point to a local directory."); } System.out.print("Valid template path: "); System.out.println(cmd....
OptionParser { public Path handleTemplateOption(CommandLine cmd) { Path templatePath = Paths.get(cmd.getOptionValue("t")); if (!templatePath.toFile().isDirectory()) { throw new IllegalArgumentException("the input template path does not point to a local directory."); } System.out.print("Valid template path: "); System.o...
OptionParser { public Path handleTemplateOption(CommandLine cmd) { Path templatePath = Paths.get(cmd.getOptionValue("t")); if (!templatePath.toFile().isDirectory()) { throw new IllegalArgumentException("the input template path does not point to a local directory."); } System.out.print("Valid template path: "); System.o...
OptionParser { public Path handleTemplateOption(CommandLine cmd) { Path templatePath = Paths.get(cmd.getOptionValue("t")); if (!templatePath.toFile().isDirectory()) { throw new IllegalArgumentException("the input template path does not point to a local directory."); } System.out.print("Valid template path: "); System.o...
OptionParser { public Path handleTemplateOption(CommandLine cmd) { Path templatePath = Paths.get(cmd.getOptionValue("t")); if (!templatePath.toFile().isDirectory()) { throw new IllegalArgumentException("the input template path does not point to a local directory."); } System.out.print("Valid template path: "); System.o...
@Test public void deep_unoptionalize_null_deep_optional_data_value() throws Exception { assertNull(Optionality.deep_unoptionalize(m_oodvn)); assertNull(Optionality.deep_unoptionalize(m_oodvin)); }
public static DataType deep_unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return deep_unoptionalize(((OptionalDataType) dt).inner_type()); } return dt; }
Optionality { public static DataType deep_unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return deep_unoptionalize(((OptionalDataType) dt).inner_type()); } return dt; } }
Optionality { public static DataType deep_unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return deep_unoptionalize(((OptionalDataType) dt).inner_type()); } return dt; } private Optionality(); }
Optionality { public static DataType deep_unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return deep_unoptionalize(((OptionalDataType) dt).inner_type()); } return dt; } private Optionality(); static boolean is_optional(DataType dt); static boolean is_optional(DataValue dv); static DataType un...
Optionality { public static DataType deep_unoptionalize(DataType dt) { Ensure.not_null(dt); if (is_optional(dt)) { return deep_unoptionalize(((OptionalDataType) dt).inner_type()); } return dt; } private Optionality(); static boolean is_optional(DataType dt); static boolean is_optional(DataValue dv); static DataType un...
@Test public void optionalize_non_null_to_normal_data_type() throws Exception { assertEquals(m_dv, Optionality.optionalize(m_dv, m_dt)); }
public static DataValue optionalize(DataValue v, DataType dt) { Ensure.not_null(dt); if (!(dt instanceof OptionalDataType)) { Ensure.not_null(v); return v; } if (v != null) { v = unoptionalize(v); } OptionalDataType odt = (OptionalDataType) dt; DataType inner_type = odt.inner_type(); if (v != null && inner_type instanc...
Optionality { public static DataValue optionalize(DataValue v, DataType dt) { Ensure.not_null(dt); if (!(dt instanceof OptionalDataType)) { Ensure.not_null(v); return v; } if (v != null) { v = unoptionalize(v); } OptionalDataType odt = (OptionalDataType) dt; DataType inner_type = odt.inner_type(); if (v != null && inne...
Optionality { public static DataValue optionalize(DataValue v, DataType dt) { Ensure.not_null(dt); if (!(dt instanceof OptionalDataType)) { Ensure.not_null(v); return v; } if (v != null) { v = unoptionalize(v); } OptionalDataType odt = (OptionalDataType) dt; DataType inner_type = odt.inner_type(); if (v != null && inne...
Optionality { public static DataValue optionalize(DataValue v, DataType dt) { Ensure.not_null(dt); if (!(dt instanceof OptionalDataType)) { Ensure.not_null(v); return v; } if (v != null) { v = unoptionalize(v); } OptionalDataType odt = (OptionalDataType) dt; DataType inner_type = odt.inner_type(); if (v != null && inne...
Optionality { public static DataValue optionalize(DataValue v, DataType dt) { Ensure.not_null(dt); if (!(dt instanceof OptionalDataType)) { Ensure.not_null(v); return v; } if (v != null) { v = unoptionalize(v); } OptionalDataType odt = (OptionalDataType) dt; DataType inner_type = odt.inner_type(); if (v != null && inne...
@Test public void optionalize_non_null_to_optional_data_type() throws Exception { assertEquals(m_odv, Optionality.optionalize(m_dv, m_odt)); }
public static DataValue optionalize(DataValue v, DataType dt) { Ensure.not_null(dt); if (!(dt instanceof OptionalDataType)) { Ensure.not_null(v); return v; } if (v != null) { v = unoptionalize(v); } OptionalDataType odt = (OptionalDataType) dt; DataType inner_type = odt.inner_type(); if (v != null && inner_type instanc...
Optionality { public static DataValue optionalize(DataValue v, DataType dt) { Ensure.not_null(dt); if (!(dt instanceof OptionalDataType)) { Ensure.not_null(v); return v; } if (v != null) { v = unoptionalize(v); } OptionalDataType odt = (OptionalDataType) dt; DataType inner_type = odt.inner_type(); if (v != null && inne...
Optionality { public static DataValue optionalize(DataValue v, DataType dt) { Ensure.not_null(dt); if (!(dt instanceof OptionalDataType)) { Ensure.not_null(v); return v; } if (v != null) { v = unoptionalize(v); } OptionalDataType odt = (OptionalDataType) dt; DataType inner_type = odt.inner_type(); if (v != null && inne...
Optionality { public static DataValue optionalize(DataValue v, DataType dt) { Ensure.not_null(dt); if (!(dt instanceof OptionalDataType)) { Ensure.not_null(v); return v; } if (v != null) { v = unoptionalize(v); } OptionalDataType odt = (OptionalDataType) dt; DataType inner_type = odt.inner_type(); if (v != null && inne...
Optionality { public static DataValue optionalize(DataValue v, DataType dt) { Ensure.not_null(dt); if (!(dt instanceof OptionalDataType)) { Ensure.not_null(v); return v; } if (v != null) { v = unoptionalize(v); } OptionalDataType odt = (OptionalDataType) dt; DataType inner_type = odt.inner_type(); if (v != null && inne...
@Test public void optionalize_non_null_to_deep_optional_data_type() throws Exception { assertEquals(m_oodv, Optionality.optionalize(m_dv, m_oodt)); }
public static DataValue optionalize(DataValue v, DataType dt) { Ensure.not_null(dt); if (!(dt instanceof OptionalDataType)) { Ensure.not_null(v); return v; } if (v != null) { v = unoptionalize(v); } OptionalDataType odt = (OptionalDataType) dt; DataType inner_type = odt.inner_type(); if (v != null && inner_type instanc...
Optionality { public static DataValue optionalize(DataValue v, DataType dt) { Ensure.not_null(dt); if (!(dt instanceof OptionalDataType)) { Ensure.not_null(v); return v; } if (v != null) { v = unoptionalize(v); } OptionalDataType odt = (OptionalDataType) dt; DataType inner_type = odt.inner_type(); if (v != null && inne...
Optionality { public static DataValue optionalize(DataValue v, DataType dt) { Ensure.not_null(dt); if (!(dt instanceof OptionalDataType)) { Ensure.not_null(v); return v; } if (v != null) { v = unoptionalize(v); } OptionalDataType odt = (OptionalDataType) dt; DataType inner_type = odt.inner_type(); if (v != null && inne...
Optionality { public static DataValue optionalize(DataValue v, DataType dt) { Ensure.not_null(dt); if (!(dt instanceof OptionalDataType)) { Ensure.not_null(v); return v; } if (v != null) { v = unoptionalize(v); } OptionalDataType odt = (OptionalDataType) dt; DataType inner_type = odt.inner_type(); if (v != null && inne...
Optionality { public static DataValue optionalize(DataValue v, DataType dt) { Ensure.not_null(dt); if (!(dt instanceof OptionalDataType)) { Ensure.not_null(v); return v; } if (v != null) { v = unoptionalize(v); } OptionalDataType odt = (OptionalDataType) dt; DataType inner_type = odt.inner_type(); if (v != null && inne...