<commit_before>package org.flymine.dataconversion;

/*
 * Copyright (C) 2002-2005 FlyMine
 *
 * This code may be freely distributed and modified under the
 * terms of the GNU Lesser General Public Licence.  This should
 * be distributed with the code.  See the LICENSE file for more
 * information or http://www.gnu.org/copyleft/lesser.html.
 *
 */

import java.util.Collection;
import java.util.Iterator;
import java.util.HashSet;
import java.util.Properties;

import org.intermine.InterMineException;
import org.intermine.xml.full.Attribute;
import org.intermine.xml.full.Item;
import org.intermine.objectstore.ObjectStoreException;
import org.intermine.dataconversion.ItemReader;
import org.intermine.dataconversion.DataTranslator;
import org.intermine.util.XmlUtil;
import org.intermine.metadata.Model;

import org.apache.log4j.Logger;

/**
 * Convert Chado data in fulldata Item format conforming to a source OWL definition
 * to fulldata Item format conforming to InterMine OWL definition.
 *
 * @author <NAME>
 * @author <NAME>
 */
public class ChadoDataTranslator extends DataTranslator
{
    protected static final Logger LOG = Logger.getLogger(ChadoDataTranslator.class);

    /**
     * @see DataTranslator#DataTranslator
     */
    public ChadoDataTranslator(ItemReader srcItemReader, Properties mapping, Model srcModel,
                               String tgtModel) {
        super(srcItemReader, mapping, srcModel, tgtModel);
    }

    /**
     * @see DataTranslator#translateItem
     */
    protected Collection translateItem(Item srcItem)
        throws ObjectStoreException, InterMineException {<commit_msg>construct DataTranslator with model instead of namespace<commit_after>package org.flymine.dataconversion;

/*
 * Copyright (C) 2002-2005 FlyMine
 *
 * This code may be freely distributed and modified under the
 * terms of the GNU Lesser General Public Licence.  This should
 * be distributed with the code.  See the LICENSE file for more
 * information or http://www.gnu.org/copyleft/lesser.html.
 *
 */

import java.util.Collection;
import java.util.Iterator;
import java.util.HashSet;
import java.util.Properties;

import org.intermine.InterMineException;
import org.intermine.xml.full.Attribute;
import org.intermine.xml.full.Item;
import org.intermine.objectstore.ObjectStoreException;
import org.intermine.dataconversion.ItemReader;
import org.intermine.dataconversion.DataTranslator;
import org.intermine.util.XmlUtil;
import org.intermine.metadata.Model;

import org.apache.log4j.Logger;

/**
 * Convert Chado data in fulldata Item format conforming to a source OWL definition
 * to fulldata Item format conforming to InterMine OWL definition.
 *
 * @author <NAME>
 * @author <NAME>
 */
public class ChadoDataTranslator extends DataTranslator
{
    protected static final Logger LOG = Logger.getLogger(ChadoDataTranslator.class);

    /**
     * @see DataTranslator#DataTranslator
     */
    public ChadoDataTranslator(ItemReader srcItemReader, Properties mapping, Model srcModel,
                               Model tgtModel) {
        super(srcItemReader, mapping, srcModel, tgtModel);
    }

    /**
     * @see DataTranslator#translateItem
     */
    protected Collection translateItem(Item srcItem)
        throws ObjectStoreException, InterMineException {
{'fraction_non_alphanumeric': 0.08303030303030302, 'fraction_numerical': 0.005454545454545455, 'mean_word_length': 3.993948562783661, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 4}, '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': '7490835', 'n_tokens_mistral': 958, 'n_tokens_neox': 937, 'n_words': 260}