+ final private boolean isCanOpenSeqWeb( final PhylogenyNode node ) {
+ if ( node.getNodeData().isHasSequence()
+ && ( node.getNodeData().getSequence().getAccession() != null )
+ && !ForesterUtil.isEmpty( node.getNodeData().getSequence().getAccession().getSource() )
+ && !ForesterUtil.isEmpty( node.getNodeData().getSequence().getAccession().getValue() )
+ && getConfiguration().isHasWebLink( node.getNodeData().getSequence().getAccession().getSource()
+ .toLowerCase() ) ) {
+ return true;
+ }
+ if ( !ForesterUtil.isEmpty( node.getName() )
+ && ( AptxUtil.UNIPROT_KB_PATTERN_1.matcher( node.getName() ).find()
+ || AptxUtil.UNIPROT_KB_PATTERN_2.matcher( node.getName() ).find()
+ ) ) {
+ return true;
+ }
+ if ( node.getNodeData().isHasSequence() ) {
+ Sequence seq = node.getNodeData().getSequence();
+ if ( !ForesterUtil.isEmpty( seq.getName() ) && ( AptxUtil.UNIPROT_KB_PATTERN_1.matcher( seq.getName() ).find()
+ || AptxUtil.UNIPROT_KB_PATTERN_2.matcher( seq.getName() ).find()
+
+ ) ) {
+ return true;
+ }
+ if ( !ForesterUtil.isEmpty( seq.getSymbol() )
+ && ( AptxUtil.UNIPROT_KB_PATTERN_1.matcher( seq.getSymbol() ).find()
+ || AptxUtil.UNIPROT_KB_PATTERN_2.matcher( seq.getSymbol() ).find() ) ) {
+ return true;
+ }
+ if ( ( node.getNodeData().getSequence().getAccession() != null )
+ && !ForesterUtil.isEmpty( seq.getAccession().getValue() )
+ && ( AptxUtil.UNIPROT_KB_PATTERN_1.matcher( seq.getAccession().getValue() ).find()
+
+ || AptxUtil.UNIPROT_KB_PATTERN_2.matcher( seq.getAccession().getValue() ).find()
+ ) ) {
+ return true;
+ }
+ }
+ return false;
+ }
+