<commit_before>package uk.ac.ebi.quickgo.search.ontology;

import uk.ac.ebi.quickgo.solr.model.ontology.SolrTerm;

import java.util.Arrays;
import java.util.Date;

/**
 * Class to create mocked objects of different {@code docType}s, which are valid according to {@link SolrTerm}.
 *
 * Used in {@link OntologySearchIT} to add documents to the ontology index, so that it is possible to test
 * the behaviour of searching the index (i.e., testing the effect of the index's schema's field definitions).
 *
 * Created 03/11/15
 * @author Edd
 */
public class DocumentMocker {

    public static class Relation extends SolrTerm {
        public static SolrTerm createRelation() {
            SolrTerm relation = new SolrTerm();
            relation.setDocType(SolrTermDocumentType.RELATION.getValue());
            relation.setObsolete(false);
            relation.setChild("GO:0006601");
            relation.setParent("GO:0006601");
            relation.setRelationType("I");
            return relation;
        }
    }

    protected static class Term extends SolrTerm {

        protected static SolrTerm createTerm() {
            SolrTerm term = new SolrTerm();
            term.setDocType(SolrTermDocumentType.TERM.getValue());
            term.setId("GO:0006600");
            term.setName("creatine metabolic process");
            term.setComment("Note that protein targeting encompasses the transport of the protein to " +
                    "the specified location, and may also include additional steps such as protein processing.");
            term.setObsolete(false);
            //        document.setCategory(CATEGORY); // not used
            term.setDefinition(
                    "The chemical reactions and pathways involving creatine (N-(aminoiminomethyl)-N-methylglycine), a "
                            + "compound synthesized from the amino acids arginine, glycine, and methionine that occurs in "
                            + "muscle.");
            term.setDefinitionXref(Arrays.asList("PMID:00000001", "PMID:00000002"));
            term.setSecondaryIds(Arrays.asList("GO:0000003", "GO:0000004"));
            return term;
        }
    }

    public static class Synonym extends SolrTerm {

        public static SolrTerm createSynonym() {<commit_msg>change visibility to public<commit_after>package uk.ac.ebi.quickgo.search.ontology;

import uk.ac.ebi.quickgo.solr.model.ontology.SolrTerm;

import java.util.Arrays;
import java.util.Date;

/**
 * Class to create mocked objects of different {@code docType}s, which are valid according to {@link SolrTerm}.
 *
 * Used in {@link OntologySearchIT} to add documents to the ontology index, so that it is possible to test
 * the behaviour of searching the index (i.e., testing the effect of the index's schema's field definitions).
 *
 * Created 03/11/15
 * @author Edd
 */
public class DocumentMocker {

    public static class Relation extends SolrTerm {
        public static SolrTerm createRelation() {
            SolrTerm relation = new SolrTerm();
            relation.setDocType(SolrTermDocumentType.RELATION.getValue());
            relation.setObsolete(false);
            relation.setChild("GO:0006601");
            relation.setParent("GO:0006601");
            relation.setRelationType("I");
            return relation;
        }
    }

    public static class Term extends SolrTerm {

        protected static SolrTerm createTerm() {
            SolrTerm term = new SolrTerm();
            term.setDocType(SolrTermDocumentType.TERM.getValue());
            term.setId("GO:0006600");
            term.setName("creatine metabolic process");
            term.setComment("Note that protein targeting encompasses the transport of the protein to " +
                    "the specified location, and may also include additional steps such as protein processing.");
            term.setObsolete(false);
            //        document.setCategory(CATEGORY); // not used
            term.setDefinition(
                    "The chemical reactions and pathways involving creatine (N-(aminoiminomethyl)-N-methylglycine), a "
                            + "compound synthesized from the amino acids arginine, glycine, and methionine that occurs in "
                            + "muscle.");
            term.setDefinitionXref(Arrays.asList("PMID:00000001", "PMID:00000002"));
            term.setSecondaryIds(Arrays.asList("GO:0000003", "GO:0000004"));
            return term;
        }
    }

    public static class Synonym extends SolrTerm {

        public static SolrTerm createSynonym() {
{'fraction_non_alphanumeric': 0.09271812814345069, 'fraction_numerical': 0.024928930680078724, 'mean_word_length': 2.5076687116564416, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 4, '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': '4943539', 'n_tokens_mistral': 1316, 'n_tokens_neox': 1169, 'n_words': 349}