in progress...
[jalview.git] / forester / java / src / org / forester / clade_analysis / Result.java
1 // $Id:
2 // FORESTER -- software libraries and applications
3 // for evolutionary biology research and applications.
4 //
5 // Copyright (C) 2017 Christian M. Zmasek
6 // Copyright (C) 2017 J. Craig Venter Institute
7 // All rights reserved
8 //
9 // This library is free software; you can redistribute it and/or
10 // modify it under the terms of the GNU Lesser General Public
11 // License as published by the Free Software Foundation; either
12 // version 2.1 of the License, or (at your option) any later version.
13 //
14 // This library is distributed in the hope that it will be useful,
15 // but WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 // Lesser General Public License for more details.
18 //
19 // You should have received a copy of the GNU Lesser General Public
20 // License along with this library; if not, write to the Free Software
21 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22 //
23 // Contact: phyloxml @ gmail . com
24 // WWW: https://sites.google.com/site/cmzmasek/home/software/forester
25
26 package org.forester.clade_analysis;
27
28 import java.util.ArrayList;
29 import java.util.List;
30
31 public final class Result {
32
33     private String             _greatest_common_prefix                = "";
34     private String             _greatest_common_prefix_up             = "";
35     private String             _greatest_common_prefix_down           = "";
36     private final List<String> _warnings                              = new ArrayList<>();
37     private int                _lec_ext_nodes                         = 0;
38     private int                _p_ext_nodes                           = 0;
39     private String             _greatest_common_clade_subtree_confidence      = "";
40     private String             _greatest_common_clade_subtree_confidence_up   = "";
41     private String             _greatest_common_clade_subtree_confidence_down = "";
42
43     void addWarning( final String warning ) {
44         _warnings.add( warning );
45     }
46
47     void setGreatestCommonPrefix( final String greatest_common_prefix ) {
48         _greatest_common_prefix = greatest_common_prefix;
49     }
50
51     void setGreatestCommonPrefixUp( final String greatest_common_prefix_up ) {
52         _greatest_common_prefix_up = greatest_common_prefix_up;
53     }
54
55     void setGreatestCommonPrefixDown( final String greatest_common_prefix_down ) {
56         _greatest_common_prefix_down = greatest_common_prefix_down;
57     }
58
59     void setGreatestCommonCladeSubtreeConfidence( final String greatest_common_clade_confidence ) {
60         _greatest_common_clade_subtree_confidence = greatest_common_clade_confidence;
61     }
62
63     void setGreatestCommonCladeUpSubtreeConfidence( final String greatest_common_clade_confidence_up ) {
64         _greatest_common_clade_subtree_confidence_up = greatest_common_clade_confidence_up;
65     }
66
67     void setGreatestCommonCladeDownSubtreeConfidence( final String greatest_common_clade_confidence_down ) {
68         _greatest_common_clade_subtree_confidence_down = greatest_common_clade_confidence_down;
69     }
70
71     public String getGreatestCommonPrefix() {
72         return _greatest_common_prefix;
73     }
74
75     public String getGreatestCommonPrefixUp() {
76         return _greatest_common_prefix_up;
77     }
78
79     public String getGreatestCommonPrefixDown() {
80         return _greatest_common_prefix_down;
81     }
82
83     public String getGreatestCommonCladeSubtreeConfidence() {
84         return _greatest_common_clade_subtree_confidence;
85     }
86
87     public String getGreatestCommonCladeUpSubtreeConfidence() {
88         return _greatest_common_clade_subtree_confidence_up;
89     }
90
91     public String getGreatestCommonCladeDownSubtreeConfidence() {
92         return _greatest_common_clade_subtree_confidence_down;
93     }
94
95     public List<String> getWarnings() {
96         return _warnings;
97     }
98
99     void setLeastEncompassingCladeSize( final int lec_ext_nodes ) {
100         _lec_ext_nodes = lec_ext_nodes;
101     }
102
103     void setTreeSize( final int p_ext_nodes ) {
104         _p_ext_nodes = p_ext_nodes;
105     }
106
107     public int getLeastEncompassingCladeSize() {
108         return _lec_ext_nodes;
109     }
110
111     public int getTreeSize() {
112         return _p_ext_nodes;
113     }
114 }