/** * FIXME: to be dropped. * * <p>Read out a view configuration setting. * * <p>Compare to client-side counterpart: function get_view_config() in webclient.js * * @param configTypeUri The type URI of the configuration topic, e.g. "dm4.webclient.view_config" * @param settingUri The setting URI, e.g. "dm4.webclient.icon" * @return The setting value, or <code>null</code> if there is no such setting */ public Object getSetting(String configTypeUri, String settingUri) { TopicModel configTopic = getConfigTopic(configTypeUri); if (configTopic == null) { return null; } CompositeValue comp = configTopic.getCompositeValue(); return comp.has(settingUri) ? comp.get(settingUri) : null; }
/** Composite value equals() test. */ public void testEquals() { CompositeValue value1 = new CompositeValue(1, 2, 3); CompositeValue value2 = new CompositeValue(1, 2); CompositeValue value3 = new CompositeValue(1); CompositeValue value4 = new CompositeValue(); CompositeValue value5 = new CompositeValue(new Object[] {1, 2, 3}); CompositeValue value6 = new CompositeValue("1", "2", "3"); Assert.assertFalse(value1.equals(value2)); Assert.assertFalse(value1.equals(value3)); Assert.assertFalse(value1.equals(value4)); Assert.assertEquals(value1, value5); Assert.assertFalse(value1.equals(value6)); }
@Override public void dump(final PrintStream writer, final String prefix, boolean compact) { if (!compact || this.type.containsAggregate()) { super.dump(writer, prefix, compact); return; } writer.print(prefix); this.dumpValue(writer); writer.println(); }