public String getGeneName ( ) { if ( uniprotDoc == null ) { return "" ; } try { Element uniprotElement = uniprotDoc . getDocumentElement ( ) ; Element entryElement = XMLHelper . selectSingleElement ( uniprotElement , "entry" ) ; Element geneElement = XMLHelper . selectSingleElement ( entryElement , "gene" ) ; if ( geneElement == null ) { return "" ; } Element nameElement = XMLHelper . selectSingleElement ( geneElement , "name" ) ; if ( nameElement == null ) { return "" ; } return nameElement . getTextContent ( ) ; } catch ( XPathExpressionException e ) { logger . error ( "Problems while parsing gene name in UniProt XML: {}. Gene name will be blank." , e . getMessage ( ) ) ; return "" ; } }
Get the gene name associated with this sequence .