de.deepamehta.core.model
Class ViewConfigurationModel

Show UML class diagram
java.lang.Object
  extended by de.deepamehta.core.model.ViewConfigurationModel

public class ViewConfigurationModel
extends Object

Author:
Jörg Richter

Field Summary
private  Map<String,TopicModel> viewConfig
          Key: config topic type URI
 
Constructor Summary
ViewConfigurationModel()
           
ViewConfigurationModel(JSONObject configurable)
           
ViewConfigurationModel(List<TopicModel> configTopics)
           
 
Method Summary
private  void addConfigTopic(TopicModel configTopic)
           
 TopicModel addSetting(String configTypeUri, String settingUri, Object value)
           
private  TopicModel getConfigTopic(String configTypeUri)
           
 Iterable<TopicModel> getConfigTopics()
           
 Object getSetting(String configTypeUri, String settingUri)
          FIXME: to be dropped.
 void toJSON(JSONObject configurable)
           
 String toString()
           
 void updateConfigTopic(TopicModel configTopic)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

viewConfig

private Map<String,TopicModel> viewConfig
Key: config topic type URI

Constructor Detail

ViewConfigurationModel

public ViewConfigurationModel()

ViewConfigurationModel

public ViewConfigurationModel(List<TopicModel> configTopics)

ViewConfigurationModel

public ViewConfigurationModel(JSONObject configurable)
Parameters:
configurable - A topic type, an association type, or an association definition. ### FIXME: the sole JSONArray should be passed
Method Detail

getConfigTopics

public Iterable<TopicModel> getConfigTopics()

updateConfigTopic

public void updateConfigTopic(TopicModel configTopic)

addSetting

public TopicModel addSetting(String configTypeUri,
                             String settingUri,
                             Object value)

getSetting

public Object getSetting(String configTypeUri,
                         String settingUri)
FIXME: to be dropped.

Read out a view configuration setting.

Compare to client-side counterpart: function get_view_config() in webclient.js

Parameters:
configTypeUri - The type URI of the configuration topic, e.g. "dm4.webclient.view_config"
settingUri - The setting URI, e.g. "dm4.webclient.icon"
Returns:
The setting value, or null if there is no such setting

toJSON

public void toJSON(JSONObject configurable)

toString

public String toString()
Overrides:
toString in class Object

getConfigTopic

private TopicModel getConfigTopic(String configTypeUri)

addConfigTopic

private void addConfigTopic(TopicModel configTopic)


Copyright © 2014. All Rights Reserved.