import org.forester.phylogeny.data.PhylogenyDataUtil;
import org.forester.phylogeny.data.PropertiesMap;
import org.forester.phylogeny.data.Property;
+import org.forester.phylogeny.data.Property.AppliesTo;
import org.forester.phylogeny.data.Reference;
import org.forester.phylogeny.data.Sequence;
import org.forester.phylogeny.data.SequenceRelation;
}
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.getRef().startsWith( NodeVisualData.APTX_VISUALIZATION_REF )
+ && ( prop.getAppliesTo() == AppliesTo.NODE ) ) {
if ( node.getNodeData().getNodeVisualData() == null ) {
node.getNodeData().setNodeVisualData( new NodeVisualData() );
}
- final NodeVisualData vd = node.getNodeData().getNodeVisualData();
- vd.parseProperty( prop );
+ 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 ) ) );