class TopicImpl extends DeepaMehtaObjectImpl implements Topic
CoreService
.Modifier and Type | Field and Description |
---|---|
private Logger |
logger |
mf, model, pl
Constructor and Description |
---|
TopicImpl(TopicModelImpl model,
PersistenceLayer pl) |
Modifier and Type | Method and Description |
---|---|
void |
delete()
Deletes the DeepaMehta object in its entirety, that is
- the object itself (the parent)
- all child topics associated via "dm4.core.composition", recusively
- all the remaining direct associations, e.g.
|
Topic |
findChildTopic(String topicTypeUri)
Searches this topic's child topics for a topic of the given type.
|
Association |
getAssociation(String assocTypeUri,
String myRoleTypeUri,
String othersRoleTypeUri,
long othersTopicId) |
List<Association> |
getAssociations() |
TopicModelImpl |
getModel() |
RelatedAssociation |
getRelatedAssociation(String assocTypeUri,
String myRoleTypeUri,
String othersRoleTypeUri,
String othersAssocTypeUri) |
List<RelatedAssociation> |
getRelatedAssociations(String assocTypeUri,
String myRoleTypeUri,
String othersRoleTypeUri,
String othersAssocTypeUri) |
List<RelatedTopic> |
getRelatedTopics(List assocTypeUris,
String myRoleTypeUri,
String othersRoleTypeUri,
String othersTopicTypeUri) |
Topic |
loadChildTopics() |
Topic |
loadChildTopics(String assocDefUri) |
void |
update(TopicModel updateModel) |
className, equals, getChildTopics, getDatabaseVendorObject, getId, getProperty, getRelatedTopic, getRelatedTopics, getRelatedTopics, getSimpleValue, getType, getTypeUri, getUri, hashCode, hasProperty, removeProperty, setChildTopics, setProperty, setSimpleValue, setSimpleValue, setSimpleValue, setSimpleValue, setSimpleValue, setTypeUri, setUri, toJSON, toString, updateChildTopic, updateChildTopics
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getChildTopics, getDatabaseVendorObject, getId, getProperty, getRelatedTopic, getRelatedTopics, getRelatedTopics, getSimpleValue, getType, getTypeUri, getUri, hasProperty, removeProperty, setChildTopics, setProperty, setSimpleValue, setSimpleValue, setSimpleValue, setSimpleValue, setSimpleValue, setTypeUri, setUri, updateChildTopic, updateChildTopics
toJSON
TopicImpl(TopicModelImpl model, PersistenceLayer pl)
public final void update(TopicModel updateModel)
public final void delete()
DeepaMehtaObject
delete
in interface DeepaMehtaObject
public final Topic findChildTopic(String topicTypeUri)
Topic
The first topic found is returned, according to a depth-first search. For multiple-value childs the first topic is returned. If the given type matches this topic directly it is returned immediately.
The search is driven by this topic's type definition. That is child topics which do not adhere to the type definition are not found.
TODO: make this generic by moving to DeepaMehtaObject interface?
findChildTopic
in interface Topic
null
.public final Topic loadChildTopics()
loadChildTopics
in interface DeepaMehtaObject
loadChildTopics
in interface Topic
loadChildTopics
in class DeepaMehtaObjectImpl
public final Topic loadChildTopics(String assocDefUri)
loadChildTopics
in interface DeepaMehtaObject
loadChildTopics
in interface Topic
loadChildTopics
in class DeepaMehtaObjectImpl
public TopicModelImpl getModel()
getModel
in interface DeepaMehtaObject
getModel
in interface Topic
getModel
in class DeepaMehtaObjectImpl
public final List<RelatedTopic> getRelatedTopics(List assocTypeUris, String myRoleTypeUri, String othersRoleTypeUri, String othersTopicTypeUri)
getRelatedTopics
in interface DeepaMehtaObject
assocTypeUris
- may *not* be nullmyRoleTypeUri
- may be nullothersRoleTypeUri
- may be nullothersTopicTypeUri
- may be nullpublic final 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 final List<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 final Association getAssociation(String assocTypeUri, String myRoleTypeUri, String othersRoleTypeUri, long othersTopicId)
getAssociation
in interface DeepaMehtaObject
public final List<Association> getAssociations()
getAssociations
in interface DeepaMehtaObject
Copyright © 2017. All Rights Reserved.