in progress
[jalview.git] / forester / java / src / org / forester / phylogeny / data / Property.java
index 9fd9904..a1fba96 100644 (file)
@@ -7,7 +7,7 @@
 // Copyright (C) 2000-2001 Washington University School of Medicine
 // and Howard Hughes Medical Institute
 // All rights reserved
-// 
+//
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 // Lesser General Public License for more details.
-// 
+//
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
 // 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;
 
@@ -104,6 +104,7 @@ public class Property implements PhylogenyData {
         sb.append( ": " );
         sb.append( getValue() );
         if ( !ForesterUtil.isEmpty( getUnit() ) ) {
+            sb.append( " " );
             sb.append( getUnit() );
         }
         return sb;
@@ -154,53 +155,7 @@ public class Property implements PhylogenyData {
 
     @Override
     public StringBuffer toNHX() {
-        final StringBuffer nhx = new StringBuffer();
-        nhx.append( ":X" );
-        switch ( getAppliesTo() ) {
-            case CLADE:
-                nhx.append( "C=" );
-                break;
-            case NODE:
-                nhx.append( "N=" );
-                break;
-            case PARENT_BRANCH:
-                nhx.append( "B=" );
-                break;
-            case PHYLOGENY:
-                nhx.append( "P=" );
-                break;
-            case ANNOTATION:
-                nhx.append( "S=" );
-                break;
-            default:
-                nhx.append( "O=" );
-                break;
-        }
-        if ( !getDataType().equals( "" ) ) {
-            if ( getDataType().equals( "xsd:string" ) ) {
-                nhx.append( "S=" );
-            }
-            else if ( getDataType().equals( "xsd:long" ) ) {
-                nhx.append( "L=" );
-            }
-            else if ( getDataType().equals( "xsd:decimal" ) ) {
-                nhx.append( "D=" );
-            }
-            else if ( getDataType().equals( "xsd:boolean" ) ) {
-                nhx.append( "B=" );
-            }
-            else if ( getDataType().equals( "xsd:anyUR" ) ) {
-                nhx.append( "U=" );
-            }
-        }
-        nhx.append( getRef() );
-        nhx.append( "=" );
-        nhx.append( getValue() );
-        if ( !getUnit().equals( "" ) ) {
-            nhx.append( "=" );
-            nhx.append( getUnit() );
-        }
-        return nhx;
+        throw new UnsupportedOperationException();
     }
 
     @Override