public void setProxySequenceReader ( SequenceReader < C > proxyLoader ) { this . sequenceStorage = proxyLoader ; if ( proxyLoader instanceof FeaturesKeyWordInterface ) { this . setFeaturesKeyWord ( ( FeaturesKeyWordInterface ) sequenceStorage ) ; } if ( proxyLoader instanceof DatabaseReferenceInterface ) { this . setDatabaseReferences ( ( DatabaseReferenceInterface ) sequenceStorage ) ; } if ( proxyLoader instanceof FeatureRetriever ) { this . setFeatureRetriever ( ( FeatureRetriever ) sequenceStorage ) ; HashMap < String , ArrayList < AbstractFeature > > ff = getFeatureRetriever ( ) . getFeatures ( ) ; for ( String k : ff . keySet ( ) ) { for ( AbstractFeature f : ff . get ( k ) ) { this . addFeature ( f ) ; } } // success of next statement guaranteed because source is a compulsory field //DBReferenceInfo dbQualifier = (DBReferenceInfo)ff.get("source").get(0).getQualifiers().get("db_xref"); ArrayList < DBReferenceInfo > dbQualifiers = ( ArrayList ) ff . get ( "source" ) . get ( 0 ) . getQualifiers ( ) . get ( "db_xref" ) ; DBReferenceInfo dbQualifier = dbQualifiers . get ( 0 ) ; if ( dbQualifier != null ) this . setTaxonomy ( new TaxonomyID ( dbQualifier . getDatabase ( ) + ":" + dbQualifier . getId ( ) , DataSource . UNKNOWN ) ) ; } if ( getAccession ( ) == null && proxyLoader instanceof UniprotProxySequenceReader ) { // we have lots of unsupported operations for this call so quick fix to allow this tow rork this . setAccession ( proxyLoader . getAccession ( ) ) ; } }
Very important method that allows external mappings of sequence data and features . This method will gain additional interface inspection that allows external data sources with knowledge of features for a sequence to be supported .