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: - Serialization to JSON.


Nested Class Summary
 class TopicmapViewmodel.GridPositioning
           
 
Field Summary
private  Map<Long,AssociationViewmodel> assocs
           
private  Logger logger
           
private  TopicModel topicmapTopic
           
private  Map<Long,TopicViewmodel> topics
           
 
Constructor Summary
TopicmapViewmodel(TopicModel topicmapTopic, Map<Long,TopicViewmodel> topics, Map<Long,AssociationViewmodel> assocs)
           
 
Method Summary
 AssociationViewmodel getAssociation(long id)
           
 Iterable<AssociationViewmodel> getAssociations()
           
 long getId()
           
 TopicViewmodel getTopic(long id)
           
 Iterable<TopicViewmodel> getTopics()
           
 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 TopicModel topicmapTopic

topics

private Map<Long,TopicViewmodel> topics

assocs

private Map<Long,AssociationViewmodel> assocs

logger

private Logger logger
Constructor Detail

TopicmapViewmodel

public TopicmapViewmodel(TopicModel topicmapTopic,
                         Map<Long,TopicViewmodel> topics,
                         Map<Long,AssociationViewmodel> assocs)
Method Detail

getId

public long getId()

getTopics

public Iterable<TopicViewmodel> getTopics()

getAssociations

public Iterable<AssociationViewmodel> getAssociations()

getTopic

public TopicViewmodel getTopic(long id)

getAssociation

public AssociationViewmodel getAssociation(long id)

toJSON

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

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2015. All Rights Reserved.