ossimRefPtr<ossimProperty> ossimNitfFileHeaderV2_1::getProperty(const ossimString& name)const { ossimProperty* property = 0; ossimStringProperty* stringProperty = 0; ossimColorProperty* colorProperty = 0; if(name == CLEVEL_KW) { property = new ossimStringProperty(name, getComplexityLevel().trim()); } else if(name == FSCLASY_KW) { property = new ossimStringProperty(name, getSecurityClassificationSys().trim()); } else if(name == FSDCTP_KW) { property = new ossimStringProperty(name, getDeclassificationType().trim()); } else if(name == FSDCDT_KW) { property = new ossimStringProperty(name, getDeclassificationDate().trim()); } else if(name == FSDCXM_KW) { property = new ossimStringProperty(name, getDeclassificationExemption().trim()); } else if(name == FSDG_KW) { stringProperty = new ossimStringProperty(name, getDowngrade().trim(), false); stringProperty->addConstraint(""); stringProperty->addConstraint("S"); stringProperty->addConstraint("C"); stringProperty->addConstraint("R"); property = stringProperty; } else if(name == FSDGDT_KW) { property = new ossimStringProperty(name, getDowngradingDate().trim()); } else if(name == FSCLTX_KW) { property = new ossimStringProperty(name, getClassificationText().trim()); } else if(name == FSCATP_KW) { stringProperty = new ossimStringProperty(name, getClassificationAuthorityType().trim(), false); stringProperty->addConstraint(""); stringProperty->addConstraint("O"); stringProperty->addConstraint("D"); stringProperty->addConstraint("M"); property = stringProperty; } else if(name == FSCRSN_KW) { stringProperty = new ossimStringProperty(name, getClassificationReason().trim(), false); stringProperty->addConstraint(""); stringProperty->addConstraint("A"); stringProperty->addConstraint("B"); stringProperty->addConstraint("C"); stringProperty->addConstraint("D"); stringProperty->addConstraint("E"); stringProperty->addConstraint("F"); stringProperty->addConstraint("G"); property = stringProperty; } else if(name == FSSRDT_KW) { property = new ossimStringProperty(name, getSecuritySourceDate().trim()); } else if(name == FBKGC_KW) { ossim_uint8 r, g, b; getBackgroundColor(r, g, b); colorProperty = new ossimColorProperty(name, ossimRgbVector(r, g, b)); property = colorProperty; } else if(name == ONAME_KW) { property = new ossimStringProperty(name, ossimString(theOriginatorsName).trim()); } else if(name == OPHONE_KW) { property = new ossimStringProperty(name, ossimString(theOriginatorsPhone).trim()); } else { return ossimNitfFileHeaderV2_X::getProperty(name); } return property; }
rspfRefPtr<rspfProperty> rspfNitfFileHeaderV2_X::getProperty(const rspfString& name)const { rspfRefPtr<rspfProperty> property = 0; if(name == FHDR_KW) { property = new rspfStringProperty(name, rspfString(theFileTypeVersion)); } else if(name == VERSION_KW) { property = new rspfStringProperty(name, rspfString(getVersion())); } else if(name == FILE_TYPE_KW) { property = new rspfStringProperty(name, "NITF"); } else if(name == CLEVEL_KW) { rspfNumericProperty* numericProperty = new rspfNumericProperty(name, getComplexityLevel(), 1, 99); numericProperty->setNumericType(rspfNumericProperty::rspfNumericPropertyType_INT); property = numericProperty; } else if(name == STYPE_KW) { property = new rspfStringProperty(name, getSystemType().trim()); } else if(name == OSTAID_KW) { property = new rspfStringProperty(name, getOriginatingStationId().trim()); } else if(name == FDT_KW) { property = new rspfStringProperty(name, getDate()); } else if(name == FTITLE_KW) { property = new rspfStringProperty(name, getTitle().trim()); } else if(name == FSCLAS_KW) { rspfStringProperty* stringProperty = new rspfStringProperty(name, getSecurityClassification().trim(), false); stringProperty->addConstraint(""); stringProperty->addConstraint("T"); stringProperty->addConstraint("S"); stringProperty->addConstraint("C"); stringProperty->addConstraint("R"); stringProperty->addConstraint("U"); property = stringProperty; } else if(name == FSCODE_KW) { property = new rspfStringProperty(name, getCodeWords().trim()); } else if(name == FSCTLH_KW) { property = new rspfStringProperty(name, getControlAndHandling().trim()); } else if(name == FSREL_KW) { property = new rspfStringProperty(name, getReleasingInstructions().trim()); } else if(name == FSCAUT_KW) { property = new rspfStringProperty(name, getClassificationAuthority().trim()); } else if(name == FSCTLN_KW) { property = new rspfStringProperty(name, getSecurityControlNumber().trim()); } else if(name == FSCOP_KW) { property = new rspfStringProperty(name, getCopyNumber().trim()); } else if(name == FSCPYS_KW) { property = new rspfStringProperty(name, getNumberOfCopies().trim()); } else if(name == ENCRYP_KW) { property = new rspfStringProperty(name, getEncryption().trim(), false); } else { property = rspfNitfFileHeader::getProperty(name).get(); } return property; }