Exemplo n.º 1
0
void ossimNitfFileHeaderV2_1::setProperty(ossimRefPtr<ossimProperty> property)
{
   if(!property.valid()) return;
   
   ossimString name = property->getName();
   if(name == FSCLASY_KW)
   {
     setSecurityClassificationSys(property->valueToString()); 
   }
   else if(name == FSDCTP_KW)
   {
      setDeclassificationType(property->valueToString());
   }
   else if(name == FSDCDT_KW)
   {
      setDeclassificationDate(property->valueToString());
   }
   else if(name == FSDCXM_KW)
   {
      setDeclassificationExemption(property->valueToString());
   }
   else if(name == FSDG_KW)
   {
      setDowngrade(property->valueToString());
   }
   else if(name == FSDGDT_KW)
   {
      setDowngradingDate(property->valueToString());
   }
   else if(name == FSCLTX_KW)
   {
      setClassificationText(property->valueToString());
   }
   else if(name == FSCATP_KW)
   {
      setClassificationAuthorityType(property->valueToString());
   }
   else if(name == FSCRSN_KW)
   {
      setClassificationReason(property->valueToString());
   }
   else if(name == FSSRDT_KW)
   {
      setSecuritySourceDate(property->valueToString());
   }
   else if(name == FBKGC_KW)
   {
      ossimString value = property->valueToString();
      std::vector<ossimString> splitString;
      value = value.trim();
      value.split(splitString, " ");
      if(splitString.size() == 3)
      {
         setFileBackgroundColor((ossim_uint8)splitString[0].toUInt32(), 
                                (ossim_uint8)splitString[1].toUInt32(), 
                                (ossim_uint8)splitString[2].toUInt32());
      }
   }
   else
   {
      ossimNitfFileHeaderV2_X::setProperty(property);
   }
}
Exemplo n.º 2
0
void ossimNitfImageHeaderV2_1::setProperty(ossimRefPtr<ossimProperty> property)
{
   ossimString name = property->getName();
   std::ostringstream out;
   
   if(!property) return;
   
   if(name.contains(ISCLSY_KW))
   {
      setSecurityClassificationSystem(property->valueToString());
   }
   else if(name.contains(ISCODE_KW))
   {
      setCodewords(property->valueToString());
   }
   else if(name.contains(ISCTLH_KW))
   {
      setControlAndHandling(property->valueToString());
   }
   else if(name.contains(ISREL_KW))
   {
      setReleasingInstructions(property->valueToString());
   }
   else if(name.contains(ISDCTP_KW))
   {
      setDeclassificationType(property->valueToString());
   }
   else if(name.contains(ISDCDT_KW))
   {
      setDeclassificationDate(property->valueToString());
   }
   else if(name.contains(ISDCXM_KW))
   {
      setDeclassificationExempt(property->valueToString());
   }
   else if(name.contains(ISDG_KW))
   {
      setDowngrade(property->valueToString());
   }
   else if(name.contains(ISDGDT_KW))
   {
      setDowngradeDate(property->valueToString());
   }
   else if(name.contains(ISCLTX_KW))
   {
      setClassificationText(property->valueToString());
   }
   else if(name.contains(ISCATP_KW))
   {
      setClassificationAuthorityType(property->valueToString());
   }
   else if(name.contains(ISCAUT_KW))
   {
      setClassificationAuthority(property->valueToString());
   }
   else if(name.contains(ISCRSN_KW))
   {
      setClassificationReason(property->valueToString());
   }
   else if(name.contains(ISSRDT_KW))
   {
      setSecuritySourceDate(property->valueToString());
   }
   else if(name.contains(ISCTLN_KW))
   {
      setSecurityControlNumber(property->valueToString());
   }
   else
   {
      ossimNitfImageHeaderV2_X::setProperty(property);
   }
}