@ Override public LinkedHashMap < String , ArrayList < DBReferenceInfo > > getDatabaseReferences ( ) { LinkedHashMap < String , ArrayList < DBReferenceInfo > > databaseReferencesHashMap = new LinkedHashMap < String , ArrayList < DBReferenceInfo > > ( ) ; if ( uniprotDoc == null ) { return databaseReferencesHashMap ; } try { Element uniprotElement = uniprotDoc . getDocumentElement ( ) ; Element entryElement = XMLHelper . selectSingleElement ( uniprotElement , "entry" ) ; ArrayList < Element > dbreferenceElementList = XMLHelper . selectElements ( entryElement , "dbReference" ) ; for ( Element element : dbreferenceElementList ) { String type = element . getAttribute ( "type" ) ; String id = element . getAttribute ( "id" ) ; ArrayList < DBReferenceInfo > idlist = databaseReferencesHashMap . get ( type ) ; if ( idlist == null ) { idlist = new ArrayList < DBReferenceInfo > ( ) ; databaseReferencesHashMap . put ( type , idlist ) ; } DBReferenceInfo dbreferenceInfo = new DBReferenceInfo ( type , id ) ; ArrayList < Element > propertyElementList = XMLHelper . selectElements ( element , "property" ) ; for ( Element propertyElement : propertyElementList ) { String propertyType = propertyElement . getAttribute ( "type" ) ; String propertyValue = propertyElement . getAttribute ( "value" ) ; dbreferenceInfo . addProperty ( propertyType , propertyValue ) ; } idlist . add ( dbreferenceInfo ) ; } } catch ( XPathExpressionException e ) { logger . error ( "Problems while parsing db references in UniProt XML: {}. No db references will be available." , e . getMessage ( ) ) ; return new LinkedHashMap < String , ArrayList < DBReferenceInfo > > ( ) ; } return databaseReferencesHashMap ; }
The Uniprot mappings to other database identifiers for this sequence