Search in sources :

Example 1 with DatabaseEntryValueObject

use of ubic.gemma.model.common.description.DatabaseEntryValueObject in project Gemma by PavlidisLab.

the class BioSequenceValueObject method fromEntity.

public static BioSequenceValueObject fromEntity(BioSequence bs) {
    BioSequenceValueObject vo = new BioSequenceValueObject(bs.getId());
    vo.setName(bs.getName());
    vo.setDescription(bs.getDescription());
    vo.setSequence(bs.getSequence());
    if (bs.getSequenceDatabaseEntry() != null) {
        vo.setSequenceDatabaseEntry(new DatabaseEntryValueObject(bs.getSequenceDatabaseEntry()));
    }
    vo.setLength(bs.getLength());
    vo.setType(bs.getType());
    vo.setFractionRepeats(bs.getFractionRepeats());
    vo.setTaxon(TaxonValueObject.fromEntity(bs.getTaxon()));
    return vo;
}
Also used : DatabaseEntryValueObject(ubic.gemma.model.common.description.DatabaseEntryValueObject)

Example 2 with DatabaseEntryValueObject

use of ubic.gemma.model.common.description.DatabaseEntryValueObject in project Gemma by PavlidisLab.

the class ArrayDesignControllerImpl method setExtRefsAndCounts.

/**
 * Sets external references, design element count and express. experiment count on the given value object.
 */
private ArrayDesignValueObjectExt setExtRefsAndCounts(ArrayDesignValueObjectExt result, ArrayDesign arrayDesign) {
    Integer numCompositeSequences = arrayDesignService.getCompositeSequenceCount(arrayDesign).intValue();
    int numExpressionExperiments = arrayDesignService.numExperiments(arrayDesign);
    Collection<DatabaseEntryValueObject> externalReferences = new HashSet<>();
    for (DatabaseEntry en : arrayDesign.getExternalReferences()) {
        externalReferences.add(new DatabaseEntryValueObject(en));
    }
    result.setExternalReferences(externalReferences);
    result.setDesignElementCount(numCompositeSequences);
    result.setExpressionExperimentCount(numExpressionExperiments);
    return result;
}
Also used : DatabaseEntry(ubic.gemma.model.common.description.DatabaseEntry) DatabaseEntryValueObject(ubic.gemma.model.common.description.DatabaseEntryValueObject)

Aggregations

DatabaseEntryValueObject (ubic.gemma.model.common.description.DatabaseEntryValueObject)2 DatabaseEntry (ubic.gemma.model.common.description.DatabaseEntry)1