use of org.nextprot.api.core.domain.EntryProperties in project nextprot-api by calipho-sib.
the class EntryPropertiesIntegrationDaoTest method testFindEntryProperties.
@Test
public void testFindEntryProperties() {
EntryProperties props = this.entryPropertieDao.findEntryProperties("NX_P51659");
assertTrue(props.getMaxSeqLen() > 760);
assertTrue(props.getInteractionCount() > 17);
assertTrue(props.getFiltermutagenesis());
assertTrue(props.getFilterstructure());
assertTrue(props.getFilterdisease());
assertTrue(props.getFilterproteomics());
assertTrue(props.getFilterexpressionprofile());
}
use of org.nextprot.api.core.domain.EntryProperties in project nextprot-api by calipho-sib.
the class FilterAndPropertiesFieldsBuilder method init.
@Override
protected void init(Entry entry) {
EntryReportStats ers = entryReportStatsService.reportEntryStats(entry.getUniqueName());
// Filters and entry properties
EntryProperties props = entry.getProperties();
addField(Fields.ISOFORM_NUM, ers.countIsoforms());
int cnt;
cnt = ers.countPTMs();
if (cnt > 0) {
addField(Fields.PTM_NUM, cnt);
}
cnt = ers.countVariants();
if (cnt > 0) {
addField(Fields.VAR_NUM, cnt);
}
String filters = "";
if (props.getFilterstructure())
filters += "filterstructure ";
if (props.getFilterdisease())
filters += "filterdisease ";
if (props.getFilterexpressionprofile())
filters += "filterexpressionprofile ";
if (props.getFiltermutagenesis())
filters += "filtermutagenesis ";
if (props.getFilterproteomics())
filters += "filterproteomics ";
if (filters.length() > 0) {
addField(Fields.FILTERS, filters.trim());
}
// max length among all isoforms
addField(Fields.AA_LENGTH, props.getMaxSeqLen());
}
Aggregations