more test for isDuplication() and isSpecation() added (phyloXML encoded
[jalview.git] / forester / java / src / org / forester / phylogeny / data / NodeData.java
index 28bedb9..28b6889 100644 (file)
@@ -38,20 +38,6 @@ import org.forester.util.ForesterUtil;
 
 public class NodeData implements PhylogenyData {
 
-    public enum NODE_DATA {
-        NODE_NAME,
-        EVENT,
-        SEQUENCE_NAME,
-        GENE_NAME,
-        SEQUENCE_SYMBOL,
-        SEQUENCE_MOL_SEQ,
-        SEQUENCE_MOL_SEQ_FASTA,
-        SEQUENCE_ACC,
-        TAXONOMY_SCIENTIFIC_NAME,
-        TAXONOMY_COMM0N_NAME,
-        TAXONOMY_CODE,
-        UNKNOWN;
-    }
     private String             _node_name;
     private Event              _event;
     private List<Sequence>     _sequences;
@@ -192,6 +178,9 @@ public class NodeData implements PhylogenyData {
     }
 
     public Distribution getDistribution( final int index ) {
+        if ( _distributions == null ) {
+            return null;
+        }
         return _distributions.get( index );
     }
 
@@ -218,6 +207,9 @@ public class NodeData implements PhylogenyData {
     }
 
     public Reference getReference( final int index ) {
+        if ( _references == null ) {
+            return null;
+        }
         return _references.get( index );
     }
 
@@ -235,6 +227,9 @@ public class NodeData implements PhylogenyData {
     }
 
     public Sequence getSequence( final int index ) {
+        if ( _sequences == null ) {
+            return null;
+        }
         return _sequences.get( index );
     }
 
@@ -257,6 +252,9 @@ public class NodeData implements PhylogenyData {
     }
 
     public Taxonomy getTaxonomy( final int index ) {
+        if ( _taxonomies == null ) {
+            return null;
+        }
         return _taxonomies.get( index );
     }