Class AssociationRoleModel

Show UML class diagram
  extended by de.deepamehta.core.model.RoleModel
      extended by de.deepamehta.core.model.AssociationRoleModel
All Implemented Interfaces:

public class AssociationRoleModel
extends RoleModel

The role an association plays in an association.

A AssociationRoleModel object is a pair of an association ID and a role type URI.

Assertion: both, the association ID and the role type URI are set.

In the database a role type is represented by a topic of type "dm4.core.role_type".

Field Summary
Fields inherited from class de.deepamehta.core.model.RoleModel
playerId, roleTypeUri
Constructor Summary
AssociationRoleModel(JSONObject assocRoleModel)
AssociationRoleModel(long assocId, String roleTypeUri)
Method Summary
 boolean refsSameObject(RoleModel model)
          Checks weather the given role model refers to the same object as this role model.
 JSONObject toJSON()
 String toString()
Methods inherited from class de.deepamehta.core.model.RoleModel
clone, getPlayerId, getRoleTypeUri, setRoleTypeUri
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail


public AssociationRoleModel(long assocId,
                            String roleTypeUri)


public AssociationRoleModel(JSONObject assocRoleModel)
Method Detail


public boolean refsSameObject(RoleModel model)
Description copied from class: RoleModel
Checks weather the given role model refers to the same object as this role model. In case of a topic role model the topic IDs resp. URIs are compared. In case of an association role model the association IDs are compared. Note: the role types are not compared.

Specified by:
refsSameObject in class RoleModel
true if the given role model refers to the same object as this role model.


public JSONObject toJSON()
Specified by:
toJSON in class RoleModel


public String toString()
toString in class Object

Copyright © 2014. All Rights Reserved.