de.deepamehta.core.model
Class AssociationRoleModel

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

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

AssociationRoleModel

public AssociationRoleModel(long assocId,
                            String roleTypeUri)

AssociationRoleModel

public AssociationRoleModel(JSONObject assocRoleModel)
Method Detail

refsSameObject

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
Returns:
true if the given role model refers to the same object as this role model.

toJSON

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

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2014. All Rights Reserved.