de.deepamehta.core.impl
Class AttachedTopic

Show UML class diagram
java.lang.Object
  extended by de.deepamehta.core.impl.AttachedDeepaMehtaObject
      extended by de.deepamehta.core.impl.AttachedTopic
All Implemented Interfaces:
DeepaMehtaObject, Identifiable, JSONEnabled, Topic
Direct Known Subclasses:
AttachedRelatedTopic, AttachedType

 class AttachedTopic
extends AttachedDeepaMehtaObject
implements Topic

A topic that is attached to the DeepaMehtaService.


Field Summary
private  Logger logger
           
 
Fields inherited from class de.deepamehta.core.impl.AttachedDeepaMehtaObject
dms
 
Constructor Summary
AttachedTopic(TopicModel model, EmbeddedService dms)
           
 
Method Summary
(package private)  void _update(TopicModel model)
          Low-level update method which does not fire the POST_UPDATE_TOPIC_REQUEST event.
(package private)  String className()
           
 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)
           
 Association getAssociation(String assocTypeUri, String myRoleTypeUri, String othersRoleTypeUri, long othersTopicId)
           
 List<Association> getAssociations()
           
 TopicModel getModel()
           
 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)
           
(package private)  TopicType getType()
           
(package private)  Directive getUpdateDirective()
           
 Topic loadChildTopics()
           
 Topic 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(TopicModel model)
           
(package private)  void updateChildTopics(ChildTopicsModel childTopics)
           
 
Methods inherited from class de.deepamehta.core.impl.AttachedDeepaMehtaObject
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
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface de.deepamehta.core.DeepaMehtaObject
getChildTopics, getDatabaseVendorObject, getId, getProperty, getRelatedTopic, getRelatedTopics, getRelatedTopics, getSimpleValue, getTypeUri, getUri, hasProperty, setChildTopics, setSimpleValue, setSimpleValue, setSimpleValue, setSimpleValue, setSimpleValue, setTypeUri, setUri, update, updateChildTopic, updateChildTopics
 
Methods inherited from interface de.deepamehta.core.JSONEnabled
toJSON
 

Field Detail

logger

private Logger logger
Constructor Detail

AttachedTopic

AttachedTopic(TopicModel model,
              EmbeddedService dms)
Method Detail

update

public void update(TopicModel model)
Specified by:
update in interface Topic

delete

public void delete()
Description copied from class: AttachedDeepaMehtaObject
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.

Note: deletion of the object itself is up to the subclasses.

Specified by:
delete in interface DeepaMehtaObject
Overrides:
delete in class AttachedDeepaMehtaObject

loadChildTopics

public Topic loadChildTopics()
Specified by:
loadChildTopics in interface DeepaMehtaObject
Specified by:
loadChildTopics in interface Topic
Overrides:
loadChildTopics in class AttachedDeepaMehtaObject

loadChildTopics

public Topic loadChildTopics(String childTypeUri)
Specified by:
loadChildTopics in interface DeepaMehtaObject
Specified by:
loadChildTopics in interface Topic
Overrides:
loadChildTopics in class AttachedDeepaMehtaObject

getModel

public TopicModel getModel()
Specified by:
getModel in interface DeepaMehtaObject
Specified by:
getModel in interface Topic
Overrides:
getModel in class AttachedDeepaMehtaObject

getRelatedTopics

public ResultList<RelatedTopic> getRelatedTopics(List assocTypeUris,
                                                 String myRoleTypeUri,
                                                 String othersRoleTypeUri,
                                                 String othersTopicTypeUri,
                                                 int maxResultSize)
Specified by:
getRelatedTopics in interface DeepaMehtaObject
Parameters:
assocTypeUris - may *not* be null
myRoleTypeUri - may be null
othersRoleTypeUri - may be null
othersTopicTypeUri - may be null

getRelatedAssociation

public RelatedAssociation getRelatedAssociation(String assocTypeUri,
                                                String myRoleTypeUri,
                                                String othersRoleTypeUri,
                                                String othersAssocTypeUri)
Specified by:
getRelatedAssociation in interface DeepaMehtaObject
Parameters:
assocTypeUri - may be null
myRoleTypeUri - may be null
othersRoleTypeUri - may be null
othersAssocTypeUri - may be null

getRelatedAssociations

public ResultList<RelatedAssociation> getRelatedAssociations(String assocTypeUri,
                                                             String myRoleTypeUri,
                                                             String othersRoleTypeUri,
                                                             String othersAssocTypeUri)
Specified by:
getRelatedAssociations in interface DeepaMehtaObject
Parameters:
assocTypeUri - may be null
myRoleTypeUri - may be null
othersRoleTypeUri - may be null
othersAssocTypeUri - may be null

getAssociation

public Association getAssociation(String assocTypeUri,
                                  String myRoleTypeUri,
                                  String othersRoleTypeUri,
                                  long othersTopicId)
Specified by:
getAssociation in interface DeepaMehtaObject

getAssociations

public List<Association> getAssociations()
Specified by:
getAssociations in interface DeepaMehtaObject

setProperty

public void setProperty(String propUri,
                        Object propValue,
                        boolean addToIndex)
Specified by:
setProperty in interface DeepaMehtaObject

removeProperty

public void removeProperty(String propUri)
Description copied from interface: DeepaMehtaObject
Removes this object's property associated with the given property URI. If there's no property value associated with the property URI nothing is performed.

Specified by:
removeProperty in interface DeepaMehtaObject

_update

void _update(TopicModel model)
Low-level update method which does not fire the POST_UPDATE_TOPIC_REQUEST event.

Called multiple times while updating the child topics (see AttachedChildTopics). POST_UPDATE_TOPIC_REQUEST on the other hand must be fired only once (per update request).


className

String className()
Specified by:
className in class AttachedDeepaMehtaObject

updateChildTopics

void updateChildTopics(ChildTopicsModel childTopics)
Specified by:
updateChildTopics in class AttachedDeepaMehtaObject

getUpdateDirective

Directive getUpdateDirective()
Specified by:
getUpdateDirective in class AttachedDeepaMehtaObject

storeUri

final void storeUri()
Specified by:
storeUri in class AttachedDeepaMehtaObject

storeTypeUri

final void storeTypeUri()
Specified by:
storeTypeUri in class AttachedDeepaMehtaObject

fetchRelatedTopic

final RelatedTopicModel fetchRelatedTopic(String assocTypeUri,
                                          String myRoleTypeUri,
                                          String othersRoleTypeUri,
                                          String othersTopicTypeUri)
Specified by:
fetchRelatedTopic in class AttachedDeepaMehtaObject

fetchRelatedTopics

final ResultList<RelatedTopicModel> fetchRelatedTopics(String assocTypeUri,
                                                       String myRoleTypeUri,
                                                       String othersRoleTypeUri,
                                                       String othersTopicTypeUri,
                                                       int maxResultSize)
Specified by:
fetchRelatedTopics in class AttachedDeepaMehtaObject

getType

TopicType getType()
Specified by:
getType in class AttachedDeepaMehtaObject

reassignInstantiation

private void reassignInstantiation()

fetchInstantiation

private Association fetchInstantiation()


Copyright © 2015. All Rights Reserved.