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; }
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); } }
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); } }