private void writeOpenClade( final PhylogenyNode node ) throws IOException {
if ( !isSawComma() ) {
if ( !node.isRoot() && node.isFirstChildNode() ) {
increaseNodeLevel();
}
if ( getOutputFormt() == FORMAT.PHYLO_XML ) {
getWriter().write( ForesterUtil.LINE_SEPARATOR );
if ( isIndentPhyloxml() ) {
getWriter().write( createIndentation().toString() );
}
if ( node.isCollapse() ) {
PhylogenyDataUtil.appendOpen( getWriter(),
PhyloXmlMapping.CLADE,
PhyloXmlMapping.NODE_COLLAPSE,
"true" );
}
else {
PhylogenyDataUtil.appendOpen( getWriter(), PhyloXmlMapping.CLADE );
}
}
else if ( ( getOutputFormt() == FORMAT.NHX ) || ( getOutputFormt() == FORMAT.NH ) ) {
getBuffer().append( "(" );
}
}
setSawComma( false );
}