(no commit message)
[jalview.git] / forester / java / src / org / forester / io / parsers / phyloxml / PhyloXmlHandler.java
index 4eed70c..3e2f6a7 100644 (file)
@@ -309,7 +309,7 @@ public final class PhyloXmlHandler extends DefaultHandler {
             }
             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 ) );
@@ -325,18 +325,12 @@ public final class PhyloXmlHandler extends DefaultHandler {
             }
             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() ) {
@@ -412,15 +406,15 @@ public final class PhyloXmlHandler extends DefaultHandler {
                 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 ) ) );