<commit_before>package nl.mpi.kinnate;

import nl.mpi.arbil.ArbilSwingInjector;
import nl.mpi.arbil.data.ArbilDataNodeLoader;
import nl.mpi.arbil.data.ArbilTreeHelper;
import nl.mpi.arbil.ui.ArbilWindowManager;
import nl.mpi.arbil.userstorage.ArbilSessionStorage;
import nl.mpi.arbil.userstorage.SessionStorage;
import nl.mpi.arbil.util.ApplicationVersionManager;
import nl.mpi.arbil.util.ArbilBugCatcher;
import nl.mpi.arbil.util.ArbilMimeHashQueue;
import nl.mpi.arbil.util.MessageDialogHandler;
import nl.mpi.kinnate.entityindexer.EntityCollection;
import nl.mpi.kinnate.userstorage.KinSessionStorage;

/**
 * Takes care of injecting certain class instances into objects or classes.
 * This provides us with a sort of dependency injection, which enables loosening
 * the coupling between for example data classes and UI classes.
 *
 * @author <NAME> <<EMAIL>>
 *
 * @author     : <NAME>
 * Cut down version as required for kinship
 * Created on : May 3, 2011, 12:17:34 PM
 */
public class KinnateArbilInjector extends ArbilSwingInjector {

    private ArbilTreeHelper treeHelper;
    private ArbilMimeHashQueue mimeHashQueue;
    private ArbilWindowManager windowManager;
    private ArbilBugCatcher bugCatcher;
    private ArbilDataNodeLoader dataNodeLoader;
    private ArbilSessionStorage sessionStorage;
    private EntityCollection entityCollection;

    public synchronized void injectHandlers() {
        injectHandlers(new ApplicationVersionManager(new KinOathVersion()));
    }

    /**
     * Does initial injection into static classes. Needs to be called only once.
     */
    public synchronized void injectHandlers(final ApplicationVersionManager versionManager) {
        injectVersionManager(versionManager);

        sessionStorage = new KinSessionStorage();
        injectSessionStorage(sessionStorage);

        bugCatcher = new ArbilBugCatcher(sessionStorage, versionManager);
        sessionStorage.setBugCatcher(bugCatcher);
        injectBugCatcher(bugCatcher);

        windowManager = new ArbilWindowManager();
        windowManager.setBugCatcher(bugCatcher);
        windowManager.setSessionStorage(sessionStorage);
        windowManager.setVersionManager(versionManager);

        final MessageDialogHandler messageDialogHandler = windowManager;
        sessionStorage.setMessageDialogHandler(messageDialogHandler);
        injectDialogHandler(messageDialogHandler);

        sessionStorage.setWindowManager(windowManager);
        injectWindowManager(windowManager);

        mimeHashQueue = new ArbilMimeHashQueue(windowManager, sessionStorage);
        mimeHashQueue.setBugCatcher(bugCatcher);
        mimeHashQueue.setMessageDialogHandler(messageDialogHandler);
        injectMimeHashQueue(mimeHashQueue);

        treeHelper = new ArbilTreeHelper(sessionStorage, messageDialogHandler, bugCatcher);
        windowManager.setTreeHelper(treeHelper);
        sessionStorage.setTreeHelper(treeHelper);
        injectTreeHelper(treeHelper);

        dataNodeLoader = new ArbilDataNodeLoader(bugCatcher, messageDialogHandler, sessionStorage, mimeHashQueue, treeHelper);
        treeHelper.setDataNodeLoader(dataNodeLoader);
        mimeHashQueue.setDataNodeLoader(dataNodeLoader);
        windowManager.setDataNodeLoader(dataNodeLoader);
        injectDataNodeLoader(dataNodeLoader);

        entityCollection = new EntityCollection(sessionStorage, windowManager, bugCatcher);
    }

    /**
     * Should not be called before injectHandlers()!!
     * @return the treeHelper
     */
    public ArbilTreeHelper getTreeHelper() {
        return treeHelper;
    }

    /**
     * Should not be called before injectHandlers()!!
     * @return the treeHelper
     */
    public ArbilMimeHashQueue getMimeHashQueue() {
        return mimeHashQueue;
    }

    /**
     * Should not be called before injectHandlers()!!
     * @return the treeHelper
     */
    public ArbilWindowManager getWindowManager() {
        return windowManager;
    }

    /**
     * Should not be called before injectHandlers()!!
     * @return the treeHelper
     */
    public ArbilBugCatcher getBugCatcher() {
        return bugCatcher;
    }

    /**
     * Should not be called before injectHandlers()!!
     * @return the treeHelper
     */
    public ArbilDataNodeLoader getDataNodeLoader() {
        return dataNodeLoader;
    }

    public SessionStorage getSessionStorage() {
        return sessionStorage;
    }

    public EntityCollection getEntityCollection() {
        return entityCollection;
    }
}
<commit_msg>Updated some sample diagrams to reflect recent changes. Updated the line rendering to reflect recent changes. Replaced the entity relation comparator code. Updated the relation type and custom relation type data structure. Added table cell editor and renderers for the kin type definitions table so that multiple select is available for symbols and relations. Added action and button to scan the diagram for relation types to which styles can be applied. Updated the kin type processor to handle multiple relations and symbols for each kin type and wild cards for each. Arranged the document new menu so that the Standard diagram is first.<commit_after>package nl.mpi.kinnate;

import nl.mpi.arbil.ArbilSwingInjector;
import nl.mpi.arbil.data.ArbilDataNodeLoader;
import nl.mpi.arbil.data.ArbilTreeHelper;
import nl.mpi.arbil.ui.ArbilWindowManager;
import nl.mpi.arbil.userstorage.ArbilSessionStorage;
import nl.mpi.arbil.userstorage.SessionStorage;
import nl.mpi.arbil.util.ApplicationVersionManager;
import nl.mpi.arbil.util.ArbilBugCatcher;
import nl.mpi.arbil.util.ArbilMimeHashQueue;
import nl.mpi.arbil.util.MessageDialogHandler;
import nl.mpi.kinnate.entityindexer.EntityCollection;
import nl.mpi.kinnate.userstorage.KinSessionStorage;

/**
 * Takes care of injecting certain class instances into objects or classes.
 * This provides us with a sort of dependency injection, which enables loosening
 * the coupling between for example data classes and UI classes.
 *
 * @author <NAME> <<EMAIL>>
 *
 * @author     : <NAME>
 * Cut down version as required for kinship
 * Created on : May 3, 2011, 12:17:34 PM
 */
public class KinnateArbilInjector extends ArbilSwingInjector {

    private ArbilTreeHelper treeHelper;
    private ArbilMimeHashQueue mimeHashQueue;
    private ArbilWindowManager windowManager;
    private ArbilBugCatcher bugCatcher;
    private ArbilDataNodeLoader dataNodeLoader;
    private ArbilSessionStorage sessionStorage;
    private EntityCollection entityCollection;

    public synchronized void injectHandlers() {
        injectHandlers(new ApplicationVersionManager(new KinOathVersion()));
    }

    /**
     * Does initial injection into static classes. Needs to be called only once.
     */
    public synchronized void injectHandlers(final ApplicationVersionManager versionManager) {
        injectVersionManager(versionManager);

        sessionStorage = new KinSessionStorage(versionManager);
        injectSessionStorage(sessionStorage);

        bugCatcher = new ArbilBugCatcher(sessionStorage, versionManager);
        sessionStorage.setBugCatcher(bugCatcher);
        injectBugCatcher(bugCatcher);

        windowManager = new ArbilWindowManager();
        windowManager.setBugCatcher(bugCatcher);
        windowManager.setSessionStorage(sessionStorage);
        windowManager.setVersionManager(versionManager);

        final MessageDialogHandler messageDialogHandler = windowManager;
        sessionStorage.setMessageDialogHandler(messageDialogHandler);
        injectDialogHandler(messageDialogHandler);

        sessionStorage.setWindowManager(windowManager);
        injectWindowManager(windowManager);

        mimeHashQueue = new ArbilMimeHashQueue(windowManager, sessionStorage);
        mimeHashQueue.setBugCatcher(bugCatcher);
        mimeHashQueue.setMessageDialogHandler(messageDialogHandler);
        injectMimeHashQueue(mimeHashQueue);

        treeHelper = new ArbilTreeHelper(sessionStorage, messageDialogHandler, bugCatcher);
        windowManager.setTreeHelper(treeHelper);
        sessionStorage.setTreeHelper(treeHelper);
        injectTreeHelper(treeHelper);

        dataNodeLoader = new ArbilDataNodeLoader(bugCatcher, messageDialogHandler, sessionStorage, mimeHashQueue, treeHelper);
        treeHelper.setDataNodeLoader(dataNodeLoader);
        mimeHashQueue.setDataNodeLoader(dataNodeLoader);
        windowManager.setDataNodeLoader(dataNodeLoader);
        injectDataNodeLoader(dataNodeLoader);

        entityCollection = new EntityCollection(sessionStorage, windowManager, bugCatcher);
    }

    /**
     * Should not be called before injectHandlers()!!
     * @return the treeHelper
     */
    public ArbilTreeHelper getTreeHelper() {
        return treeHelper;
    }

    /**
     * Should not be called before injectHandlers()!!
     * @return the treeHelper
     */
    public ArbilMimeHashQueue getMimeHashQueue() {
        return mimeHashQueue;
    }

    /**
     * Should not be called before injectHandlers()!!
     * @return the treeHelper
     */
    public ArbilWindowManager getWindowManager() {
        return windowManager;
    }

    /**
     * Should not be called before injectHandlers()!!
     * @return the treeHelper
     */
    public ArbilBugCatcher getBugCatcher() {
        return bugCatcher;
    }

    /**
     * Should not be called before injectHandlers()!!
     * @return the treeHelper
     */
    public ArbilDataNodeLoader getDataNodeLoader() {
        return dataNodeLoader;
    }

    public SessionStorage getSessionStorage() {
        return sessionStorage;
    }

    public EntityCollection getEntityCollection() {
        return entityCollection;
    }
}

{'fraction_non_alphanumeric': 0.07116336633663366, 'fraction_numerical': 0.002268976897689769, 'mean_word_length': 3.826779492284719, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3107948', 'n_tokens_mistral': 2625, 'n_tokens_neox': 2499, 'n_words': 632}