de.deepamehta.core.model
Class RoleModel

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

public abstract class RoleModel
extends Object
implements Cloneable


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

Field Detail

playerId

protected long playerId

roleTypeUri

protected String roleTypeUri
Constructor Detail

RoleModel

protected RoleModel()

RoleModel

protected RoleModel(long playerId,
                    String roleTypeUri)
Method Detail

getPlayerId

public long getPlayerId()

getRoleTypeUri

public final String getRoleTypeUri()

setRoleTypeUri

public final void setRoleTypeUri(String roleTypeUri)

refsSameObject

public abstract boolean refsSameObject(RoleModel model)
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.

Returns:
true if the given role model refers to the same object as this role model.

toJSON

public abstract JSONObject toJSON()

clone

public RoleModel clone()
Overrides:
clone in class Object


Copyright © 2014. All Rights Reserved.