2 // FORESTER -- software libraries and applications
3 // for evolutionary biology research and applications.
5 // Copyright (C) 2017 Christian M. Zmasek
6 // Copyright (C) 2017 J. Craig Venter Institute
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.
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.
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
23 // Contact: phyloxml @ gmail . com
24 // WWW: https://sites.google.com/site/cmzmasek/home/software/forester
26 package org.forester.clade_analysis;
28 import java.util.ArrayList;
29 import java.util.List;
31 public final class Result {
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_confidence = "";
40 private String _greatest_common_clade_confidence_up = "";
41 private String _greatest_common_clade_confidence_down = "";
43 void addWarning( final String warning ) {
44 _warnings.add( warning );
47 void setGreatestCommonPrefix( final String greatest_common_prefix ) {
48 _greatest_common_prefix = greatest_common_prefix;
51 void setGreatestCommonPrefixUp( final String greatest_common_prefix_up ) {
52 _greatest_common_prefix_up = greatest_common_prefix_up;
55 void setGreatestCommonPrefixDown( final String greatest_common_prefix_down ) {
56 _greatest_common_prefix_down = greatest_common_prefix_down;
59 void setGreatestCommonCladeConfidence( final String greatest_common_clade_confidence ) {
60 _greatest_common_clade_confidence = greatest_common_clade_confidence;
63 void setGreatestCommonCladeUpConfidence( final String greatest_common_clade_confidence_up ) {
64 _greatest_common_clade_confidence_up = greatest_common_clade_confidence_up;
67 void setGreatestCommonCladeDownConfidence( final String greatest_common_clade_confidence_down ) {
68 _greatest_common_clade_confidence_down = greatest_common_clade_confidence_down;
71 public String getGreatestCommonPrefix() {
72 return _greatest_common_prefix;
75 public String getGreatestCommonPrefixUp() {
76 return _greatest_common_prefix_up;
79 public String getGreatestCommonPrefixDown() {
80 return _greatest_common_prefix_down;
83 public String getGreatestCommonCladeConfidence() {
84 return _greatest_common_clade_confidence;
87 public String getGreatestCommonCladeUpConfidence() {
88 return _greatest_common_clade_confidence_up;
91 public String getGreatestCommonCladeDownConfidence() {
92 return _greatest_common_clade_confidence_down;
95 public List<String> getWarnings() {
99 void setLeastEncompassingCladeSize( final int lec_ext_nodes ) {
100 _lec_ext_nodes = lec_ext_nodes;
103 void setTreeSize( final int p_ext_nodes ) {
104 _p_ext_nodes = p_ext_nodes;
107 public int getLeastEncompassingCladeSize() {
108 return _lec_ext_nodes;
111 public int getTreeSize() {