00001 00002 /* 00003 * ALMA - Atacama Large Millimeter Array 00004 * (c) European Southern Observatory, 2002 00005 * (c) Associated Universities Inc., 2002 00006 * Copyright by ESO (in the framework of the ALMA collaboration), 00007 * Copyright by AUI (in the framework of the ALMA collaboration), 00008 * All rights reserved. 00009 * 00010 * This library is free software; you can redistribute it and/or 00011 * modify it under the terms of the GNU Lesser General Public 00012 * License as published by the Free software Foundation; either 00013 * version 2.1 of the License, or (at your option) any later version. 00014 * 00015 * This library is distributed in the hope that it will be useful, 00016 * but WITHOUT ANY WARRANTY, without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00018 * Lesser General Public License for more details. 00019 * 00020 * You should have received a copy of the GNU Lesser General Public 00021 * License along with this library; if not, write to the Free Software 00022 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 00023 * MA 02111-1307 USA 00024 * 00025 * Warning! 00026 * -------------------------------------------------------------------- 00027 * | This is generated code! Do not modify this file. | 00028 * | If you do, all changes will be lost when the file is re-generated. | 00029 * -------------------------------------------------------------------- 00030 * 00031 * File ASDM.h 00032 */ 00033 00034 #ifndef ASDM_CLASS 00035 #define ASDM_CLASS 00036 00037 #include <vector> 00038 #include <map> 00039 00040 #include <Representable.h> 00041 #include <Entity.h> 00042 #include <EntityId.h> 00043 #include <ArrayTime.h> 00044 #include <IllegalAccessException.h> 00045 #include <InvalidArgumentException.h> 00046 00047 #include <Misc.h> 00048 00049 #ifndef WITHOUT_ACS 00050 #include <asdmIDLC.h> 00051 //using namespace asdmIDL; /// <------------------- 00052 #endif 00053 00054 /*\file ASDM.h 00055 \brief Generated from model's revision "-1", branch "" 00056 */ 00057 00058 namespace asdm { 00059 00060 00061 //class asdm::MainTable; 00062 class MainTable; 00063 00064 //class asdm::AlmaRadiometerTable; 00065 class AlmaRadiometerTable; 00066 00067 //class asdm::AnnotationTable; 00068 class AnnotationTable; 00069 00070 //class asdm::AntennaTable; 00071 class AntennaTable; 00072 00073 //class asdm::CalAmpliTable; 00074 class CalAmpliTable; 00075 00076 //class asdm::CalAppPhaseTable; 00077 class CalAppPhaseTable; 00078 00079 //class asdm::CalAtmosphereTable; 00080 class CalAtmosphereTable; 00081 00082 //class asdm::CalBandpassTable; 00083 class CalBandpassTable; 00084 00085 //class asdm::CalCurveTable; 00086 class CalCurveTable; 00087 00088 //class asdm::CalDataTable; 00089 class CalDataTable; 00090 00091 //class asdm::CalDelayTable; 00092 class CalDelayTable; 00093 00094 //class asdm::CalDeviceTable; 00095 class CalDeviceTable; 00096 00097 //class asdm::CalFluxTable; 00098 class CalFluxTable; 00099 00100 //class asdm::CalFocusTable; 00101 class CalFocusTable; 00102 00103 //class asdm::CalFocusModelTable; 00104 class CalFocusModelTable; 00105 00106 //class asdm::CalGainTable; 00107 class CalGainTable; 00108 00109 //class asdm::CalHolographyTable; 00110 class CalHolographyTable; 00111 00112 //class asdm::CalPhaseTable; 00113 class CalPhaseTable; 00114 00115 //class asdm::CalPointingTable; 00116 class CalPointingTable; 00117 00118 //class asdm::CalPointingModelTable; 00119 class CalPointingModelTable; 00120 00121 //class asdm::CalPositionTable; 00122 class CalPositionTable; 00123 00124 //class asdm::CalPrimaryBeamTable; 00125 class CalPrimaryBeamTable; 00126 00127 //class asdm::CalReductionTable; 00128 class CalReductionTable; 00129 00130 //class asdm::CalSeeingTable; 00131 class CalSeeingTable; 00132 00133 //class asdm::CalWVRTable; 00134 class CalWVRTable; 00135 00136 //class asdm::ConfigDescriptionTable; 00137 class ConfigDescriptionTable; 00138 00139 //class asdm::CorrelatorModeTable; 00140 class CorrelatorModeTable; 00141 00142 //class asdm::DataDescriptionTable; 00143 class DataDescriptionTable; 00144 00145 //class asdm::DelayModelTable; 00146 class DelayModelTable; 00147 00148 //class asdm::DelayModelFixedParametersTable; 00149 class DelayModelFixedParametersTable; 00150 00151 //class asdm::DelayModelVariableParametersTable; 00152 class DelayModelVariableParametersTable; 00153 00154 //class asdm::DopplerTable; 00155 class DopplerTable; 00156 00157 //class asdm::EphemerisTable; 00158 class EphemerisTable; 00159 00160 //class asdm::ExecBlockTable; 00161 class ExecBlockTable; 00162 00163 //class asdm::FeedTable; 00164 class FeedTable; 00165 00166 //class asdm::FieldTable; 00167 class FieldTable; 00168 00169 //class asdm::FlagTable; 00170 class FlagTable; 00171 00172 //class asdm::FlagCmdTable; 00173 class FlagCmdTable; 00174 00175 //class asdm::FocusTable; 00176 class FocusTable; 00177 00178 //class asdm::FocusModelTable; 00179 class FocusModelTable; 00180 00181 //class asdm::FreqOffsetTable; 00182 class FreqOffsetTable; 00183 00184 //class asdm::GainTrackingTable; 00185 class GainTrackingTable; 00186 00187 //class asdm::HistoryTable; 00188 class HistoryTable; 00189 00190 //class asdm::HolographyTable; 00191 class HolographyTable; 00192 00193 //class asdm::ObservationTable; 00194 class ObservationTable; 00195 00196 //class asdm::PointingTable; 00197 class PointingTable; 00198 00199 //class asdm::PointingModelTable; 00200 class PointingModelTable; 00201 00202 //class asdm::PolarizationTable; 00203 class PolarizationTable; 00204 00205 //class asdm::ProcessorTable; 00206 class ProcessorTable; 00207 00208 //class asdm::ReceiverTable; 00209 class ReceiverTable; 00210 00211 //class asdm::SBSummaryTable; 00212 class SBSummaryTable; 00213 00214 //class asdm::ScaleTable; 00215 class ScaleTable; 00216 00217 //class asdm::ScanTable; 00218 class ScanTable; 00219 00220 //class asdm::SeeingTable; 00221 class SeeingTable; 00222 00223 //class asdm::SourceTable; 00224 class SourceTable; 00225 00226 //class asdm::SpectralWindowTable; 00227 class SpectralWindowTable; 00228 00229 //class asdm::SquareLawDetectorTable; 00230 class SquareLawDetectorTable; 00231 00232 //class asdm::StateTable; 00233 class StateTable; 00234 00235 //class asdm::StationTable; 00236 class StationTable; 00237 00238 //class asdm::SubscanTable; 00239 class SubscanTable; 00240 00241 //class asdm::SwitchCycleTable; 00242 class SwitchCycleTable; 00243 00244 //class asdm::SysCalTable; 00245 class SysCalTable; 00246 00247 //class asdm::SysPowerTable; 00248 class SysPowerTable; 00249 00250 //class asdm::TotalPowerTable; 00251 class TotalPowerTable; 00252 00253 //class asdm::WVMCalTable; 00254 class WVMCalTable; 00255 00256 //class asdm::WeatherTable; 00257 class WeatherTable; 00258 00259 00267 //class ASDM : public Representable { 00268 class ASDM { 00269 00270 public: 00274 ASDM (); 00275 00276 virtual ~ASDM (); 00277 00278 00283 MainTable & getMain () const; 00284 00289 AlmaRadiometerTable & getAlmaRadiometer () const; 00290 00295 AnnotationTable & getAnnotation () const; 00296 00301 AntennaTable & getAntenna () const; 00302 00307 CalAmpliTable & getCalAmpli () const; 00308 00313 CalAppPhaseTable & getCalAppPhase () const; 00314 00319 CalAtmosphereTable & getCalAtmosphere () const; 00320 00325 CalBandpassTable & getCalBandpass () const; 00326 00331 CalCurveTable & getCalCurve () const; 00332 00337 CalDataTable & getCalData () const; 00338 00343 CalDelayTable & getCalDelay () const; 00344 00349 CalDeviceTable & getCalDevice () const; 00350 00355 CalFluxTable & getCalFlux () const; 00356 00361 CalFocusTable & getCalFocus () const; 00362 00367 CalFocusModelTable & getCalFocusModel () const; 00368 00373 CalGainTable & getCalGain () const; 00374 00379 CalHolographyTable & getCalHolography () const; 00380 00385 CalPhaseTable & getCalPhase () const; 00386 00391 CalPointingTable & getCalPointing () const; 00392 00397 CalPointingModelTable & getCalPointingModel () const; 00398 00403 CalPositionTable & getCalPosition () const; 00404 00409 CalPrimaryBeamTable & getCalPrimaryBeam () const; 00410 00415 CalReductionTable & getCalReduction () const; 00416 00421 CalSeeingTable & getCalSeeing () const; 00422 00427 CalWVRTable & getCalWVR () const; 00428 00433 ConfigDescriptionTable & getConfigDescription () const; 00434 00439 CorrelatorModeTable & getCorrelatorMode () const; 00440 00445 DataDescriptionTable & getDataDescription () const; 00446 00451 DelayModelTable & getDelayModel () const; 00452 00457 DelayModelFixedParametersTable & getDelayModelFixedParameters () const; 00458 00463 DelayModelVariableParametersTable & getDelayModelVariableParameters () const; 00464 00469 DopplerTable & getDoppler () const; 00470 00475 EphemerisTable & getEphemeris () const; 00476 00481 ExecBlockTable & getExecBlock () const; 00482 00487 FeedTable & getFeed () const; 00488 00493 FieldTable & getField () const; 00494 00499 FlagTable & getFlag () const; 00500 00505 FlagCmdTable & getFlagCmd () const; 00506 00511 FocusTable & getFocus () const; 00512 00517 FocusModelTable & getFocusModel () const; 00518 00523 FreqOffsetTable & getFreqOffset () const; 00524 00529 GainTrackingTable & getGainTracking () const; 00530 00535 HistoryTable & getHistory () const; 00536 00541 HolographyTable & getHolography () const; 00542 00547 ObservationTable & getObservation () const; 00548 00553 PointingTable & getPointing () const; 00554 00559 PointingModelTable & getPointingModel () const; 00560 00565 PolarizationTable & getPolarization () const; 00566 00571 ProcessorTable & getProcessor () const; 00572 00577 ReceiverTable & getReceiver () const; 00578 00583 SBSummaryTable & getSBSummary () const; 00584 00589 ScaleTable & getScale () const; 00590 00595 ScanTable & getScan () const; 00596 00601 SeeingTable & getSeeing () const; 00602 00607 SourceTable & getSource () const; 00608 00613 SpectralWindowTable & getSpectralWindow () const; 00614 00619 SquareLawDetectorTable & getSquareLawDetector () const; 00620 00625 StateTable & getState () const; 00626 00631 StationTable & getStation () const; 00632 00637 SubscanTable & getSubscan () const; 00638 00643 SwitchCycleTable & getSwitchCycle () const; 00644 00649 SysCalTable & getSysCal () const; 00650 00655 SysPowerTable & getSysPower () const; 00656 00661 TotalPowerTable & getTotalPower () const; 00662 00667 WVMCalTable & getWVMCal () const; 00668 00673 WeatherTable & getWeather () const; 00674 00680 virtual std::string toXML(); 00681 00691 void toXML(std::string directory) ; 00692 00703 virtual void fromXML(std::string xml) ; 00704 00717 static ASDM *getFromXML(std::string xmlDirectory) ; 00718 00724 std::string toMIME(); 00725 00732 void setFromMIME(const std::string & mimeMsg); 00733 00748 void toFile(std::string directory); 00749 00764 void setFromFile(std::string directory, bool loadTablesOnDemand); 00765 00801 void setFromFile(std::string directory, const ASDMParseOptions& parse=ASDMParseOptions()); 00802 00811 bool checkRowUniqueness() const ; 00812 00813 #ifndef WITHOUT_ACS 00814 00818 virtual asdmIDL::ASDMDataSetIDL* toIDL(); 00819 00828 virtual void fromIDL(asdmIDL::ASDMDataSetIDL* x); 00829 #endif 00830 00831 virtual Entity getEntity() const; 00832 00833 virtual void setEntity(Entity e); 00834 00838 virtual std::string getName() const; 00839 00843 virtual unsigned int size() ; 00844 00845 #ifndef WITHOUT_ACS 00846 00852 static ASDM *fromArchive(EntityId datasetId) ; 00853 #endif 00854 00855 #ifndef WITHOUT_ACS 00856 00860 void updateArchive() const ; 00861 #endif 00862 00868 Representable &getTable(std::string tableName) ; 00869 00870 00871 00872 // ===> Attribute timeOfCreation 00873 00874 00875 00876 00877 00882 ArrayTime getTimeOfCreation() const; 00883 00884 00885 00886 00894 void setTimeOfCreation (ArrayTime timeOfCreation); 00895 00896 00897 00898 00899 00900 00901 00902 // ===> Attribute version 00903 00904 00905 00906 00907 00912 int getVersion() const; 00913 00914 00915 00916 00924 void setVersion (int version); 00925 00926 00927 00928 00929 00930 00931 00932 // ===> Attribute xmlnsPrefix 00933 00934 00935 00936 00937 00942 string getXmlnsPrefix() const; 00943 00944 00945 00946 00954 void setXmlnsPrefix (string xmlnsPrefix); 00955 00956 00957 00958 00959 00960 00961 00967 enum Origin { 00968 FILE, 00969 ARCHIVE, 00970 EX_NIHILO 00971 }; 00972 00978 Origin getOrigin() const ; 00979 00987 std::string getDirectory() const ; 00988 00989 XSLTransformer & getXSLTransformer() ; 00990 00991 private: 00992 00993 bool archiveAsBin; // If true archive binary else archive XML 00994 bool fileAsBin ; // If true file binary else file XML 00995 bool hasBeenAdded; 00996 Origin origin; 00997 bool loadTablesOnDemand_; // For a dataset which is stored on disk, convert and load in memory only the tables which are used by the code the first time they are referred to. 00998 bool checkRowUniqueness_; // For a dataset which is stored on disk, when a table is converted and loaded in memory verify (true) or not (false) the fact that each row is unique. 00999 std::string directory_; // The directory where the ASDM has been read. (left empty if the ASDM is only in memory) 01000 01001 01005 MainTable * main; 01006 01010 AlmaRadiometerTable * almaRadiometer; 01011 01015 AnnotationTable * annotation; 01016 01020 AntennaTable * antenna; 01021 01025 CalAmpliTable * calAmpli; 01026 01030 CalAppPhaseTable * calAppPhase; 01031 01035 CalAtmosphereTable * calAtmosphere; 01036 01040 CalBandpassTable * calBandpass; 01041 01045 CalCurveTable * calCurve; 01046 01050 CalDataTable * calData; 01051 01055 CalDelayTable * calDelay; 01056 01060 CalDeviceTable * calDevice; 01061 01065 CalFluxTable * calFlux; 01066 01070 CalFocusTable * calFocus; 01071 01075 CalFocusModelTable * calFocusModel; 01076 01080 CalGainTable * calGain; 01081 01085 CalHolographyTable * calHolography; 01086 01090 CalPhaseTable * calPhase; 01091 01095 CalPointingTable * calPointing; 01096 01100 CalPointingModelTable * calPointingModel; 01101 01105 CalPositionTable * calPosition; 01106 01110 CalPrimaryBeamTable * calPrimaryBeam; 01111 01115 CalReductionTable * calReduction; 01116 01120 CalSeeingTable * calSeeing; 01121 01125 CalWVRTable * calWVR; 01126 01130 ConfigDescriptionTable * configDescription; 01131 01135 CorrelatorModeTable * correlatorMode; 01136 01140 DataDescriptionTable * dataDescription; 01141 01145 DelayModelTable * delayModel; 01146 01150 DelayModelFixedParametersTable * delayModelFixedParameters; 01151 01155 DelayModelVariableParametersTable * delayModelVariableParameters; 01156 01160 DopplerTable * doppler; 01161 01165 EphemerisTable * ephemeris; 01166 01170 ExecBlockTable * execBlock; 01171 01175 FeedTable * feed; 01176 01180 FieldTable * field; 01181 01185 FlagTable * flag; 01186 01190 FlagCmdTable * flagCmd; 01191 01195 FocusTable * focus; 01196 01200 FocusModelTable * focusModel; 01201 01205 FreqOffsetTable * freqOffset; 01206 01210 GainTrackingTable * gainTracking; 01211 01215 HistoryTable * history; 01216 01220 HolographyTable * holography; 01221 01225 ObservationTable * observation; 01226 01230 PointingTable * pointing; 01231 01235 PointingModelTable * pointingModel; 01236 01240 PolarizationTable * polarization; 01241 01245 ProcessorTable * processor; 01246 01250 ReceiverTable * receiver; 01251 01255 SBSummaryTable * sBSummary; 01256 01260 ScaleTable * scale; 01261 01265 ScanTable * scan; 01266 01270 SeeingTable * seeing; 01271 01275 SourceTable * source; 01276 01280 SpectralWindowTable * spectralWindow; 01281 01285 SquareLawDetectorTable * squareLawDetector; 01286 01290 StateTable * state; 01291 01295 StationTable * station; 01296 01300 SubscanTable * subscan; 01301 01305 SwitchCycleTable * switchCycle; 01306 01310 SysCalTable * sysCal; 01311 01315 SysPowerTable * sysPower; 01316 01320 TotalPowerTable * totalPower; 01321 01325 WVMCalTable * wVMCal; 01326 01330 WeatherTable * weather; 01331 01335 std::vector<Representable *> table; 01336 01340 //vector<Entity *> tableEntity; 01341 std::map<std::string, Entity> tableEntity; 01342 01346 Entity entity; 01347 01348 01349 01350 // ===> Attribute timeOfCreation 01351 01352 01353 01354 ArrayTime timeOfCreation; 01355 01356 01357 01358 01359 01360 01361 // ===> Attribute version 01362 01363 01364 01365 int version; 01366 01367 01368 01369 01370 01371 01372 // ===> Attribute xmlnsPrefix 01373 01374 01375 01376 string xmlnsPrefix; 01377 01378 01379 01380 01381 01382 01383 void error() ; // throw(ConversionException); 01384 static std::string getXMLEntity(EntityId id); // throw(ConversionException); 01385 static void putXMLEntity(std::string xml); // throw(ConversionException); 01386 01387 XSLTransformer xslTransformer; 01388 01389 }; 01390 01391 } // End namespace asdm 01392 01393 #endif /* ASDM_CLASS */