de.deepamehta.plugins.topicmaps.model
Class TopicmapViewmodel

Show UML class diagram
java.lang.Object
  extended by de.deepamehta.plugins.topicmaps.model.TopicmapViewmodel
All Implemented Interfaces:
JSONEnabled

public class TopicmapViewmodel
extends Object
implements JSONEnabled

A topicmap viewmodel: a collection of topics and associations plus their view properties.

Features: - load from DB (by constructor). - Serialization to JSON.


Nested Class Summary
 class TopicmapViewmodel.GridPositioning
           
 
Field Summary
private  Map<Long,AssociationViewmodel> assocs
           
private  List<ViewmodelCustomizer> customizers
           
private  DeepaMehtaService dms
           
private  Logger logger
           
private  Topic topicmapTopic
           
private  Map<Long,TopicViewmodel> topics
           
 
Constructor Summary
TopicmapViewmodel(long topicmapId, DeepaMehtaService dms, List<ViewmodelCustomizer> customizers)
          Loads a topicmap from the DB.
 
Method Summary
private  void addAssociation(AssociationViewmodel assoc)
           
private  void addTopic(TopicViewmodel topic)
           
 Iterable<AssociationViewmodel> getAssociations()
           
 long getId()
           
 Iterable<TopicViewmodel> getTopics()
           
private  void invokeViewmodelCustomizer(ViewmodelCustomizer customizer, Topic topic, CompositeValueModel viewProps)
           
private  void invokeViewmodelCustomizers(Topic topic, CompositeValueModel viewProps)
           
private  void loadAssociations()
           
private  void loadTopics()
           
 JSONObject toJSON()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

topicmapTopic

private Topic topicmapTopic

topics

private Map<Long,TopicViewmodel> topics

assocs

private Map<Long,AssociationViewmodel> assocs

dms

private DeepaMehtaService dms

customizers

private List<ViewmodelCustomizer> customizers

logger

private Logger logger
Constructor Detail

TopicmapViewmodel

public TopicmapViewmodel(long topicmapId,
                         DeepaMehtaService dms,
                         List<ViewmodelCustomizer> customizers)
Loads a topicmap from the DB.

Method Detail

getId

public long getId()

getTopics

public Iterable<TopicViewmodel> getTopics()

getAssociations

public Iterable<AssociationViewmodel> getAssociations()

toJSON

public JSONObject toJSON()
Specified by:
toJSON in interface JSONEnabled

toString

public String toString()
Overrides:
toString in class Object

loadTopics

private void loadTopics()

loadAssociations

private void loadAssociations()

invokeViewmodelCustomizers

private void invokeViewmodelCustomizers(Topic topic,
                                        CompositeValueModel viewProps)

invokeViewmodelCustomizer

private void invokeViewmodelCustomizer(ViewmodelCustomizer customizer,
                                       Topic topic,
                                       CompositeValueModel viewProps)

addTopic

private void addTopic(TopicViewmodel topic)

addAssociation

private void addAssociation(AssociationViewmodel assoc)


Copyright © 2013. All Rights Reserved.