class AttachedAssociation extends AttachedDeepaMehtaObject implements Association
Modifier and Type | Field and Description |
---|---|
private Logger |
logger |
private Role |
role1 |
private Role |
role2 |
dms
Constructor and Description |
---|
AttachedAssociation(AssociationModel model,
EmbeddedService dms) |
Modifier and Type | Method and Description |
---|---|
(package private) String |
className() |
private Role |
createAttachedRole(RoleModel model) |
void |
delete()
Deletes 1) this DeepaMehta object's child topics (recursively) which have an underlying association definition of
type "Composition Definition" and 2) deletes all the remaining direct associations of this DeepaMehta object.
|
private Association |
fetchInstantiation() |
(package private) RelatedTopicModel |
fetchRelatedTopic(String assocTypeUri,
String myRoleTypeUri,
String othersRoleTypeUri,
String othersTopicTypeUri) |
(package private) ResultList<RelatedTopicModel> |
fetchRelatedTopics(String assocTypeUri,
String myRoleTypeUri,
String othersRoleTypeUri,
String othersTopicTypeUri,
int maxResultSize) |
private TopicRole |
filterRole(Role role,
TopicRoleModel roleModel) |
private Topic |
filterTopic(DeepaMehtaObject object,
String topicTypeUri) |
private Topic |
filterTopic(Role role,
String roleTypeUri) |
Association |
getAssociation(String assocTypeUri,
String myRoleTypeUri,
String othersRoleTypeUri,
long othersTopicId) |
List<Association> |
getAssociations() |
AssociationModel |
getModel() |
DeepaMehtaObject |
getPlayer1() |
DeepaMehtaObject |
getPlayer2() |
RelatedAssociation |
getRelatedAssociation(String assocTypeUri,
String myRoleTypeUri,
String othersRoleTypeUri,
String othersAssocTypeUri) |
ResultList<RelatedAssociation> |
getRelatedAssociations(String assocTypeUri,
String myRoleTypeUri,
String othersRoleTypeUri,
String othersAssocTypeUri) |
ResultList<RelatedTopic> |
getRelatedTopics(List assocTypeUris,
String myRoleTypeUri,
String othersRoleTypeUri,
String othersTopicTypeUri,
int maxResultSize) |
Role |
getRole(RoleModel roleModel)
Returns this association's role which refers to the same object as the given role model.
|
Role |
getRole1() |
Role |
getRole2() |
Topic |
getTopic(String roleTypeUri) |
Topic |
getTopicByType(String topicTypeUri) |
(package private) AssociationType |
getType() |
(package private) Directive |
getUpdateDirective() |
boolean |
isPlayer(TopicRoleModel roleModel) |
Association |
loadChildTopics() |
Association |
loadChildTopics(String childTypeUri) |
private void |
reassignInstantiation() |
void |
removeProperty(String propUri)
Removes this object's property associated with the given property URI.
|
void |
setProperty(String propUri,
Object propValue,
boolean addToIndex) |
(package private) void |
storeTypeUri() |
(package private) void |
storeUri() |
void |
update(AssociationModel model) |
(package private) void |
updateChildTopics(ChildTopicsModel childTopics) |
private void |
updateRole(RoleModel newModel,
int nr) |
equals, getChildTopics, getDatabaseVendorObject, getId, getProperty, getRelatedTopic, getRelatedTopics, getRelatedTopics, getSimpleValue, getTypeUri, getUri, hashCode, hasProperty, setChildTopics, setSimpleValue, setSimpleValue, setSimpleValue, setSimpleValue, setSimpleValue, setTypeUri, setUri, toJSON, toString, update, updateChildTopic, updateChildTopics
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getChildTopics, getDatabaseVendorObject, getId, getProperty, getRelatedTopic, getRelatedTopics, getRelatedTopics, getSimpleValue, getTypeUri, getUri, hasProperty, setChildTopics, setSimpleValue, setSimpleValue, setSimpleValue, setSimpleValue, setSimpleValue, setTypeUri, setUri, update, updateChildTopic, updateChildTopics
toJSON
AttachedAssociation(AssociationModel model, EmbeddedService dms)
public void update(AssociationModel model)
update
in interface Association
model
- The data to update.
If the type URI is null
it is not updated.
If role 1 is null
it is not updated.
If role 2 is null
it is not updated.public void delete()
AttachedDeepaMehtaObject
Note: deletion of the object itself is up to the subclasses.
delete
in interface DeepaMehtaObject
delete
in class AttachedDeepaMehtaObject
public Role getRole1()
getRole1
in interface Association
public Role getRole2()
getRole2
in interface Association
public DeepaMehtaObject getPlayer1()
getPlayer1
in interface Association
public DeepaMehtaObject getPlayer2()
getPlayer2
in interface Association
public Topic getTopic(String roleTypeUri)
getTopic
in interface Association
public Topic getTopicByType(String topicTypeUri)
getTopicByType
in interface Association
public Role getRole(RoleModel roleModel)
Association
If the object refered by the given role model is not a player in this association an exception is thrown.
getRole
in interface Association
public boolean isPlayer(TopicRoleModel roleModel)
isPlayer
in interface Association
public Association loadChildTopics()
loadChildTopics
in interface Association
loadChildTopics
in interface DeepaMehtaObject
loadChildTopics
in class AttachedDeepaMehtaObject
public Association loadChildTopics(String childTypeUri)
loadChildTopics
in interface Association
loadChildTopics
in interface DeepaMehtaObject
loadChildTopics
in class AttachedDeepaMehtaObject
public AssociationModel getModel()
getModel
in interface Association
getModel
in interface DeepaMehtaObject
getModel
in class AttachedDeepaMehtaObject
public ResultList<RelatedTopic> getRelatedTopics(List assocTypeUris, String myRoleTypeUri, String othersRoleTypeUri, String othersTopicTypeUri, int maxResultSize)
getRelatedTopics
in interface DeepaMehtaObject
assocTypeUris
- may *not* be nullmyRoleTypeUri
- may be nullothersRoleTypeUri
- may be nullothersTopicTypeUri
- may be nullpublic RelatedAssociation getRelatedAssociation(String assocTypeUri, String myRoleTypeUri, String othersRoleTypeUri, String othersAssocTypeUri)
getRelatedAssociation
in interface DeepaMehtaObject
assocTypeUri
- may be nullmyRoleTypeUri
- may be nullothersRoleTypeUri
- may be nullothersAssocTypeUri
- may be nullpublic ResultList<RelatedAssociation> getRelatedAssociations(String assocTypeUri, String myRoleTypeUri, String othersRoleTypeUri, String othersAssocTypeUri)
getRelatedAssociations
in interface DeepaMehtaObject
assocTypeUri
- may be nullmyRoleTypeUri
- may be nullothersRoleTypeUri
- may be nullothersAssocTypeUri
- may be nullpublic Association getAssociation(String assocTypeUri, String myRoleTypeUri, String othersRoleTypeUri, long othersTopicId)
getAssociation
in interface DeepaMehtaObject
public List<Association> getAssociations()
getAssociations
in interface DeepaMehtaObject
public void setProperty(String propUri, Object propValue, boolean addToIndex)
setProperty
in interface DeepaMehtaObject
public void removeProperty(String propUri)
DeepaMehtaObject
removeProperty
in interface DeepaMehtaObject
final String className()
className
in class AttachedDeepaMehtaObject
void updateChildTopics(ChildTopicsModel childTopics)
updateChildTopics
in class AttachedDeepaMehtaObject
Directive getUpdateDirective()
getUpdateDirective
in class AttachedDeepaMehtaObject
final void storeUri()
storeUri
in class AttachedDeepaMehtaObject
final void storeTypeUri()
storeTypeUri
in class AttachedDeepaMehtaObject
final RelatedTopicModel fetchRelatedTopic(String assocTypeUri, String myRoleTypeUri, String othersRoleTypeUri, String othersTopicTypeUri)
fetchRelatedTopic
in class AttachedDeepaMehtaObject
final ResultList<RelatedTopicModel> fetchRelatedTopics(String assocTypeUri, String myRoleTypeUri, String othersRoleTypeUri, String othersTopicTypeUri, int maxResultSize)
fetchRelatedTopics
in class AttachedDeepaMehtaObject
AssociationType getType()
getType
in class AttachedDeepaMehtaObject
private void updateRole(RoleModel newModel, int nr)
nr
- used only for loggingprivate Role createAttachedRole(RoleModel model)
private Topic filterTopic(Role role, String roleTypeUri)
private Topic filterTopic(DeepaMehtaObject object, String topicTypeUri)
private TopicRole filterRole(Role role, TopicRoleModel roleModel)
private void reassignInstantiation()
private Association fetchInstantiation()
Copyright © 2015. All Rights Reserved.