@ Override public ArrayList < String > getKeyWords ( ) { ArrayList < String > keyWordsList = new ArrayList < String > ( ) ; if ( uniprotDoc == null ) { return keyWordsList ; } try { Element uniprotElement = uniprotDoc . getDocumentElement ( ) ; Element entryElement = XMLHelper . selectSingleElement ( uniprotElement , "entry" ) ; ArrayList < Element > keyWordElementList = XMLHelper . selectElements ( entryElement , "keyword" ) ; for ( Element element : keyWordElementList ) { keyWordsList . add ( element . getTextContent ( ) ) ; } } catch ( XPathExpressionException e ) { logger . error ( "Problems while parsing keywords in UniProt XML: {}. No keywords will be available." , e . getMessage ( ) ) ; return new ArrayList < String > ( ) ; } return keyWordsList ; }
Pull UniProt key words which is a mixed bag of words associated with this sequence