// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
//
// Contact: phylosoft @ gmail . com
-// WWW: www.phylosoft.org/forester
+// WWW: https://sites.google.com/site/cmzmasek/home/software/forester
package org.forester.phylogeny.data;
public final class PhylogenyDataUtil {
+ /** Value of -99.0 is used as default value. */
+ public final static double BRANCH_LENGTH_DEFAULT = -1024.0;
+
public static void appendClose( final Writer w, final String element_name ) throws IOException {
w.write( "</" );
w.write( element_name );
public static void appendElement( final Writer w,
final String element_name,
+ final String value,
+ final String attribute1_name,
+ final String attribute1_value,
+ final String attribute2_name,
+ final String attribute2_value ) throws IOException {
+ appendOpen( w, element_name, attribute1_name, attribute1_value, attribute2_name, attribute2_value );
+ w.write( replaceIllegalXmlCharacters( value ) );
+ appendClose( w, element_name );
+ }
+
+ public static void appendElement( final Writer w,
+ final String element_name,
final String attribute1_name,
final String attribute1_value,
final String attribute2_name,
/**
* Creates a deep copy of ArrayList of PhylogenyData objects.
- *
+ *
* @param list
* an ArrayList of PhylogenyData objects
* @return a deep copy of ArrayList list
org.forester.util.ForesterUtil.roundToInt( y2 ) );
}
- public static void drawString( final String str, final double x, final double y, final Graphics g ) {
- g.drawString( str,
- org.forester.util.ForesterUtil.roundToInt( x ),
- org.forester.util.ForesterUtil.roundToInt( y ) );
- }
-
public static String replaceIllegalXmlCharacters( final String value ) {
String v = value.replaceAll( "&", "&" );
v = v.replaceAll( "<", "<" );