public class TopicRoleModel extends RoleModel
A TopicRoleModel object is a pair of a topic reference and a role type reference. The topic is refered to either by its ID or URI. The role type is refered to by its URI.
Assertion: both, the topic reference and the role type reference are set.
In the database a role type is represented by a topic of type "dm4.core.role_type".
Modifier and Type | Field and Description |
---|---|
private boolean |
topicIdentifiedByUri |
private String |
topicUri |
playerId, roleTypeUri
Constructor and Description |
---|
TopicRoleModel(org.codehaus.jettison.json.JSONObject topicRoleModel) |
TopicRoleModel(long topicId,
String roleTypeUri) |
TopicRoleModel(String topicUri,
String roleTypeUri) |
Modifier and Type | Method and Description |
---|---|
long |
getPlayerId() |
String |
getTopicUri() |
boolean |
refsSameObject(RoleModel model)
Checks weather the given role model refers to the same object as this role model.
|
org.codehaus.jettison.json.JSONObject |
toJSON() |
boolean |
topicIdentifiedByUri() |
String |
toString() |
clone, getRoleTypeUri, setPlayerId, setRoleTypeUri
private boolean topicIdentifiedByUri
public TopicRoleModel(long topicId, String roleTypeUri)
public TopicRoleModel(String topicUri, String roleTypeUri)
public TopicRoleModel(org.codehaus.jettison.json.JSONObject topicRoleModel)
public long getPlayerId()
getPlayerId
in class RoleModel
public String getTopicUri()
public boolean topicIdentifiedByUri()
public boolean refsSameObject(RoleModel model)
RoleModel
refsSameObject
in class RoleModel
public org.codehaus.jettison.json.JSONObject toJSON()
Copyright © 2015. All Rights Reserved.