use of uk.ac.bbsrc.tgac.miso.core.data.type.MetricCategory in project miso-lims by miso-lims.
the class ConstantsController method addMetricCategories.
private static void addMetricCategories(ObjectNode node) {
ArrayNode metricCategories = node.putArray("metricCategories");
for (MetricCategory category : MetricCategory.values()) {
ObjectNode dto = metricCategories.addObject();
dto.put("label", category.getLabel());
dto.put("value", category.name());
dto.put("sortPriority", category.getSortPriority());
}
}
use of uk.ac.bbsrc.tgac.miso.core.data.type.MetricCategory in project miso-lims by miso-lims.
the class MetricDto method to.
public Metric to() {
Metric to = new Metric();
setLong(to::setId, getId(), false);
setString(to::setAlias, getAlias());
setObject(to::setCategory, getCategory(), MetricCategory::valueOf);
setObject(to::setSubcategory, MetricSubcategory::new, getSubcategoryId());
setObject(to::setThresholdType, getThresholdType(), ThresholdType::valueOf);
setString(to::setUnits, getUnits());
setInteger(to::setSortPriority, getSortPriority(), true);
setObject(to::setNucleicAcidType, getNucleicAcidType(), NucleicAcidType::valueOf);
setObject(to::setTissueMaterial, TissueMaterialImpl::new, getTissueMaterialId());
setObject(to::setTissueType, TissueTypeImpl::new, getTissueTypeId());
setBoolean(to::setNegateTissueType, isNegateTissueType(), false);
setObject(to::setTissueOrigin, TissueOriginImpl::new, getTissueOriginId());
setObject(to::setContainerModel, SequencingContainerModel::new, getContainerModelId());
setInteger(to::setReadLength, getReadLength(), true);
setInteger(to::setReadLength2, getReadLength2(), true);
return to;
}
use of uk.ac.bbsrc.tgac.miso.core.data.type.MetricCategory in project miso-lims by miso-lims.
the class MetricSubcategoryDto method to.
public MetricSubcategory to() {
MetricSubcategory to = new MetricSubcategory();
setLong(to::setId, getId(), false);
setObject(to::setCategory, getCategory(), MetricCategory::valueOf);
setString(to::setAlias, getAlias());
setObject(to::setLibraryDesignCode, LibraryDesignCode::new, getLibraryDesignCodeId());
setInteger(to::setSortPriority, getSortPriority(), true);
return to;
}
use of uk.ac.bbsrc.tgac.miso.core.data.type.MetricCategory in project miso-lims by miso-lims.
the class HibernateMetricSubcategoryDaoIT method testGetByAliasAndCategory.
@Test
public void testGetByAliasAndCategory() throws Exception {
final String alias = "Nucleic Acid Isolation";
final MetricCategory category = MetricCategory.EXTRACTION;
MetricSubcategory item = getTestSubject().getByAliasAndCategory(alias, category);
assertNotNull(item);
assertEquals(alias, item.getAlias());
assertEquals(category, item.getCategory());
}
Aggregations