Constructing a RelatedTopic object based on two topics and an assoc
Using the current dmx-core API I am unable to turn these actions into a RelatedTopic (as needed by the dmx-webclient).
// Get original image file topic
Topic fileTopic = dmx.getTopic(fileTopicId).loadChildTopics();
// Create resized image file topic
Topic resizedImageFileTopic = files.getFileTopic(imageFileTopicParentRepositoryPath + File.separator + newFileName);
// Associate new file topic with original file topic
dmx.createAssoc(mf.newAssocModel(RESIZED_IMAGE,
mf.newTopicPlayerModel(fileTopic.getId(), Constants.PARENT),
mf.newTopicPlayerModel(resizedImageFileTopic.getId(), Constants.CHILD)));
I can't find admx.getRelatedTopic(topicId1, topicId2, {topic1RoleType, topic2RoleType2}, assocTypeUri);
or a fileTopic.getRelatedTopic(topic2Id, {topic1RoleType, topic2RoleType2}, assocTypeUri);
.
Am I doing something wrong? How am I supposed to construct a RelatedTopic (server-side) given I have both topics and the assoc at hand?
Thanks for your support!