private void checkMetagenomeSource ( Origin origin , SourceFeature source ) { List < Qualifier > metagenomeSourceQual = source . getQualifiers ( Qualifier . METAGENOME_SOURCE_QUALIFIER_NAME ) ; if ( metagenomeSourceQual != null && ! metagenomeSourceQual . isEmpty ( ) ) { Qualifier envSample = source . getSingleQualifier ( Qualifier . ENVIRONMENTAL_SAMPLE_QUALIFIER_NAME ) ; if ( envSample == null ) { reportError ( origin , ENV_SAMPLE_REQUIRED ) ; } if ( metagenomeSourceQual . size ( ) > 1 ) { reportError ( origin , MORE_THAN_ONE_METAGENOME_SOURCE ) ; } String metegenomeSource = metagenomeSourceQual . get ( 0 ) . getValue ( ) ; if ( metegenomeSource == null || ( ! metegenomeSource . contains ( "metagenome" ) && metegenomeSource . contains ( "Metagenome" ) ) ) { reportError ( origin , INVALID_METAGENOME_SOURCE , metegenomeSource ) ; } List < Taxon > taxon = getEmblEntryValidationPlanProperty ( ) . taxonHelper . get ( ) . getTaxonsByScientificName ( metegenomeSource ) ; if ( taxon == null || taxon . isEmpty ( ) || taxon . get ( 0 ) . getTaxId ( ) == 408169L || ! getEmblEntryValidationPlanProperty ( ) . taxonHelper . get ( ) . isOrganismMetagenome ( metegenomeSource ) ) { reportError ( origin , INVALID_METAGENOME_SOURCE , metegenomeSource ) ; } } }
ENA - 2825