}
displayedPhylogenyMightHaveChanged( true );
}
- else if ( e.getSource() == _show_domain_architectures ) {
+ else if ( e.getSource() == _show_domain_architectures ) {
search0();
search1();
displayedPhylogenyMightHaveChanged( true );
}
-
else if ( ( tp != null ) && ( tp.getPhylogeny() != null ) ) {
if ( e.getSource() == getDisplayAsPhylogramCb() ) {
setDrawPhylogram( getDisplayAsPhylogramCb().isSelected() );
case Configuration.color_according_to_annotation:
_color_according_to_annotation = new JCheckBox( title );
_color_according_to_annotation
- .setToolTipText( "To colorize sequence annotation labels as a function of sequence annotation" );
+ .setToolTipText( "To colorize sequence annotation labels as a function of sequence annotation" );
addJCheckBox( _color_according_to_annotation, ch_panel );
add( ch_panel );
break;
case Configuration.use_style:
_use_visual_styles_cb = new JCheckBox( title );
getUseVisualStylesCb()
- .setToolTipText( "To use visual styles (node colors, fonts) and branch colors, if present" );
+ .setToolTipText( "To use visual styles (node colors, fonts) and branch colors, if present" );
addJCheckBox( getUseVisualStylesCb(), ch_panel );
add( ch_panel );
break;
getNodeDescPopupCb().setSelected( state );
}
break;
- /* GUILHEM_BEG */
+ /* GUILHEM_BEG */
case Configuration.show_relation_confidence:
if ( _seq_relation_confidence_switch != null ) {
_seq_relation_confidence_switch.setSelected( state );
}
break;
- /* GUILHEM_END */
+ /* GUILHEM_END */
default:
throw new AssertionError( "unknown checkbox: " + which );
}
}
else {
getMainPanel().getMainFrame().setSelectedTypeInTypeMenu( getMainPanel().getCurrentTreePanel()
- .getPhylogenyGraphicsType() );
+ .getPhylogenyGraphicsType() );
}
getMainPanel().getCurrentTreePanel().updateSubSuperTreeButton();
getMainPanel().getControlPanel().search0();
treepanel.resetPreferredSize();
getMainPanel().getCurrentScrollPane().getViewport().validate();
sb.setValue( ForesterUtil.roundToInt( ( ( sb.getMaximum() - sb.getMinimum() ) / x )
- - ( sb.getVisibleAmount() / 2.0 ) ) );
+ - ( sb.getVisibleAmount() / 2.0 ) ) );
}
else {
final int x = sb.getMaximum() - sb.getMinimum() - sb.getVisibleAmount() - sb.getValue();
treepanel.resetPreferredSize();
getMainPanel().getCurrentScrollPane().getViewport().validate();
sb.setValue( ForesterUtil.roundToInt( ( ( sb.getMaximum() - sb.getMinimum() ) / x )
- - ( sb.getVisibleAmount() / 2.0 ) ) );
+ - ( sb.getVisibleAmount() / 2.0 ) ) );
treepanel.resetPreferredSize();
treepanel.updateOvSizes();
}
treepanel.resetPreferredSize();
getMainPanel().getCurrentScrollPane().getViewport().validate();
sb.setValue( ForesterUtil.roundToInt( ( ( sb.getMaximum() - sb.getMinimum() ) / x )
- - ( sb.getVisibleAmount() / 2.0 ) ) );
+ - ( sb.getVisibleAmount() / 2.0 ) ) );
}
else {
final int x = sb.getMaximum() - sb.getMinimum() - sb.getVisibleAmount() - sb.getValue();
treepanel.resetPreferredSize();
getMainPanel().getCurrentScrollPane().getViewport().validate();
sb.setValue( ForesterUtil.roundToInt( ( ( sb.getMaximum() - sb.getMinimum() ) / x )
- - ( sb.getVisibleAmount() / 2.0 ) ) );
+ - ( sb.getVisibleAmount() / 2.0 ) ) );
treepanel.resetPreferredSize();
treepanel.updateOvSizes();
}
cellHasFocus );
if ( ( value != null ) && ( value instanceof SequenceRelation.SEQUENCE_RELATION_TYPE ) ) {
( ( DefaultListCellRenderer ) component ).setText( SequenceRelation
- .getPrintableNameByType( ( SequenceRelation.SEQUENCE_RELATION_TYPE ) value ) );
+ .getPrintableNameByType( ( SequenceRelation.SEQUENCE_RELATION_TYPE ) value ) );
}
return component;
}
continue;
}
query = query.trim();
- if ( ( query.indexOf( '+' ) >= 0 ) && !getOptions().isSearchWithRegex() ) {
+ final TreePanel tp = getMainPanel().getCurrentTreePanel();
+ if ( ( query.indexOf( '+' ) > 0 ) && !getOptions().isSearchWithRegex() ) {
nodes.addAll( PhylogenyMethods.searchDataLogicalAnd( query.split( "\\++" ),
tree,
getOptions().isSearchCaseSensitive(),
!getOptions().isMatchWholeTermsOnly(),
- isShowDomainArchitectures() ) );
+ isShowDomainArchitectures(),
+ tp != null ? Math.pow( 10,
+ tp.getDomainStructureEvalueThresholdExp() )
+ : 0 ) );
}
else {
- final TreePanel tp = getMainPanel().getCurrentTreePanel();
-
-
nodes.addAll( PhylogenyMethods.searchData( query,
tree,
getOptions().isSearchCaseSensitive(),
!getOptions().isMatchWholeTermsOnly(),
getOptions().isSearchWithRegex(),
isShowDomainArchitectures(),
- tp != null ? Math.pow( 10, tp.getDomainStructureEvalueThresholdExp() ) : 0 ) );
+ tp != null ? Math.pow( 10, tp
+ .getDomainStructureEvalueThresholdExp() ) : 0 ) );
}
}
if ( getOptions().isInverseSearchResult() ) {
continue;
}
query = query.trim();
- if ( ( query.indexOf( '+' ) >= 0 ) && !getOptions().isSearchWithRegex() ) {
+ final TreePanel tp = getMainPanel().getCurrentTreePanel();
+ if ( ( query.indexOf( '+' ) > 0 ) && !getOptions().isSearchWithRegex() ) {
nodes.addAll( PhylogenyMethods.searchDataLogicalAnd( query.split( "\\++" ),
tree,
getOptions().isSearchCaseSensitive(),
!getOptions().isMatchWholeTermsOnly(),
- isShowDomainArchitectures() ) );
+ isShowDomainArchitectures(),
+ tp != null ? Math.pow( 10,
+ tp.getDomainStructureEvalueThresholdExp() )
+ : 0 ) );
}
else {
- final TreePanel tp = getMainPanel().getCurrentTreePanel();
nodes.addAll( PhylogenyMethods.searchData( query,
tree,
getOptions().isSearchCaseSensitive(),
!getOptions().isMatchWholeTermsOnly(),
getOptions().isSearchWithRegex(),
isShowDomainArchitectures(),
- tp != null ? Math.pow( 10, tp.getDomainStructureEvalueThresholdExp() ) : 0 ) );
+ tp != null ? Math.pow( 10, tp
+ .getDomainStructureEvalueThresholdExp() ) : 0 ) );
}
}
if ( getOptions().isInverseSearchResult() ) {
_get_ext_desc_data = cb_index;
if ( !ForesterUtil.isEmpty( getConfiguration().getLabelForGetExtDescendentsData() ) ) {
addClickToOption( Configuration.get_ext_desc_data, getConfiguration()
- .getLabelForGetExtDescendentsData() );
+ .getLabelForGetExtDescendentsData() );
}
else {
-
addClickToOption( Configuration.get_ext_desc_data,
getConfiguration().getClickToTitle( Configuration.get_ext_desc_data ) );
}
-
if ( default_option == Configuration.get_ext_desc_data ) {
selected_index = cb_index;
}
if ( !ForesterUtil.isEmpty( stats.get( i ).getDescription() ) ) {\r
if ( !stats.get( i ).getDescription().equalsIgnoreCase( c.getType() ) ) {\r
throw new IllegalArgumentException( "support values in node [" + n.toString()\r
- + "] appear inconsistently ordered" );\r
+ + "] appear inconsistently ordered" );\r
}\r
}\r
stats.get( i ).setDescription( c.getType() );\r
}\r
}\r
\r
- \r
private static enum NDF {\r
- NN( "NN" ),\r
- TC( "TC" ),\r
- CN( "CN" ),\r
- TS( "TS" ),\r
- TI( "TI" ),\r
- SY( "SY" ),\r
- SN( "SN" ),\r
- GN( "GN" ),\r
- SS( "SS" ),\r
- SA( "SA" ),\r
- DO( "DO" ),\r
- AN( "AN" ),\r
- XR( "XR" ),\r
- BC( "BC" ),\r
- MS( "MS" );\r
- \r
+ NodeName( "NN" ),\r
+ TaxonomyCode( "TC" ),\r
+ TaxonomyCommonName( "CN" ),\r
+ TaxonomyScientificName( "TS" ),\r
+ TaxonomyIdentifier( "TI" ),\r
+ TaxonomySynonym( "SY" ),\r
+ SequenceName( "SN" ),\r
+ GeneName( "GN" ),\r
+ SequenceSymbol( "SS" ),\r
+ SequenceAccession( "SA" ),\r
+ Domain( "DO" ),\r
+ Annotation( "AN" ),\r
+ CrossRef( "XR" ),\r
+ BinaryCharacter( "BC" ),\r
+ MolecularSequence( "MS" );\r
+\r
private final String _text;\r
\r
NDF( final String text ) {\r
}\r
\r
public static NDF fromString( final String text ) {\r
- for( NDF n : NDF.values() ) {\r
- if ( text.startsWith( n._text ) ) {\r
- return n;\r
- }\r
+ for( final NDF n : NDF.values() ) {\r
+ if ( text.startsWith( n._text ) ) {\r
+ return n;\r
}\r
+ }\r
return null;\r
}\r
}\r
- \r
- \r
+\r
public static List<PhylogenyNode> searchData( final String query,\r
final Phylogeny phy,\r
final boolean case_sensitive,\r
if ( ForesterUtil.isEmpty( query ) ) {\r
return nodes;\r
}\r
-\r
String my_query = query;\r
NDF ndf = null;\r
-\r
- if ( my_query.length() > 2 && my_query.indexOf( ":" ) == 2 ) {\r
+ if ( ( my_query.length() > 2 ) && ( my_query.indexOf( ":" ) == 2 ) ) {\r
ndf = NDF.fromString( my_query );\r
if ( ndf != null ) {\r
my_query = my_query.substring( 3 );\r
}\r
}\r
- \r
- \r
for( final PhylogenyNodeIterator iter = phy.iteratorPreorder(); iter.hasNext(); ) {\r
final PhylogenyNode node = iter.next();\r
boolean match = false;\r
- \r
- \r
- if ( ( ndf == null || ndf == NDF.NN ) && match( node.getName(), my_query, case_sensitive, partial, regex ) ) {\r
+ if ( ( ( ndf == null ) || ( ndf == NDF.NodeName ) )\r
+ && match( node.getName(), my_query, case_sensitive, partial, regex ) ) {\r
match = true;\r
}\r
- else if ( ( ndf == null || ndf == NDF.TC ) && node.getNodeData().isHasTaxonomy()\r
- && match( node.getNodeData().getTaxonomy().getTaxonomyCode(), my_query, case_sensitive, partial, regex ) ) {\r
+ else if ( ( ( ndf == null ) || ( ndf == NDF.TaxonomyCode ) )\r
+ && node.getNodeData().isHasTaxonomy()\r
+ && match( node.getNodeData().getTaxonomy().getTaxonomyCode(),\r
+ my_query,\r
+ case_sensitive,\r
+ partial,\r
+ regex ) ) {\r
match = true;\r
}\r
- else if ( ( ndf == null || ndf == NDF.CN ) && node.getNodeData().isHasTaxonomy()\r
- && match( node.getNodeData().getTaxonomy().getCommonName(), my_query, case_sensitive, partial, regex ) ) {\r
+ else if ( ( ( ndf == null ) || ( ndf == NDF.TaxonomyCommonName ) )\r
+ && node.getNodeData().isHasTaxonomy()\r
+ && match( node.getNodeData().getTaxonomy().getCommonName(),\r
+ my_query,\r
+ case_sensitive,\r
+ partial,\r
+ regex ) ) {\r
match = true;\r
}\r
- else if ( ( ndf == null || ndf == NDF.TS ) && node.getNodeData().isHasTaxonomy()\r
+ else if ( ( ( ndf == null ) || ( ndf == NDF.TaxonomyScientificName ) )\r
+ && node.getNodeData().isHasTaxonomy()\r
&& match( node.getNodeData().getTaxonomy().getScientificName(),\r
my_query,\r
case_sensitive,\r
regex ) ) {\r
match = true;\r
}\r
- else if ( ( ndf == null || ndf == NDF.TI ) &&\r
- node.getNodeData().isHasTaxonomy()\r
+ else if ( ( ( ndf == null ) || ( ndf == NDF.TaxonomyIdentifier ) )\r
+ && node.getNodeData().isHasTaxonomy()\r
&& ( node.getNodeData().getTaxonomy().getIdentifier() != null )\r
&& match( node.getNodeData().getTaxonomy().getIdentifier().getValue(),\r
my_query,\r
regex ) ) {\r
match = true;\r
}\r
- else if ( \r
- ( ndf == null || ndf == NDF.SY ) &&\r
- node.getNodeData().isHasTaxonomy() && !node.getNodeData().getTaxonomy().getSynonyms().isEmpty() ) {\r
+ else if ( ( ( ndf == null ) || ( ndf == NDF.TaxonomySynonym ) ) && node.getNodeData().isHasTaxonomy()\r
+ && !node.getNodeData().getTaxonomy().getSynonyms().isEmpty() ) {\r
final List<String> syns = node.getNodeData().getTaxonomy().getSynonyms();\r
I: for( final String syn : syns ) {\r
if ( match( syn, my_query, case_sensitive, partial, regex ) ) {\r
}\r
}\r
}\r
- if ( !match && ( ndf == null || ndf == NDF.SN ) &&\r
- node.getNodeData().isHasSequence()\r
+ if ( !match && ( ( ndf == null ) || ( ndf == NDF.SequenceName ) ) && node.getNodeData().isHasSequence()\r
&& match( node.getNodeData().getSequence().getName(), my_query, case_sensitive, partial, regex ) ) {\r
match = true;\r
}\r
- if ( !match && ( ndf == null || ndf == NDF.GN ) &&\r
- node.getNodeData().isHasSequence()\r
+ if ( !match && ( ( ndf == null ) || ( ndf == NDF.GeneName ) ) && node.getNodeData().isHasSequence()\r
&& match( node.getNodeData().getSequence().getGeneName(), my_query, case_sensitive, partial, regex ) ) {\r
match = true;\r
}\r
- if ( !match && ( ndf == null || ndf == NDF.SS ) &&\r
- \r
- node.getNodeData().isHasSequence()\r
+ if ( !match && ( ( ndf == null ) || ( ndf == NDF.SequenceSymbol ) ) && node.getNodeData().isHasSequence()\r
&& match( node.getNodeData().getSequence().getSymbol(), my_query, case_sensitive, partial, regex ) ) {\r
match = true;\r
}\r
- if ( !match && ( ndf == null || ndf == NDF.SA ) &&\r
- \r
- \r
- node.getNodeData().isHasSequence()\r
+ if ( !match\r
+ && ( ( ndf == null ) || ( ndf == NDF.SequenceAccession ) )\r
+ && node.getNodeData().isHasSequence()\r
&& ( node.getNodeData().getSequence().getAccession() != null )\r
&& match( node.getNodeData().getSequence().getAccession().getValue(),\r
my_query,\r
regex ) ) {\r
match = true;\r
}\r
- if ( !match && ( (ndf == null && search_domains ) || ndf == NDF.DO ) && node.getNodeData().isHasSequence()\r
+ if ( !match && ( ( ( ndf == null ) && search_domains ) || ( ndf == NDF.Domain ) )\r
+ && node.getNodeData().isHasSequence()\r
&& ( node.getNodeData().getSequence().getDomainArchitecture() != null ) ) {\r
final DomainArchitecture da = node.getNodeData().getSequence().getDomainArchitecture();\r
I: for( int i = 0; i < da.getNumberOfDomains(); ++i ) {\r
- if ( ( da.getDomain( i ).getConfidence() <= domains_confidence_threshold ) && ( match( da.getDomain( i ).getName(), my_query, case_sensitive, partial, regex ) ) ) {\r
+ if ( ( da.getDomain( i ).getConfidence() <= domains_confidence_threshold )\r
+ && ( match( da.getDomain( i ).getName(), my_query, case_sensitive, partial, regex ) ) ) {\r
match = true;\r
break I;\r
}\r
}\r
}\r
- if ( \r
- !match && ( ndf == null || ndf == NDF.AN ) &&\r
- node.getNodeData().isHasSequence()\r
+ if ( !match && ( ( ndf == null ) || ( ndf == NDF.Annotation ) ) && node.getNodeData().isHasSequence()\r
&& ( node.getNodeData().getSequence().getAnnotations() != null ) ) {\r
for( final Annotation ann : node.getNodeData().getSequence().getAnnotations() ) {\r
if ( match( ann.getDesc(), my_query, case_sensitive, partial, regex ) ) {\r
}\r
}\r
}\r
- if ( !match && ( ndf == null || ndf == NDF.XR ) &&\r
- node.getNodeData().isHasSequence()\r
+ if ( !match && ( ( ndf == null ) || ( ndf == NDF.CrossRef ) ) && node.getNodeData().isHasSequence()\r
&& ( node.getNodeData().getSequence().getCrossReferences() != null ) ) {\r
for( final Accession x : node.getNodeData().getSequence().getCrossReferences() ) {\r
if ( match( x.getComment(), my_query, case_sensitive, partial, regex ) ) {\r
}\r
}\r
}\r
- //\r
- if ( !match && ( ndf == null || ndf == NDF.BC ) &&\r
- ( node.getNodeData().getBinaryCharacters() != null ) ) {\r
+ if ( !match && ( ( ndf == null ) || ( ndf == NDF.BinaryCharacter ) )\r
+ && ( node.getNodeData().getBinaryCharacters() != null ) ) {\r
Iterator<String> it = node.getNodeData().getBinaryCharacters().getPresentCharacters().iterator();\r
I: while ( it.hasNext() ) {\r
if ( match( it.next(), my_query, case_sensitive, partial, regex ) ) {\r
}\r
}\r
}\r
+ if ( !match\r
+ && ( ndf == NDF.MolecularSequence )\r
+ && node.getNodeData().isHasSequence()\r
+ && match( node.getNodeData().getSequence().getMolecularSequence(),\r
+ my_query,\r
+ case_sensitive,\r
+ true,\r
+ regex ) ) {\r
+ match = true;\r
+ }\r
if ( match ) {\r
nodes.add( node );\r
}\r
final Phylogeny phy,\r
final boolean case_sensitive,\r
final boolean partial,\r
- final boolean search_domains ) {\r
+ final boolean search_domains,\r
+ final double domains_confidence_threshold ) {\r
final List<PhylogenyNode> nodes = new ArrayList<PhylogenyNode>();\r
if ( phy.isEmpty() || ( queries == null ) || ( queries.length < 1 ) ) {\r
return nodes;\r
for( final PhylogenyNodeIterator iter = phy.iteratorPreorder(); iter.hasNext(); ) {\r
final PhylogenyNode node = iter.next();\r
boolean all_matched = true;\r
- for( final String query : queries ) {\r
+ for( String query : queries ) {\r
+ NDF ndf = null;\r
+ if ( ( query.length() > 2 ) && ( query.indexOf( ":" ) == 2 ) ) {\r
+ ndf = NDF.fromString( query );\r
+ if ( ndf != null ) {\r
+ query = query.substring( 3 );\r
+ }\r
+ }\r
boolean match = false;\r
if ( ForesterUtil.isEmpty( query ) ) {\r
continue;\r
}\r
- if ( match( node.getName(), query, case_sensitive, partial, false ) ) {\r
+ if ( ( ( ndf == null ) || ( ndf == NDF.NodeName ) )\r
+ && match( node.getName(), query, case_sensitive, partial, false ) ) {\r
match = true;\r
}\r
- else if ( node.getNodeData().isHasTaxonomy()\r
+ else if ( ( ( ndf == null ) || ( ndf == NDF.TaxonomyCode ) )\r
+ && node.getNodeData().isHasTaxonomy()\r
&& match( node.getNodeData().getTaxonomy().getTaxonomyCode(),\r
query,\r
case_sensitive,\r
false ) ) {\r
match = true;\r
}\r
- else if ( node.getNodeData().isHasTaxonomy()\r
+ else if ( ( ( ndf == null ) || ( ndf == NDF.TaxonomyCommonName ) )\r
+ && node.getNodeData().isHasTaxonomy()\r
&& match( node.getNodeData().getTaxonomy().getCommonName(),\r
query,\r
case_sensitive,\r
false ) ) {\r
match = true;\r
}\r
- else if ( node.getNodeData().isHasTaxonomy()\r
+ else if ( ( ( ndf == null ) || ( ndf == NDF.TaxonomyScientificName ) )\r
+ && node.getNodeData().isHasTaxonomy()\r
&& match( node.getNodeData().getTaxonomy().getScientificName(),\r
query,\r
case_sensitive,\r
false ) ) {\r
match = true;\r
}\r
- else if ( node.getNodeData().isHasTaxonomy()\r
+ else if ( ( ( ndf == null ) || ( ndf == NDF.TaxonomyIdentifier ) )\r
+ && node.getNodeData().isHasTaxonomy()\r
&& ( node.getNodeData().getTaxonomy().getIdentifier() != null )\r
&& match( node.getNodeData().getTaxonomy().getIdentifier().getValue(),\r
query,\r
false ) ) {\r
match = true;\r
}\r
- else if ( node.getNodeData().isHasTaxonomy()\r
+ else if ( ( ( ndf == null ) || ( ndf == NDF.TaxonomySynonym ) ) && node.getNodeData().isHasTaxonomy()\r
&& !node.getNodeData().getTaxonomy().getSynonyms().isEmpty() ) {\r
final List<String> syns = node.getNodeData().getTaxonomy().getSynonyms();\r
I: for( final String syn : syns ) {\r
}\r
}\r
}\r
- if ( !match && node.getNodeData().isHasSequence()\r
+ if ( !match && ( ( ndf == null ) || ( ndf == NDF.SequenceName ) ) && node.getNodeData().isHasSequence()\r
&& match( node.getNodeData().getSequence().getName(), query, case_sensitive, partial, false ) ) {\r
match = true;\r
}\r
if ( !match\r
+ && ( ( ndf == null ) || ( ndf == NDF.GeneName ) )\r
&& node.getNodeData().isHasSequence()\r
&& match( node.getNodeData().getSequence().getGeneName(), query, case_sensitive, partial, false ) ) {\r
match = true;\r
}\r
- if ( !match && node.getNodeData().isHasSequence()\r
+ if ( !match && ( ( ndf == null ) || ( ndf == NDF.SequenceSymbol ) )\r
+ && node.getNodeData().isHasSequence()\r
&& match( node.getNodeData().getSequence().getSymbol(), query, case_sensitive, partial, false ) ) {\r
match = true;\r
}\r
if ( !match\r
+ && ( ( ndf == null ) || ( ndf == NDF.SequenceAccession ) )\r
&& node.getNodeData().isHasSequence()\r
&& ( node.getNodeData().getSequence().getAccession() != null )\r
&& match( node.getNodeData().getSequence().getAccession().getValue(),\r
false ) ) {\r
match = true;\r
}\r
- if ( search_domains && !match && node.getNodeData().isHasSequence()\r
+ if ( !match && ( ( ( ndf == null ) && search_domains ) || ( ndf == NDF.Domain ) )\r
+ && node.getNodeData().isHasSequence()\r
&& ( node.getNodeData().getSequence().getDomainArchitecture() != null ) ) {\r
final DomainArchitecture da = node.getNodeData().getSequence().getDomainArchitecture();\r
I: for( int i = 0; i < da.getNumberOfDomains(); ++i ) {\r
- if ( match( da.getDomain( i ).getName(), query, case_sensitive, partial, false ) ) {\r
+ if ( ( da.getDomain( i ).getConfidence() <= domains_confidence_threshold )\r
+ && match( da.getDomain( i ).getName(), query, case_sensitive, partial, false ) ) {\r
match = true;\r
break I;\r
}\r
}\r
}\r
- //\r
- if ( !match && node.getNodeData().isHasSequence()\r
+ if ( !match && ( ( ndf == null ) || ( ndf == NDF.Annotation ) ) && node.getNodeData().isHasSequence()\r
&& ( node.getNodeData().getSequence().getAnnotations() != null ) ) {\r
for( final Annotation ann : node.getNodeData().getSequence().getAnnotations() ) {\r
if ( match( ann.getDesc(), query, case_sensitive, partial, false ) ) {\r
}\r
}\r
}\r
- if ( !match && node.getNodeData().isHasSequence()\r
+ if ( !match && ( ( ndf == null ) || ( ndf == NDF.CrossRef ) ) && node.getNodeData().isHasSequence()\r
&& ( node.getNodeData().getSequence().getCrossReferences() != null ) ) {\r
for( final Accession x : node.getNodeData().getSequence().getCrossReferences() ) {\r
if ( match( x.getComment(), query, case_sensitive, partial, false ) ) {\r
}\r
}\r
}\r
- //\r
- if ( !match && ( node.getNodeData().getBinaryCharacters() != null ) ) {\r
+ if ( !match && ( ( ndf == null ) || ( ndf == NDF.BinaryCharacter ) )\r
+ && ( node.getNodeData().getBinaryCharacters() != null ) ) {\r
Iterator<String> it = node.getNodeData().getBinaryCharacters().getPresentCharacters().iterator();\r
I: while ( it.hasNext() ) {\r
if ( match( it.next(), query, case_sensitive, partial, false ) ) {\r
}\r
}\r
}\r
+ if ( !match\r
+ && ( ndf == NDF.MolecularSequence )\r
+ && node.getNodeData().isHasSequence()\r
+ && match( node.getNodeData().getSequence().getMolecularSequence(),\r
+ query,\r
+ case_sensitive,\r
+ true,\r
+ false ) ) {\r
+ match = true;\r
+ }\r
if ( !match ) {\r
all_matched = false;\r
break;\r
else if ( !( ref_ext_taxo.contains( n.getNodeData().getTaxonomy().getScientificName() ) )\r
&& !( ref_ext_taxo.contains( n.getNodeData().getTaxonomy().getTaxonomyCode() ) )\r
&& !( ( n.getNodeData().getTaxonomy().getIdentifier() != null ) && ref_ext_taxo.contains( n\r
- .getNodeData().getTaxonomy().getIdentifier().getValuePlusProvider() ) ) ) {\r
+ .getNodeData().getTaxonomy().getIdentifier().getValuePlusProvider() ) ) ) {\r
nodes_to_delete.add( n );\r
}\r
}\r
n.setName( "" );\r
}\r
n.getNodeData().getTaxonomy()\r
- .setIdentifier( new Identifier( id, PhyloXmlUtil.UNIPROT_TAX_PROVIDER ) );\r
+ .setIdentifier( new Identifier( id, PhyloXmlUtil.UNIPROT_TAX_PROVIDER ) );\r
break;\r
}\r
case TAXONOMY_ID_UNIPROT_2: {\r
n.setName( "" );\r
}\r
n.getNodeData().getTaxonomy()\r
- .setIdentifier( new Identifier( id, PhyloXmlUtil.UNIPROT_TAX_PROVIDER ) );\r
+ .setIdentifier( new Identifier( id, PhyloXmlUtil.UNIPROT_TAX_PROVIDER ) );\r
break;\r
}\r
case TAXONOMY_ID: {\r