<commit_before>package uk.ac.ebi.microarray.atlas.api;

import com.google.common.base.Function;
import com.google.common.collect.Lists;
import uk.ac.ebi.microarray.atlas.model.AssayProperty;
import uk.ac.ebi.microarray.atlas.model.OntologyTerm;
import uk.ac.ebi.microarray.atlas.model.SampleProperty;

import javax.annotation.Nonnull;
import java.util.List;
import java.util.Set;

import static com.google.common.collect.Collections2.transform;

/**
 * A minimal version of ApiProperty
 *
 * @author <NAME>
 */
public class ApiShallowProperty {

    private String name;
    private String value;
    private List<String> terms;

    public ApiShallowProperty(final ApiPropertyValue pv, Set<String> terms) {
        name = pv.getProperty().getName();
        value = pv.getValue();
        this.terms = Lists.newArrayList(terms);
    }

    public String getName() {
        return name;
    }

    public String getValue() {
        return value;
    }

    public List<String> getTerms() {
        return terms;
    }
}<commit_msg>Ticket 3389 - Re-instated missing constructors<commit_after>package uk.ac.ebi.microarray.atlas.api;

import com.google.common.base.Function;
import com.google.common.collect.Lists;
import uk.ac.ebi.microarray.atlas.model.AssayProperty;
import uk.ac.ebi.microarray.atlas.model.OntologyTerm;
import uk.ac.ebi.microarray.atlas.model.SampleProperty;

import javax.annotation.Nonnull;
import java.util.List;
import java.util.Set;

import static com.google.common.collect.Collections2.transform;

/**
 * A minimal version of ApiProperty
 *
 * @author <NAME>
 */
public class ApiShallowProperty {

    private static final Function<OntologyTerm, String> ONTOLOGY_TERM =
            new Function<OntologyTerm, String>() {
                public String apply(@Nonnull OntologyTerm term) {
                    return term.getAccession();
                }
            };


    private String name;
    private String value;
    private List<String> terms;

    public ApiShallowProperty(final ApiPropertyValue pv, Set<String> terms) {
        name = pv.getProperty().getName();
        value = pv.getValue();
        this.terms = Lists.newArrayList(terms);
    }

    public ApiShallowProperty(final AssayProperty assayProperty) {
        this.name = assayProperty.getName();
        this.value = assayProperty.getValue();
        this.terms = Lists.newArrayList(transform(assayProperty.getTerms(), ONTOLOGY_TERM));
    }

    public ApiShallowProperty(final SampleProperty sampleProperty) {
        this.name = sampleProperty.getName();
        this.value = sampleProperty.getValue();
        this.terms = Lists.newArrayList(transform(sampleProperty.getTerms(), ONTOLOGY_TERM));
    }

    public String getName() {
        return name;
    }

    public String getValue() {
        return value;
    }

    public List<String> getTerms() {
        return terms;
    }
}
{'fraction_non_alphanumeric': 0.10746371803731859, 'fraction_numerical': 0.002073255010366275, 'mean_word_length': 3.1357142857142857, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '4826967', 'n_tokens_mistral': 893, 'n_tokens_neox': 862, 'n_words': 176}