コード例 #1
0
void ossimNitfFileHeaderV2_0::setProperty(ossimRefPtr<ossimProperty> property)
{
   const ossimString& name = property->getName();
   if(name == CLEVEL_KW)
   {
      setComplianceLevel(property->valueToString());
   }
   else if(name == FSDWNG_KW)
   {
      setSecurityDowngrade(property->valueToString());
   }
   else if(name == FSDEVT_KW)
   {
      setDowngradingEvent(property->valueToString());
   }
   else if(name == ONAME_KW)
   {
      setOriginatorsName(property->valueToString());
   }
   else if(name == OPHONE_KW)
   {
      setOriginatorsPhone(property->valueToString());
   }
   else
   {
      ossimNitfFileHeaderV2_X::setProperty(property);
   }
}
コード例 #2
0
bool rspfNitfFileHeaderV2_X::loadState(const rspfKeywordlist& kwl, const char* prefix)
{
   // Note: Currently not looking up all fieds only ones that make sense.
   
   const char* lookup;
   
   lookup = kwl.find( prefix, OSTAID_KW);
   if ( lookup )
   {
      setOriginatingStationId( rspfString(lookup) );
   }
   lookup = kwl.find( prefix, FDT_KW);
   if ( lookup )
   {
      setDate( rspfString(lookup) );
   }
   lookup = kwl.find( prefix, FTITLE_KW);
   if ( lookup )
   {
      setTitle( rspfString(lookup) );
   }
   lookup = kwl.find( prefix, FSCLAS_KW);
   if ( lookup )
   {
      setFileSecurityClassification( rspfString(lookup) );
   }
   lookup = kwl.find( prefix, FSCODE_KW);
   if ( lookup )
   {
      setCodeWords( rspfString(lookup) ); 
   }
   lookup = kwl.find( prefix, FSCTLH_KW);
   if ( lookup )
   {
      setControlAndHandling( rspfString(lookup) );
   }
   lookup = kwl.find( prefix, FSREL_KW);
   if ( lookup )
   {
      setReleasingInstructions( rspfString(lookup) );
   }
   lookup = kwl.find( prefix, FSCAUT_KW);
   if ( lookup )
   {
      setClassificationAuthority( rspfString(lookup) );
   }
   lookup = kwl.find( prefix, FSCTLN_KW);
   if ( lookup )
   {
      setSecurityControlNumber( rspfString(lookup) );
   }
   lookup = kwl.find( prefix, FSCOP_KW);
   if ( lookup )
   {
      setCopyNumber( rspfString(lookup) );
   }
   lookup = kwl.find( prefix, FSCPYS_KW);
   if ( lookup )
   {
      setNumberOfCopies( rspfString(lookup) );
   }
   lookup = kwl.find( prefix, ENCRYP_KW);
   if ( lookup )
   {
      setEncryption( rspfString(lookup) );
   }
   lookup = kwl.find( prefix, ONAME_KW);
   if ( lookup )
   {
      setOriginatorsName( rspfString(lookup) );
   }
   lookup = kwl.find( prefix, OPHONE_KW);
   if ( lookup )
   {
      setOriginatorsPhone( rspfString(lookup) );
   }

   return true;
}
コード例 #3
0
void rspfNitfFileHeaderV2_X::setProperty(rspfRefPtr<rspfProperty> property)
{
   if(!property.valid()) return;

   rspfString name = property->getName();

   // Make case insensitive:
   name.upcase();

   if(name == FHDR_KW)
   {
      
   }
   else if(name == STYPE_KW)
   {
      setSystemType(property->valueToString());
   }
   else if(name == OSTAID_KW)
   {
      setOriginatingStationId(property->valueToString());
   }
   else if(name == FDT_KW)
   {
      setDate(property->valueToString());
   }
   else if(name == FTITLE_KW)
   {
      setTitle(property->valueToString());
   }
   else if(name == FSCLAS_KW)
   {
      setFileSecurityClassification(property->valueToString());
   }
   else if(name == FSCODE_KW)
   {
      setCodeWords(property->valueToString()); 
   }
   else if(name == FSCTLH_KW)
   {
      setControlAndHandling(property->valueToString());
   }
   else if(name == FSREL_KW)
   {
      setReleasingInstructions(property->valueToString());
   }
   else if(name == FSCAUT_KW)
   {
      setClassificationAuthority(property->valueToString()); 
   }
   else if(name == FSCTLN_KW)
   {
      setSecurityControlNumber(property->valueToString());
   }
   else if(name == FSCOP_KW)
   {
      setCopyNumber(property->valueToString());
   }
   else if(name == FSCPYS_KW)
   {
      setNumberOfCopies(property->valueToString());
   }
   else if(name == ENCRYP_KW)
   {
      setEncryption(property->valueToString());
   }
   else if(name == ONAME_KW)
   {
      setOriginatorsName(property->valueToString());
   }
   else if(name == OPHONE_KW)
   {
      setOriginatorsPhone(property->valueToString());
   }
   else
   {
      rspfNitfFileHeader::setProperty(property);
   }
}