}
else if ( qualified_name.equals( PhyloXmlMapping.BINARY_CHARACTERS ) ) {
node.getNodeData().setBinaryCharacters( ( BinaryCharacters ) BinaryCharactersParser.getInstance()
- .parse( element ) );
+ .parse( element ) );
}
else if ( qualified_name.equals( PhyloXmlMapping.COLOR ) ) {
node.getBranchData().setBranchColor( ( BranchColor ) ColorParser.getInstance().parse( element ) );
}
else if ( qualified_name.equals( PhyloXmlMapping.PROPERTY ) ) {
final Property prop = ( Property ) PropertyParser.getInstance().parse( element );
- if ( prop.getRef().startsWith( NodeVisualData.APTX_VISUALIZATION_REF ) ) {
- if ( prop.getAppliesTo() == AppliesTo.NODE ) {
- if ( node.getNodeData().getNodeVisualData() == null ) {
- node.getNodeData().setNodeVisualData( new NodeVisualData() );
- }
- final NodeVisualData vd = node.getNodeData().getNodeVisualData();
- vd.parseProperty( prop );
- }
- else {
- System.err.println( "Do not know how to handle " + NodeVisualData.APTX_VISUALIZATION_REF
- + " property applied to " + prop.getAppliesTo() );
+ if ( prop.getRef().startsWith( NodeVisualData.APTX_VISUALIZATION_REF )
+ && ( prop.getAppliesTo() == AppliesTo.NODE ) ) {
+ if ( node.getNodeData().getNodeVisualData() == null ) {
+ node.getNodeData().setNodeVisualData( new NodeVisualData() );
}
+ node.getNodeData().getNodeVisualData().parseProperty( prop );
}
else {
if ( !node.getNodeData().isHasProperties() ) {
final XmlElement element = new XmlElement( namespace_uri, local_name, local_name, attributes );
if ( element.isHasAttribute( PhyloXmlMapping.PHYLOGENY_IS_REROOTABLE_ATTR ) ) {
getCurrentPhylogeny().setRerootable( Boolean.parseBoolean( element
- .getAttribute( PhyloXmlMapping.PHYLOGENY_IS_REROOTABLE_ATTR ) ) );
+ .getAttribute( PhyloXmlMapping.PHYLOGENY_IS_REROOTABLE_ATTR ) ) );
}
if ( element.isHasAttribute( PhyloXmlMapping.PHYLOGENY_BRANCHLENGTH_UNIT_ATTR ) ) {
getCurrentPhylogeny()
- .setDistanceUnit( element.getAttribute( PhyloXmlMapping.PHYLOGENY_BRANCHLENGTH_UNIT_ATTR ) );
+ .setDistanceUnit( element.getAttribute( PhyloXmlMapping.PHYLOGENY_BRANCHLENGTH_UNIT_ATTR ) );
}
if ( element.isHasAttribute( PhyloXmlMapping.PHYLOGENY_IS_ROOTED_ATTR ) ) {
getCurrentPhylogeny().setRooted( Boolean.parseBoolean( element
- .getAttribute( PhyloXmlMapping.PHYLOGENY_IS_ROOTED_ATTR ) ) );
+ .getAttribute( PhyloXmlMapping.PHYLOGENY_IS_ROOTED_ATTR ) ) );
}
if ( element.isHasAttribute( PhyloXmlMapping.PHYLOGENY_TYPE_ATTR ) ) {
getCurrentPhylogeny().setType( ( element.getAttribute( PhyloXmlMapping.PHYLOGENY_TYPE_ATTR ) ) );