de.deepamehta.plugins.topicmaps.model
Class TopicViewmodel

Show UML class diagram
java.lang.Object
  extended by de.deepamehta.core.model.DeepaMehtaObjectModel
      extended by de.deepamehta.core.model.TopicModel
          extended by de.deepamehta.plugins.topicmaps.model.TopicViewmodel
All Implemented Interfaces:
Identifiable, JSONEnabled, Cloneable

public class TopicViewmodel
extends TopicModel

A topic viewmodel as contained in a topicmap viewmodel.

That is a generic topic model enriched by view properties. Standard view properties are "dm4.topicmaps.x", "dm4.topicmaps.y", and "dm4.topicmaps.visibility". Additional view properties can be added by plugins (by implementing a Viewmodel Customizer).


Field Summary
private  ViewProperties viewProps
           
 
Fields inherited from class de.deepamehta.core.model.DeepaMehtaObjectModel
childTopics, id, typeUri, uri, value
 
Constructor Summary
TopicViewmodel(TopicModel topic, ViewProperties viewProps)
           
 
Method Summary
 ViewProperties getViewProperties()
           
 boolean getVisibility()
          Convencience method to access the "dm4.topicmaps.visibility" standard view property.
 int getX()
          Convencience method to access the "dm4.topicmaps.x" standard view property.
 int getY()
          Convencience method to access the "dm4.topicmaps.y" standard view property.
 JSONObject toJSON()
           
 
Methods inherited from class de.deepamehta.core.model.TopicModel
clone, createRoleModel, toString
 
Methods inherited from class de.deepamehta.core.model.DeepaMehtaObjectModel
equals, getChildTopicsModel, getId, getSimpleValue, getTypeUri, getUri, hashCode, set, setChildTopicsModel, setId, setSimpleValue, setSimpleValue, setSimpleValue, setSimpleValue, setSimpleValue, setTypeUri, setUri
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

viewProps

private ViewProperties viewProps
Constructor Detail

TopicViewmodel

public TopicViewmodel(TopicModel topic,
                      ViewProperties viewProps)
Method Detail

getViewProperties

public ViewProperties getViewProperties()

getX

public int getX()
Convencience method to access the "dm4.topicmaps.x" standard view property.


getY

public int getY()
Convencience method to access the "dm4.topicmaps.y" standard view property.


getVisibility

public boolean getVisibility()
Convencience method to access the "dm4.topicmaps.visibility" standard view property.


toJSON

public JSONObject toJSON()
Specified by:
toJSON in interface JSONEnabled
Overrides:
toJSON in class DeepaMehtaObjectModel


Copyright © 2015. All Rights Reserved.