void storeIndexModes(String typeUri, Set<IndexMode> indexModes) {
   for (IndexMode indexMode : indexModes) {
     dms.createAssociation(
         "dm4.core.aggregation",
         new TopicRoleModel(typeUri, "dm4.core.type"),
         new TopicRoleModel(indexMode.toUri(), "dm4.core.default"));
   }
 }
 private Set<IndexMode> fetchIndexModes(long typeId) {
   ResultSet<RelatedTopicModel> indexModes =
       dms.storage.getTopicRelatedTopics(
           typeId,
           "dm4.core.aggregation",
           "dm4.core.type",
           null,
           "dm4.core.index_mode",
           0); // ### FIXME: null
   return IndexMode.fromTopics(indexModes.getItems());
 }