@Override public StringBuffer toNHX() { final StringBuffer sb = new StringBuffer(); if ( isHasTaxonomy() ) { sb.append( getTaxonomy().toNHX() ); } if ( isHasSequence() ) { sb.append( getSequence().toNHX() ); } if ( isHasEvent() ) { sb.append( getEvent().toNHX() ); } return sb; }
/** * Returns true if this PhylogenyNode represents a _duplication event, false * otherwise. */ final public boolean isDuplication() { return getNodeData().isHasEvent() && getNodeData().getEvent().isDuplication(); }
final static boolean isHasAssignedEvent( final PhylogenyNode node ) { if ( !node.getNodeData().isHasEvent() ) { return false; } if ( ( node.getNodeData().getEvent() ).isUnassigned() ) { return false; } return true; }
final static public boolean isHasAtLeastNodeWithEvent( final Phylogeny phy ) { final PhylogenyNodeIterator it = phy.iteratorPostorder(); while ( it.hasNext() ) { if ( it.next().getNodeData().isHasEvent() ) { return true; } } return false; }
/** * Returns whether a _duplication or speciation event has been assigned for * this PhylogenyNode. */ final public boolean isHasAssignedEvent() { if ( !getNodeData().isHasEvent() ) { return false; } if ( ( getNodeData().getEvent() ).isUnassigned() ) { return false; } return true; }
final public boolean isSpeciation() { return getNodeData().isHasEvent() && getNodeData().getEvent().isSpeciation(); }
public boolean isEmpty() { return ( ForesterUtil.isEmpty( _node_name ) && !isHasSequence() && !isHasTaxonomy() && !isHasBinaryCharacters() && !isHasDate() && !isHasDistribution() && !isHasEvent() && !isHasProperties() && !isHasReference() && ( ( _vector == null ) || _vector .isEmpty() ) ); }
if ( isHasEvent() ) { getEvent().toPhyloXML( writer, level, indentation );
if ( isHasEvent() ) { new_data.setEvent( ( Event ) getEvent().copy() );
if ( !getMyNode().getNodeData().isHasEvent() ) { getMyNode().getNodeData().setEvent( new Event() ); break; case EVENTS_SPECIATIONS: if ( !getMyNode().getNodeData().isHasEvent() ) { getMyNode().getNodeData().setEvent( new Event() ); break; case EVENTS_GENE_LOSSES: if ( !getMyNode().getNodeData().isHasEvent() ) { getMyNode().getNodeData().setEvent( new Event() );
if ( phylogeny_node.getNodeData().isHasEvent() ) { addEvents( top, phylogeny_node.getNodeData().getEvent(), EVENTS );