public ExposureDataAdaptor(ContractExposure contractExposure, JavascriptParser _jsParser, SubSamplingAnalysisSetting _subSamplingSettings) { JSParser = _jsParser; _contractExposure = contractExposure; SubSamplingSettings = _subSamplingSettings; MaxNumSamplesPerHiResLocation = SubSamplingSettings.MaxSampleBldgs; //Unnecessary if no more multiplier arrays... RITE.MaxNumOfBldgs = MaxNumSamplesPerHiResLocation; _contractJSON = GetJSONForContract(); ContractCOLs = GetContractCOLs(); UseAggregatedRITEs = IsExtractVersion2Disaggregated(); EDSDataExtract = new ExposureDataExtractor(_contractExposure); _characteristics = new HashSet <RITCharacteristic>(); _rites = new HashSet <RITE>(); _schedules = new HashSet <ScheduleOfRITEs>(); _characteristicsDict = new Dictionary <long, RITCharacteristic>(); _ritesDict = new Dictionary <long, RITE>(); _schedulesDict = new Dictionary <string, ScheduleOfRITEs>(); RiskCharIDtoAggregateID = new Dictionary <long, long>(); AggregateIDtoDisaggIDs = new Dictionary <long, HashSet <long> >(); DisaggRitCharToDisAggRIT = new Dictionary <long, long>(); if (_contractExposure.ContractType.IsReinsuranceContract()) { TreatyExposure = true; treatyIncludesPrimaryData = false; } else { TreatyExposure = false; } }
private ExposureDataAdaptor GetTreatyExposureData(ContractExposure contractExposure) { ExposureDataAdaptor treatyAdaptor = new ExposureDataAdaptor(contractExposure, NGFM_API); treatyAdaptor.ExtractPositionData(); foreach (long conID in treatyAdaptor.Positions.GetDependentContracts()) { ExposureDataAdaptor childContractData = GetExposureAdaptor(conID); treatyAdaptor.CombineExposure(childContractData); } return(treatyAdaptor); }
private ExposureDataAdaptor GetTreatyExposureData(ContractExposure contractExposure) { ExposureDataAdaptor treatyAdaptor = new ExposureDataAdaptor(contractExposure, JSParser, SubSamplingSettings); treatyAdaptor.ExtractPositionData(); foreach (long conID in treatyAdaptor.Positions.GetDependentContracts()) { ExposureDataAdaptor childContractData = GetExposureAdaptor(conID); treatyAdaptor.AddExposureToTreaty(childContractData); } return(treatyAdaptor); }
public ExposureDataAdaptor GetExposureAdaptor(long conID) { ExposureDataAdaptor exposure; if (!expData.TryGetValue(conID, out exposure)) { ContractExposure contractExposure = GetExposure(conID); if (contractExposure.ContractType.IsReinsuranceContract()) { exposure = GetTreatyExposureData(contractExposure); } else { exposure = new ExposureDataAdaptor(contractExposure, NGFM_API); exposure.GetPrimaryData(); } expData.Add(conID, exposure); } return(exposure); }
public ExposureDataAdaptor(ContractExposure contractExposure, NGFMPrototype _ParsingAPI) { ParsingAPI = _ParsingAPI; _contractExposure = contractExposure; _contractJSON = GetJSONForContract(); EDSDataExtract = new ExposureDataExtractor(_contractExposure); _characteristics = new HashSet <RITCharacteristic>(); _rites = new HashSet <RITE>(); _schedules = new HashSet <ScheduleOfRITEs>(); _characteristicsDict = new Dictionary <long, RITCharacteristic>(); _ritesDict = new Dictionary <long, RITE>(); _schedulesDict = new Dictionary <string, ScheduleOfRITEs>(); if (_contractExposure.ContractType.IsReinsuranceContract()) { TreatyExposure = true; } else { TreatyExposure = false; } }
public ExposureDataExtractor(ContractExposure _contractExposure) { ConExp = _contractExposure; BugMessage = new StringBuilder(); }