NitfFileHeader.h

Go to the documentation of this file.
00001 /*
00002  * The information in this file is
00003  * Copyright(c) 2007 Ball Aerospace & Technologies Corporation
00004  * and is subject to the terms and conditions of the
00005  * GNU Lesser General Public License Version 2.1
00006  * The license text is available from   
00007  * http://www.gnu.org/licenses/lgpl.html
00008  */
00009 
00010 #ifndef NITFFILEHEADER_H
00011 #define NITFFILEHEADER_H
00012 
00013 #include "AppVersion.h"
00014 #include "ConfigurationSettings.h"
00015 #include "NitfConstants.h"
00016 #include "NitfHeader.h"
00017 
00018 #include <string>
00019 
00020 class ossimContainerProperty;
00021 class ossimNitfFileHeader;
00022 class RasterDataDescriptor;
00023 
00024 class DynamicObject;
00025 
00026 namespace Nitf
00027 {
00028    /**
00029     * Represents the NITF file header.
00030     */
00031    class FileHeader : public Header
00032    {
00033    public:
00034       /**
00035        * Constructs the FileHeader.
00036        *
00037        * @param fileVersion
00038        *        Either Nitf::VERSION_02_00 or Nitf::VERSION_02_10.
00039        */
00040       FileHeader(const std::string& fileVersion);
00041 
00042       /**
00043        * Adds NITF File Header Metadata to the DynamicObject.
00044        *
00045        * @param pHeader
00046        *        The source of the metadata.
00047        *
00048        * @param pDescriptor
00049        *        The destination for the metadata.
00050        *
00051        * @return \c True on success, \c false otherwise.
00052        */
00053       bool importMetadata(const ossimPropertyInterface* pHeader, RasterDataDescriptor* pDescriptor);
00054 
00055       std::string getMetadataPath() const;
00056 
00057       FactoryResource<DynamicObject> createDefaultsDynamicObject(const RasterDataDescriptor* pDescriptor);
00058 
00059    protected: // special import/export code
00060       /**
00061        * @copydoc Nitf::Header::importMetadataValue()
00062        *
00063        * <b>This function is specialized for importing classification strings.</b>
00064        */
00065       static bool importClassificationString(const ossimPropertyInterface*pPropertyInterface,
00066          RasterDataDescriptor *pDescriptor,
00067          DynamicObject *pDynObj, const std::string& appName,
00068          const std::string& ossimName);
00069 
00070       /**
00071        * @copydoc Nitf::Header::exportMetadataValue()
00072        *
00073        * <b>This function is specialized for exporting classification strings.</b>
00074        */
00075       static bool exportClassificationString(const RasterDataDescriptor* pDescriptor,
00076          const DataVariant& prop,
00077          ossimContainerProperty* pProperties, const std::string& appName,
00078          const std::string& ossimName);
00079 
00080       /**
00081        * @copydoc Nitf::Header::importMetadataValue()
00082        *
00083        * <b>This function is specialized for importing classification dates and times.</b>
00084        */
00085       static bool importClassificationDate(const ossimPropertyInterface* pPropertyInterface,
00086          RasterDataDescriptor* pDescriptor,
00087          DynamicObject* pDynObj, const std::string& appName,
00088          const std::string& ossimName);
00089 
00090       /**
00091        * @copydoc Nitf::Header::exportMetadataValue()
00092        *
00093        * <b>This function is specialized for exporting classification dates and times.</b>
00094        */
00095       static bool exportClassificationDate(const RasterDataDescriptor* pDescriptor,
00096          const DataVariant& prop,
00097          ossimContainerProperty* pProperties, const std::string& appName,
00098          const std::string& ossimName);
00099 
00100       /**
00101        * @copydoc Nitf::Header::exportMetadataValue()
00102        *
00103        * <b>This function is specialized for exporting Originating STAtion ID.</b>
00104        */
00105       static bool exportOSTAID(const RasterDataDescriptor* pDescriptor,
00106          const DataVariant& prop,
00107          ossimContainerProperty* pProperties, const std::string& appName,
00108          const std::string& ossimName);
00109 
00110       /**
00111        * @copydoc Nitf::Header::exportMetadataValue()
00112        *
00113        * <b>This function is specialized for exporting the originator's name.</b>
00114        */
00115       static bool exportONAME(const RasterDataDescriptor* pDescriptor,
00116          const DataVariant& prop,
00117          ossimContainerProperty* pProperties, const std::string& appName,
00118          const std::string& ossimName);
00119 
00120       /**
00121        * @copydoc Nitf::Header::exportMetadataValue()
00122        *
00123        * <b>This function is specialized for exporting the originator's phone number.</b>
00124        */
00125       static bool exportOPHONE(const RasterDataDescriptor* pDescriptor,
00126          const DataVariant& prop,
00127          ossimContainerProperty* pProperties, const std::string& appName,
00128          const std::string& ossimName);
00129 
00130    private:
00131       FileHeader& operator=(const FileHeader& rhs);
00132 
00133       SETTING(OSTAID, FileHeader, std::string, APP_NAME);
00134       SETTING(ONAME, FileHeader, std::string, std::string());
00135       SETTING(OPHONE, FileHeader, std::string, std::string());
00136    };
00137 }
00138 
00139 #endif

Software Development Kit - Opticks 4.9.0 Build 16218