@Override public final void toPhyloXML( final Writer writer, final int level, final String indentation ) throws IOException { for( final Property p : toProperties() ) { p.toPhyloXML( writer, level, indentation ); } }
/** * Returns all property refs of this PhylogenyNode as String array. */ public String[] getPropertyRefs() { if ( getProperties() == null ) { return new String[ 0 ]; } final Property[] properties = getPropertiesArray(); final String[] refs = new String[ properties.length ]; for( int i = 0; i < properties.length; ++i ) { refs[ i ] = properties[ i ].getRef(); } return refs; }
public void init() { setValue( CONFIDENCE_DEFAULT_VALUE ); setType( "" ); setStandardDeviation( CONFIDENCE_DEFAULT_VALUE ); }
private final void init() { setFontName( null ); setFontStyle( FontType.PLAIN ); setFontSize( DEFAULT_FONT_SIZE ); setFontColor( null ); setShape( NodeShape.DEFAULT ); setFillType( NodeFill.DEFAULT ); setNodeColor( null ); setSize( DEFAULT_SIZE ); setTransparency( DEFAULT_TRANSPARENCY ); _font = null; }
@Override public StringBuffer toNHX() { final StringBuffer sb = new StringBuffer(); if ( isHasTaxonomy() ) { sb.append( getTaxonomy().toNHX() ); } if ( isHasSequence() ) { sb.append( getSequence().toNHX() ); } if ( isHasEvent() ) { sb.append( getEvent().toNHX() ); } return sb; }
@Override public PhylogenyData copy() { if ( getId() == null ) { return new ProteinDomain( getName(), getFrom(), getTo(), getConfidence() ); } return new ProteinDomain( getName(), getFrom(), getTo(), getId(), getConfidence() ); }
public static void setScientificName( final PhylogenyNode node, final String scientific_name ) { if ( !node.getNodeData().isHasTaxonomy() ) { node.getNodeData().setTaxonomy( new Taxonomy() ); } node.getNodeData().getTaxonomy().setScientificName( scientific_name ); }
@Override /** * Not a deep copy. * */ public PhylogenyData copy() { final BranchColor bc = new BranchColor(); bc.setValue( getValue() ); return bc; }
/** * Convenience method */ public static double getBranchWidthValue( final PhylogenyNode node ) { if ( !node.getBranchData().isHasBranchWidth() ) { return BranchWidth.BRANCH_WIDTH_DEFAULT_VALUE; } return node.getBranchData().getBranchWidth().getValue(); }
public static void ensurePresenceOfSequence( final PhylogenyNode node ) { if ( !node.getNodeData().isHasSequence() ) { node.getNodeData().setSequence( new Sequence() ); } }
public static void ensurePresenceOfTaxonomy( final PhylogenyNode node ) { if ( !node.getNodeData().isHasTaxonomy() ) { node.getNodeData().setTaxonomy( new Taxonomy() ); } }
/** * Returns true if this PhylogenyNode represents a _duplication event, false * otherwise. */ final public boolean isDuplication() { return getNodeData().isHasEvent() && getNodeData().getEvent().isDuplication(); }
final public static void ensurePresenceOfDistribution( final PhylogenyNode node ) { if ( !node.getNodeData().isHasDistribution() ) { node.getNodeData().setDistribution( new Distribution( "" ) ); } }
final static boolean isHasAssignedEvent( final PhylogenyNode node ) { if ( !node.getNodeData().isHasEvent() ) { return false; } if ( ( node.getNodeData().getEvent() ).isUnassigned() ) { return false; } return true; }
@Override public void toPhyloXML( final Writer writer, final int level, final String indentation ) throws IOException { if ( getProperties() != null ) { for( final String ref : getProperties().keySet() ) { getProperties().get( ref ).toPhyloXML( writer, level, indentation ); } } }
@Override public void toPhyloXML( final Writer writer, final int level, final String indentation ) throws IOException { _domain_structure.toPhyloXML( writer, level, indentation ); } }
/** * Convenience method -- always returns the first Taxonomy. * * @return Taxonomy * */ public Taxonomy getTaxonomy() { return getTaxonomy( 0 ); }
private void init() { _desc = ""; _type = ""; _source = ""; _evidence = ""; _confidence = null; _properties = null; setUris( null ); } }
/** * Convenience method -- always returns the first Sequence. * * @return Sequence */ public Sequence getSequence() { return getSequence( 0 ); }
public Annotation() { _ref_value = ""; _ref_source = ""; init(); }