casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Searcher.h
Go to the documentation of this file.
1 //# Copyright (C) 2004
2 //# Associated Universities, Inc. Washington DC, USA.
3 //#
4 //# This library is free software; you can redistribute it and/or modify it
5 //# under the terms of the GNU Library General Public License as published by
6 //# the Free Software Foundation; either version 2 of the License, or (at your
7 //# option) any later version.
8 //#
9 //# This library is distributed in the hope that it will be useful, but WITHOUT
10 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 //# License for more details.
13 //#
14 //# You should have received a copy of the GNU Library General Public License
15 //# along with this library; if not, write to the Free Software Foundation,
16 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
17 //#
18 //# Correspondence concerning AIPS++ should be addressed as follows:
19 //# Internet email: aips2-request@nrao.edu.
20 //# Postal address: AIPS++ Project Office
21 //# National Radio Astronomy Observatory
22 //# 520 Edgemont Road
23 //# Charlottesville, VA 22903-2475 USA
24 #ifndef SEARCHER_H_
25 #define SEARCHER_H_
26 
28 #include <string>
29 #include <vector>
30 
31 namespace casa {
32 
33 //Interface needed to support molecular line searching and identification.
34 
35 class Searcher {
36 public:
37  Searcher();
38 
39  //Set all search parameters back to their defaults.
40  virtual void reset() = 0;
41 
42  //Returns whether or not a connection has been established to the database
43  //provider.
44  virtual bool isConnected() const = 0;
45 
46  //Provide a way to interrupt long searches.
47  virtual void stopSearch() = 0;
48 
49  //Search Parameters
50  virtual void setChemicalNames( const std::vector<string>& chemNames ) = 0;
51  virtual void setSpeciesNames( const std::vector<string>& speciesNames ) = 0;
52  virtual void setFrequencyRange( double minValue, double maxValue ) = 0;
53  virtual void setIntensityRange( double minValue, double maxValue ) = 0;
54  virtual void setSmu2Range( double minValue, double maxValue ) = 0;
55  virtual void setLogaRange( double minValue, double maxValue ) = 0;
56  virtual void setElRange( double minValue, double maxValue ) = 0;
57  virtual void setEuRange( double minValue, double maxValue ) = 0;
58  virtual void setQNS( const std::vector<string>& qns ) = 0;
59 
60 
61  //Filters
62  virtual void setFilterTop20( bool filter = true) = 0;
63  virtual void setFilterPlanetaryAtmosphere( bool filter = true ) = 0;
64  virtual void setFilterHotCores(bool filter = true) = 0;
65  virtual void setFilterDarkClouds(bool filter = true) = 0;
66  virtual void setFilterDiffuseClouds( bool filter = true) = 0;
67  virtual void setFilterComets(bool filter = true) = 0;
68  virtual void setFilterAgbPpnPn(bool filter = true) = 0;
69  virtual void setFilterExtragalactic(bool filter = true) = 0;
70 
71  //Support for scolling
72  virtual void setSearchResultLimit( int limit ) = 0;
73 
74  //Doing the search
75  virtual std::vector<SplatResult> doSearch(string& errorMsg, int offset ) = 0;
76  virtual long doSearchCount( string& errorMsg ) = 0;
77 
78  //Information about the database
79  virtual string getCreatedDate() const = 0;
80  virtual string tableInfo( const string& tableName, string& errorMessage ) const= 0;
81 
82  virtual ~Searcher();
83 };
84 
85 } /* namespace casa */
86 #endif /* SEARCHER_H_ */
virtual void reset()=0
Set all search parameters back to their defaults.
virtual void setSpeciesNames(const std::vector< string > &speciesNames)=0
virtual long doSearchCount(string &errorMsg)=0
virtual void stopSearch()=0
Provide a way to interrupt long searches.
virtual void setSearchResultLimit(int limit)=0
Support for scolling.
virtual bool isConnected() const =0
Returns whether or not a connection has been established to the database provider.
virtual void setQNS(const std::vector< string > &qns)=0
Interface needed to support molecular line searching and identification.
Definition: Searcher.h:35
virtual void setSmu2Range(double minValue, double maxValue)=0
virtual void setEuRange(double minValue, double maxValue)=0
virtual std::vector< SplatResult > doSearch(string &errorMsg, int offset)=0
Doing the search.
virtual void setFrequencyRange(double minValue, double maxValue)=0
virtual void setFilterTop20(bool filter=true)=0
Filters.
virtual void setChemicalNames(const std::vector< string > &chemNames)=0
Search Parameters.
virtual void setFilterDiffuseClouds(bool filter=true)=0
virtual ~Searcher()
virtual void setFilterAgbPpnPn(bool filter=true)=0
virtual void setFilterDarkClouds(bool filter=true)=0
virtual string getCreatedDate() const =0
Information about the database.
virtual void setFilterPlanetaryAtmosphere(bool filter=true)=0
virtual void setElRange(double minValue, double maxValue)=0
virtual void setLogaRange(double minValue, double maxValue)=0
virtual string tableInfo(const string &tableName, string &errorMessage) const =0
std::set< ScanKey > filter(const std::set< ScanKey > scans, const ArrayKey &arrayKey)
given a set of scan keys, return the subset that matches the given array key
virtual void setFilterComets(bool filter=true)=0
virtual void setFilterHotCores(bool filter=true)=0
virtual void setFilterExtragalactic(bool filter=true)=0
virtual void setIntensityRange(double minValue, double maxValue)=0