X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=forester%2Fjava%2Fsrc%2Forg%2Fforester%2Fphylogeny%2Fdata%2FNodeData.java;h=ab6f05536ccd0c97d0a24e839b9998d0cf1db377;hb=bdf2d2a11d720d6457f52866af7ff909afe98db4;hp=609b203db412b710db5bcc4800d767d87b5e40ea;hpb=7b05eefd8e0eb34d3879f59f0c8d12d785283d2d;p=jalview.git diff --git a/forester/java/src/org/forester/phylogeny/data/NodeData.java b/forester/java/src/org/forester/phylogeny/data/NodeData.java index 609b203..ab6f055 100644 --- a/forester/java/src/org/forester/phylogeny/data/NodeData.java +++ b/forester/java/src/org/forester/phylogeny/data/NodeData.java @@ -52,17 +52,17 @@ public class NodeData implements PhylogenyData { TAXONOMY_CODE, UNKNOWN; } - private String _node_name; - private Event _event; - private List _sequences; - private List _taxonomies; - private List _distributions; - private Date _date; - private BinaryCharacters _binary_characters; - private PropertiesMap _properties; - private List _references; - private List _vector; - private NodeVisualData _node_visual_data; + private String _node_name; + private Event _event; + private List _sequences; + private List _taxonomies; + private List _distributions; + private Date _date; + private BinaryCharacters _binary_characters; + private PropertiesMap _properties; + private List _references; + private List _vector; + private NodeVisualData _node_visual_data; public NodeData() { init(); @@ -71,15 +71,15 @@ public class NodeData implements PhylogenyData { private void init() { _node_name = ""; _event = null; - _sequences= null; - _taxonomies= null; - _distributions= null; - _date= null; - _binary_characters= null; - _properties= null; - _references= null; - _vector= null; - _node_visual_data= null; + _sequences = null; + _taxonomies = null; + _distributions = null; + _date = null; + _binary_characters = null; + _properties = null; + _references = null; + _vector = null; + _node_visual_data = null; } public void addDistribution( final Distribution distribution ) { @@ -162,7 +162,7 @@ public class NodeData implements PhylogenyData { } } } - if ( getNodeVisualData() != null && !getNodeVisualData().isEmpty() ) { + if ( ( getNodeVisualData() != null ) && !getNodeVisualData().isEmpty() ) { new_data.setNodeVisualData( ( NodeVisualData ) getNodeVisualData().copy() ); } if ( isHasDate() ) { @@ -279,7 +279,7 @@ public class NodeData implements PhylogenyData { return ( getDate() != null ) && ( !ForesterUtil.isEmpty( getDate().getDesc() ) || !ForesterUtil.isNull( getDate().getMax() ) || !ForesterUtil.isNull( getDate().getMin() ) || !ForesterUtil.isNull( getDate().getValue() ) || !ForesterUtil - .isEmpty( getDate().getUnit() ) ); + .isEmpty( getDate().getUnit() ) ); } public boolean isHasDistribution() { @@ -488,6 +488,9 @@ public class NodeData implements PhylogenyData { if ( isHasProperties() ) { getProperties().toPhyloXML( writer, level, indentation.substring( 0, indentation.length() - 2 ) ); } + if ( ( level == 0 ) && ( getNodeVisualData() != null ) && !getNodeVisualData().isEmpty() ) { + getNodeVisualData().toPhyloXML( writer, level, indentation.substring( 0, indentation.length() - 2 ) ); + } if ( ( getVector() != null ) && !getVector().isEmpty() && ( ( getProperties() == null ) || getProperties()