001    package org.deepamehta.plugins.wikidata.migrations;
002    
003    import de.deepamehta.core.AssociationType;
004    import de.deepamehta.core.Topic;
005    import de.deepamehta.core.TopicType;
006    import de.deepamehta.core.model.*;
007    import de.deepamehta.core.service.Migration;
008    import java.util.logging.Logger;
009    
010    
011    /*
012     * Registering the custom page-renderer for wikidata search entities.
013     *
014     * @author Malte Rei├čig (<malte@mikromedia.de>)
015     * @website https://github.com/mukil/dm4-wikidata
016     * @since 0.0.3-SNAPSHOT
017     */
018    
019    public class Migration7 extends Migration {
020    
021        private Logger log = Logger.getLogger(getClass().getName());
022    
023        private final static String WD_SEARCH_ENTITY = "org.deepamehta.wikidata.search_entity";
024    
025        @Override
026        public void run() {
027    
028            // 1) Register the new page-renderer
029            TopicType searchEntity = dms.getTopicType(WD_SEARCH_ENTITY);
030            searchEntity.getViewConfig().addSetting("dm4.webclient.view_config", "dm4.webclient.page_renderer_uri",
031                    "org.deepamehta.wikidata.search_entity_renderer");
032    
033        }
034    
035    }