00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 #ifndef SourceRow_CLASS
00035 #define SourceRow_CLASS
00036
00037 #include <vector>
00038 #include <string>
00039 #include <set>
00040 using std::vector;
00041 using std::string;
00042 using std::set;
00043
00044 #ifndef WITHOUT_ACS
00045 #include <asdmIDLC.h>
00046 using asdmIDL::SourceRowIDL;
00047 #endif
00048
00049 #include <Angle.h>
00050 #include <AngularRate.h>
00051 #include <ArrayTime.h>
00052 #include <ArrayTimeInterval.h>
00053 #include <Complex.h>
00054 #include <Entity.h>
00055 #include <EntityId.h>
00056 #include <EntityRef.h>
00057 #include <Flux.h>
00058 #include <Frequency.h>
00059 #include <Humidity.h>
00060 #include <Interval.h>
00061 #include <Length.h>
00062 #include <Pressure.h>
00063 #include <Speed.h>
00064 #include <Tag.h>
00065 #include <Temperature.h>
00066 #include <ConversionException.h>
00067 #include <NoSuchRow.h>
00068 #include <IllegalAccessException.h>
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105 #include "CSourceModel.h"
00106 using namespace SourceModelMod;
00107
00108
00109
00110
00111
00112
00113
00114
00115 using asdm::Angle;
00116 using asdm::AngularRate;
00117 using asdm::ArrayTime;
00118 using asdm::Complex;
00119 using asdm::Entity;
00120 using asdm::EntityId;
00121 using asdm::EntityRef;
00122 using asdm::Flux;
00123 using asdm::Frequency;
00124 using asdm::Humidity;
00125 using asdm::Interval;
00126 using asdm::Length;
00127 using asdm::Pressure;
00128 using asdm::Speed;
00129 using asdm::Tag;
00130 using asdm::Temperature;
00131 using asdm::ConversionException;
00132 using asdm::NoSuchRow;
00133 using asdm::IllegalAccessException;
00134
00135
00136
00137
00138
00139 namespace asdm {
00140
00141
00142
00143
00144
00145 class SpectralWindowRow;
00146
00147
00148 class SourceParameterRow;
00149
00150
00157 class SourceRow {
00158 friend class asdm::SourceTable;
00159
00160 public:
00161
00162 virtual ~SourceRow();
00163
00167 SourceTable &getTable() const;
00168
00169 #ifndef WITHOUT_ACS
00170
00174 SourceRowIDL *toIDL() const;
00175 #endif
00176
00177 #ifndef WITHOUT_ACS
00178
00182 void setFromIDL (SourceRowIDL x) throw(ConversionException);
00183 #endif
00184
00189 string toXML() const;
00190
00196 void setFromXML (string rowDoc) throw(ConversionException);
00197
00199
00201
00202
00203
00204
00205
00206
00207
00208
00213 int getSourceId() const;
00214
00215
00216
00217
00218
00219
00220
00221
00222
00223
00224
00225
00226
00227
00228
00233 ArrayTimeInterval getTimeInterval() const;
00234
00235
00236
00237
00244 void setTimeInterval (ArrayTimeInterval timeInterval) throw(IllegalAccessException);
00245
00246
00247
00248
00249
00250
00251
00252
00253
00254
00255
00256
00257
00262 int getNumLines() const;
00263
00264
00265
00266
00272 void setNumLines (int numLines);
00273
00274
00275
00276
00277
00278
00279
00280
00281
00282
00283
00284
00285
00290 string getSourceName() const;
00291
00292
00293
00294
00300 void setSourceName (string sourceName);
00301
00302
00303
00304
00305
00306
00307
00308
00309
00310
00311
00316 bool isCatalogExists() const;
00317
00318
00319
00325 string getCatalog() const throw(IllegalAccessException);
00326
00327
00328
00329
00335 void setCatalog (string catalog);
00336
00337
00338
00339
00343 void clearCatalog ();
00344
00345
00346
00347
00348
00349
00350
00351
00356 bool isCalibrationGroupExists() const;
00357
00358
00359
00365 int getCalibrationGroup() const throw(IllegalAccessException);
00366
00367
00368
00369
00375 void setCalibrationGroup (int calibrationGroup);
00376
00377
00378
00379
00383 void clearCalibrationGroup ();
00384
00385
00386
00387
00388
00389
00390
00391
00392
00393
00398 string getCode() const;
00399
00400
00401
00402
00408 void setCode (string code);
00409
00410
00411
00412
00413
00414
00415
00416
00417
00418
00419
00420
00421
00426 vector<Angle > getDirection() const;
00427
00428
00429
00430
00436 void setDirection (vector<Angle > direction);
00437
00438
00439
00440
00441
00442
00443
00444
00445
00446
00447
00452 bool isPositionExists() const;
00453
00454
00455
00461 vector<Length > getPosition() const throw(IllegalAccessException);
00462
00463
00464
00465
00471 void setPosition (vector<Length > position);
00472
00473
00474
00475
00479 void clearPosition ();
00480
00481
00482
00483
00484
00485
00486
00487
00488
00489
00494 vector<AngularRate > getProperMotion() const;
00495
00496
00497
00498
00504 void setProperMotion (vector<AngularRate > properMotion);
00505
00506
00507
00508
00509
00510
00511
00512
00513
00514
00515
00520 bool isTransitionExists() const;
00521
00522
00523
00529 vector<string > getTransition() const throw(IllegalAccessException);
00530
00531
00532
00533
00539 void setTransition (vector<string > transition);
00540
00541
00542
00543
00547 void clearTransition ();
00548
00549
00550
00551
00552
00553
00554
00555
00560 bool isRestFrequencyExists() const;
00561
00562
00563
00569 vector<Frequency > getRestFrequency() const throw(IllegalAccessException);
00570
00571
00572
00573
00579 void setRestFrequency (vector<Frequency > restFrequency);
00580
00581
00582
00583
00587 void clearRestFrequency ();
00588
00589
00590
00591
00592
00593
00594
00595
00600 bool isSysVelExists() const;
00601
00602
00603
00609 vector<Speed > getSysVel() const throw(IllegalAccessException);
00610
00611
00612
00613
00619 void setSysVel (vector<Speed > sysVel);
00620
00621
00622
00623
00627 void clearSysVel ();
00628
00629
00630
00631
00632
00633
00634
00635
00640 bool isSourceModelExists() const;
00641
00642
00643
00649 SourceModel getSourceModel() const throw(IllegalAccessException);
00650
00651
00652
00653
00659 void setSourceModel (SourceModel sourceModel);
00660
00661
00662
00663
00667 void clearSourceModel ();
00668
00669
00670
00671
00672
00673
00674
00675
00680 bool isDeltaVelExists() const;
00681
00682
00683
00689 Speed getDeltaVel() const throw(IllegalAccessException);
00690
00691
00692
00693
00699 void setDeltaVel (Speed deltaVel);
00700
00701
00702
00703
00707 void clearDeltaVel ();
00708
00709
00710
00711
00712
00713
00714
00715
00720 bool isRangeVelExists() const;
00721
00722
00723
00729 vector<Speed > getRangeVel() const throw(IllegalAccessException);
00730
00731
00732
00733
00739 void setRangeVel (vector<Speed > rangeVel);
00740
00741
00742
00743
00747 void clearRangeVel ();
00748
00749
00750
00752
00754
00755
00756
00757
00758
00759
00764 bool isSourceParameterIdExists() const;
00765
00766
00767
00773 int getSourceParameterId() const throw(IllegalAccessException);
00774
00775
00776
00777
00783 void setSourceParameterId (int sourceParameterId);
00784
00785
00786
00787
00791 void clearSourceParameterId ();
00792
00793
00794
00795
00796
00797
00798
00799
00800
00801
00806 Tag getSpectralWindowId() const;
00807
00808
00809
00810
00817 void setSpectralWindowId (Tag spectralWindowId) throw(IllegalAccessException);
00818
00819
00820
00821
00822
00823
00825
00827
00828
00829
00830
00831
00838 SpectralWindowRow* getSpectralWindowUsingSpectralWindowId();
00839
00840
00841
00842
00843
00844
00845
00846
00847
00848
00854 vector <SourceParameterRow *> getSourceParameters();
00855
00856
00857
00858
00859
00860
00861
00862
00867 bool compareNoAutoInc(Tag spectralWindowId, ArrayTimeInterval timeInterval, int numLines, string sourceName, string code, vector<Angle > direction, vector<AngularRate > properMotion);
00868
00869
00870
00871
00872 bool compareRequiredValue(int numLines, string sourceName, string code, vector<Angle > direction, vector<AngularRate > properMotion);
00873
00874
00883 bool equalByRequiredValue(SourceRow* x) ;
00884
00885 private:
00889 SourceTable &table;
00893 bool hasBeenAdded;
00894
00895
00896 void isAdded();
00897
00898
00907 SourceRow (SourceTable &table);
00908
00926 SourceRow (SourceTable &table, SourceRow &row);
00927
00929
00931
00932
00933
00934
00935
00936
00937 int sourceId;
00938
00939
00940
00941
00948 void setSourceId (int sourceId) throw(IllegalAccessException);
00949
00950
00951
00952
00953
00954
00955
00956
00957 ArrayTimeInterval timeInterval;
00958
00959
00960
00961
00962
00963
00964
00965
00966
00967
00968 int numLines;
00969
00970
00971
00972
00973
00974
00975
00976
00977
00978
00979 string sourceName;
00980
00981
00982
00983
00984
00985
00986
00987
00988
00989 bool catalogExists;
00990
00991
00992 string catalog;
00993
00994
00995
00996
00997
00998
00999
01000
01001
01002 bool calibrationGroupExists;
01003
01004
01005 int calibrationGroup;
01006
01007
01008
01009
01010
01011
01012
01013
01014
01015
01016 string code;
01017
01018
01019
01020
01021
01022
01023
01024
01025
01026
01027 vector<Angle > direction;
01028
01029
01030
01031
01032
01033
01034
01035
01036
01037 bool positionExists;
01038
01039
01040 vector<Length > position;
01041
01042
01043
01044
01045
01046
01047
01048
01049
01050
01051 vector<AngularRate > properMotion;
01052
01053
01054
01055
01056
01057
01058
01059
01060
01061 bool transitionExists;
01062
01063
01064 vector<string > transition;
01065
01066
01067
01068
01069
01070
01071
01072
01073
01074 bool restFrequencyExists;
01075
01076
01077 vector<Frequency > restFrequency;
01078
01079
01080
01081
01082
01083
01084
01085
01086
01087 bool sysVelExists;
01088
01089
01090 vector<Speed > sysVel;
01091
01092
01093
01094
01095
01096
01097
01098
01099
01100 bool sourceModelExists;
01101
01102
01103 SourceModel sourceModel;
01104
01105
01106
01107
01108
01109
01110
01111
01112
01113 bool deltaVelExists;
01114
01115
01116 Speed deltaVel;
01117
01118
01119
01120
01121
01122
01123
01124
01125
01126 bool rangeVelExists;
01127
01128
01129 vector<Speed > rangeVel;
01130
01131
01132
01133
01134
01136
01138
01139
01140
01141
01142
01143 bool sourceParameterIdExists;
01144
01145
01146 int sourceParameterId;
01147
01148
01149
01150
01151
01152
01153
01154
01155
01156
01157 Tag spectralWindowId;
01158
01159
01160
01161
01162
01164
01166
01167
01168
01169
01170
01171
01172
01173
01174
01175
01176
01177
01178
01179
01180
01181 };
01182
01183 }
01184
01185 #endif