<commit_before>/*
 * The Gemma project
 * 
 * Copyright (c) 2007 University of British Columbia
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */
package ubic.gemma.model.genome.gene.phenotype.valueObject;

import java.util.ArrayList;
import java.util.Calendar;
import java.util.Collection;
import java.util.GregorianCalendar;
import java.util.List;

import org.apache.commons.lang.StringUtils;

import ubic.gemma.model.common.description.BibliographicReference;

/**
 * represents a BibliographicReference as a citation string (which is really super light value object). This object has
 * four fields and is meant to be very simple, before adding anything consider using BibliographicReferenceValueObject.
 * This can't be an inner class of BibliographicReferenceValueObject because it needs dummy constructor for dwr to work with it.
 * 
 * @see ubic.gemma.model.genome.gene.phenotype.valueObject.BibliographicReferenceValueObject
 *      BibliographicReferenceValueObject for a more comprehensive alternative representation of BibliographicReference
 * @version
 */
public class CitationValueObject {

    public static CitationValueObject convert2CitationValueObject( BibliographicReference ref ) {

        return new CitationValueObject( ref );
    }

    public static List<CitationValueObject> convert2CitationValueObjects( Collection<BibliographicReference> refs ) {
        if ( refs == null || refs.size() == 0 ) {
            return new ArrayList<CitationValueObject>();
        }

        List<CitationValueObject> results = new ArrayList<CitationValueObject>();

        for ( BibliographicReference ref : refs ) {
            results.add( new CitationValueObject( ref ) );<commit_msg>removed a bit of unnecessary code<commit_after>/*
 * The Gemma project
 * 
 * Copyright (c) 2007 University of British Columbia
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */
package ubic.gemma.model.genome.gene.phenotype.valueObject;

import java.util.ArrayList;
import java.util.Calendar;
import java.util.Collection;
import java.util.GregorianCalendar;
import java.util.List;

import org.apache.commons.lang.StringUtils;

import ubic.gemma.model.common.description.BibliographicReference;

/**
 * represents a BibliographicReference as a citation string (which is really super light value object). This object has
 * four fields and is meant to be very simple, before adding anything consider using BibliographicReferenceValueObject.
 * This can't be an inner class of BibliographicReferenceValueObject because it needs dummy constructor for dwr to work with it.
 * 
 * @see ubic.gemma.model.genome.gene.phenotype.valueObject.BibliographicReferenceValueObject
 *      BibliographicReferenceValueObject for a more comprehensive alternative representation of BibliographicReference
 * @version
 */
public class CitationValueObject {

    public static CitationValueObject convert2CitationValueObject( BibliographicReference ref ) {

        return new CitationValueObject( ref );
    }

    public static List<CitationValueObject> convert2CitationValueObjects( Collection<BibliographicReference> refs ) {

        List<CitationValueObject> results = new ArrayList<CitationValueObject>();

        for ( BibliographicReference ref : refs ) {
            results.add( new CitationValueObject( ref ) );
{'fraction_non_alphanumeric': 0.07006222631942843, 'fraction_numerical': 0.004839824844434202, 'mean_word_length': 4.2798053527980535, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '5568563', 'n_tokens_mistral': 1099, 'n_tokens_neox': 1061, 'n_words': 411}