1 /**
2  * UGENE - Integrated Bioinformatics Tools.
3  * Copyright (C) 2008-2021 UniPro <ugene@unipro.ru>
4  * http://ugene.net
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2
9  * of the License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19  * MA 02110-1301, USA.
20  */
21 
22 #ifndef _U2_CDS_TASK_FACTORY_H_
23 #define _U2_CDS_TASK_FACTORY_H_
24 
25 #include <U2Core/AnnotationData.h>
26 
27 namespace U2 {
28 
29 class U2ALGORITHM_EXPORT CDDNames {
30 public:
CDD_DB()31     static QString CDD_DB() {
32         return "CDD";
33     }
PFAM_DB()34     static QString PFAM_DB() {
35         return "Pfam";
36     }
SMART_DB()37     static QString SMART_DB() {
38         return "Smart";
39     }
COG_DB()40     static QString COG_DB() {
41         return "Cog";
42     }
KOG_DB()43     static QString KOG_DB() {
44         return "Kog";
45     }
PRK_DB()46     static QString PRK_DB() {
47         return "Prk";
48     }
TIGR_DB()49     static QString TIGR_DB() {
50         return "Tigr";
51     }
52 };
53 
54 class DNAAlphabet;
55 
56 class U2ALGORITHM_EXPORT CDSearchSettings {
57 public:
CDSearchSettings()58     CDSearchSettings()
59         : ev(0.01f), alp(nullptr) {
60     }
61     float ev;
62     const DNAAlphabet *alp;
63     QByteArray query;
64     QString localDbFolder;
65     QString dbName;
66 };
67 
68 class Task;
69 
70 class U2ALGORITHM_EXPORT CDSearchResultListener {
71 public:
~CDSearchResultListener()72     virtual ~CDSearchResultListener() {
73     }
74     virtual QList<SharedAnnotationData> getCDSResults() const = 0;
75     virtual Task *getTask() const = 0;
76 };
77 
78 class U2ALGORITHM_EXPORT CDSearchFactory {
79 public:
~CDSearchFactory()80     virtual ~CDSearchFactory() {
81     }
82 
83     virtual CDSearchResultListener *createCDSearch(const CDSearchSettings &settings) const = 0;
84 };
85 
86 }  // namespace U2
87 
88 #endif
89