Search in sources :

Example 1 with SequenceFeatureValidator

use of org.nextprot.api.isoform.mapper.service.SequenceFeatureValidator in project nextprot-api by calipho-sib.

the class IsoformMappingServiceImpl method validateFeature.

@Override
public BaseFeatureQueryResult validateFeature(SingleFeatureQuery query) {
    try {
        SequenceFeature sequenceFeature = SequenceFeatureBase.newFeature(query);
        if (Strings.isNullOrEmpty(query.getAccession()))
            query.setAccession(findAccessionFromGeneName(query, sequenceFeature.getGeneName()));
        Entry entry = entryBuilderService.build(EntryConfig.newConfig(query.getAccession()).withTargetIsoforms().withOverview());
        SequenceFeatureValidator validator = new SequenceFeatureValidator(entry, query);
        return validator.validate(sequenceFeature);
    } catch (FeatureQueryException e) {
        return new FeatureQueryFailureImpl(e);
    }
}
Also used : Entry(org.nextprot.api.core.domain.Entry) SequenceFeatureValidator(org.nextprot.api.isoform.mapper.service.SequenceFeatureValidator) SequenceFeature(org.nextprot.api.isoform.mapper.domain.SequenceFeature) FeatureQueryException(org.nextprot.api.isoform.mapper.domain.FeatureQueryException) FeatureQueryFailureImpl(org.nextprot.api.isoform.mapper.domain.impl.FeatureQueryFailureImpl)

Aggregations

Entry (org.nextprot.api.core.domain.Entry)1 FeatureQueryException (org.nextprot.api.isoform.mapper.domain.FeatureQueryException)1 SequenceFeature (org.nextprot.api.isoform.mapper.domain.SequenceFeature)1 FeatureQueryFailureImpl (org.nextprot.api.isoform.mapper.domain.impl.FeatureQueryFailureImpl)1 SequenceFeatureValidator (org.nextprot.api.isoform.mapper.service.SequenceFeatureValidator)1