de.deepamehta.core.model
Class AssociationRoleModel
java.lang.Object
de.deepamehta.core.model.RoleModel
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".
AssociationRoleModel
public AssociationRoleModel(long assocId,
String roleTypeUri)
AssociationRoleModel
public AssociationRoleModel(org.codehaus.jettison.json.JSONObject assocRoleModel)
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 org.codehaus.jettison.json.JSONObject toJSON()
- Specified by:
toJSON
in class RoleModel
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2015. All Rights Reserved.