├── .github ├── ISSUE_TEMPLATE.md └── PULL_REQUEST_TEMPLATE.md ├── .gitignore ├── RDOS_Schema.xlsx ├── README.md ├── Schema └── sql │ ├── ExposureTables.sql │ ├── ReferenceTables-SeedData │ ├── 000_Common.Currencies.Currency.sql │ ├── 001_Common.Currencies.CurrencyExchangeRate.sql │ ├── 002_Contract.CDL.AttachmentBasis.sql │ ├── 003_Contract.CDL.TimeBasis.sql │ ├── 004_Contract.CDL.PayoutFunction.sql │ ├── 005_Contract.CDL.Resolution.sql │ ├── 006_Contract.CDL.AmountBasis.sql │ ├── 007_Contract.CDL.TermType.sql │ ├── 008_Contract.CDL.CauseOfLoss.sql │ ├── 009_Contract.CDL.CauseOfLossHierarchy.sql │ ├── 010_Contract.CDL.LossType.sql │ ├── 011_Contract.CDL.LossTypeHierarchy.sql │ ├── 012_Contract.CDL.AttachmentLevel.sql │ ├── 013_Contract.ContractType.sql │ ├── 014_Contract.ContractScope.sql │ ├── 015_Geography.Boundaries.Country.sql │ ├── 017_Geography.Geocoding.GeocodingResolution.sql │ ├── 018_Geography.Geocoding.GeoModelResolution.sql │ ├── 019_Geography.Geocoding.GeocodingDataSource.sql │ ├── 024_RiskItem.Common.RiskitemType.sql │ ├── 027_RiskItem.RealProperty.Characteristics.Basement.sql │ ├── 028_RiskItem.RealProperty.Characteristics.BIPreparedness.sql │ ├── 029_RiskItem.RealProperty.Characteristics.BIRedundancy.sql │ ├── 030_RiskItem.RealProperty.Characteristics.CommercialAppurtenant.sql │ ├── 031_RiskItem.RealProperty.Characteristics.ContentsVulnWater.sql │ ├── 032_RiskItem.RealProperty.Characteristics.ContentsVulnWind.sql │ ├── 033_RiskItem.RealProperty.Characteristics.Exterior.sql │ ├── 034_RiskItem.RealProperty.Characteristics.EngineeredFoundation.sql │ ├── 035_RiskItem.RealProperty.Characteristics.ExteriorRating.sql │ ├── 036_RiskItem.RealProperty.Characteristics.ExternalOrnamentation.sql │ ├── 037_RiskItem.RealProperty.Characteristics.FireRemoteAlarmPresence.sql │ ├── 038_RiskItem.RealProperty.Characteristics.FireSprinklerPresence.sql │ ├── 039_RiskItem.RealProperty.Characteristics.FloodMissile.sql │ ├── 040_RiskItem.RealProperty.Characteristics.FloodProtection.sql │ ├── 041_RiskItem.RealProperty.Characteristics.FloorType.sql │ ├── 042_RiskItem.RealProperty.Characteristics.FoundationType.sql │ ├── 043_RiskItem.RealProperty.Characteristics.FrameFoundationConnection.sql │ ├── 044_RiskItem.RealProperty.Characteristics.FireSupression.sql │ ├── 045_RiskItem.RealProperty.Characteristics.Garaging.sql │ ├── 046_RiskItem.RealProperty.Characteristics.MarineProtection.sql │ ├── 047_RiskItem.RealProperty.Characteristics.OpeningProtect.sql │ ├── 048_RiskItem.RealProperty.Characteristics.Performance.sql │ ├── 049_RiskItem.RealProperty.Characteristics.PlanIrregularity.sql │ ├── 050_RiskItem.RealProperty.Characteristics.PlumbingInsulation.sql │ ├── 051_RiskItem.RealProperty.Characteristics.Pounding.sql │ ├── 052_RiskItem.RealProperty.Characteristics.RentalPropertyIdentifier.sql │ ├── 053_RiskItem.RealProperty.Characteristics.ResidentialAppurtenant.sql │ ├── 054_RiskItem.RealProperty.Characteristics.RoofAdditions.sql │ ├── 055_RiskItem.RealProperty.Characteristics.RoofAgeCondition.sql │ ├── 056_RiskItem.RealProperty.Characteristics.RoofAnchor.sql │ ├── 057_RiskItem.RealProperty.Characteristics.RoofCovering.sql │ ├── 058_RiskItem.RealProperty.Characteristics.RoofGeometry.sql │ ├── 059_RiskItem.RealProperty.Characteristics.RoofVent.sql │ ├── 060_RiskItem.RealProperty.Characteristics.StructuralUpgradeNonURM.sql │ ├── 061_RiskItem.RealProperty.Characteristics.Tank.sql │ ├── 062_RiskItem.RealProperty.Characteristics.URMChimney.sql │ ├── 063_RiskItem.RealProperty.Characteristics.URMRetrofit.sql │ ├── 064_RiskItem.RealProperty.Characteristics.VerticalIrregularity.sql │ ├── 065_RiskItem.RealProperty.Characteristics.WindMissileExposure.sql │ ├── 066_RiskItem.RealProperty.Characteristics.AreaUnit.sql │ ├── 067_RiskItem.RealProperty.Characteristics.DistanceUnit.sql │ ├── 068_RiskItem.RealProperty.Occupancy.sql │ ├── 069_RiskItem.RealProperty.Construction.sql │ ├── 100_RiskItem.Population.HazardousMaterial.sql │ ├── 101_RiskItem.Population.RiskManagementOnsiteRank.sql │ ├── 102_RiskItem.Population.ShiftType.sql │ ├── 103_RiskItem.Population.EmergencyProtectionProximity.sql │ ├── 106_RiskItem.Population.WageRelativityRank.sql │ ├── 201_Structure.PositionType.sql │ ├── 202_Portfolio.PortfolioType.sql │ ├── 301_Result.Peril.sql │ ├── 302_Result.ResultType.sql │ └── 302_Settings.SettingsType.sql │ ├── ReferenceTables.sql │ └── ResultsTables.sql ├── licenses ├── Apache_License ├── RMS-RDOS_CorporateCLA.pdf ├── RMS-RDOS_IndividualCLA.pdf └── Readme.md ├── rdos-conversion-tools └── edm2rdo │ └── README.md └── rdos-validation-tools ├── README.md ├── cdl-parser ├── README.md ├── pom.xml ├── scalastyle_config.xml └── src │ └── main │ ├── antlr4 │ └── CDL.g4 │ ├── java │ └── com │ │ └── rms │ │ └── cdl │ │ └── parser │ │ ├── listener │ │ └── CustomErrorListener.java │ │ ├── treebuilder │ │ └── CdlParseTreeBuilder.java │ │ └── validator │ │ └── ContractValidator.java │ └── resources │ └── logback.xml ├── pom.xml ├── rdo-validation-tool-java ├── README.md ├── pom.xml ├── scalastyle_config.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── rms │ │ │ └── rdo │ │ │ └── validation │ │ │ ├── Application.java │ │ │ ├── cdl │ │ │ └── CDLValidator.java │ │ │ ├── constants │ │ │ └── Constants.java │ │ │ ├── csv │ │ │ └── CsvReader.java │ │ │ ├── datatype │ │ │ ├── DataTypeValidator.java │ │ │ └── Validator.java │ │ │ ├── handler │ │ │ ├── CDLValidationHandler.java │ │ │ └── RDOValidationHandler.java │ │ │ ├── integrityconstraint │ │ │ ├── ForeignKeyValidator.java │ │ │ ├── IntegrityConstraintValidator.java │ │ │ └── PrimaryKeyValidator.java │ │ │ ├── model │ │ │ ├── cdl │ │ │ │ └── CDLValidationError.java │ │ │ ├── datatype │ │ │ │ ├── DataTypeValidationError.java │ │ │ │ └── DataTypeValidationErrors.java │ │ │ └── integrityconstraint │ │ │ │ ├── ForeignKeyDetail.java │ │ │ │ ├── ForeignKeyError.java │ │ │ │ ├── ForeignKeyErrorDetail.java │ │ │ │ ├── IntegrityConstraint.java │ │ │ │ ├── IntegrityConstraintValidationError.java │ │ │ │ ├── PrimaryKeyError.java │ │ │ │ └── PrimaryKeyErrorDetail.java │ │ │ └── utility │ │ │ └── Utility.java │ └── resources │ │ └── logback.xml │ └── test │ └── java │ └── com │ └── rms │ └── rdo │ └── validation │ └── datatype │ └── DataTypeValidatorTest.java ├── rdo-validation-tool-scala ├── README.md ├── pom.xml ├── scalastyle_config.xml └── src │ ├── main │ ├── resources │ │ └── logback.xml │ └── scala │ │ └── com │ │ └── rms │ │ └── rdo │ │ └── validation │ │ ├── Application.scala │ │ ├── cdl │ │ └── CDLValidator.scala │ │ ├── constant │ │ └── Constants.scala │ │ ├── csv │ │ └── CsvReader.scala │ │ ├── datatype │ │ ├── DataTypeValidator.scala │ │ └── Validator.scala │ │ ├── integrityconstraint │ │ ├── ForeignKeyValidator.scala │ │ ├── IntegrityConstraintValidator.scala │ │ └── PrimaryKeyValidator.scala │ │ ├── model │ │ ├── CDLValidationError.scala │ │ ├── DataTypeValidationError.scala │ │ ├── IntegrityConstraint.scala │ │ └── IntegrityConstraintValidationError.scala │ │ └── utility │ │ └── Utility.scala │ └── test │ ├── resources │ ├── cdl │ │ ├── invalid.txt │ │ └── valid.txt │ ├── csv │ │ └── employee.csv │ ├── employee │ │ ├── data_type_validation.json │ │ ├── emp.csv │ │ └── integrity_constraints.json │ ├── invalid_data_type.json │ ├── invalid_integrity_constraints.json │ ├── valid_data_type.json │ └── valid_integrity_constraints.json │ └── scala │ └── com │ └── rms │ └── rdo │ └── validation │ ├── cdl │ └── CDLValidatorTest.scala │ ├── csv │ └── CsvReaderTest.scala │ ├── datatype │ ├── DataTypeValidatorTest.scala │ └── ValidatorTest.scala │ ├── integrityconstraint │ ├── ForeignKeyValidatorTest.scala │ ├── IntegrityConstraintValidatorTest.scala │ └── PrimaryKeyValidatorTest.scala │ └── utility │ └── UtilityTest.scala └── rdos-schema ├── pom.xml └── src └── main └── resources ├── Address ├── data_type_validation.json └── integrity_constraints.json ├── AddressScheme ├── data_type_validation.json └── integrity_constraints.json ├── Admin1 ├── data_type_validation.json └── integrity_constraints.json ├── Admin2 ├── data_type_validation.json └── integrity_constraints.json ├── Admin3 ├── data_type_validation.json └── integrity_constraints.json ├── Admin4 ├── data_type_validation.json └── integrity_constraints.json ├── Admin5 ├── data_type_validation.json └── integrity_constraints.json ├── AggregatePortfolioMembership ├── data_type_validation.json └── integrity_constraints.json ├── AmountBasis ├── data_type_validation.json └── integrity_constraints.json ├── Analysis ├── data_type_validation.json └── integrity_constraints.json ├── AnalysisHierarchy ├── data_type_validation.json └── integrity_constraints.json ├── AnalysisMap ├── data_type_validation.json └── integrity_constraints.json ├── AreaUnit ├── data_type_validation.json └── integrity_constraints.json ├── AttachmentBasis ├── data_type_validation.json └── integrity_constraints.json ├── AttachmentLevel ├── data_type_validation.json └── integrity_constraints.json ├── BIPreparedness ├── data_type_validation.json └── integrity_constraints.json ├── BIRedundancy ├── data_type_validation.json └── integrity_constraints.json ├── Basement ├── data_type_validation.json └── integrity_constraints.json ├── CauseOfLoss ├── data_type_validation.json └── integrity_constraints.json ├── CauseOfLossHierarchy ├── data_type_validation.json └── integrity_constraints.json ├── CharacteristicsScheme ├── data_type_validation.json └── integrity_constraints.json ├── City ├── data_type_validation.json └── integrity_constraints.json ├── CommercialAppurtenant ├── data_type_validation.json └── integrity_constraints.json ├── Construction ├── data_type_validation.json └── integrity_constraints.json ├── ContentsVulnWater ├── data_type_validation.json └── integrity_constraints.json ├── ContentsVulnWind ├── data_type_validation.json └── integrity_constraints.json ├── Contract ├── data_type_validation.json └── integrity_constraints.json ├── ContractBranch ├── data_type_validation.json └── integrity_constraints.json ├── ContractCDL ├── data_type_validation.json └── integrity_constraints.json ├── ContractCedant ├── data_type_validation.json └── integrity_constraints.json ├── ContractDeclaration ├── data_type_validation.json └── integrity_constraints.json ├── ContractScope ├── data_type_validation.json └── integrity_constraints.json ├── ContractStatus ├── data_type_validation.json └── integrity_constraints.json ├── ContractSubjectType ├── data_type_validation.json └── integrity_constraints.json ├── ContractType ├── data_type_validation.json └── integrity_constraints.json ├── ContractUnderwriter ├── data_type_validation.json └── integrity_constraints.json ├── Contract_Facultative ├── data_type_validation.json └── integrity_constraints.json ├── Contract_Insurance ├── data_type_validation.json └── integrity_constraints.json ├── Contract_Treaty ├── data_type_validation.json └── integrity_constraints.json ├── Country ├── data_type_validation.json └── integrity_constraints.json ├── Currency ├── data_type_validation.json └── integrity_constraints.json ├── CurrencyExchangeRate ├── data_type_validation.json └── integrity_constraints.json ├── DistanceUnit ├── data_type_validation.json └── integrity_constraints.json ├── EmergencyProtectionProximity ├── data_type_validation.json └── integrity_constraints.json ├── EngineeredFoundation ├── data_type_validation.json └── integrity_constraints.json ├── ExposureSet ├── data_type_validation.json └── integrity_constraints.json ├── Exterior ├── data_type_validation.json └── integrity_constraints.json ├── ExteriorRating ├── data_type_validation.json └── integrity_constraints.json ├── ExternalOrnamentation ├── data_type_validation.json └── integrity_constraints.json ├── FacultativeCession ├── data_type_validation.json └── integrity_constraints.json ├── FireRemoteAlarmPresence ├── data_type_validation.json └── integrity_constraints.json ├── FireSprinklerPresence ├── data_type_validation.json └── integrity_constraints.json ├── FireSprinklerSystem ├── data_type_validation.json └── integrity_constraints.json ├── FireSuppression ├── data_type_validation.json └── integrity_constraints.json ├── FloodMissile ├── data_type_validation.json └── integrity_constraints.json ├── FloodProtection ├── data_type_validation.json └── integrity_constraints.json ├── FloodType ├── data_type_validation.json └── integrity_constraints.json ├── FloorType ├── data_type_validation.json └── integrity_constraints.json ├── FoundationType ├── data_type_validation.json └── integrity_constraints.json ├── FrameFoundationConnection ├── data_type_validation.json └── integrity_constraints.json ├── Garaging ├── data_type_validation.json └── integrity_constraints.json ├── GeoModelResolution ├── data_type_validation.json └── integrity_constraints.json ├── GeocodingDataSource ├── data_type_validation.json └── integrity_constraints.json ├── GeocodinglResolution ├── data_type_validation.json └── integrity_constraints.json ├── Granularity ├── data_type_validation.json └── integrity_constraints.json ├── HazardousMaterial ├── data_type_validation.json └── integrity_constraints.json ├── InsuranceLayer ├── data_type_validation.json └── integrity_constraints.json ├── InsuranceTerm ├── data_type_validation.json └── integrity_constraints.json ├── Insured ├── data_type_validation.json └── integrity_constraints.json ├── Insurer ├── data_type_validation.json └── integrity_constraints.json ├── LineOfBusiness ├── data_type_validation.json └── integrity_constraints.json ├── LossType ├── data_type_validation.json └── integrity_constraints.json ├── LossTypeHierarchy ├── data_type_validation.json └── integrity_constraints.json ├── MEPPlumbing ├── data_type_validation.json └── integrity_constraints.json ├── MarineProtection ├── data_type_validation.json └── integrity_constraints.json ├── Occupancy ├── data_type_validation.json └── integrity_constraints.json ├── OpeningProtect ├── data_type_validation.json └── integrity_constraints.json ├── PayoutFunction ├── data_type_validation.json └── integrity_constraints.json ├── PerRiskTreatySubject ├── data_type_validation.json └── integrity_constraints.json ├── Performance ├── data_type_validation.json └── integrity_constraints.json ├── Peril ├── data_type_validation.json └── integrity_constraints.json ├── PlanIrregularity ├── data_type_validation.json └── integrity_constraints.json ├── PlumbingInsulation ├── data_type_validation.json └── integrity_constraints.json ├── PopulationDensity ├── data_type_validation.json └── integrity_constraints.json ├── PopulationShift ├── data_type_validation.json └── integrity_constraints.json ├── Portfolio ├── data_type_validation.json └── integrity_constraints.json ├── PortfolioMembership ├── data_type_validation.json └── integrity_constraints.json ├── PortfolioTag ├── data_type_validation.json └── integrity_constraints.json ├── PortfolioType ├── data_type_validation.json └── integrity_constraints.json ├── PositionType ├── data_type_validation.json └── integrity_constraints.json ├── PostalCode ├── data_type_validation.json └── integrity_constraints.json ├── Pounding ├── data_type_validation.json └── integrity_constraints.json ├── Producer ├── data_type_validation.json └── integrity_constraints.json ├── ProrataOptionType ├── data_type_validation.json └── integrity_constraints.json ├── RealPropertyCharacteristics ├── data_type_validation.json └── integrity_constraints.json ├── Region ├── data_type_validation.json └── integrity_constraints.json ├── Reinsurer ├── data_type_validation.json └── integrity_constraints.json ├── RentalPropertyIdentifier ├── data_type_validation.json └── integrity_constraints.json ├── ResidentialAppurtenant ├── data_type_validation.json └── integrity_constraints.json ├── Resolution ├── data_type_validation.json └── integrity_constraints.json ├── Result ├── data_type_validation.json └── integrity_constraints.json ├── ResultFacetValues ├── data_type_validation.json └── integrity_constraints.json ├── ResultMetadata ├── data_type_validation.json └── integrity_constraints.json ├── ResultType ├── data_type_validation.json └── integrity_constraints.json ├── Result_ELT ├── data_type_validation.json └── integrity_constraints.json ├── Result_EP ├── data_type_validation.json └── integrity_constraints.json ├── Result_PLT ├── data_type_validation.json └── integrity_constraints.json ├── Result_Stats ├── data_type_validation.json └── integrity_constraints.json ├── Risk ├── data_type_validation.json └── integrity_constraints.json ├── RiskExposure ├── data_type_validation.json └── integrity_constraints.json ├── RiskItem ├── data_type_validation.json └── integrity_constraints.json ├── RiskItem_ContainedProperty ├── data_type_validation.json └── integrity_constraints.json ├── RiskItem_Population ├── data_type_validation.json └── integrity_constraints.json ├── RiskItem_RealProperty ├── data_type_validation.json └── integrity_constraints.json ├── RiskItem_TimeElement ├── data_type_validation.json └── integrity_constraints.json ├── RiskManagementOnsiteRank ├── data_type_validation.json └── integrity_constraints.json ├── RiskitemType ├── data_type_validation.json └── integrity_constraints.json ├── RoofAdditions ├── data_type_validation.json └── integrity_constraints.json ├── RoofAgeCondition ├── data_type_validation.json └── integrity_constraints.json ├── RoofAnchor ├── data_type_validation.json └── integrity_constraints.json ├── RoofCovering ├── data_type_validation.json └── integrity_constraints.json ├── RoofGeometry ├── data_type_validation.json └── integrity_constraints.json ├── RoofVent ├── data_type_validation.json └── integrity_constraints.json ├── SDLStructure ├── data_type_validation.json └── integrity_constraints.json ├── Schedule ├── data_type_validation.json └── integrity_constraints.json ├── ScheduleRiskMap ├── data_type_validation.json └── integrity_constraints.json ├── Settings ├── data_type_validation.json └── integrity_constraints.json ├── SettingsDetail ├── data_type_validation.json └── integrity_constraints.json ├── SettingsType ├── data_type_validation.json └── integrity_constraints.json ├── Settings_ModelProfile ├── data_type_validation.json └── integrity_constraints.json ├── Settings_RiskAnalysisProfile ├── data_type_validation.json └── integrity_constraints.json ├── ShiftType ├── data_type_validation.json └── integrity_constraints.json ├── StructuralUpgradeNonURM ├── data_type_validation.json └── integrity_constraints.json ├── StructurePositions ├── data_type_validation.json └── integrity_constraints.json ├── SubscheduleRiskMap ├── data_type_validation.json └── integrity_constraints.json ├── Tag ├── data_type_validation.json └── integrity_constraints.json ├── Tank ├── data_type_validation.json └── integrity_constraints.json ├── TermType ├── data_type_validation.json └── integrity_constraints.json ├── TimeBasis ├── data_type_validation.json └── integrity_constraints.json ├── TreatyLayer ├── data_type_validation.json └── integrity_constraints.json ├── TreatyReinstatements ├── data_type_validation.json └── integrity_constraints.json ├── URMChimney ├── data_type_validation.json └── integrity_constraints.json ├── URMRetrofit ├── data_type_validation.json └── integrity_constraints.json ├── VerticalIrregularity ├── data_type_validation.json └── integrity_constraints.json ├── WageRelativityRank ├── data_type_validation.json └── integrity_constraints.json ├── WindMissileExposure ├── data_type_validation.json └── integrity_constraints.json ├── logback.xml └── sysdiagrams ├── data_type_validation.json └── integrity_constraints.json /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | * **I'm submitting a ...** 2 | - [ ] bug report 3 | - [ ] feature request 4 | - [ ] technical question 5 | - [ ] documentation question 6 | - [ ] Other 7 | 8 | 9 | * **What is the current behavior?** 10 | 11 | 12 | 13 | * **If the current behavior is a bug, please provide the steps to reproduce** 14 | 15 | 16 | 17 | * **What is the expected behavior?** 18 | 19 | 20 | 21 | * **What is the motivation / use case for new feature request?** 22 | 23 | 24 | 25 | * **Please tell us about your environment:** 26 | 27 | - Version: 28 | - Language: [sqlserver | Java] 29 | 30 | 31 | * **Other information** (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix etc) -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | * **Please check if the PR fulfills these requirements** 2 | - [ ] The commit message follows guidelines 3 | - [ ] Tests for the changes have been added (for bug fixes / features) 4 | - [ ] Docs have been added / updated (for bug fixes / features) 5 | - [ ] Tools have been added / updated (for schema updates) 6 | 7 | 8 | * **What kind of change does this PR introduce?** (Bug fix, feature, docs update, ...) 9 | 10 | 11 | 12 | * **What is the current behavior?** (You can also link to an open issue here) 13 | 14 | 15 | 16 | * **What is the new behavior (if this is a feature change)?** 17 | 18 | 19 | 20 | * **Does this PR introduce a breaking change?** (What changes might users need to make in their application due to this PR?) 21 | 22 | 23 | 24 | * **Other information**: -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # IntelliJ 2 | *.iml 3 | *.ipr 4 | *.iws 5 | .idea 6 | 7 | # Maven 8 | **/target/ 9 | **/logs/ 10 | *.versionsBackup 11 | .flattened-pom.xml 12 | **/scalastyle-output.xml 13 | 14 | # Mac 15 | .DS_Store 16 | **/derby.log 17 | **/metastore_db/ 18 | **/graylog-client.log 19 | 20 | -------------------------------------------------------------------------------- /RDOS_Schema.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RMS/RDOS/ee20afb531b963eed1a1f961267db398a42a10e0/RDOS_Schema.xlsx -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/002_Contract.CDL.AttachmentBasis.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.AttachmentBasis (attachmentBasisCode) VALUES 2 | ('Risk Attaching'), 3 | ('Loss Occurring') 4 | ; 5 | 6 | -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/003_Contract.CDL.TimeBasis.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.TimeBasis (timeBasisCode, timeBasisDesc) VALUES 2 | ('AGGREGATE','Each occurrence erodes the term''s amount. Amount is reset only after the end of the period.'), 3 | ('OCCURRENCE','Amount is reset for each occurrence.') 4 | ; 5 | -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/004_Contract.CDL.PayoutFunction.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.PayoutFunction (payoutFunctionCode, payoutFunctionDesc) VALUES 2 | ('LIMIT','Pays share * (min(limit, max(0, loss - attachment)))'), 3 | ('CONSTANT ','If loss > attachment, pays share * payoutAmount') 4 | ; 5 | -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/005_Contract.CDL.Resolution.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.Resolution (resolutionCode, resolutionDesc) VALUES 2 | ('PER_RISK','This is a shorthand for specifying multiple layers or terms, identical except each applies to a single risk.'), 3 | ('PER_OCCURRENCE','The terms apply to the sum of the losses in the subject.') 4 | ; 5 | -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/006_Contract.CDL.AmountBasis.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.AmountBasis (amountBasisCode, amountBasisDesc) VALUES 2 | ('MONEY','The amount is a quantity of money, in the currency specified by ContractTerm.Currency. ContractLayer.PayoutCurrency or ContractLayer.AttachmentBasis'), 3 | ('PART_COVERED','The amount is a fraction of the replacement cost of the subject. ( 0..1)'), 4 | ('PART_AFFECTED','The amount is a fraction of the replacement cost of the subject exposure that took loss. ( 0..1)'), 5 | ('PART_LOSS','The amount is a fraction of the loss. (0..1)'), 6 | ('TIME','The amount is the number of days between the loss occurrence and the start of coverage. (Used for TimeElement loss types such as Business Interruption)') 7 | ; 8 | -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/007_Contract.CDL.TermType.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.TermType (termTypeCode, termTypeDesc) VALUES 2 | ('SUBLIMIT','Standard sublimit'), 3 | ('DEDUCTIBLE','Standard deductible'), 4 | ('MAX_DEDUCTIBLE','Maximum deductible'), 5 | ('FRANCHISE_DEDUCTIBLE','The deductible is 0 if the loss exceeds the amount specified.'), 6 | ('SINGLE_LARGEST','(Not implemented)') 7 | ; 8 | -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/008_Contract.CDL.CauseOfLoss.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.CauseOfLoss (causeOfLossCode, causeOfLossDesc, isActive) VALUES 2 | ('EQ','Earthquake',1), 3 | ('WS','Windstorm/Hurricane',1), 4 | ('FL','Flood',1), 5 | ('FR','Interior Fire',1), 6 | ('TR','Terrorism',1), 7 | ('CS','Severe Convective Storm',1), 8 | ('WT','Winterstorm',1), 9 | ('ALL','RMS ALL PERILS',1) 10 | 11 | -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/009_Contract.CDL.CauseOfLossHierarchy.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.CauseOfLossHierarchy (causeOfLossCode, parentCauseOfLossCode) VALUES 2 | ('EQ', 'ALL'), 3 | ('WS', 'ALL'), 4 | ('FL', 'ALL'), 5 | ('FR', 'ALL'), 6 | ('TR', 'ALL'), 7 | ('CS', 'ALL'), 8 | ('WT', 'ALL') 9 | -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/010_Contract.CDL.LossType.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.LossType (lossTypeCode, lossTypeDesc, isActive) VALUES 2 | ('Building', 'Building', 1), 3 | ('Contents', 'Contents', 1), 4 | ('BI', 'Business Interruption', 1), 5 | ('CovA', 'Coverage A', 1), 6 | ('CovB', 'Coverage B - appurtenant structure', 1), 7 | ('CovC', 'Coverage C', 1), 8 | ('CovD', 'Coverage D', 1), 9 | ('Casualty', 'Casualty', 1), 10 | ('Property', 'Property', 1), 11 | ('Loss','any or all loss types. CDL will specify Loss to catch all Loss types', 1) 12 | ; 13 | -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/011_Contract.CDL.LossTypeHierarchy.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.LossTypeHierarchy (lossTypeCode, parentLossTypeCode) VALUES 2 | ('CovA', 'Building'), 3 | ('CovB', 'Building'), 4 | ('CovC', 'Contents'), 5 | ('CovD', 'BI'), 6 | ('Building', 'Property'), 7 | ('Contents', 'Property'), 8 | ('BI', 'Property'), 9 | ('Casualty', 'Loss'), 10 | ('Property', 'Loss') 11 | ; 12 | -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/012_Contract.CDL.AttachmentLevel.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.AttachmentLevel (attachmentLevelCode, attachmentLevelDesc, externalId) VALUES 2 | ('Contract','Terms aggregated over Contracts in reinsurance schedule grouped by Account Number','ACCT'), 3 | ('Location','Terms apply to each Subject At Risk covered by each Contract in reinsurance Schedule','LOC'), 4 | ('ContractLayer','Terms apply to each Cover in reinsurance schedule','POL') 5 | ; 6 | -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/013_Contract.ContractType.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.ContractType (contractTypeCode, parentContractTypeCode, contractTypeDesc, isActive) VALUES 2 | ('Insurance',null,'Insurance',1), 3 | ('Reinsurance',null,'Reinsurance',1), 4 | ('Policy','Insurance','Policy',1), 5 | ('FAC','Reinsurance','Facultative Cession',1), 6 | ('Treaty','Reinsurance','Treaty',1), 7 | ('PrimaryPolicy','Policy','Primary Policy',1), 8 | ('ExcessPolicy','Policy','Excess Policy',1), 9 | ('PerRisk','Treaty','Per Risk Reinsurance',1), 10 | ('CatastropheReinsurance','Treaty','Catastrophe Reinsurance',1), 11 | ('SurplusShare','PerRisk','Surplus Share Treaty',1), 12 | ('QuotaShare','PerRisk','Quota Share Treaty',1), 13 | ('WorkingExcess','PerRisk','Working Excess Treaty',1), 14 | ('CAT','CatastropheReinsurance','Catastrophe Treaty',1), 15 | ('SSCession','PerRisk','Surplus Share Cession',1) 16 | ; 17 | -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/014_Contract.ContractScope.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.ContractScope (contractScopeCode) VALUES 2 | ('RISK'), 3 | ('SCHEDULE'), 4 | ('LAYER'), 5 | ('CONTRACT'), 6 | ('SUBSCHEDULE') 7 | ; 8 | -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/017_Geography.Geocoding.GeocodingResolution.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.GeocodingResolution (geocodingResolutionCode, geocodingResolutionDesc) VALUES 2 | (0,'Ungeocoded'), 3 | (1,'Multiple Match'), 4 | (2,'Country'), 5 | (14,'Building'), 6 | (19,'Point'), 7 | (22,'Parcel'), 8 | (31,'Street Address'), 9 | (32,'Street Address'), 10 | (34,'Block Segment'), 11 | (36,'Hi Resolution Postcode'), 12 | (51,'Street Name'), 13 | (64,'Medium Resolution Postcode'), 14 | (66,'Admin4'), 15 | (72,'City'), 16 | (76,'Admin3'), 17 | (86,'Admin2'), 18 | (96,'Admin1'), 19 | (98,'CRESTA') 20 | ; 21 | -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/018_Geography.Geocoding.GeoModelResolution.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.GeoModelResolution (geoModelResolutionCode, geoModelResolutionDesc) VALUES 2 | (0,'none'), 3 | (1,'Coordinate'), 4 | (2,'Street / Building / Parcel'), 5 | (3,'High Resolution Postcode / Other'), 6 | (4,'Street Name'), 7 | (5,'Postal Code'), 8 | (6,'Neighborhood'), 9 | (7,'City'), 10 | (8,'District / Municipality'), 11 | (9,'County'), 12 | (10,'State'), 13 | (11,'CRESTA'), 14 | (14,'Country') 15 | ; 16 | -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/019_Geography.Geocoding.GeocodingDataSource.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.GeocodingDataSource (geocodingDataSourceId, geocodingDataSourceName) VALUES 2 | (0,'Failed geocoding attempt'), 3 | (4,'Parcel'), 4 | (8,'Street interpolation'), 5 | (16,'ESDB HRB data'), 6 | (32,'Global Location Module (GLM)'), 7 | (64,'Tabular') 8 | ; 9 | -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/024_RiskItem.Common.RiskitemType.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.RiskitemType (riskItemTypeCode, riskItemTypeDesc) VALUES 2 | ('RP', 'RealProperty'), 3 | ('CP', 'ContainedProperty'), 4 | ('TE', 'TimeElement'), 5 | ('POP', 'Population') 6 | ; 7 | -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/027_RiskItem.RealProperty.Characteristics.Basement.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.Basement (countryGeoId, optionDesc, optionValue) VALUES 2 | (0, 'Unknown', 0), 3 | (0, 'No', 1), 4 | (0, 'Yes', 2) -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/028_RiskItem.RealProperty.Characteristics.BIPreparedness.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.BIPreparedness (countryGeoId, optionDesc, optionValue) VALUES 2 | (0, 'Unknown', 0), 3 | (0, 'Poor', 3), 4 | (0, 'Average', 2), 5 | (0, 'Good', 1) 6 | ; 7 | -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/029_RiskItem.RealProperty.Characteristics.BIRedundancy.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.BIRedundancy (countryGeoId, optionDesc, optionValue) VALUES 2 | (0, 'Unknown', 0), 3 | (0, 'Minimal', 1), 4 | (0, 'Average', 2), 5 | (0, 'Extensive', 3) -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/030_RiskItem.RealProperty.Characteristics.CommercialAppurtenant.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.CommercialAppurtenant (countryGeoId, optionDesc, optionValue) VALUES 2 | (0, 'Unknown', 0), 3 | (0, 'None', 1), 4 | (0, 'Signage', 2), 5 | (0, 'PV Array', 3) 6 | -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/031_RiskItem.RealProperty.Characteristics.ContentsVulnWater.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.ContentsVulnWater (countryGeoId, optionDesc, optionValue) VALUES 2 | (0, 'Unknown', 0), 3 | (0, 'Low', 1), 4 | (0, 'Average', 2), 5 | (0, 'High', 3), 6 | (0, 'Very High', 4) -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/032_RiskItem.RealProperty.Characteristics.ContentsVulnWind.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.ContentsVulnWind (countryGeoId, optionDesc, optionValue) VALUES 2 | (0, 'Unknown', 0), 3 | (0, 'Low', 1), 4 | (0, 'Average', 2), 5 | (0, 'High', 3), 6 | (0, 'Very High', 4) -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/033_RiskItem.RealProperty.Characteristics.Exterior.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.Exterior (countryGeoId, optionDesc, optionValue) VALUES 2 | (0, 'Unknown', 0), 3 | (0, 'Brick Veneer', 1), 4 | (0, 'Vinyl', 2), 5 | (0, 'EFIS/Stucco', 3), 6 | (0, 'Glazed', 4), 7 | (0, 'Masonry/RC', 5), 8 | (0, 'Metal', 6), 9 | (0, 'Wood', 7) -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/034_RiskItem.RealProperty.Characteristics.EngineeredFoundation.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.EngineeredFoundation (countryGeoId, optionDesc, optionValue) VALUES 2 | (0, 'Unknown', 0), 3 | (0, 'Yes', 1), 4 | (0, 'No', 2) 5 | -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/035_RiskItem.RealProperty.Characteristics.ExteriorRating.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.ExteriorRating (countryGeoId, optionDesc, optionValue) VALUES 2 | (0, 'Unknown', 0), 3 | (0, 'Good', 1), 4 | (0, 'Average', 2), 5 | (0, 'Poor', 3) 6 | ; 7 | -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/036_RiskItem.RealProperty.Characteristics.ExternalOrnamentation.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.ExternalOrnamentation (countryGeoId, optionDesc, optionValue) VALUES 2 | (0, 'Unknown', 0), 3 | (0, 'Limited', 1), 4 | (0, 'Average', 2), 5 | (0, 'Extensive', 3) 6 | 7 | ; 8 | -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/037_RiskItem.RealProperty.Characteristics.FireRemoteAlarmPresence.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.FireRemoteAlarmPresence(countryGeoId, optionDesc, optionValue) VALUES 2 | (0, 'Unknown', 0), 3 | (0, 'Yes', 1), 4 | (0, 'No', 2) 5 | ; -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/038_RiskItem.RealProperty.Characteristics.FireSprinklerPresence.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.FireSprinklerPresence (countryGeoId, optionDesc, optionValue) VALUES 2 | (0, 'Unknown', 0), 3 | (0, 'No', 1), 4 | (0, 'Yes', 2) 5 | ; -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/039_RiskItem.RealProperty.Characteristics.FloodMissile.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.FloodMissile (countryGeoId, optionDesc, optionValue) VALUES 2 | (0, 'Unknown', 0), 3 | (0, 'No', 1), 4 | (0, 'Yes', 2) 5 | -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/040_RiskItem.RealProperty.Characteristics.FloodProtection.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.FloodProtection (countryGeoId, optionDesc, optionValue) VALUES 2 | (0, 'Unknown', 0), 3 | (0, 'No', 1), 4 | (0, 'Yes', 2) 5 | 6 | -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/041_RiskItem.RealProperty.Characteristics.FloorType.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.FloorType (countryGeoId, optionDesc, optionValue) VALUES 2 | (0, 'Unknown', 0), 3 | (0, 'Concrete', 1), 4 | (0, 'Masonry', 2), 5 | (0, 'Wood', 3) 6 | 7 | ; -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/042_RiskItem.RealProperty.Characteristics.FoundationType.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.FoundationType (countryGeoId, optionDesc, optionValue) VALUES 2 | (0, 'Unknown', 0), 3 | (0, 'Non-Elevated', 1), 4 | (0, 'Elevated', 2) 5 | ; 6 | -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/043_RiskItem.RealProperty.Characteristics.FrameFoundationConnection.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.FrameFoundationConnection (countryGeoId, optionDesc, optionValue) VALUES 2 | (0, 'Unknown', 0), 3 | (0, 'Bolted', 1), 4 | (0, 'Unbolted', 2) -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/044_RiskItem.RealProperty.Characteristics.FireSupression.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.FireSuppression (countryGeoId, optionDesc, optionValue) VALUES 2 | (0, 'Unknown', 0), 3 | (0, 'Active suppression', 1), 4 | (0, 'Passive suppression', 2), 5 | (0, 'None', 3) 6 | ; 7 | -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/045_RiskItem.RealProperty.Characteristics.Garaging.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.Garaging (countryGeoId, optionDesc, optionValue) VALUES 2 | (0, 'Unknown', 0), 3 | (0, 'Outside', 1), 4 | (0, 'Inside', 2) 5 | ; 6 | -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/046_RiskItem.RealProperty.Characteristics.MarineProtection.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.MarineProtection (countryGeoId, optionDesc, optionValue) VALUES 2 | (0, 'Unknown', 0), 3 | (0, 'None', 1), 4 | (0, 'Yes', 2) 5 | ; 6 | -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/047_RiskItem.RealProperty.Characteristics.OpeningProtect.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.OpeningProtect (countryGeoId, optionDesc, optionValue) VALUES 2 | (0, 'Unknown', 0), 3 | (0, 'Shuttered', 1), 4 | (0, 'Not Shuttered', 2) -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/048_RiskItem.RealProperty.Characteristics.Performance.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.Performance (countryGeoId, optionDesc, optionValue) VALUES 2 | (0, 'Unknown', 0), 3 | (0, 'Good', 1), 4 | (0, 'Average', 2), 5 | (0, 'Poor', 3) -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/049_RiskItem.RealProperty.Characteristics.PlanIrregularity.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.PlanIrregularity (countryGeoId, optionDesc, optionValue) VALUES 2 | (0, 'Unknown', 0), 3 | (0, 'Regular', 1), 4 | (0, 'Irregular', 2) -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/050_RiskItem.RealProperty.Characteristics.PlumbingInsulation.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.PlumbingInsulation(countryGeoId, optionDesc, optionValue) VALUES 2 | (0, 'Unknown', 0), 3 | (0, 'Yes', 1), 4 | (0, 'No', 2) 5 | ; 6 | -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/051_RiskItem.RealProperty.Characteristics.Pounding.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.Pounding (countryGeoId, optionDesc, optionValue) VALUES 2 | (0, 'Unknown', 0), 3 | (0, 'No', 1), 4 | (0, 'Yes', 2) -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/052_RiskItem.RealProperty.Characteristics.RentalPropertyIdentifier.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.RentalPropertyIdentifier (rentalPropertyIdentifierCode, rentalPropertyIdentifierDesc) VALUES 2 | (0, 'Unknown'), 3 | (1, 'Owner Insured'), 4 | (2, 'Tenant Insured') 5 | -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/053_RiskItem.RealProperty.Characteristics.ResidentialAppurtenant.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.ResidentialAppurtenant (countryGeoId, optionDesc, optionValue) VALUES 2 | (0, 'Unknown', 0), 3 | (0, 'None', 1), 4 | (0, 'Screen Enclosure', 2), 5 | (0, 'PV Array', 3), 6 | (0, 'Additional Structure', 4) 7 | -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/054_RiskItem.RealProperty.Characteristics.RoofAdditions.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.RoofAdditions (countryGeoId, optionDesc, optionValue) VALUES 2 | (0, 'Unknown', 0), 3 | (0, 'No', 1), 4 | (0, 'Yes', 2) -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/055_RiskItem.RealProperty.Characteristics.RoofAgeCondition.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.RoofAgeCondition (countryGeoId, optionDesc, optionValue) VALUES 2 | (0, 'Unknown', 0), 3 | (0, 'New', 1), 4 | (0, 'Old', 2) -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/056_RiskItem.RealProperty.Characteristics.RoofAnchor.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.RoofAnchor (countryGeoId, optionDesc, optionValue) VALUES 2 | (0, 'Unknown', 0), 3 | (0, 'Bolts', 1), 4 | (0, 'Wraps', 2) -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/057_RiskItem.RealProperty.Characteristics.RoofCovering.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.RoofCovering (countryGeoId, optionDesc, optionValue) VALUES 2 | (0, 'Unknown', 0), 3 | (0, 'Shingles', 1), 4 | (0, 'Metal', 2), 5 | (0, 'Tiles', 3), 6 | (0, 'Concrete', 4), 7 | (0, 'Other', 5) -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/058_RiskItem.RealProperty.Characteristics.RoofGeometry.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.RoofGeometry (countryGeoId, optionDesc, optionValue) VALUES 2 | (0, 'Unknown', 0), 3 | (0, 'Flat', 1), 4 | (0, 'Gable', 2), 5 | (0, 'Hip', 3), 6 | (0, 'Monoslope', 4) 7 | -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/059_RiskItem.RealProperty.Characteristics.RoofVent.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.RoofVent (countryGeoId, optionDesc, optionValue) VALUES 2 | (0, 'Unknown', 0), 3 | (0, 'Present', 2), 4 | (0, 'None', 1) 5 | -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/060_RiskItem.RealProperty.Characteristics.StructuralUpgradeNonURM.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.StructuralUpgradeNonURM (countryGeoId, optionDesc, optionValue) VALUES 2 | (0, 'Unknown', 0), 3 | (0, 'Yes', 2), 4 | (0, 'No', 1) 5 | 6 | -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/061_RiskItem.RealProperty.Characteristics.Tank.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.Tank (countryGeoId, optionDesc, optionValue) VALUES 2 | (0, 'Unknown', 0), 3 | (0, 'No', 1), 4 | (0, 'Yes', 2) 5 | ; 6 | -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/062_RiskItem.RealProperty.Characteristics.URMChimney.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.URMChimney(countryGeoId, optionDesc, optionValue) VALUES 2 | (0, 'Unknown', 0), 3 | (0, 'No', 1), 4 | (0, 'Yes', 2) 5 | ; 6 | -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/063_RiskItem.RealProperty.Characteristics.URMRetrofit.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.URMRetrofit (countryGeoId, optionDesc, optionValue) VALUES 2 | (0, 'Unknown', 0), 3 | (0, 'Yes', 1), 4 | (0, 'No', 2) 5 | -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/064_RiskItem.RealProperty.Characteristics.VerticalIrregularity.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.VerticalIrregularity (countryGeoId, optionDesc, optionValue) VALUES 2 | (0, 'Unknown', 0), 3 | (0, 'No', 1), 4 | (0, 'Yes', 2) -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/065_RiskItem.RealProperty.Characteristics.WindMissileExposure.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.WindMissileExposure (countryGeoId, optionDesc, optionValue) VALUES 2 | (0, 'Unknown', 0), 3 | (0, 'Low', 1), 4 | (0, 'High', 2) -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/066_RiskItem.RealProperty.Characteristics.AreaUnit.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.AreaUnit (areaUnitCode, areaUnitDesc) VALUES 2 | (2,'Square Feet'), 3 | (4,'Square Meters') 4 | ; 5 | -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/067_RiskItem.RealProperty.Characteristics.DistanceUnit.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.DistanceUnit (distanceUnitCode, distanceUnitDesc) VALUES 2 | (0,'Unspecified'), 3 | (1,'Inches'), 4 | (2,'Feet'), 5 | (3,'Miles'), 6 | (4,'Meters'), 7 | (5,'Kilometers') 8 | ; 9 | -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/100_RiskItem.Population.HazardousMaterial.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.HazardousMaterial (hazardousMaterialCode, hazardousMaterialDesc) VALUES 2 | (1, 'None other than Incidental'), 3 | (2, 'Flammables or Explosives'), 4 | (3, 'Toxic Gas or Liquids') 5 | ; -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/101_RiskItem.Population.RiskManagementOnsiteRank.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.RiskManagementOnsiteRank (riskManagementOnsiteRankCode, riskManagementOnsiteRankDesc) VALUES 2 | (-1, 'Above Average'), 3 | (0, 'Average'), 4 | (1, 'Below Average') 5 | ; 6 | -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/102_RiskItem.Population.ShiftType.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.shifttype (ShiftTypeID, ShiftTypeDesc) VALUES 2 | (0, 'Shift data not available or applicable'), 3 | (1, 'Standard Single Shift'), 4 | (2, 'Two shifts per day'), 5 | (3, 'Three shifts per day'), 6 | (4, 'Four shifts per day') 7 | ; -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/103_RiskItem.Population.EmergencyProtectionProximity.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.EmergencyProtectionProximity (emergencyProtectionProxCode, emergencyProtectionProxDesc) VALUES 2 | (-1, 'Above Average'), 3 | (0, 'Average'), 4 | (1, 'Below Average') 5 | -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/106_RiskItem.Population.WageRelativityRank.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.WageRelativityRank (wageRelativityRankCode, wageRelativityRankDesc) VALUES 2 | (110,'Above Average'), 3 | (100,'Average'), 4 | (81,'Below Average') 5 | ; 6 | -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/201_Structure.PositionType.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.PositionType(positionTypeCode) VALUES 2 | ('Group'), 3 | ('Scale'), 4 | ('Filter'), 5 | ('Contract'), 6 | ('Portfolio') 7 | ; 8 | -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/202_Portfolio.PortfolioType.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.PortfolioType(portfolioTypeCode) VALUES 2 | ('AGG'), 3 | ('DETAIL') 4 | ; 5 | -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/301_Result.Peril.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.Peril (perilCode, perilDesc, isActive) VALUES 2 | ('EQ', 'Earthquake', 1), 3 | ('WS', 'Windstorm/Hurricane/Typhoon', 1), 4 | ('FL', 'Flood', 1), 5 | ('FR', 'Interior Fire', 0), 6 | ('TR', 'Terrorism', 0), 7 | ('CS', 'Severe Convective Storm', 1), 8 | ('WT', 'Winterstorm', 1), 9 | ('YY', 'RMS ALL PERILS', 0), 10 | ('TO', '(CS/WT) Severe Convective Storm / WinterStorm', 0) 11 | ; 12 | -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/302_Result.ResultType.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.ResultType(resultTypeCode) VALUES 2 | ('ELT'), 3 | ('PLT'), 4 | ('EP'), 5 | ('STATS') 6 | ; 7 | -------------------------------------------------------------------------------- /Schema/sql/ReferenceTables-SeedData/302_Settings.SettingsType.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REF.SettingsType(settingsTypeCode) VALUES 2 | ('ModelProfile'), 3 | ('RiskAnalysisProfile') 4 | ; 5 | -------------------------------------------------------------------------------- /licenses/RMS-RDOS_CorporateCLA.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RMS/RDOS/ee20afb531b963eed1a1f961267db398a42a10e0/licenses/RMS-RDOS_CorporateCLA.pdf -------------------------------------------------------------------------------- /licenses/RMS-RDOS_IndividualCLA.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RMS/RDOS/ee20afb531b963eed1a1f961267db398a42a10e0/licenses/RMS-RDOS_IndividualCLA.pdf -------------------------------------------------------------------------------- /rdos-validation-tools/README.md: -------------------------------------------------------------------------------- 1 | #### Create RDO Validation Java jar 2 | mvn -pl rdo-validation-tool-java/ -am clean package 3 | 4 | #### Create RDO Validation Scala jar 5 | mvn -pl rdo-validation-tool-scala/ -am clean package 6 | 7 | #### Compile the project 8 | mvn clean compile 9 | 10 | #### Run the jar 11 | java -jar 12 | 13 | Here, is optional. If it will not be given then the will be used to create error files. 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /rdos-validation-tools/cdl-parser/README.md: -------------------------------------------------------------------------------- 1 | ### CDL parser 2 | CDL syntax is defined in the grammar file antlr4/CDL.g4. 3 | CDL Parser is generated from the CDL grammar file using the ANTLR4 parser generator. 4 | 5 | This library contains ContractValidator class which provides example usage of the CDL Parser. ContractValidator is used in the RDO validation tool to validate CDL files. 6 | 7 | 8 | ###References 9 | https://www.antlr.org/ 10 | 11 | #### Compile the project 12 | mvn clean compile 13 | 14 | #### Publish the jar in local maven repository 15 | mvn clean install 16 | 17 | #### How to use the library ? 18 | Include the below artifact into the application's pom 19 | ``` 20 | 21 | com.rms 22 | cdl-parser 23 | ${cdl-parser.version} 24 | 25 | ``` -------------------------------------------------------------------------------- /rdos-validation-tools/cdl-parser/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | com.rms 6 | rdos-validation-tools 7 | 1.0.0 8 | 9 | 10 | cdl-parser 11 | ${project.artifactId} 12 | 2020 13 | jar 14 | 15 | 16 | 1.8 17 | 1.8 18 | UTF-8 19 | 1.9.1 20 | 4.7.2 21 | 22 | 23 | 24 | 25 | 26 | org.antlr 27 | antlr4-runtime 28 | ${antlr-v4.version} 29 | 30 | 31 | 32 | 33 | 34 | src/main/java 35 | 36 | 37 | org.apache.maven.plugins 38 | maven-surefire-plugin 39 | 2.21.0 40 | 41 | 42 | true 43 | 44 | 45 | 46 | 47 | org.antlr 48 | antlr4-maven-plugin 49 | ${antlr-v4.version} 50 | 51 | 52 | antlr 53 | 54 | antlr4 55 | 56 | 57 | 58 | -Werror 59 | -visitor 60 | -package 61 | com.rms.cdl.generated 62 | -o 63 | ${basedir}/target/generated-sources/antlr4/com/rms/cdl/generated 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /rdos-validation-tools/cdl-parser/src/main/java/com/rms/cdl/parser/listener/CustomErrorListener.java: -------------------------------------------------------------------------------- 1 | package com.rms.cdl.parser.listener; 2 | 3 | import org.antlr.v4.runtime.*; 4 | 5 | import java.util.Collections; 6 | import java.util.List; 7 | 8 | public class CustomErrorListener extends BaseErrorListener { 9 | 10 | private String formatError(String message, int linePos, int charPos, String input, int errorStart, int errorEnd) { 11 | 12 | final String nl = System.lineSeparator(); 13 | /* Collect information for underlining the error. */ 14 | String[] lines = input.split(nl); 15 | StringBuilder prefix = new StringBuilder(nl); 16 | if (linePos > 2) { 17 | prefix.append("..."); 18 | prefix.append(nl); 19 | } 20 | if (linePos > 1) { 21 | prefix.append(lines[linePos - 2]); 22 | prefix.append(nl); 23 | } 24 | 25 | StringBuilder suffix = new StringBuilder(nl); 26 | if (lines.length > linePos) { 27 | suffix.append(lines[linePos]); 28 | suffix.append(nl); 29 | } 30 | if (lines.length > linePos + 1) { 31 | suffix.append("..."); 32 | suffix.append(nl); 33 | } 34 | StringBuilder out = new StringBuilder(nl); 35 | out.append("at line " + linePos + ", col " + charPos + ": " + message); 36 | out.append(nl); 37 | out.append(prefix); 38 | out.append(lines[linePos - 1]); 39 | out.append(nl); 40 | for (int i = 0; i < charPos; i++) { 41 | out.append(' '); 42 | } 43 | for (int i = errorStart; i <= errorEnd; i++) { 44 | out.append('^'); 45 | } 46 | out.append(suffix); 47 | return out.toString(); 48 | } 49 | 50 | @Override 51 | public void syntaxError(Recognizer recognizer, 52 | Object offendingSymbol, 53 | int line, 54 | int charPositionInLine, 55 | String msg, 56 | RecognitionException e) { 57 | Parser parser = (Parser) recognizer; 58 | List stack = parser.getRuleInvocationStack(); 59 | Collections.reverse(stack); 60 | 61 | String message = msg + " with rule stack " + stack; 62 | 63 | Token offendingToken = (Token) offendingSymbol; 64 | TokenStream tokens = parser.getTokenStream(); 65 | String input = tokens.getTokenSource().getInputStream().toString(); 66 | 67 | int start = offendingToken.getStartIndex(); 68 | int stop = offendingToken.getStopIndex(); 69 | 70 | throw new RuntimeException( 71 | "[Cdl Compile Error] " + formatError(message, line, charPositionInLine, input, start, stop) 72 | ); 73 | } 74 | } -------------------------------------------------------------------------------- /rdos-validation-tools/cdl-parser/src/main/java/com/rms/cdl/parser/treebuilder/CdlParseTreeBuilder.java: -------------------------------------------------------------------------------- 1 | package com.rms.cdl.parser.treebuilder; 2 | 3 | import com.rms.cdl.generated.CDLLexer; 4 | import com.rms.cdl.generated.CDLParser; 5 | import com.rms.cdl.generated.CDLParser.CdlContext; 6 | 7 | import com.rms.cdl.parser.listener.CustomErrorListener; 8 | import org.antlr.v4.runtime.ANTLRInputStream; 9 | import org.antlr.v4.runtime.CommonTokenStream; 10 | 11 | public class CdlParseTreeBuilder { 12 | 13 | public static CdlContext build(String cdl) { 14 | ANTLRInputStream input; 15 | input = new ANTLRInputStream(cdl); 16 | CDLLexer lexer = new CDLLexer(input); 17 | CommonTokenStream tokens = new CommonTokenStream(lexer); 18 | CDLParser parser = new CDLParser(tokens); 19 | parser.removeErrorListeners(); 20 | parser.addErrorListener(new CustomErrorListener()); 21 | return parser.cdl(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /rdos-validation-tools/cdl-parser/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | %date{HH:mm:ss} %-5level %logger{0} {%class %method} - %msg%n 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /rdos-validation-tools/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | com.rms 6 | rdos-validation-tools 7 | 1.0.0 8 | pom 9 | 10 | cdl-parser 11 | rdo-validation-tool-java 12 | rdo-validation-tool-scala 13 | rdos-schema 14 | 15 | 16 | UTF-8 17 | 18 | 19 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdo-validation-tool-java/README.md: -------------------------------------------------------------------------------- 1 | ### RDOS Validation Tool 2 | This module validates the RDOS input files (CSV Format) and the CDL files. 3 | 4 | It validates RDOS input files for the 2 following things: 5 | * Data Type Validation 6 | * Integrity Constraint Validation (Primary and foreign key) 7 | 8 | It accepts 2 validation types: 9 | * RDO: For RDOS input files 10 | * CDL: For CDL files 11 | 12 | #### Compile the project 13 | mvn clean compile 14 | 15 | #### Create a project jar 16 | mvn clean package 17 | 18 | #### Run test cases with coverage report 19 | mvn clean scoverage:report 20 | 21 | #### Run the jar 22 | java -jar 23 | 24 | Here, is optional. If it will not be given then the will be used to create error files. 25 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdo-validation-tool-java/src/main/java/com/rms/rdo/validation/cdl/CDLValidator.java: -------------------------------------------------------------------------------- 1 | package com.rms.rdo.validation.cdl; 2 | 3 | import com.rms.cdl.parser.validator.ContractValidator; 4 | import com.rms.rdo.validation.constants.Constants; 5 | import com.rms.rdo.validation.model.cdl.CDLValidationError; 6 | 7 | import java.io.File; 8 | import java.io.IOException; 9 | import java.nio.file.Files; 10 | import java.nio.file.Paths; 11 | import java.util.Optional; 12 | import java.util.stream.Collectors; 13 | import java.util.stream.Stream; 14 | 15 | public class CDLValidator { 16 | 17 | public static Optional validateCDLFile(File file) { 18 | Optional fileContent = readFile(file); 19 | 20 | return fileContent.flatMap(content -> { 21 | try { 22 | ContractValidator.validate(content); 23 | return Optional.empty(); 24 | } catch (Exception ex) { 25 | return Optional.of(CDLValidationError.builder() 26 | .file(file.getName()).errorMessage(ex.getMessage()).build()); 27 | } 28 | }); 29 | } 30 | 31 | private static Optional readFile(File file) { 32 | try (Stream stream = Files.lines(Paths.get(file.getPath()))) { 33 | return Optional.ofNullable(stream.collect(Collectors.joining(Constants.EMPTY_STRING))); 34 | } catch (IOException e) { 35 | return Optional.empty(); 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdo-validation-tool-java/src/main/java/com/rms/rdo/validation/constants/Constants.java: -------------------------------------------------------------------------------- 1 | package com.rms.rdo.validation.constants; 2 | 3 | import java.util.Arrays; 4 | import java.util.List; 5 | 6 | public class Constants { 7 | 8 | public static final String EMPTY_STRING = ""; 9 | public static final String FOREIGN_KEY_ERROR_MESSAGE = 10 | "The below columnValues should not be present in this file as it is not present" + 11 | " in primary keys of the below given file"; 12 | public static final String PRIMARY_KEY_NULL_VALUE_ERROR_MESSAGE = "Primary Key contains null values"; 13 | public static final String PRIMARY_KEY_DUPLICATE_VALUE_ERROR_MESSAGE = "Primary Key contains duplicate Values"; 14 | public static final String DATA_TYPE_VALIDATION_TYPE = "data type validation"; 15 | public static final String INTEGRITY_CONSTRAINT_VALIDATION_TYPE = "integrity constraint validation"; 16 | public static final List DATE_FORMATS = Arrays.asList("MM/dd/yyyy", "dd/MM/yyyy", "MMM dd, yyyy", "dd-MM" + 17 | "-yyyy"); 18 | public static final List TIME_FORMATS = Arrays.asList("hh:mm:ss", "hh:mm:ss[.nnnnnnn]", "hh-mm-ss"); 19 | public static final List DATE_TIME_FORMATS = Arrays.asList("MM/dd/yyyy hh:mm:ss", "dd/MM/yyyy hh:mm:ss", 20 | "MMM dd, yyyy hh:mm:ss", "dd-MM-yyyy hh:mm:ss"); 21 | 22 | public static final String INTEGRITY_CONSTRAIN_CONFIG_PARSING_ERROR_MESSAGE = "Error in parsing the integrity " + 23 | "constraint config file"; 24 | public static final String NO_INTEGRITY_CONSTRAINT_ERROR_MESSAGE = "There are no integrity constraint errors"; 25 | public static final String RDO_VALIDATION_TYPE = "RDO"; 26 | public static final String CDL_VALIDATION_TYPE = "CDL"; 27 | public static final List VALIDATION_TYPE = Arrays.asList(RDO_VALIDATION_TYPE, CDL_VALIDATION_TYPE); 28 | } 29 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdo-validation-tool-java/src/main/java/com/rms/rdo/validation/datatype/DataTypeValidator.java: -------------------------------------------------------------------------------- 1 | package com.rms.rdo.validation.datatype; 2 | 3 | import com.rms.rdo.validation.constants.Constants; 4 | import com.rms.rdo.validation.model.datatype.DataTypeValidationError; 5 | 6 | import java.util.ArrayList; 7 | import java.util.List; 8 | import java.util.Map; 9 | import java.util.Optional; 10 | import java.util.stream.Collectors; 11 | 12 | public class DataTypeValidator { 13 | 14 | public static List validateDataType(Map row, 15 | Map validationMap) { 16 | List columnNames = new ArrayList<>(row.keySet()); 17 | return columnNames.stream().map(columnName -> 18 | checkDataTypes(row.get(columnName), validationMap.get(columnName)) 19 | .map(error -> DataTypeValidationError.builder() 20 | .columnName(columnName) 21 | .columnValue(row.get(columnName)) 22 | .errorMessage(error) 23 | .build())) 24 | .filter(Optional::isPresent) 25 | .map(Optional::get) 26 | .collect(Collectors.toList()); 27 | } 28 | 29 | private static Optional checkDataTypes(String columnValue, String dataType) { 30 | 31 | switch (dataType) { 32 | case "Double": 33 | return Validator.validateNumericType(() -> Double.valueOf(columnValue).toString(), dataType); 34 | case "Long": 35 | return Validator.validateNumericType(() -> Long.valueOf(columnValue).toString(), dataType); 36 | case "Byte": 37 | Validator.validateNumericType(() -> Byte.valueOf(columnValue).toString(), dataType); 38 | case "Short": 39 | return Validator.validateNumericType(() -> Short.valueOf(columnValue).toString(), dataType); 40 | case "Integer": 41 | return Validator.validateNumericType(() -> Integer.valueOf(columnValue).toString(), dataType); 42 | case "Date": 43 | return Validator.validateDateAndTimeDataType(columnValue, Constants.DATE_FORMATS, dataType); 44 | case "Time": 45 | return Validator.validateDateAndTimeDataType(columnValue, Constants.TIME_FORMATS, dataType); 46 | case "DateTime": 47 | return Validator.validateDateAndTimeDataType(columnValue, Constants.DATE_TIME_FORMATS, dataType); 48 | case "Bit": 49 | return Validator.validateBitType(columnValue, dataType); 50 | default: 51 | return Optional.empty(); 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdo-validation-tool-java/src/main/java/com/rms/rdo/validation/datatype/Validator.java: -------------------------------------------------------------------------------- 1 | package com.rms.rdo.validation.datatype; 2 | 3 | import java.text.SimpleDateFormat; 4 | import java.util.List; 5 | import java.util.Optional; 6 | import java.util.function.Supplier; 7 | import java.util.stream.Collectors; 8 | 9 | public class Validator { 10 | 11 | public static Optional validateNumericType(Supplier value, String dataType) { 12 | try { 13 | value.get(); 14 | return Optional.empty(); 15 | } catch (Exception ex) { 16 | return Optional.of("The value is not a " + dataType); 17 | } 18 | } 19 | 20 | public static Optional validateDateAndTimeDataType(String value, List formats, String dataType) { 21 | List result = formats.stream().map(dateFormat -> isDateValid(value, dateFormat, dataType)) 22 | .filter(Optional::isPresent) 23 | .map(Optional::get) 24 | .collect(Collectors.toList()); 25 | if (result.size() == formats.size()) { 26 | return Optional.of(result.get(0)); 27 | } else { 28 | return Optional.empty(); 29 | } 30 | } 31 | 32 | public static Optional validateBitType(String value, String dataType) { 33 | if (value.equals("0") || value.equals("1")) { 34 | return Optional.empty(); 35 | } else { 36 | return Optional.of("The value is not a " + dataType); 37 | } 38 | } 39 | 40 | private static Optional isDateValid(String value, String formats, String dataType) { 41 | try { 42 | SimpleDateFormat formatter = new SimpleDateFormat(formats); 43 | formatter.parse(value); 44 | return Optional.empty(); 45 | } catch (Exception ex) { 46 | return Optional.of("The value is not a " + dataType); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdo-validation-tool-java/src/main/java/com/rms/rdo/validation/handler/CDLValidationHandler.java: -------------------------------------------------------------------------------- 1 | package com.rms.rdo.validation.handler; 2 | 3 | import com.rms.rdo.validation.cdl.CDLValidator; 4 | import com.rms.rdo.validation.constants.Constants; 5 | import com.rms.rdo.validation.utility.Utility; 6 | import lombok.AllArgsConstructor; 7 | 8 | import java.io.File; 9 | import java.util.List; 10 | import java.util.Optional; 11 | import java.util.concurrent.CompletableFuture; 12 | import java.util.stream.Collectors; 13 | 14 | @AllArgsConstructor 15 | public class CDLValidationHandler { 16 | 17 | private Utility utility; 18 | 19 | public CompletableFuture validateCDLFile(List files, String outputDirectory) { 20 | return CompletableFuture.supplyAsync(() -> files.stream() 21 | .map(CDLValidator::validateCDLFile) 22 | .filter(Optional::isPresent) 23 | .map(Optional::get) 24 | .collect(Collectors.toList())) 25 | .thenApply(errors -> utility.writeErrorsIntoFile(errors, outputDirectory + "/" + "CDL", 26 | Constants.CDL_VALIDATION_TYPE)); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdo-validation-tool-java/src/main/java/com/rms/rdo/validation/handler/RDOValidationHandler.java: -------------------------------------------------------------------------------- 1 | package com.rms.rdo.validation.handler; 2 | 3 | import com.rms.rdo.validation.constants.Constants; 4 | import com.rms.rdo.validation.csv.CsvReader; 5 | import com.rms.rdo.validation.integrityconstraint.IntegrityConstraintValidator; 6 | import com.rms.rdo.validation.utility.Utility; 7 | import lombok.AllArgsConstructor; 8 | 9 | import java.io.File; 10 | import java.util.List; 11 | import java.util.concurrent.CompletableFuture; 12 | import java.util.stream.Collectors; 13 | 14 | @AllArgsConstructor 15 | public class RDOValidationHandler { 16 | 17 | private Utility utility; 18 | private CsvReader csvReader; 19 | private IntegrityConstraintValidator integrityConstraintValidator; 20 | 21 | public CompletableFuture> validateRDOFile(List files, String directoryPath, 22 | String outputDirectory) { 23 | 24 | List> result = files.stream().map(file -> csvReader.processDataTypeValidation(file) 25 | .thenApply(errors -> utility.writeErrorsIntoFile( 26 | errors, outputDirectory + "/" + file.getName().split("\\.")[0], 27 | Constants.DATA_TYPE_VALIDATION_TYPE)) 28 | .thenCompose(res -> 29 | integrityConstraintValidator.processIntegrityConstraintValidation( 30 | file, directoryPath).thenApply(error -> utility.writeErrorsIntoFile( 31 | error, outputDirectory + "/" + file.getName().split("\\.")[0], 32 | Constants.INTEGRITY_CONSTRAINT_VALIDATION_TYPE)) 33 | )) 34 | .map(x -> x.toCompletableFuture()) 35 | .collect(Collectors.toList()); 36 | 37 | return CompletableFuture 38 | .allOf(result.toArray(new CompletableFuture[result.size()])) 39 | .thenApply(v -> result.stream() 40 | .map(CompletableFuture::join) 41 | .collect(Collectors.toList())); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdo-validation-tool-java/src/main/java/com/rms/rdo/validation/integrityconstraint/PrimaryKeyValidator.java: -------------------------------------------------------------------------------- 1 | package com.rms.rdo.validation.integrityconstraint; 2 | 3 | import com.rms.rdo.validation.constants.Constants; 4 | import com.rms.rdo.validation.csv.CsvReader; 5 | import com.rms.rdo.validation.model.integrityconstraint.IntegrityConstraint; 6 | import com.rms.rdo.validation.model.integrityconstraint.PrimaryKeyErrorDetail; 7 | import com.rms.rdo.validation.model.integrityconstraint.PrimaryKeyError; 8 | 9 | import java.util.Collections; 10 | import java.util.List; 11 | import java.util.Map; 12 | import java.util.Optional; 13 | import java.util.concurrent.CompletableFuture; 14 | import java.util.stream.Collectors; 15 | import java.util.stream.Stream; 16 | 17 | import lombok.AllArgsConstructor; 18 | 19 | @AllArgsConstructor 20 | public class PrimaryKeyValidator { 21 | 22 | private final CsvReader csvReader; 23 | 24 | public CompletableFuture> 25 | processPrimaryKeysValidation(String filePath, 26 | IntegrityConstraint integrityConstraint) { 27 | List primaryKeys = integrityConstraint.getPrimaryKeys(); 28 | CompletableFuture>> primaryKeyData = csvReader.getDataByColumns(filePath, primaryKeys); 29 | return primaryKeyData.thenApply(values -> { 30 | Optional nulErrors = validateNull(values); 31 | Optional duplicateErrors = validateDuplicateValues(values); 32 | List primaryKeyErrors = Stream.of(nulErrors, duplicateErrors) 33 | .filter(Optional::isPresent) 34 | .map(Optional::get) 35 | .collect(Collectors.toList()); 36 | if (primaryKeyErrors.isEmpty()) { 37 | return Optional.empty(); 38 | } else { 39 | return Optional.of(PrimaryKeyErrorDetail.builder().errors(primaryKeyErrors).build()); 40 | } 41 | }); 42 | } 43 | 44 | private Optional validateNull(List> rows) { 45 | boolean isNull = rows.stream().anyMatch(row -> row.values().contains(null)); 46 | if (isNull) { 47 | String columns = String.join("-", rows.get(0).keySet()); 48 | return Optional.of(PrimaryKeyError.builder().columnName(columns) 49 | .errorMessage(Constants.PRIMARY_KEY_NULL_VALUE_ERROR_MESSAGE).build()); 50 | } else { 51 | return Optional.empty(); 52 | } 53 | } 54 | 55 | private Optional validateDuplicateValues(List> rows) { 56 | List duplicates = rows.stream() 57 | .filter(e -> Collections.frequency(rows, e) > 1) 58 | .distinct() 59 | .map(res -> String.join("-", res.values())) 60 | .collect(Collectors.toList()); 61 | 62 | if (duplicates.isEmpty()) { 63 | return Optional.empty(); 64 | } else { 65 | String columns = String.join("-", rows.get(0).keySet()); 66 | return Optional.of(PrimaryKeyError.builder() 67 | .columnName(columns).columnValue(duplicates) 68 | .errorMessage(Constants.PRIMARY_KEY_DUPLICATE_VALUE_ERROR_MESSAGE).build()); 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdo-validation-tool-java/src/main/java/com/rms/rdo/validation/model/cdl/CDLValidationError.java: -------------------------------------------------------------------------------- 1 | package com.rms.rdo.validation.model.cdl; 2 | 3 | import lombok.AccessLevel; 4 | import lombok.AllArgsConstructor; 5 | import lombok.Builder; 6 | import lombok.Getter; 7 | import lombok.experimental.FieldDefaults; 8 | 9 | @Getter 10 | @Builder 11 | @AllArgsConstructor 12 | @FieldDefaults(level = AccessLevel.PRIVATE, makeFinal = true) 13 | public class CDLValidationError { 14 | 15 | String file; 16 | 17 | String errorMessage; 18 | } 19 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdo-validation-tool-java/src/main/java/com/rms/rdo/validation/model/datatype/DataTypeValidationError.java: -------------------------------------------------------------------------------- 1 | package com.rms.rdo.validation.model.datatype; 2 | 3 | import lombok.AccessLevel; 4 | import lombok.AllArgsConstructor; 5 | import lombok.Builder; 6 | import lombok.Getter; 7 | import lombok.experimental.FieldDefaults; 8 | 9 | @Getter 10 | @Builder 11 | @AllArgsConstructor 12 | @FieldDefaults(level = AccessLevel.PRIVATE, makeFinal = true) 13 | public class DataTypeValidationError { 14 | 15 | String columnName; 16 | 17 | String columnValue; 18 | 19 | String errorMessage; 20 | } 21 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdo-validation-tool-java/src/main/java/com/rms/rdo/validation/model/datatype/DataTypeValidationErrors.java: -------------------------------------------------------------------------------- 1 | package com.rms.rdo.validation.model.datatype; 2 | 3 | import java.util.List; 4 | 5 | import lombok.AccessLevel; 6 | import lombok.AllArgsConstructor; 7 | import lombok.Builder; 8 | import lombok.Getter; 9 | import lombok.experimental.FieldDefaults; 10 | 11 | @Getter 12 | @Builder 13 | @AllArgsConstructor 14 | @FieldDefaults(level = AccessLevel.PRIVATE, makeFinal = true) 15 | public class DataTypeValidationErrors { 16 | 17 | List errors; 18 | 19 | String message; 20 | } 21 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdo-validation-tool-java/src/main/java/com/rms/rdo/validation/model/integrityconstraint/ForeignKeyDetail.java: -------------------------------------------------------------------------------- 1 | package com.rms.rdo.validation.model.integrityconstraint; 2 | 3 | import java.util.Map; 4 | 5 | import lombok.*; 6 | import lombok.experimental.FieldDefaults; 7 | 8 | @Getter 9 | @Setter 10 | @Builder 11 | @AllArgsConstructor 12 | @NoArgsConstructor 13 | @FieldDefaults(level = AccessLevel.PRIVATE) 14 | public class ForeignKeyDetail { 15 | 16 | String table; 17 | 18 | Map columnMapping; 19 | } 20 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdo-validation-tool-java/src/main/java/com/rms/rdo/validation/model/integrityconstraint/ForeignKeyError.java: -------------------------------------------------------------------------------- 1 | package com.rms.rdo.validation.model.integrityconstraint; 2 | 3 | import java.util.List; 4 | import java.util.Map; 5 | 6 | import lombok.AccessLevel; 7 | import lombok.AllArgsConstructor; 8 | import lombok.Builder; 9 | import lombok.Getter; 10 | import lombok.experimental.FieldDefaults; 11 | 12 | @Getter 13 | @Builder 14 | @AllArgsConstructor 15 | @FieldDefaults(level = AccessLevel.PRIVATE, makeFinal = true) 16 | public class ForeignKeyError { 17 | 18 | String file; 19 | 20 | List> columnValues; 21 | 22 | String message; 23 | } 24 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdo-validation-tool-java/src/main/java/com/rms/rdo/validation/model/integrityconstraint/ForeignKeyErrorDetail.java: -------------------------------------------------------------------------------- 1 | package com.rms.rdo.validation.model.integrityconstraint; 2 | 3 | import java.util.List; 4 | 5 | import lombok.AccessLevel; 6 | import lombok.AllArgsConstructor; 7 | import lombok.Builder; 8 | import lombok.Getter; 9 | import lombok.experimental.FieldDefaults; 10 | 11 | @Getter 12 | @Builder 13 | @AllArgsConstructor 14 | @FieldDefaults(level = AccessLevel.PRIVATE, makeFinal = true) 15 | public class ForeignKeyErrorDetail { 16 | 17 | String errorMessage; 18 | 19 | List errors; 20 | } 21 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdo-validation-tool-java/src/main/java/com/rms/rdo/validation/model/integrityconstraint/IntegrityConstraint.java: -------------------------------------------------------------------------------- 1 | package com.rms.rdo.validation.model.integrityconstraint; 2 | 3 | import java.util.List; 4 | 5 | import lombok.*; 6 | import lombok.experimental.FieldDefaults; 7 | 8 | @Getter 9 | @Setter 10 | @Builder 11 | @AllArgsConstructor 12 | @NoArgsConstructor 13 | @FieldDefaults(level = AccessLevel.PRIVATE) 14 | public class IntegrityConstraint { 15 | 16 | List primaryKeys; 17 | 18 | List foreignKeys; 19 | } 20 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdo-validation-tool-java/src/main/java/com/rms/rdo/validation/model/integrityconstraint/IntegrityConstraintValidationError.java: -------------------------------------------------------------------------------- 1 | package com.rms.rdo.validation.model.integrityconstraint; 2 | 3 | import lombok.AccessLevel; 4 | import lombok.AllArgsConstructor; 5 | import lombok.Builder; 6 | import lombok.Getter; 7 | import lombok.experimental.FieldDefaults; 8 | 9 | @Getter 10 | @Builder 11 | @AllArgsConstructor 12 | @FieldDefaults(level = AccessLevel.PRIVATE, makeFinal = true) 13 | public class IntegrityConstraintValidationError { 14 | 15 | String message; 16 | 17 | PrimaryKeyErrorDetail primaryKey; 18 | 19 | ForeignKeyErrorDetail foreignKey; 20 | } 21 | 22 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdo-validation-tool-java/src/main/java/com/rms/rdo/validation/model/integrityconstraint/PrimaryKeyError.java: -------------------------------------------------------------------------------- 1 | package com.rms.rdo.validation.model.integrityconstraint; 2 | 3 | import java.util.List; 4 | 5 | import lombok.AccessLevel; 6 | import lombok.AllArgsConstructor; 7 | import lombok.Builder; 8 | import lombok.Getter; 9 | import lombok.experimental.FieldDefaults; 10 | 11 | @Getter 12 | @Builder 13 | @AllArgsConstructor 14 | @FieldDefaults(level = AccessLevel.PRIVATE, makeFinal = true) 15 | public class PrimaryKeyError { 16 | 17 | String columnName; 18 | 19 | List columnValue; 20 | 21 | String errorMessage; 22 | } 23 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdo-validation-tool-java/src/main/java/com/rms/rdo/validation/model/integrityconstraint/PrimaryKeyErrorDetail.java: -------------------------------------------------------------------------------- 1 | package com.rms.rdo.validation.model.integrityconstraint; 2 | 3 | 4 | import java.util.List; 5 | 6 | import lombok.AccessLevel; 7 | import lombok.AllArgsConstructor; 8 | import lombok.Builder; 9 | import lombok.Getter; 10 | import lombok.experimental.FieldDefaults; 11 | 12 | @Getter 13 | @Builder 14 | @AllArgsConstructor 15 | @FieldDefaults(level = AccessLevel.PRIVATE, makeFinal = true) 16 | public class PrimaryKeyErrorDetail { 17 | 18 | List errors; 19 | } 20 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdo-validation-tool-java/src/main/java/com/rms/rdo/validation/utility/Utility.java: -------------------------------------------------------------------------------- 1 | package com.rms.rdo.validation.utility; 2 | 3 | import com.fasterxml.jackson.annotation.JsonInclude; 4 | import com.fasterxml.jackson.core.type.TypeReference; 5 | import com.fasterxml.jackson.databind.ObjectMapper; 6 | import com.rms.rdo.validation.model.integrityconstraint.IntegrityConstraint; 7 | 8 | import org.slf4j.Logger; 9 | import org.slf4j.LoggerFactory; 10 | 11 | import java.io.File; 12 | import java.io.FileWriter; 13 | import java.io.InputStream; 14 | import java.util.Map; 15 | import java.util.Optional; 16 | 17 | public class Utility { 18 | 19 | private Logger logger = LoggerFactory.getLogger(this.getClass()); 20 | 21 | private ObjectMapper mapper = new ObjectMapper(); 22 | 23 | public Optional> getDataTypeValidationJson(String fileName, String validationType) { 24 | try { 25 | InputStream inputStream = getClass().getClassLoader().getResourceAsStream(fileName); 26 | Map validationJson = 27 | mapper.readValue(inputStream, new TypeReference>() {}); 28 | return Optional.of(validationJson); 29 | } catch (Exception ex) { 30 | logger.error("Error in parsing the {} json for file: {}", validationType, fileName); 31 | return Optional.empty(); 32 | } 33 | } 34 | 35 | public Optional getIntegrityConstraintValidationJson(String fileName, String validationType) { 36 | try { 37 | InputStream inputStream = getClass().getClassLoader().getResourceAsStream(fileName); 38 | return Optional.of(mapper.readValue(inputStream, IntegrityConstraint.class)); 39 | } catch (Exception ex) { 40 | logger.error("Error in parsing the {} json for file: {}", validationType, fileName); 41 | return Optional.empty(); 42 | } 43 | } 44 | 45 | public Boolean writeErrorsIntoFile(T errors, String filePath, String validationType) { 46 | try { 47 | mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); 48 | FileWriter writer = new FileWriter(new File(filePath + "_errors"), true); 49 | writer.append("=============" + validationType + "errors =================\n"); 50 | writer.append(mapper.writerWithDefaultPrettyPrinter().writeValueAsString(errors) + "\n\n"); 51 | writer.close(); 52 | return true; 53 | } catch (Exception ex) { 54 | logger.error("Failure for writing errors in the file: {}", filePath); 55 | return false; 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdo-validation-tool-java/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | %date{HH:mm:ss} %-5level %logger{0} {%class %method} - %msg%n 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdo-validation-tool-scala/README.md: -------------------------------------------------------------------------------- 1 | ### RDO Validation Tool 2 | This project validates the RDOS input files (CSV Format) and the CDL files. 3 | 4 | It validates RDOS input files for the 2 following things: 5 | * Data Type Validation 6 | * Integrity Constraint Validation (Primary and foreign key) 7 | 8 | It accepts 2 validation types: 9 | * RDOS: For RDOS input files 10 | * CDL: For CDL files 11 | 12 | #### Compile the project 13 | mvn clean compile 14 | 15 | #### Create a project jar 16 | mvn clean package 17 | 18 | #### Run test cases with coverage report 19 | mvn clean scoverage:report 20 | 21 | #### Run the jar 22 | java -jar 23 | 24 | Here, is optional. If it will not be given then the will be used to create error files. 25 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdo-validation-tool-scala/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | %date{HH:mm:ss} %-5level %logger{0} {%class %method} - %msg%n 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdo-validation-tool-scala/src/main/scala/com/rms/rdo/validation/cdl/CDLValidator.scala: -------------------------------------------------------------------------------- 1 | package com.rms.rdo.validation.cdl 2 | 3 | import java.io.File 4 | 5 | import com.rms.cdl.parser.validator.ContractValidator 6 | import com.rms.rdo.validation.model.CDLValidationError 7 | 8 | import scala.io.Source 9 | import scala.util.Try 10 | 11 | object CDLValidator { 12 | 13 | def validateCDLFile(file: File): Option[CDLValidationError] = { 14 | val fileContent = Try(Source.fromFile(file.getPath)).toOption.map(_.getLines.mkString) 15 | 16 | fileContent.flatMap(content => 17 | try { 18 | ContractValidator.validate(content) 19 | None 20 | } 21 | catch { 22 | case e: Exception => Some(CDLValidationError(file.getName, e.getMessage)) 23 | }) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdo-validation-tool-scala/src/main/scala/com/rms/rdo/validation/constant/Constants.scala: -------------------------------------------------------------------------------- 1 | package com.rms.rdo.validation.constant 2 | 3 | object Constants { 4 | 5 | val EmptyString = "" 6 | val ForeignKeyErrorMessage = "The below columnValues should not be present in this file as it is not present" + 7 | " in primary keys of the below given file" 8 | val PrimaryKeyNullValueErrorMessage = "Primary Key contains null values" 9 | val PrimaryKeyDuplicateValueErrorMessage = "Primary Key contains duplicate Values" 10 | val DataTypeValidationType = "data type validation" 11 | val IntegrityConstraintValidationType = "integrity constraint validation" 12 | val DateFormats = List("MM/dd/yyyy", "dd/MM/yyyy", "MMM dd, yyyy", "dd-MM-yyyy") 13 | val TimeFormats = List("hh:mm:ss", "hh:mm:ss[.nnnnnnn]", "hh-mm-ss") 14 | val DateTimeFormats = List("MM/dd/yyyy hh:mm:ss", "dd/MM/yyyy hh:mm:ss", 15 | "MMM dd, yyyy hh:mm:ss", "dd-MM-yyyy hh:mm:ss") 16 | 17 | val IntegrityConstrainConfigParsingErrorMessage = "Error in parsing the integrity constraint config file" 18 | val NoIntegrityConstraintErrorMessage = "There are no integrity constraint errors" 19 | val RdoValidationType = "RDO" 20 | val CdlValidationType = "CDL" 21 | val ValidationType = List(RdoValidationType, CdlValidationType) 22 | } 23 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdo-validation-tool-scala/src/main/scala/com/rms/rdo/validation/csv/CsvReader.scala: -------------------------------------------------------------------------------- 1 | package com.rms.rdo.validation.csv 2 | 3 | import java.io.File 4 | import java.nio.file.{Path, Paths} 5 | 6 | import akka.actor.ActorSystem 7 | import akka.stream.alpakka.csv.scaladsl.{CsvParsing, CsvToMap} 8 | import akka.stream.scaladsl._ 9 | import com.rms.rdo.validation.constant.Constants 10 | import com.rms.rdo.validation.datatype.DataTypeValidator 11 | import com.rms.rdo.validation.model.DataTypeValidationErrors 12 | import com.rms.rdo.validation.utility.Utility 13 | import org.slf4j.{Logger, LoggerFactory} 14 | 15 | import scala.concurrent.ExecutionContext.Implicits.global 16 | import scala.concurrent.Future 17 | 18 | class CsvReader(implicit system: ActorSystem) { 19 | 20 | private val logger: Logger = LoggerFactory.getLogger(this.getClass) 21 | 22 | def processDataTypeValidation(file: File): Future[DataTypeValidationErrors] = { 23 | 24 | val csvFile: Path = Paths.get(file.getPath) 25 | val source = FileIO.fromPath(csvFile) 26 | val fileName = file.getName.split('.')(0) 27 | val validationFileName = s"$fileName/data_type_validation.json" 28 | 29 | val validationMapOpt = Utility.getValidationJson[Map[String, String]](validationFileName, 30 | Constants.DataTypeValidationType) 31 | 32 | validationMapOpt.fold(Future.successful(DataTypeValidationErrors(Nil, 33 | Some( 34 | "Error in parsing the data type validation config file")))) 35 | { 36 | validationMap => 37 | source 38 | .via(CsvParsing.lineScanner()) 39 | .via(CsvToMap.toMapAsStrings()) 40 | .map(rows => DataTypeValidator.validateDataType(rows, validationMap)) 41 | .filter(errors => errors.nonEmpty) 42 | .runWith(Sink.seq).map(data => data.flatten.toList) 43 | .map(errors => DataTypeValidationErrors(errors)) 44 | .recover { 45 | case ex: Exception => ex.printStackTrace() 46 | val errorMessage = s"Error in processing data type validation for file $fileName" 47 | logger.error(errorMessage) 48 | DataTypeValidationErrors(Nil, Some(errorMessage)) 49 | } 50 | } 51 | } 52 | 53 | def getDataByColumns(filePath: String, columns: List[String]): Future[List[Map[String, String]]] = { 54 | val csvFile: Path = Paths.get(filePath) 55 | val source = FileIO.fromPath(csvFile) 56 | 57 | source 58 | .via(CsvParsing.lineScanner()) 59 | .via(CsvToMap.toMapAsStrings()) 60 | .map(row => { 61 | columns.flatMap(column => Map(column -> row(column))).toMap 62 | }) 63 | .runWith(Sink.seq).map(_.toList) 64 | .recover { 65 | case e: Exception => logger.error(s"Error in reading the file $filePath for integrity constraint validation") 66 | Nil 67 | } 68 | } 69 | } 70 | 71 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdo-validation-tool-scala/src/main/scala/com/rms/rdo/validation/datatype/DataTypeValidator.scala: -------------------------------------------------------------------------------- 1 | package com.rms.rdo.validation.datatype 2 | 3 | import com.rms.rdo.validation.constant.Constants 4 | import com.rms.rdo.validation.model.DataTypeValidationError 5 | 6 | import scala.util.Try 7 | 8 | object DataTypeValidator { 9 | 10 | def validateDataType(row: Map[String, String], 11 | validationMap: Map[String, String]): List[DataTypeValidationError] = { 12 | val columnNames = row.keySet.toList 13 | columnNames.flatMap { columnName => 14 | checkDataTypes(row(columnName), validationMap(columnName)) 15 | .map(error => DataTypeValidationError(columnName, row(columnName), error)) 16 | } 17 | } 18 | 19 | private def checkDataTypes(columnValue: String, dataType: String): Option[String] = { 20 | dataType match { 21 | case "Date" => Validator.validateDateAndTimeDataType(columnValue, Constants.DateFormats, dataType) 22 | case "Time" => Validator.validateDateAndTimeDataType(columnValue, Constants.TimeFormats, dataType) 23 | case "DateTime" => Validator.validateDateAndTimeDataType(columnValue, 24 | Constants.DateTimeFormats, dataType) 25 | case "Bit" => Validator.validateBitType(columnValue, dataType) 26 | case _ => validateNumericDataTypes(columnValue, dataType) 27 | } 28 | } 29 | 30 | private def validateNumericDataTypes(columnValue: String, dataType: String): Option[String] = { 31 | dataType match { 32 | case "Double" => Validator.validateNumericType(Try(columnValue.toDouble).toOption, dataType) 33 | case "Long" => Validator.validateNumericType(Try(columnValue.toLong).toOption, dataType) 34 | case "Byte" => Validator.validateNumericType(Try(columnValue.toByte).toOption, dataType) 35 | case "Short" => Validator.validateNumericType(Try(columnValue.toShort).toOption, dataType) 36 | case "Integer" => Validator.validateNumericType(Try(columnValue.toInt).toOption, dataType) 37 | case _ => None 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdo-validation-tool-scala/src/main/scala/com/rms/rdo/validation/datatype/Validator.scala: -------------------------------------------------------------------------------- 1 | package com.rms.rdo.validation.datatype 2 | 3 | import java.text.SimpleDateFormat 4 | 5 | object Validator { 6 | 7 | def validateNumericType[T](value: Option[T], dataType: String): Option[String] = { 8 | value match { 9 | case Some(_) => None 10 | case None => Some(s"The value is not a $dataType") 11 | } 12 | } 13 | 14 | def validateDateAndTimeDataType(value: String, formats: List[String], dataType: String): Option[String] = { 15 | val result = formats.flatMap(dateFormat => isDateValid(value, dateFormat, dataType)) 16 | if (result.length == formats.length) result.headOption else None 17 | } 18 | 19 | def validateBitType(value: String, dataType: String): Option[String] = { 20 | if (value == "0" || value == "1") None else Some(s"The value is not a $dataType") 21 | } 22 | 23 | private def isDateValid(value: String, formats: String, dataType: String): Option[String] = { 24 | try { 25 | val formatter = new SimpleDateFormat(formats) 26 | formatter.parse(value) 27 | None 28 | } catch { 29 | case _: Exception => Some(s"The value is not a $dataType") 30 | } 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdo-validation-tool-scala/src/main/scala/com/rms/rdo/validation/integrityconstraint/ForeignKeyValidator.scala: -------------------------------------------------------------------------------- 1 | package com.rms.rdo.validation.integrityconstraint 2 | 3 | import java.io.File 4 | 5 | import com.rms.rdo.validation.constant.Constants 6 | import com.rms.rdo.validation.csv.CsvReader 7 | import com.rms.rdo.validation.model.{ForeignKeyDetail, ForeignKeyError, ForeignKeyErrorDetail, IntegrityConstraint} 8 | import com.rms.rdo.validation.model 9 | 10 | import scala.concurrent.ExecutionContext.Implicits.global 11 | import scala.concurrent.Future 12 | 13 | class ForeignKeyValidator(csvReader: CsvReader) { 14 | 15 | def processForeignKeysValidation(foreignKeyFilePath: String, 16 | integrityConstraint: IntegrityConstraint, 17 | directoryPath: String): Future[Option[ForeignKeyErrorDetail]] = { 18 | val foreignKeyDetails = integrityConstraint.foreignKeys 19 | Future.sequence(foreignKeyDetails.map(detail => { 20 | val primaryKeyFilePath = s"$directoryPath/${detail.table}.csv" 21 | val primaryKeyFile = new File(primaryKeyFilePath) 22 | if (primaryKeyFile.exists()) { 23 | val primaryKeys = detail.columnMapping.keySet.toList 24 | val foreignKeys = detail.columnMapping.values.toList 25 | val primaryKeyDataResult = csvReader.getDataByColumns(primaryKeyFilePath, primaryKeys) 26 | val foreignKeyDataResult = csvReader.getDataByColumns(foreignKeyFilePath, foreignKeys) 27 | 28 | primaryKeyDataResult.flatMap(primaryKeyData => 29 | foreignKeyDataResult.map(foreignKeyData => 30 | validateForeignKeys(detail, 31 | primaryKeyData, 32 | foreignKeyData) 33 | )) 34 | } else Future.successful(Some(ForeignKeyError(detail.table, None, Some("File does not exist")))) 35 | })) 36 | .map(errors => if (errors.flatten.isEmpty) None 37 | else Some(model.ForeignKeyErrorDetail(Constants.ForeignKeyErrorMessage, errors.flatten))) 38 | } 39 | 40 | private def validateForeignKeys(detail: ForeignKeyDetail, 41 | primaryKeyData: List[Map[String, String]], 42 | foreignKeyData: List[Map[String, String]]): Option[ForeignKeyError] = { 43 | val mapping = detail.columnMapping 44 | val foreignKeys = detail.columnMapping.values.toList 45 | val updatedPrimaryKeyData = primaryKeyData.map(values => { 46 | values.map { case (key, value) => 47 | mapping.getOrElse(key, key) -> value 48 | } 49 | }) 50 | 51 | val errors = foreignKeyData.distinct diff updatedPrimaryKeyData 52 | if (errors.isEmpty) None else Some(ForeignKeyError(detail.table, Some(errors))) 53 | } 54 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdo-validation-tool-scala/src/main/scala/com/rms/rdo/validation/integrityconstraint/PrimaryKeyValidator.scala: -------------------------------------------------------------------------------- 1 | package com.rms.rdo.validation.integrityconstraint 2 | 3 | import com.rms.rdo.validation.constant.Constants 4 | import com.rms.rdo.validation.csv.CsvReader 5 | import com.rms.rdo.validation.model.{IntegrityConstraint, PrimaryKeyError, PrimaryKeyErrorDetail} 6 | 7 | import scala.concurrent.Future 8 | import scala.concurrent.ExecutionContext.Implicits.global 9 | 10 | class PrimaryKeyValidator(csvReader: CsvReader) { 11 | 12 | def processPrimaryKeysValidation(filePath: String, integrityConstraint: IntegrityConstraint): 13 | Future[Option[PrimaryKeyErrorDetail]] = { 14 | val primaryKeys = integrityConstraint.primaryKeys 15 | val primaryKeyData = csvReader.getDataByColumns(filePath, primaryKeys) 16 | primaryKeyData.map(values => { 17 | val nulErrors = validateNull(values) 18 | val duplicateErrors = validateDuplicateValues(values) 19 | if (nulErrors.isDefined || duplicateErrors.isDefined) 20 | Some(PrimaryKeyErrorDetail(List(nulErrors, duplicateErrors).flatten)) 21 | else None 22 | }) 23 | } 24 | 25 | private def validateNull(rows: List[Map[String, String]]): Option[PrimaryKeyError] = { 26 | val isNull = rows.exists(row => row.values.toList.contains(null)) 27 | if (isNull) { 28 | val columns = rows.head.keySet.mkString("-") 29 | Some(PrimaryKeyError(columns, Nil, Constants.PrimaryKeyNullValueErrorMessage)) 30 | } else None 31 | } 32 | 33 | private def validateDuplicateValues(rows: List[Map[String, String]]): Option[PrimaryKeyError] = { 34 | val duplicates = rows.groupBy(identity).collect { 35 | case (x, y) if y.lengthCompare(1) > 0 => x 36 | }.toList.map(res => res.values.mkString("-")) 37 | 38 | if (duplicates.nonEmpty) { 39 | val columns = rows.head.keySet.mkString("-") 40 | Some(PrimaryKeyError(columns, duplicates, Constants.PrimaryKeyDuplicateValueErrorMessage)) 41 | } else None 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdo-validation-tool-scala/src/main/scala/com/rms/rdo/validation/model/CDLValidationError.scala: -------------------------------------------------------------------------------- 1 | package com.rms.rdo.validation.model 2 | 3 | case class CDLValidationError(file: String, errorMessage: String) 4 | 5 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdo-validation-tool-scala/src/main/scala/com/rms/rdo/validation/model/DataTypeValidationError.scala: -------------------------------------------------------------------------------- 1 | package com.rms.rdo.validation.model 2 | 3 | case class DataTypeValidationError(columnName: String, columnValue: String, errorMessage: String) 4 | 5 | case class DataTypeValidationErrors(errors: List[DataTypeValidationError], 6 | message: Option[String] = None) -------------------------------------------------------------------------------- /rdos-validation-tools/rdo-validation-tool-scala/src/main/scala/com/rms/rdo/validation/model/IntegrityConstraint.scala: -------------------------------------------------------------------------------- 1 | package com.rms.rdo.validation.model 2 | 3 | case class IntegrityConstraint(primaryKeys: List[String], 4 | foreignKeys: List[ForeignKeyDetail]) 5 | 6 | case class ForeignKeyDetail(table: String, columnMapping: Map[String, String]) -------------------------------------------------------------------------------- /rdos-validation-tools/rdo-validation-tool-scala/src/main/scala/com/rms/rdo/validation/model/IntegrityConstraintValidationError.scala: -------------------------------------------------------------------------------- 1 | package com.rms.rdo.validation.model 2 | 3 | case class IntegrityConstraintValidationError(message: Option[String], 4 | primaryKey: Option[PrimaryKeyErrorDetail], 5 | foreignKey: Option[ForeignKeyErrorDetail]) 6 | 7 | case class PrimaryKeyError(columnName: String, columnValue: List[String], errorMessage: String) 8 | 9 | case class PrimaryKeyErrorDetail(errors: List[PrimaryKeyError]) 10 | 11 | case class ColumnDetails() 12 | 13 | case class ForeignKeyError(file: String, columnValues: Option[List[Map[String, String]]], 14 | message: Option[String] = None) 15 | 16 | case class ForeignKeyErrorDetail(errorMessage: String, errors: List[ForeignKeyError]) -------------------------------------------------------------------------------- /rdos-validation-tools/rdo-validation-tool-scala/src/main/scala/com/rms/rdo/validation/utility/Utility.scala: -------------------------------------------------------------------------------- 1 | package com.rms.rdo.validation.utility 2 | 3 | import java.io.{File, FileWriter} 4 | 5 | import com.fasterxml.jackson.annotation.JsonInclude.Include 6 | import com.fasterxml.jackson.databind.ObjectMapper 7 | import com.fasterxml.jackson.module.scala.DefaultScalaModule 8 | import com.fasterxml.jackson.module.scala.experimental.ScalaObjectMapper 9 | import org.slf4j.{Logger, LoggerFactory} 10 | 11 | import scala.io.Source 12 | 13 | object Utility { 14 | 15 | private val logger: Logger = LoggerFactory.getLogger(this.getClass) 16 | 17 | private val mapper = new ObjectMapper() with ScalaObjectMapper 18 | mapper.setSerializationInclusion(Include.NON_ABSENT) 19 | mapper.registerModule(DefaultScalaModule) 20 | 21 | def getValidationJson[T](fileName: String, validationType: String)(implicit m: Manifest[T]): Option[T] = { 22 | try { 23 | val validationJson = Source.fromResource(fileName) 24 | Some(mapper.readValue[T](validationJson.reader())) 25 | } catch { 26 | case _: Exception => logger.error(s"Error in parsing the $validationType json for file: $fileName") 27 | None 28 | } 29 | } 30 | 31 | def writeErrorsIntoFile[T](errors: T, filePath: String, validationTye: String): Boolean = { 32 | try { 33 | val writer = new FileWriter(new File(filePath + "_errors"), true) 34 | writer.append(s"============= $validationTye errors =================\n") 35 | writer.append(mapper.writerWithDefaultPrettyPrinter.writeValueAsString(errors) + "\n\n") 36 | writer.close() 37 | true 38 | } catch { 39 | case _: Exception => logger.error(s"Failure for writing errors in the file: $filePath") 40 | false 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdo-validation-tool-scala/src/test/resources/cdl/invalid.txt: -------------------------------------------------------------------------------- 1 | Contract123 2 | Declarations 3 | Currency is USD 4 | Covers 5 | 100% share 6 | Deductibles12 7 | 2% RCV Affected to R1, R2 -------------------------------------------------------------------------------- /rdos-validation-tools/rdo-validation-tool-scala/src/test/resources/cdl/valid.txt: -------------------------------------------------------------------------------- 1 | Contract 2 | Declarations 3 | Currency is USD 4 | Covers 5 | 100% share 6 | Deductibles 7 | 2% RCV Affected to R1, R2 -------------------------------------------------------------------------------- /rdos-validation-tools/rdo-validation-tool-scala/src/test/resources/csv/employee.csv: -------------------------------------------------------------------------------- 1 | id,name,age,sex 2 | 1,John,30,Male 3 | 2,Robert,20,Male 4 | 3,Michael,40,Male 5 | 4,Aish,25,Female 6 | 5,Jerry,30,Female 7 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdo-validation-tool-scala/src/test/resources/employee/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "Long", 3 | "name": "String", 4 | "age": "String", 5 | "sex": "String" 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdo-validation-tool-scala/src/test/resources/employee/emp.csv: -------------------------------------------------------------------------------- 1 | id,name,age,sex 2 | 1,John,30,Male 3 | 2,Robert,20,Male 4 | 3,Michael,40,Male 5 | 4,Aish,25,Female 6 | 5,Jerry,30,Female -------------------------------------------------------------------------------- /rdos-validation-tools/rdo-validation-tool-scala/src/test/resources/employee/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "id", 4 | "salary" 5 | ], 6 | "foreignKeys": [] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdo-validation-tool-scala/src/test/resources/invalid_data_type.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "Long", 3 | "name": "String", 4 | "salary": "Double", 5 | "empid": "Long", 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdo-validation-tool-scala/src/test/resources/invalid_integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "id", 4 | "salary", 5 | ], 6 | "foreignKeys": [] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdo-validation-tool-scala/src/test/resources/valid_data_type.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "Long", 3 | "name": "String", 4 | "salary": "Double", 5 | "empid": "Long" 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdo-validation-tool-scala/src/test/resources/valid_integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "id", 4 | "salary" 5 | ], 6 | "foreignKeys": [] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdo-validation-tool-scala/src/test/scala/com/rms/rdo/validation/cdl/CDLValidatorTest.scala: -------------------------------------------------------------------------------- 1 | package com.rms.rdo.validation.cdl 2 | 3 | import java.io.File 4 | 5 | import org.scalatest.funsuite.AsyncFunSuite 6 | 7 | class CDLValidatorTest extends AsyncFunSuite { 8 | 9 | test("should not be able to validate for wrong CDL file") { 10 | val result = CDLValidator.validateCDLFile(new File("")) 11 | assert(result.isEmpty) 12 | } 13 | 14 | test("validate valid CDL file") { 15 | val result = CDLValidator.validateCDLFile(new File("src/test/resources/cdl/valid.txt")) 16 | assert(result.isEmpty) 17 | } 18 | 19 | test("validate invalid CDL file") { 20 | val result = CDLValidator.validateCDLFile(new File("src/test/resources/cdl/invalid.txt")) 21 | assert(result.isDefined) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdo-validation-tool-scala/src/test/scala/com/rms/rdo/validation/csv/CsvReaderTest.scala: -------------------------------------------------------------------------------- 1 | package com.rms.rdo.validation.csv 2 | 3 | import java.io.File 4 | 5 | import akka.actor.ActorSystem 6 | import com.rms.rdo.validation.model.DataTypeValidationErrors 7 | import org.mockito.MockitoSugar 8 | import org.scalatest.funsuite.AsyncFunSuite 9 | 10 | class CsvReaderTest extends AsyncFunSuite with MockitoSugar { 11 | 12 | implicit val actorSystem: ActorSystem = ActorSystem("test") 13 | 14 | val csvReader = new CsvReader 15 | test("get data by columns successfully") { 16 | val filePath = "src/test/resources/csv/employee.csv" 17 | val result = csvReader.getDataByColumns(filePath, List("id", "age")) 18 | 19 | result.map(x => { 20 | assert(x.length == 5) 21 | assert(x.head.size == 2) 22 | }) 23 | } 24 | 25 | test("should get error while getting data by columns") { 26 | val filePath = "src/test/resources/csv/employee.csv" 27 | val result = csvReader.getDataByColumns(filePath, List("id", "address")) 28 | 29 | result.map(x => assert(x.isEmpty)) 30 | } 31 | 32 | test("should get data type validation config parsing error ") { 33 | val file = new File("src/test/resources/csv/department.csv") 34 | val result = csvReader.processDataTypeValidation(file) 35 | 36 | result.map(x => assert(x == DataTypeValidationErrors(Nil, 37 | Some( 38 | "Error in parsing the data type validation config file")))) 39 | } 40 | 41 | test("should get process data type validation successfully ") { 42 | val file = new File("src/test/resources/csv/employee.csv") 43 | val result = csvReader.processDataTypeValidation(file) 44 | 45 | result.map(x => assert(x == DataTypeValidationErrors(Nil, None))) 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdo-validation-tool-scala/src/test/scala/com/rms/rdo/validation/datatype/ValidatorTest.scala: -------------------------------------------------------------------------------- 1 | package com.rms.rdo.validation.datatype 2 | 3 | import com.rms.rdo.validation.constant.Constants 4 | import org.scalatest.funsuite.AnyFunSuite 5 | 6 | class ValidatorTest extends AnyFunSuite { 7 | 8 | test("value is an integer") { 9 | val result = Validator.validateNumericType(Some("2"), "Integer") 10 | assert(result.isEmpty) 11 | } 12 | 13 | test("value is not an integer") { 14 | val result = Validator.validateNumericType(None, "Integer") 15 | assert(result.isDefined) 16 | } 17 | 18 | test("value is a double") { 19 | val result = Validator.validateNumericType(Some("12.0"), "Double") 20 | assert(result.isEmpty) 21 | } 22 | 23 | test("value is not a double") { 24 | val result = Validator.validateNumericType(None, "Double") 25 | assert(result.isDefined) 26 | } 27 | 28 | test("value is a date with dd/MM/yyyy format") { 29 | val result = Validator.validateDateAndTimeDataType("16/01/2020", Constants.DateFormats, "Date") 30 | assert(result.isEmpty) 31 | } 32 | 33 | test("value is a date with MMM dd, yyyy format") { 34 | val result = Validator.validateDateAndTimeDataType("Jan 16, 2020", Constants.DateFormats, "Date") 35 | assert(result.isEmpty) 36 | } 37 | 38 | test("value is not a date") { 39 | val result = Validator.validateDateAndTimeDataType("Ja 16, 2020", Constants.DateFormats, "Date") 40 | assert(result.isDefined) 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdo-validation-tool-scala/src/test/scala/com/rms/rdo/validation/integrityconstraint/PrimaryKeyValidatorTest.scala: -------------------------------------------------------------------------------- 1 | package com.rms.rdo.validation.integrityconstraint 2 | 3 | import com.rms.rdo.validation.csv.CsvReader 4 | import com.rms.rdo.validation.model.IntegrityConstraint 5 | import org.mockito.MockitoSugar 6 | import org.scalatest.funsuite.AsyncFunSuite 7 | 8 | import scala.concurrent.Future 9 | 10 | class PrimaryKeyValidatorTest extends AsyncFunSuite with MockitoSugar { 11 | 12 | private val csvReader = mock[CsvReader] 13 | private val primaryKeyValidator = new PrimaryKeyValidator(csvReader) 14 | 15 | test("validate primary key for duplicate values") { 16 | val integrityConstraint = IntegrityConstraint(List("id"), Nil) 17 | val data = List(Map("id" -> "1"), Map("id" -> "2"), Map("id" -> "1"), Map("id" -> "2")) 18 | 19 | when(csvReader.getDataByColumns("test.csv", List("id"))).thenReturn(Future.successful(data)) 20 | 21 | val result = primaryKeyValidator.processPrimaryKeysValidation("test.csv", integrityConstraint) 22 | result map (errors => assert(errors.get.errors.length == 1)) 23 | } 24 | 25 | test("validate primary key for null values") { 26 | val integrityConstraint = IntegrityConstraint(List("id"), Nil) 27 | val data = List(Map("id" -> "1"), Map("id" -> null), Map("id" -> "3"), Map("id" -> "2")) 28 | 29 | when(csvReader.getDataByColumns("test.csv", List("id"))).thenReturn(Future.successful(data)) 30 | 31 | val result = primaryKeyValidator.processPrimaryKeysValidation("test.csv", integrityConstraint) 32 | result map (errors => assert(errors.get.errors.length == 1)) 33 | } 34 | 35 | test("validate primary key for no errors") { 36 | val integrityConstraint = IntegrityConstraint(List("id"), Nil) 37 | val data = List(Map("id" -> "1"), Map("id" -> "4"), Map("id" -> "3"), Map("id" -> "2")) 38 | 39 | when(csvReader.getDataByColumns("test.csv", List("id"))).thenReturn(Future.successful(data)) 40 | 41 | val result = primaryKeyValidator.processPrimaryKeysValidation("test.csv", integrityConstraint) 42 | result map (errors => assert(errors.isEmpty)) 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdo-validation-tool-scala/src/test/scala/com/rms/rdo/validation/utility/UtilityTest.scala: -------------------------------------------------------------------------------- 1 | package com.rms.rdo.validation.utility 2 | 3 | import java.io.File 4 | 5 | import com.rms.rdo.validation.constant.Constants 6 | import com.rms.rdo.validation.model.{DataTypeValidationError, DataTypeValidationErrors, IntegrityConstraint} 7 | import org.scalatest.BeforeAndAfterAll 8 | import org.scalatest.funsuite.AnyFunSuite 9 | 10 | class UtilityTest extends AnyFunSuite with BeforeAndAfterAll { 11 | 12 | override def afterAll(): Unit = { 13 | new File("src/test/resources/emp_errors").delete() 14 | } 15 | 16 | test("get validate data type json successfully") { 17 | val result = Utility.getValidationJson[Map[String, String]]("valid_data_type.json", 18 | Constants.DataTypeValidationType) 19 | assert(result.isDefined) 20 | } 21 | 22 | test("did not get validate data type json") { 23 | val result = Utility.getValidationJson[Map[String, String]]("invalid_data_type.json", 24 | Constants.DataTypeValidationType) 25 | assert(result.isEmpty) 26 | } 27 | 28 | test("get validate integrity constraint json successfully") { 29 | val result = Utility.getValidationJson[IntegrityConstraint]("valid_integrity_constraints.json", 30 | Constants.IntegrityConstraintValidationType) 31 | assert(result.isDefined) 32 | } 33 | 34 | test("did not get validate integrity constraint json") { 35 | val result = Utility.getValidationJson[IntegrityConstraint]("invalid_integrity_constraints.json", 36 | Constants.IntegrityConstraintValidationType) 37 | assert(result.isEmpty) 38 | } 39 | 40 | test("should get failure while writing errors in json file") { 41 | val error = DataTypeValidationErrors(List(DataTypeValidationError("accountId", 42 | "123abc", 43 | "The value is not a Time"))) 44 | val result = Utility.writeErrorsIntoFile(error, "src/test/resources/1/q", Constants.DataTypeValidationType) 45 | assert(!result) 46 | } 47 | 48 | test("should be able to write errors in json file") { 49 | val error = DataTypeValidationErrors(List(DataTypeValidationError("accountId", 50 | "123abc", 51 | "The value is not a Time"))) 52 | val result = Utility.writeErrorsIntoFile(error, "src/test/resources/emp", Constants.DataTypeValidationType) 53 | assert(result) 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | com.rms 7 | rdos-validation-tools 8 | 1.0.0 9 | 10 | rdos-schema 11 | jar 12 | 13 | UTF-8 14 | 15 | 16 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Address/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "id":"Long", 3 | "addressSchemeId":"Short", 4 | "exposureSetId":"Long", 5 | "externalId":"String", 6 | "UGId":"String", 7 | "source":"String", 8 | "latitude":"Double", 9 | "longitude":"Double", 10 | "addressText":"String", 11 | "campusCorrelationId":"Long", 12 | "countryCode":"String", 13 | "countryName":"String", 14 | "countryGeoId":"Integer", 15 | "countryScheme":"String", 16 | "countryModelCode":"String", 17 | "zone1Code":"String", 18 | "zone1Name":"String", 19 | "zone2Code":"String", 20 | "zone1GeoId":"Long", 21 | "zone2Name":"String", 22 | "zone2GeoId":"Long", 23 | "zone3Code":"String", 24 | "zone3Name":"String", 25 | "zone3GeoId":"Long", 26 | "zone4Code":"String", 27 | "zone4Name":"String", 28 | "zone4GeoId":"Long", 29 | "zone5Code":"String", 30 | "zone5Name":"String", 31 | "zone5GeoId":"Long", 32 | "admin1Code":"String", 33 | "admin1Name":"String", 34 | "admin1GeoId":"Long", 35 | "admin2Code":"String", 36 | "admin2Name":"String", 37 | "admin2GeoId":"Long", 38 | "admin3Code":"String", 39 | "admin3Name":"String", 40 | "admin3GeoId":"Long", 41 | "admin4Code":"String", 42 | "admin4Name":"String", 43 | "admin4GeoId":"Long", 44 | "admin5Code":"String", 45 | "admin5Name":"String", 46 | "admin5GeoId":"Long", 47 | "cityCode":"String", 48 | "cityName":"String", 49 | "cityGeoId":"Long", 50 | "cityPreferred":"String", 51 | "postalCode":"String", 52 | "postalCodeGeoId":"Long", 53 | "postalCode1GeoId":"Long", 54 | "postalCode2GeoId":"Long", 55 | "postalCode3GeoId":"Long", 56 | "postalCode4GeoId":"Long", 57 | "locationCode":"String", 58 | "locationCodeGeoId":"Long", 59 | "census1Code":"String", 60 | "census1Name":"String", 61 | "census1GeoId":"Long", 62 | "census2Code":"String", 63 | "census2Name":"String", 64 | "census2GeoId":"Long", 65 | "streetAddress":"String", 66 | "streetIsIntersection":"String", 67 | "streetGeoId":"Long", 68 | "streetType":"String", 69 | "parcelName":"String", 70 | "parcelNumber":"String", 71 | "parcelGeoId":"Long", 72 | "pointOfInterestFirmName":"String", 73 | "pointOfInterestName":"String", 74 | "pointOfInterestGeoId":"Long", 75 | "pointOfInterestType":"String", 76 | "buildingId":"String", 77 | "buildingName":"String", 78 | "buildingGeoId":"Long", 79 | "unitNumber":"String", 80 | "isSubmittedAddress":"Integer", 81 | "geocodingDataSourceId":"Short", 82 | "quadKey":"Long", 83 | "geoProductVersion":"String", 84 | "ACORDResolutionCode":"String", 85 | "geocodingLocationCode":"String", 86 | "geocodingMatchCode":"String", 87 | "geoModelResolutionCode":"Short", 88 | "geocodingMatchConfidence":"Double", 89 | "sublocality":"String", 90 | "uncertainty":"DOuble", 91 | "uncertaintyBuffer":"Double", 92 | "geoCodedDate":"DateTime" 93 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Address/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "id" 4 | ], 5 | "foreignKeys": [ 6 | { 7 | "table": "ExposureSet", 8 | "columnMapping": { 9 | "id": "exposureSetId" 10 | } 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/AddressScheme/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "addressSchemeId":"Short", 3 | "addressSchemeName":"String", 4 | "addressSchemeDesc":"String", 5 | "isActive":"Bit", 6 | "externalId":"String" 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/AddressScheme/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "addressSchemeId" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Admin1/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "admin1GeoId":"Long", 3 | "countryGeoId":"Integer", 4 | "admin1Code":"String", 5 | "admin1Name":"String", 6 | "isActive":"Bit", 7 | "externalId":"String" 8 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Admin1/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "admin1GeoId" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Admin2/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "admin2GeoId":"Long", 3 | "admin1GeoId":"Long", 4 | "countryGeoId":"Integer", 5 | "admin2Code":"String", 6 | "admin2Name":"String", 7 | "cresta":"String", 8 | "isActive":"Bit", 9 | "externalId":"String" 10 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Admin2/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "admin2GeoId" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Admin3/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "admin3GeoId":"Long", 3 | "admin2GeoId":"Long", 4 | "admin1GeoId":"Long", 5 | "countryGeoId":"Long", 6 | "admin3Code":"String", 7 | "admin3Name":"String", 8 | "cresta":"String", 9 | "isActive":"Bit", 10 | "externalId":"String" 11 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Admin3/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "admin3GeoId" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Admin4/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "admin4GeoId":"Long", 3 | "admin3GeoId":"Long", 4 | "admin2GeoId":"Long", 5 | "admin1GeoId":"Long", 6 | "countryGeoId":"Long", 7 | "admin4Code":"String", 8 | "admin4Name":"String", 9 | "cresta":"String", 10 | "isActive":"Bit", 11 | "externalId":"String" 12 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Admin4/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "admin4GeoId" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Admin5/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "admin5GeoId":"Long", 3 | "admin4GeoId":"Long", 4 | "admin3GeoId":"Long", 5 | "admin2GeoId":"Long", 6 | "admin1GeoId":"Long", 7 | "countryGeoId":"Long", 8 | "admin5Code":"String", 9 | "admin5Name":"String", 10 | "CRESTA":"String", 11 | "isActive":"Bit", 12 | "externalId":"String" 13 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Admin5/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "admin5GeoId" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/AggregatePortfolioMembership/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "id":"Long", 3 | "portfolioId":"Long", 4 | "exposureSetId":"Long", 5 | "countryCode":"String", 6 | "admin1Code":"String", 7 | "admin2Code":"String", 8 | "cresta":"String", 9 | "postalCode":"String", 10 | "riskCount":"Long", 11 | "totalReplacementCostValue":"Double", 12 | "currencyCode":"Char", 13 | "lossTypeCode":"String", 14 | "causeOfLossCode":"String", 15 | "contractLineOfBusinessCode":"String", 16 | "totalPremium":"Double", 17 | "totalLimit":"Double", 18 | "averageDeductible":"Double" 19 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/AggregatePortfolioMembership/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "id" 4 | ], 5 | "foreignKeys": [ 6 | { 7 | "table": "Portfolio", 8 | "columnMapping": { 9 | "id": "portfolioId" 10 | } 11 | }, 12 | { 13 | "table": "ExposureSet", 14 | "columnMapping": { 15 | "id": "exposureSetId" 16 | } 17 | } 18 | ] 19 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/AmountBasis/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "amountBasisCode":"String", 3 | "amountBasisDesc":"String", 4 | "isActive":"Bit" 5 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/AmountBasis/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "amountBasisCode" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Analysis/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "Long", 3 | "name": "String", 4 | "settingTypeCode": "String", 5 | "settingsId": "Long" 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Analysis/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "id", 4 | "settingsId" 5 | ], 6 | "foreignKeys": [ 7 | ] 8 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/AnalysisHierarchy/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "analysisId": "Long", 3 | "childAnalysisId": "Long" 4 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/AnalysisHierarchy/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "analysisId", 4 | "childAnalysisId" 5 | ], 6 | "foreignKeys": [ 7 | ] 8 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/AnalysisMap/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "analysisId": "Long", 3 | "resultId": "Long" 4 | } 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/AnalysisMap/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "analysisId", 4 | "resultsId" 5 | ], 6 | "foreignKeys": [ 7 | ] 8 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/AreaUnit/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "areaUnitCode":"Byte", 3 | "areaUnitdesc":"String" 4 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/AreaUnit/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "areaUnitCode" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/AttachmentBasis/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "attachmentBasisCode":"String", 3 | "attachmentBasisDesc":"String", 4 | "isActive":"Bit", 5 | "externalId":"String" 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/AttachmentBasis/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "attachmentBasisCode" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/AttachmentLevel/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "attachmentLevelCode":"String", 3 | "attachmentLevelDesc":"String", 4 | "isActive":"Bit", 5 | "externalId":"String" 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/AttachmentLevel/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "attachmentLevelCode" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/BIPreparedness/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "countryGeoId":"Integer", 3 | "optionDesc":"String", 4 | "optionValue":"Short", 5 | "isActive":"Bit", 6 | "externalId":"String" 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/BIPreparedness/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "countryGeoId", 4 | "optionValue" 5 | ], 6 | "foreignKeys": [ 7 | ] 8 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/BIRedundancy/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "countryGeoId":"Integer", 3 | "optionDesc":"String", 4 | "optionValue":"Short", 5 | "isActive":"Bit", 6 | "externalId":"String" 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/BIRedundancy/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "countryGeoId", 4 | "optionValue" 5 | ], 6 | "foreignKeys": [ 7 | ] 8 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Basement/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "countryGeoId":"Integer", 3 | "optionDesc":"String", 4 | "optionValue":"Short", 5 | "isActive":"Bit", 6 | "externalId":"String" 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Basement/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "countryGeoId", 4 | "optionValue" 5 | ], 6 | "foreignKeys": [ 7 | ] 8 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/CauseOfLoss/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "causeOfLossCode":"Char", 3 | "causeOfLossDesc":"String", 4 | "isActive":"Bit", 5 | "externalId":"String" 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/CauseOfLoss/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "causeOfLossCode" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/CauseOfLossHierarchy/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "causeOfLossCode":"Char", 3 | "parentCauseOfLossCode":"Char" 4 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/CauseOfLossHierarchy/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "causeOfLossCode", 4 | "parentCauseOfLossCode" 5 | ], 6 | "foreignKeys": [ 7 | { 8 | "table": "CauseOfLoss", 9 | "columnMapping": { 10 | "causeOfLossCode": "causeOfLossCode, parentCauseOfLossCode" 11 | } 12 | } 13 | ] 14 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/CharacteristicsScheme/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "characteristicsSchemeCode":"String", 3 | "characteristicsSchemeDesc":"String", 4 | "isActive":"Bit", 5 | "externalId":"String" 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/CharacteristicsScheme/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "characteristicsSchemeCode" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/City/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "cityGeoId":"Long", 3 | "countryGeoId":"Long", 4 | "cityCode":"String", 5 | "cityName":"String", 6 | "isActive":"Bit", 7 | "externalId":"String" 8 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/City/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "cityGeoId" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/CommercialAppurtenant/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "countryGeoId":"Integer", 3 | "optionDesc":"String", 4 | "optionValue":"Short", 5 | "isActive":"Bit", 6 | "externalId":"String" 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/CommercialAppurtenant/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "countryGeoId", 4 | "optionValue" 5 | ], 6 | "foreignKeys": [ 7 | ] 8 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Construction/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "constructionschemeName":"String", 3 | "constructionCode":"String", 4 | "constructionName":"String", 5 | "constructionBandName":"String", 6 | "isActive":"Bit", 7 | "externalId":"String" 8 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Construction/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "constructionschemeName", 4 | "constructionCode" 5 | ], 6 | "foreignKeys": [ 7 | ] 8 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/ContentsVulnWater/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "countryGeoId":"Integer", 3 | "optionDesc":"String", 4 | "optionValue":"Short", 5 | "isActive":"Bit", 6 | "externalId":"String" 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/ContentsVulnWater/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "countryGeoId", 4 | "optionValue" 5 | ], 6 | "foreignKeys": [ 7 | ] 8 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/ContentsVulnWind/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "countryGeoId":"Integer", 3 | "optionDesc":"String", 4 | "optionValue":"Short", 5 | "isActive":"Bit", 6 | "externalId":"String" 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/ContentsVulnWind/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "countryGeoId", 4 | "optionValue" 5 | ], 6 | "foreignKeys": [ 7 | ] 8 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Contract/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "Long", 3 | "name": "String" 4 | } 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Contract/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | ] 4 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/ContractBranch/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "contractBranchCode":"String", 3 | "contractBranchName":"String", 4 | "isActive":"Bit", 5 | "externalId":"String" 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/ContractBranch/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "contractBranchCode" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/ContractCDL/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "contractId": "Long", 3 | "CDL": "String" 4 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/ContractCDL/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "contractId" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/ContractCedant/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "contractCedantCode":"String", 3 | "contractCedantName":"String", 4 | "isActive":"Bit", 5 | "externalId":"String" 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/ContractCedant/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "contractCedantCode" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/ContractDeclaration/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "contractId":"Long", 3 | "contractLayerId":"Long", 4 | "contractScopeCode":"String", 5 | "contractCedantCode":"String", 6 | "reinsurerCode":"String", 7 | "underwriterShortName":"String", 8 | "producerShortName":"String", 9 | "branchShortName":"String", 10 | "brokerShortName":"String" 11 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/ContractDeclaration/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | ], 4 | "foreignKeys": [ 5 | ] 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/ContractScope/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "contractScopeCode":"String", 3 | "contractScopeDesc":"String", 4 | "isActive":"Bit", 5 | "externalId":"String" 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/ContractScope/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "contractScopeCode" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/ContractStatus/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "contractStatusCode":"Char", 3 | "contractStatusDesc":"String", 4 | "isActive":"Bit", 5 | "externalId":"String" 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/ContractStatus/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "contractStatusCode" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/ContractSubjectType/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "contractSubjectTypeCode":"String", 3 | "contractSubjectDesc":"String", 4 | "isActive":"Bit", 5 | "externalId":"String" 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/ContractSubjectType/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "contractSubjectTypeCode" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/ContractType/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "contractTypeCode":"String", 3 | "contractTypeDesc":"String", 4 | "parentContractTypeCode":"String", 5 | "isInsurance":"Bit", 6 | "isActive":"Bit", 7 | "externalId":"String" 8 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/ContractType/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "contractTypeCode" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/ContractUnderwriter/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "contractUnderwriterCode":"String", 3 | "contractUnderwriterName":"String", 4 | "isActive":"Bit", 5 | "externalId":"String" 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/ContractUnderwriter/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "contractUnderwriterCode" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Contract_Facultative/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "id":"Long", 3 | "exposureSetId":"Long", 4 | "name":"String", 5 | "number":"String", 6 | "inceptionDate":"Date", 7 | "expirationDate":"Date", 8 | "producerCode":"String", 9 | "cedantCode":"String", 10 | "lossTypeCodes":"String", 11 | "causeOfLossCodes":"String", 12 | "lineOfBusinessCodes":"String", 13 | "premium":"Double", 14 | "excessAmount":"Double", 15 | "excessCurrencyCode":"Char", 16 | "limitAmount":"Double", 17 | "limitCurrency":"Char", 18 | "share":"Double", 19 | "inuringPriority":"Short" 20 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Contract_Facultative/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "id" 4 | ], 5 | "foreignKeys": [ 6 | { 7 | "table": "ExposureSet", 8 | "columnMapping": { 9 | "id": "exposureSetId" 10 | } 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Contract_Insurance/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "id":"Long", 3 | "exposureSetId":"Long", 4 | "externalId":"String", 5 | "name":"String", 6 | "number":"String", 7 | "description":"String", 8 | "statusCode":"String", 9 | "insuranceContractTypeCode":"String", 10 | "subjectId":"Long", 11 | "subjectName":"String", 12 | "subjectScopeCode":"String", 13 | "renewalExternalId":"String", 14 | "brokerage":"Double" 15 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Contract_Insurance/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "id" 4 | ], 5 | "foreignKeys": [ 6 | { 7 | "table": "ExposureSet", 8 | "columnMapping": { 9 | "id": "exposureSetId" 10 | } 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Contract_Treaty/data_type_validation.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "id":"Long", 4 | "name":"String", 5 | "number":"String", 6 | "externalId":"String", 7 | "treatyTypeCode":"String", 8 | "depositPremium":"Double", 9 | "depositPremiumCurrencyCode":"Char", 10 | "taxRate":"Double", 11 | "brokerageRate":"Double", 12 | "variableExpenseRate":"Double", 13 | "lossAdjustmentExpenseRate":"Double", 14 | "fixedExpense":"Double", 15 | "inuringPriority":"Short", 16 | "attachmentLevelCode":"String", 17 | "attachmentBasisCode":"String", 18 | "percentRetention":"Double", 19 | "percentShare":"Double" 20 | } 21 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Contract_Treaty/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "id" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Country/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "countryGeoId":"Integer", 3 | "countryCode":"String", 4 | "countryName":"String", 5 | "iso2a":"String", 6 | "iso3a":"String", 7 | "iso3n":"String", 8 | "fips":"String", 9 | "cresta":"String", 10 | "countryModelCode":"String", 11 | "countryModelName":"String", 12 | "isActive":"Bit", 13 | "externalId":"String" 14 | } 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Country/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "countryCode" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Currency/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "currencyCode":"Char", 3 | "currencyName":"String", 4 | "countryName":"String", 5 | "currencySymbol":"Nvarchar", 6 | "isActive":"Bit", 7 | "externalId":"String" 8 | } 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Currency/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "currencyCode" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/CurrencyExchangeRate/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "currencyCode":"Char", 3 | "effectiveDate":"DateTime", 4 | "exchangeRate":"Double" 5 | } 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/CurrencyExchangeRate/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | ], 4 | "foreignKeys": [ 5 | ] 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/DistanceUnit/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "distanceUnitCode":"Byte", 3 | "distanceUnitDesc":"String" 4 | } 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/DistanceUnit/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "distanceUnitCode" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/EmergencyProtectionProximity/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "emergencyProtectionProxCode":"Short", 3 | "emergencyProtectionProxDesc":"String", 4 | "isActive":"Bit", 5 | "externalId":"String" 6 | } 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/EmergencyProtectionProximity/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "emergencyProtectionProxCode" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/EngineeredFoundation/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "countryGeoId":"Integer", 3 | "optionDesc":"String", 4 | "optionValue":"Short", 5 | "isActive":"Bit", 6 | "externalId":"String" 7 | } 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/EngineeredFoundation/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "countryGeoId", 4 | "optionValue" 5 | ], 6 | "foreignKeys": [ 7 | ] 8 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/ExposureSet/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "Long", 3 | "name": "String", 4 | "externalId": "String", 5 | "description": "String", 6 | "createUserId": "String", 7 | "createDate": "DateTime", 8 | "updateUserId": "String", 9 | "updateDate": "DateTime" 10 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/ExposureSet/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "id" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Exterior/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "countryGeoId":"Integer", 3 | "optionDesc":"String", 4 | "optionValue":"Short", 5 | "isActive":"Bit", 6 | "externalId":"String" 7 | } 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Exterior/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "countryGeoId", 4 | "optionValue" 5 | ], 6 | "foreignKeys": [ 7 | ] 8 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/ExteriorRating/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "countryGeoId":"Integer", 3 | "optionDesc":"String", 4 | "optionValue":"Short", 5 | "isActive":"Bit", 6 | "externalId":"String" 7 | } 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/ExteriorRating/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "countryGeoId", 4 | "optionValue" 5 | ], 6 | "foreignKeys": [ 7 | ] 8 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/ExternalOrnamentation/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "countryGeoId":"Integer", 3 | "optionDesc":"String", 4 | "optionValue":"Short", 5 | "isActive":"Bit", 6 | "externalId":"String" 7 | } 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/ExternalOrnamentation/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "countryGeoId", 4 | "optionValue" 5 | ], 6 | "foreignKeys": [ 7 | ] 8 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/FacultativeCession/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "id":"Long", 3 | "facultativeId":"Long", 4 | "excessAmount":"Double", 5 | "excessCurrencyCode":"Char", 6 | "limitAmount":"Double", 7 | "limitCurrency":"Char", 8 | "share":"Double", 9 | "subjectTypeCode":"String", 10 | "subjectInsuranceContractId":"Long", 11 | "subjectInsuranceLayerId":"Long", 12 | "subjectRiskId":"Long" 13 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/FacultativeCession/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "id" 4 | ], 5 | "foreignKeys": [ 6 | { 7 | "table": "Facultative", 8 | "columnMapping": { 9 | "id": "facultativeId" 10 | } 11 | }, 12 | { 13 | "table": "Contract_Insurance", 14 | "columnMapping": { 15 | "id": "subjectInsuranceContractId" 16 | } 17 | }, 18 | { 19 | "table": "InsuranceLayer", 20 | "columnMapping": { 21 | "id": "subjectInsuranceLayerId" 22 | } 23 | }, 24 | { 25 | "table": "Risk", 26 | "columnMapping": { 27 | "id": "subjectRiskId" 28 | } 29 | } 30 | ] 31 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/FireRemoteAlarmPresence/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "countryGeoId":"Integer", 3 | "optionDesc":"String", 4 | "optionValue":"Short", 5 | "isActive":"Bit", 6 | "externalId":"String" 7 | } 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/FireRemoteAlarmPresence/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "countryGeoId", 4 | "optionValue" 5 | ], 6 | "foreignKeys": [ 7 | ] 8 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/FireSprinklerPresence/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "countryGeoId":"Integer", 3 | "optionDesc":"String", 4 | "optionValue":"Short", 5 | "isActive":"Bit", 6 | "externalId":"String" 7 | } 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/FireSprinklerPresence/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "countryGeoId", 4 | "optionValue" 5 | ], 6 | "foreignKeys": [ 7 | ] 8 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/FireSprinklerSystem/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "countryGeoId":"Integer", 3 | "optionDesc":"String", 4 | "optionValue":"Short", 5 | "isActive":"Bit", 6 | "externalId":"String" 7 | } 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/FireSprinklerSystem/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "countryGeoId", 4 | "optionValue" 5 | ], 6 | "foreignKeys": [ 7 | ] 8 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/FireSuppression/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "countryGeoId":"Integer", 3 | "optionDesc":"String", 4 | "optionValue":"Short", 5 | "isActive":"Bit", 6 | "externalId":"String" 7 | } 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/FireSuppression/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "countryGeoId", 4 | "optionValue" 5 | ], 6 | "foreignKeys": [ 7 | ] 8 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/FloodMissile/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "countryGeoId":"Integer", 3 | "optionDesc":"String", 4 | "optionValue":"Short", 5 | "isActive":"Bit", 6 | "externalId":"String" 7 | } 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/FloodMissile/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "countryGeoId", 4 | "optionValue" 5 | ], 6 | "foreignKeys": [ 7 | ] 8 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/FloodProtection/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "countryGeoId":"Integer", 3 | "optionDesc":"String", 4 | "optionValue":"Short", 5 | "isActive":"Bit", 6 | "externalId":"String" 7 | } 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/FloodProtection/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "countryGeoId", 4 | "optionValue" 5 | ], 6 | "foreignKeys": [ 7 | ] 8 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/FloodType/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "countryGeoId":"Integer", 3 | "optionDesc":"String", 4 | "optionValue":"Short", 5 | "isActive":"Bit", 6 | "externalId":"String" 7 | } 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/FloodType/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "countryGeoId", 4 | "optionValue" 5 | ], 6 | "foreignKeys": [ 7 | ] 8 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/FloorType/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "countryGeoId":"Integer", 3 | "optionDesc":"String", 4 | "optionValue":"Short", 5 | "isActive":"Bit", 6 | "externalId":"String" 7 | } 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/FloorType/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "countryGeoId", 4 | "optionValue" 5 | ], 6 | "foreignKeys": [ 7 | ] 8 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/FoundationType/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "countryGeoId":"Integer", 3 | "optionDesc":"String", 4 | "optionValue":"Short", 5 | "isActive":"Bit", 6 | "externalId":"String" 7 | } 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/FoundationType/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "countryGeoId", 4 | "optionValue" 5 | ], 6 | "foreignKeys": [ 7 | ] 8 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/FrameFoundationConnection/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "countryGeoId":"Integer", 3 | "optionDesc":"String", 4 | "optionValue":"Short", 5 | "isActive":"Bit", 6 | "externalId":"String" 7 | } 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/FrameFoundationConnection/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "countryGeoId", 4 | "optionValue" 5 | ], 6 | "foreignKeys": [ 7 | ] 8 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Garaging/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "countryGeoId":"Integer", 3 | "optionDesc":"String", 4 | "optionValue":"Short", 5 | "isActive":"Bit", 6 | "externalId":"String" 7 | } 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Garaging/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "countryGeoId", 4 | "optionValue" 5 | ], 6 | "foreignKeys": [ 7 | ] 8 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/GeoModelResolution/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "geoModelResolutionCode":"Short", 3 | "geoModelResolutionDesc":"String", 4 | "isActive":"Bit", 5 | "externalId":"String" 6 | } 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/GeoModelResolution/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "geoModelResolutionCode" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/GeocodingDataSource/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "geocodingDataSourceId":"Short", 3 | "geocodingDataSourceName":"String", 4 | "isActive":"Bit", 5 | "externalId":"String" 6 | } 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/GeocodingDataSource/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "geocodingDataSourceId" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/GeocodinglResolution/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "geocodingResolutionCode":"Short", 3 | "geocodingResolutionDesc":"String", 4 | "isActive":"Bit", 5 | "externalId":"String" 6 | } 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/GeocodinglResolution/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "geocodingResolutionCode" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Granularity/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "granularityCode":"String", 3 | "granularityDesc":"String", 4 | "isActive":"Bit", 5 | "externalId":"String" 6 | } 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Granularity/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "granularityCode" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/HazardousMaterial/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "hazardousMaterialCode":"Integer", 3 | "hazardousMaterialDesc":"String", 4 | "isActive":"Bit", 5 | "externalId":"String" 6 | } 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/HazardousMaterial/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "hazardousMaterialCode" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/InsuranceLayer/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "id":"Long", 3 | "externalId":"String", 4 | "insuranceContractId":"Long", 5 | "name":"String", 6 | "number":"String", 7 | "description":"String", 8 | "inceptionDate":"Date", 9 | "expirationDate":"Date", 10 | "contractLineOfBusinessCode":"String", 11 | "premium":"DOuble", 12 | "premiumCurrencyCode":"String", 13 | "tax":"Double", 14 | "payoutShare": "Double", 15 | "payoutFunctionCode":"String", 16 | "payoutAmount":"Double", 17 | "payoutAmountBasisCode":"String", 18 | "payoutTimeBasisCode":"String", 19 | "payoutCurrencyCode":"Char", 20 | "excessIsFranchise":"Bit", 21 | "excessAmount":"Integer", 22 | "excessAmountBasisCode":"String", 23 | "excessTimeBasisCode":"String", 24 | "excessCurrencyCode":"Char", 25 | "lossTypeCode":"String", 26 | "causeOfLossCode":"String", 27 | "subjectId":"Long", 28 | "subjectScopeCode":"String", 29 | "subjectResolutionCode":"String" 30 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/InsuranceLayer/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "id" 4 | ], 5 | "foreignKeys": [ 6 | { 7 | "table": "Contract_Insurance", 8 | "columnMapping": { 9 | "id": "insuranceContractId" 10 | } 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/InsuranceTerm/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "id":"Long", 3 | "insuranceContractId":"Long", 4 | "termTypeCode":"String", 5 | "amount":"Double", 6 | "amountBasisCode":"String", 7 | "timeBasisCode":"String", 8 | "currencyCode":"Char", 9 | "lossTypeCode":"String", 10 | "causeOfLossCode":"String", 11 | "subjectId":"Long", 12 | "subjectScopeCode":"String", 13 | "subjectResolutionCode":"String" 14 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/InsuranceTerm/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "id" 4 | ], 5 | "foreignKeys": [ 6 | { 7 | "table": "Contract_Insurance", 8 | "columnMapping": { 9 | "id": "insuranceContractId" 10 | } 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Insured/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "insuredCode":"String", 3 | "insuredDesc":"String", 4 | "isActive":"Bit", 5 | "externalId":"String" 6 | } 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Insured/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "insuredCode" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Insurer/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "insurerCode":"String", 3 | "insurerDesc":"String", 4 | "isActive":"Bit", 5 | "externalId":"String" 6 | } 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Insurer/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "insurerCode" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/LineOfBusiness/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "lineOfBusinessCode":"String", 3 | "lineOfBusinessDesc":"String", 4 | "isActive":"Bit", 5 | "externalId":"String" 6 | } 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/LineOfBusiness/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "lineOfBusinessCode" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/LossType/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "lossTypeCode":"String", 3 | "lossTypeDesc":"String", 4 | "isActive":"Bit", 5 | "externalId":"String" 6 | } 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/LossType/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "lossTypeCode" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/LossTypeHierarchy/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "lossTypeCode":"String", 3 | "parentLossTypeCode": "String" 4 | } 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/LossTypeHierarchy/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "lossTypeCode", 4 | "parentLossTypeCode" 5 | ], 6 | "foreignKeys": [ 7 | ] 8 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/MEPPlumbing/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "countryGeoId": "Integer", 3 | "optionDesc": "String", 4 | "optionValue": "Short", 5 | "isActive": "Bit", 6 | "externalId": "String" 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/MEPPlumbing/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "countryGeoId", "optionValue" 4 | ], 5 | "foreignKeys": [] 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/MarineProtection/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "countryGeoId": "Integer", 3 | "optionDesc": "String", 4 | "optionValue": "Short", 5 | "isActive": "Bit", 6 | "externalId": "String" 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/MarineProtection/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "countryGeoId", "optionValue" 4 | ], 5 | "foreignKeys": [] 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Occupancy/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "occupancyschemeName": "String", 3 | "occupancyCode": "Integer", 4 | "occupancyName": "String", 5 | "occupancyBandName": "String", 6 | "isActive": "Bit", 7 | "externalId": "String" 8 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Occupancy/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "occupancyschemeName", "occupancyCode" 4 | ], 5 | "foreignKeys": [] 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/OpeningProtect/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "countryGeoId": "Integer", 3 | "optionDesc": "String", 4 | "optionValue": "Short", 5 | "isActive": "Bit", 6 | "externalId": "String" 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/OpeningProtect/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "countryGeoId", "optionValue" 4 | ], 5 | "foreignKeys": [] 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/PayoutFunction/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "payoutFunctionCode": "String", 3 | "payoutFunctionDesc": "String", 4 | "isActive": "Bit" 5 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/PayoutFunction/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "payoutFunctionCode" 4 | ], 5 | "foreignKeys": [] 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/PerRiskTreatySubject/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "id":"Long", 3 | "treatyId":"Long", 4 | "portfolioId":"Long", 5 | "filterAttribute":"String", 6 | "filterValue":"String" 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/PerRiskTreatySubject/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "id" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Performance/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "countryGeoId": "Integer", 3 | "optionDesc": "String", 4 | "optionValue": "Short", 5 | "isActive": "Bit", 6 | "externalId": "String" 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Performance/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "countryGeoId", "optionValue" 4 | ], 5 | "foreignKeys": [] 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Peril/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "perilCode": "String", 3 | "perilDesc": "String", 4 | "isActive": "Bit", 5 | "externalId": "String" 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Peril/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "perilCode" 4 | ], 5 | "foreignKeys": [] 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/PlanIrregularity/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "countryGeoId": "Integer", 3 | "optionDesc": "String", 4 | "optionValue": "Short", 5 | "isActive": "Bit", 6 | "externalId": "String" 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/PlanIrregularity/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "countryGeoId", "optionValue" 4 | ], 5 | "foreignKeys": [] 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/PlumbingInsulation/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "countryGeoId": "Integer", 3 | "optionDesc": "String", 4 | "optionValue": "Short", 5 | "isActive": "Bit", 6 | "externalId": "String" 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/PlumbingInsulation/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "countryGeoId", "optionValue" 4 | ], 5 | "foreignKeys": [] 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/PopulationDensity/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "populationDensityCode": "Integer", 3 | "populationDensityDesc": "String", 4 | "isActive": "Bit", 5 | "externalId": "String" 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/PopulationDensity/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "populationDensityCode" 4 | ], 5 | "foreignKeys": [] 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/PopulationShift/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "riskItemId":"Long", 3 | "shiftId":"Short", 4 | "count":"Integer" 5 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/PopulationShift/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "riskItemid", 4 | "shiftId" 5 | ], 6 | "foreignKeys": [ 7 | ] 8 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Portfolio/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "Long", 3 | "externalId": "String", 4 | "name": "String", 5 | "exposureSetId": "Long", 6 | "number": "String", 7 | "portfolioTypeCode": "String", 8 | "description": "String" 9 | } 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Portfolio/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "id" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/PortfolioMembership/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "portfolioId": "Long", 3 | "insuranceContractId": "Long" 4 | } 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/PortfolioMembership/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "portfolioId", 4 | "insuranceContractId" 5 | ], 6 | "foreignKeys": [ 7 | { 8 | "table": "Contract_Insurance", 9 | "columnMapping": { 10 | "id": "insuranceContractId" 11 | } 12 | }, 13 | { 14 | "table": "Portfolio", 15 | "columnMapping": { 16 | "id": "portfolioId" 17 | } 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/PortfolioTag/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "portfolioId": "Long", 3 | "tagCode": "String", 4 | "tagValue": "String" 5 | } 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/PortfolioTag/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "portfolioId", 4 | "tagCode" 5 | ], 6 | "foreignKeys": [ 7 | { 8 | "table": "Portfolio", 9 | "columnMapping": { 10 | "id": "portfolioId" 11 | } 12 | } 13 | ] 14 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/PortfolioType/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "portfolioTypeCode": "String", 3 | "portfolioTypeDesc": "String", 4 | "isActive": "Bit", 5 | "externalId": "String" 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/PortfolioType/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "portfolioTypeCode" 4 | ], 5 | "foreignKeys": [] 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/PositionType/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "positionTypeCode": "String", 3 | "positionTypeDesc": "String", 4 | "isActive": "Bit", 5 | "externalId": "String" 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/PositionType/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "positionTypeCode" 4 | ], 5 | "foreignKeys": [] 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/PostalCode/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "postalCodeGeoId": "Long", 3 | "admin3GeoId": "Long", 4 | "admin2GeoId": "Long", 5 | "admin1GeoId": "Long", 6 | "countryGeoId": "Long", 7 | "postalCode": "String", 8 | "isActive": "Bit", 9 | "externalId": "String" 10 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/PostalCode/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "postalCodeGeoId" 4 | ], 5 | "foreignKeys": [] 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Pounding/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "countryGeoId": "Integer", 3 | "optionDesc": "String", 4 | "optionValue": "Short", 5 | "isActive": "Bit", 6 | "externalId": "String" 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Pounding/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "countryGeoId", "optionValue" 4 | ], 5 | "foreignKeys": [] 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Producer/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "producerCode": "String", 3 | "producerName": "String", 4 | "isActive": "Bit", 5 | "externalId": "String" 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Producer/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "producerCode" 4 | ], 5 | "foreignKeys": [] 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/ProrataOptionType/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "prorataOptionTypeCode": "String", 3 | "prorataOptionTypeDesc": "String", 4 | "isActive": "Bit", 5 | "externalId": "String" 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/ProrataOptionType/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "prorataOptionTypeCode" 4 | ], 5 | "foreignKeys": [] 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/RealPropertyCharacteristics/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "riskItemId":"Long", 3 | "characteristicsSchemeCode":"String", 4 | "basementCode":"Short", 5 | "BIPreparednessCode":"Short", 6 | "BIRedundancyCode":"Short", 7 | "commercialAppurtenantCode":"Short", 8 | "contentsVulnWaterCode":"Short", 9 | "contentsVulnWindCode":"Short", 10 | "engineeredFoundationCode":"Short", 11 | "exteriorCode":"Short", 12 | "exteriorRatingCode":"Short", 13 | "externalOrnamentationCode":"Short", 14 | "fireSprinklerSystemCode":"Short", 15 | "fireSuppressionCode":"Short", 16 | "fireRemoteAlarmPresenceCode":"Short", 17 | "floorTypeCode":"Short", 18 | "floodingMissileCode":"Short", 19 | "floodingProtectionCode":"Short", 20 | "foundationTypeCode":"Short", 21 | "frameFoundationConnectionCode":"Short", 22 | "garagingCode":"Short", 23 | "marineProtectionCode":"Short", 24 | "plumbingInsulationCode":"Short", 25 | "openingProtectCode":"Short", 26 | "performanceCode":"Short", 27 | "planIrregularityCode":"Short", 28 | "poundingCode":"Short", 29 | "residentialAppurtenantCode":"Short", 30 | "roofAdditionsCode":"Short", 31 | "roofAgeConditionCode":"Short", 32 | "roofAnchorCode":"Short", 33 | "roofCoveringCode":"Short", 34 | "roofGeometryCode":"Short", 35 | "roofVentCode":"Short", 36 | "structuralUpgradeNonURMCode":"Short", 37 | "tankCode":"Short", 38 | "URMRetrofitCode":"Short", 39 | "URMChimneyCode":"Short", 40 | "verticalIrregularityCode":"Short", 41 | "windMissileExposureCode":"Byte", 42 | "yearOfUpgrade":"Short" 43 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/RealPropertyCharacteristics/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "riskItemId" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Region/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "regionCode": "String", 3 | "regionDesc": "String", 4 | "isActive": "Bit", 5 | "externalId": "String" 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Region/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "RegionCode" 4 | ], 5 | "foreignKeys": [] 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Reinsurer/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "reinsurerCode": "String", 3 | "reinsurerName": "String", 4 | "isActive": "Bit", 5 | "externalId": "String" 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Reinsurer/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "reinsurerCode" 4 | ], 5 | "foreignKeys": [] 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/RentalPropertyIdentifier/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "rentalPropertyIdentifierCode": "Integer", 3 | "rentalPropertyIdentifierDesc": "String", 4 | "isActive": "Bit", 5 | "externalId": "String" 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/RentalPropertyIdentifier/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "rentalPropertyIdentifierCode" 4 | ], 5 | "foreignKeys": [] 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/ResidentialAppurtenant/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "countryGeoId": "Integer", 3 | "optionDesc": "String", 4 | "optionValue": "Short", 5 | "isActive": "Bit", 6 | "externalId": "String" 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/ResidentialAppurtenant/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "countryGeoId", "optionValue" 4 | ], 5 | "foreignKeys": [] 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Resolution/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "resolutionCode": "String", 3 | "resolutionDesc": "String", 4 | "isActive": "Bit", 5 | "externalId": "String" 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Resolution/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "resolutionCode" 4 | ], 5 | "foreignKeys": [] 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Result/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "Long" 3 | } 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Result/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "id" ], 4 | "foreignKeys": [ 5 | ] 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/ResultFacetValues/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "facetId": "Long", 3 | "admin1GeoId": "Long", 4 | "admin2GeoId": "Long", 5 | "admin3GeoId": "Long", 6 | "postalCodeGeoId": "Long", 7 | "lineOfBusinessCode": "String", 8 | "cedantCode": "String" 9 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/ResultFacetValues/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "id" ], 4 | "foreignKeys": [ 5 | ] 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/ResultMetadata/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "Long", 3 | "structureId": "Long", 4 | "positionId": "Long", 5 | "settingsId": "Long", 6 | "resultTypeCode": "String", 7 | "granularityCode": "String" 8 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/ResultMetadata/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "id" ], 4 | "foreignKeys": [ 5 | ] 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/ResultType/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "resultTypeCode": "String", 3 | "resultTypeDesc": "String", 4 | "isActive": "Bit", 5 | "externalId": "String" 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/ResultType/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "resultTypeCode" 4 | ], 5 | "foreignKeys": [] 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Result_ELT/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "resultId": "Long", 3 | "facetId": "Long", 4 | "eventId": "Long", 5 | "meanLoss": "Double", 6 | "stdDevC": "Double", 7 | "stdDevl": "Double", 8 | "exposureValue": "Double" 9 | } 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Result_ELT/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "resultId", 4 | "eventId" 5 | ], 6 | "foreignKeys": [ 7 | ] 8 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Result_EP/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "resultId": "Long", 3 | "returnPeriod": "Double", 4 | "facetId": "Long", 5 | "aep": "Double", 6 | "oep": "Double", 7 | "tce_aep": "Double", 8 | "tce_oep": "Double", 9 | "eef": "Double" 10 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Result_EP/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "resultId", 4 | "returnPeriod" 5 | ], 6 | "foreignKeys": [ 7 | ] 8 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Result_PLT/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "resultId": "Long", 3 | "periodId": "Long", 4 | "eventId": "Long", 5 | "facetId": "Long", 6 | "loss": "Double", 7 | "lossDate": "Date", 8 | "eventDate": "Date" 9 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Result_PLT/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "resultId", 4 | "periodId", 5 | "eventId" 6 | ], 7 | "foreignKeys": [ 8 | ] 9 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Result_Stats/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "resultId": "Long", 3 | "facetId": "Long", 4 | "aal": "Double", 5 | "stdDev": "Double", 6 | "CV": "Double" 7 | } 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Result_Stats/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "resultId" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Risk/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "Long", 3 | "exposureSetId": "Long", 4 | "primaryRiskItemId": "Long", 5 | "externalId": "String", 6 | "name": "String", 7 | "number": "String", 8 | "description": "String", 9 | "accountName": "String", 10 | "numberOfUnits": "Integer" 11 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Risk/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "id" 4 | ], 5 | "foreignKeys": [ 6 | { 7 | "table": "ExposureSet", 8 | "columnMapping": { 9 | "id": "exposureSetId" 10 | } 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/RiskExposure/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "riskExposureId": "Long", 3 | "exposureSetId": "Long", 4 | "riskId": "Long", 5 | "riskItemId": "Long", 6 | "lossTypeCode": "String", 7 | "insurableInterest": "Double" 8 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/RiskExposure/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "riskExposureId" 4 | ], 5 | "foreignKeys": [ 6 | { 7 | "table": "ExposureSet", 8 | "columnMapping": { 9 | "id": "exposureSetId" 10 | } 11 | }, 12 | { 13 | "table": "Risk", 14 | "columnMapping": { 15 | "id": "riskId" 16 | } 17 | } 18 | ] 19 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/RiskItem/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "Long", 3 | "name": "String" 4 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/RiskItem/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | ], 4 | "foreignKeys": [ 5 | ] 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/RiskItem_ContainedProperty/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "riskItemId": "Long", 3 | "externalId": "String", 4 | "parentRiskItemId": "Long", 5 | "name": "String", 6 | "number": "String", 7 | "replacementCostValue": "Integer", 8 | "currencyCode": "String" 9 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/RiskItem_ContainedProperty/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "riskItemId" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/RiskItem_Population/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "riskItemId":"Long", 3 | "externalId":"String", 4 | "parentRiskItemId":"Long", 5 | "name":"String", 6 | "number":"String", 7 | "groupName":"String", 8 | "groupNumber":"String", 9 | "occupancyschemeName":"String", 10 | "occupationCode":"Integer", 11 | "totalPayroll":"Double", 12 | "totalNumPeople":"Integer", 13 | "maxNumOfPeople":"Integer", 14 | "calculatedNumPeople":"Integer", 15 | "shiftTypeId":"Short", 16 | "emergencyProtectionProxCode": "Short", 17 | "hazardousMaterialCode":"Short", 18 | "wageRelativityRankCode":"Short", 19 | "riskManagementOnsiteRankCode":"Short", 20 | "populationDensityCode":"Short", 21 | "USLHCoveredPercent":"Double", 22 | "hasExcessWorkersComp":"Bit", 23 | "UWManagementAdjustment":"Double" 24 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/RiskItem_Population/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "riskItemId" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/RiskItem_RealProperty/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "riskItemId":"Long", 3 | "addresId":"Long", 4 | "externalId":"String", 5 | "parentRiskItemId":"Long", 6 | "name":"String", 7 | "number":"String", 8 | "replacementCostValue":"Double", 9 | "currencyCode":"Char", 10 | "buildingHeight":"Double", 11 | "constructionCompleteDate":"DateTime", 12 | "constructionCompletePercent":"Double", 13 | "constructionSchemeName":"String", 14 | "constructionCode":"String", 15 | "constructionStartDate":"DateTime", 16 | "floorArea":"Double", 17 | "floorAreaUnitCode":"Short", 18 | "floorOccupied":"String", 19 | "floorSize":"Double", 20 | "floorsUnderground":"Short", 21 | "footprintArea":"Double", 22 | "heightUnitCode":"Short", 23 | "numberOfBaths":"Short", 24 | "numberOfBedrooms":"Short", 25 | "numberOfBuildings":"Short", 26 | "numberOfStories":"Short", 27 | "occupancyschemeName":"String", 28 | "occupancyCode":"String", 29 | "rentalPropertyIdentifierCode":"Short", 30 | "secondaryOccupancyList":"String", 31 | "totalRooms":"Integer", 32 | "yearBuilt":"Short" 33 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/RiskItem_RealProperty/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "riskItemId" 4 | ], 5 | "foreignKeys": [ 6 | { 7 | "table": "Address", 8 | "columnMapping": { 9 | "id": "addressId" 10 | } 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/RiskItem_TimeElement/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "riskItemId":"Long", 3 | "externalId":"String", 4 | "name":"String", 5 | "number":"String", 6 | "parentRiskItemId":"Long", 7 | "replacementCostValue":"Double", 8 | "currencyCode":"Char" 9 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/RiskItem_TimeElement/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "riskItemId" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/RiskManagementOnsiteRank/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "riskManagementOnsiteRankCode": "Short", 3 | "riskManagementOnsiteRankDesc": "String", 4 | "isActive": "Bit", 5 | "externalId": "String" 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/RiskManagementOnsiteRank/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "riskManagementOnsiteRankCode" 4 | ], 5 | "foreignKeys": [] 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/RiskitemType/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "riskItemTypeCode": "String", 3 | "riskItemTypeDesc": "String", 4 | "isActive": "Bit", 5 | "externalId": "String" 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/RiskitemType/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "riskItemTypeCode" 4 | ], 5 | "foreignKeys": [] 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/RoofAdditions/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "countryGeoId": "Integer", 3 | "optionDesc": "String", 4 | "optionValue": "Short", 5 | "isActive": "Bit", 6 | "externalId": "String" 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/RoofAdditions/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "countryGeoId", "optionValue" 4 | ], 5 | "foreignKeys": [] 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/RoofAgeCondition/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "countryGeoId": "Integer", 3 | "optionDesc": "String", 4 | "optionValue": "Short", 5 | "isActive": "Bit", 6 | "externalId": "String" 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/RoofAgeCondition/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "countryGeoId", "optionValue" 4 | ], 5 | "foreignKeys": [] 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/RoofAnchor/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "countryGeoId": "Integer", 3 | "optionDesc": "String", 4 | "optionValue": "Short", 5 | "isActive": "Bit", 6 | "externalId": "String" 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/RoofAnchor/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "countryGeoId", "optionValue" 4 | ], 5 | "foreignKeys": [] 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/RoofCovering/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "countryGeoId": "Integer", 3 | "optionDesc": "String", 4 | "optionValue": "Short", 5 | "isActive": "Bit", 6 | "externalId": "String" 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/RoofCovering/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "countryGeoId", "optionValue" 4 | ], 5 | "foreignKeys": [] 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/RoofGeometry/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "countryGeoId": "Integer", 3 | "optionDesc": "String", 4 | "optionValue": "Short", 5 | "isActive": "Bit", 6 | "externalId": "String" 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/RoofGeometry/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "countryGeoId", "optionValue" 4 | ], 5 | "foreignKeys": [] 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/RoofVent/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "countryGeoId": "Integer", 3 | "optionDesc": "String", 4 | "optionValue": "Short", 5 | "isActive": "Bit", 6 | "externalId": "String" 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/RoofVent/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "countryGeoId", "optionValue" 4 | ], 5 | "foreignKeys": [] 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/SDLStructure/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "Long", 3 | "name": "String", 4 | "externalId": "String", 5 | "description": "String", 6 | "SDL": "String" 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/SDLStructure/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "id" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Schedule/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "Long", 3 | "exposureSetId": "Long", 4 | "externalId": "String", 5 | "name": "String", 6 | "number": "String", 7 | "description": "String", 8 | "scheduleExpression": "String", 9 | "accountName": "String" 10 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Schedule/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "id" 4 | ], 5 | "foreignKeys": [ 6 | { 7 | "table": "ExpposureSet", 8 | "columnMapping": { 9 | "id": "exposureSetId" 10 | } 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/ScheduleRiskMap/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "subscheduleId": "Long", 3 | "insuranceContractId": "Long", 4 | "riskId": "Long" 5 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/ScheduleRiskMap/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "subscheduleId", 4 | "riskId" 5 | ], 6 | "foreignKeys": [ 7 | { 8 | "table": "Risk", 9 | "columnMapping": { 10 | "id": "riskId" 11 | } 12 | } 13 | ] 14 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Settings/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "Long" 3 | } 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Settings/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "id" ], 4 | "foreignKeys": [ 5 | ] 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/SettingsDetail/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "settingDetailId":"Long", 3 | "settingId":"Long", 4 | "settingname":"String", 5 | "settingValue":"String", 6 | "settingGroupName":"String", 7 | "settingGroupValue":"String", 8 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/SettingsDetail/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "settingDetailId" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/SettingsType/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "settingsTypeCode": "String", 3 | "settingsTypeDesc": "String", 4 | "isActive": "Bit", 5 | "externalId": "String" 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/SettingsType/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "settingsTypeCode" 4 | ], 5 | "foreignKeys": [] 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Settings_ModelProfile/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "id":"Long", 3 | "analysisType":"String", 4 | "softwareVersion":"String", 5 | "perilCode":"String", 6 | "regionCode":"String", 7 | "currencyCode":"String", 8 | "currencyAsOfDate":"Date", 9 | "modelProfileJson":"String", 10 | "createUser":"String", 11 | "createDate":"Date" 12 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Settings_ModelProfile/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "id" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Settings_RiskAnalysisProfile/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "id":"Long", 3 | "numberOfPeriods":"Long", 4 | "currencyCode":"Char", 5 | "currencyAsOfDate":"Date", 6 | "reportingWindowStartDate":"Date", 7 | "reportingWindowEndDate":"Date", 8 | "minimumLossThreshold":"Double" 9 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Settings_RiskAnalysisProfile/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "id" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/ShiftType/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "shiftTypeId": "Short", 3 | "shiftTypeDesc": "String", 4 | "isActive": "Bit", 5 | "externalId": "String" 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/ShiftType/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "shiftTypeId" 4 | ], 5 | "foreignKeys": [] 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/StructuralUpgradeNonURM/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "countryGeoId": "Integer", 3 | "optionDesc": "String", 4 | "optionValue": "Short", 5 | "isActive": "Bit", 6 | "externalId": "String" 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/StructuralUpgradeNonURM/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "countryGeoId", "optionValue" 4 | ], 5 | "foreignKeys": [] 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/StructurePositions/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "id":"Long", 3 | "structureId":"Long", 4 | "positionName":"String", 5 | "positionTypeCode":"String", 6 | "children":"String", 7 | "instructions":"String" 8 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/StructurePositions/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "id" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/SubscheduleRiskMap/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "subscheduleId":"Long", 3 | "insuranceContractId":"Long", 4 | "riskId":"Long" 5 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/SubscheduleRiskMap/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "subscheduleId", 4 | "insuranceContractId", 5 | "riskId" 6 | ], 7 | "foreignKeys": [ 8 | { 9 | "table": "InsuranceContract", 10 | "columnMapping": { 11 | "id": "insuranceContractId" 12 | } 13 | }, 14 | { 15 | "table": "Risk", 16 | "columnMapping": { 17 | "id": "riskId" 18 | } 19 | } 20 | ] 21 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Tag/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "tagCode": "String", 3 | "tagValue": "String", 4 | "isActive":"Bit", 5 | "externalId":"String" 6 | } 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Tag/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "tagCode" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Tank/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "countryGeoId": "Integer", 3 | "optionDesc": "String", 4 | "optionValue": "Short", 5 | "isActive": "Bit", 6 | "externalId": "String" 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/Tank/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "countryGeoId", "optionValue" 4 | ], 5 | "foreignKeys": [] 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/TermType/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "termTypeCode": "String", 3 | "termTypeDesc": "String", 4 | "isActive": "Bit" 5 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/TermType/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "termTypeCode" 4 | ], 5 | "foreignKeys": [] 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/TimeBasis/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "timeBasisCode": "String", 3 | "timeBasisDesc": "String", 4 | "isActive": "Bit" 5 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/TimeBasis/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "timeBasisCode" 4 | ], 5 | "foreignKeys": [] 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/TreatyLayer/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "treatyId":"Long", 3 | "id":"Short", 4 | "name":"String", 5 | "parentLayerId":"Short", 6 | "isPerRisk":"Integer", 7 | "inceptionDate":"Date", 8 | "expirationDate":"Date", 9 | "payoutShare":"Double", 10 | "payoutFunctionCode":"String", 11 | "payoutAmount":"Double", 12 | "payoutAmountBasisCode":"String", 13 | "payoutTimeBasisCode":"String", 14 | "payoutCurrencyCode":"Char", 15 | "excessIsFranchise":"Bit", 16 | "excessAmount":"Double", 17 | "excessAmountBasisCode":"String", 18 | "excessTimeBasisCode":"String", 19 | "excessCurrencyCode":"Char" 20 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/TreatyLayer/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "treatyId", 4 | "id" 5 | ], 6 | "foreignKeys": [ 7 | ] 8 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/TreatyReinstatements/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "treatyId": "Long", 3 | "numberOfReinstatements": "Short", 4 | "isUnlimited": "Bit", 5 | "ordinal": "Short", 6 | "isPaid": "Bit", 7 | "rate": "Double", 8 | "prorataOptionTypeCode": "String" 9 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/TreatyReinstatements/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "treatyId" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/URMChimney/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "countryGeoId": "Integer", 3 | "optionDesc": "String", 4 | "optionValue": "Short", 5 | "isActive": "Bit", 6 | "externalId": "String" 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/URMChimney/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "countryGeoId", "optionValue" 4 | ], 5 | "foreignKeys": [] 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/URMRetrofit/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "countryGeoId": "Integer", 3 | "optionDesc": "String", 4 | "optionValue": "Short", 5 | "isActive": "Bit", 6 | "externalId": "String" 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/URMRetrofit/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "countryGeoId", "optionValue" 4 | ], 5 | "foreignKeys": [] 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/VerticalIrregularity/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "countryGeoId": "Integer", 3 | "optionDesc": "String", 4 | "optionValue": "Short", 5 | "isActive": "Bit", 6 | "externalId": "String" 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/VerticalIrregularity/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "countryGeoId", "optionValue" 4 | ], 5 | "foreignKeys": [] 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/WageRelativityRank/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "wageRelativityRankCode": "Short", 3 | "wageRelativityRankDesc": "String", 4 | "isActive": "Bit", 5 | "externalId": "String" 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/WageRelativityRank/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "wageRelativityRankCode" 4 | ], 5 | "foreignKeys": [] 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/WindMissileExposure/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "countryGeoId": "Integer", 3 | "optionDesc": "String", 4 | "optionValue": "Short", 5 | "isActive": "Bit", 6 | "externalId": "String" 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/WindMissileExposure/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "countryGeoId", "optionValue" 4 | ], 5 | "foreignKeys": [] 6 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | %date{HH:mm:ss} %-5level %logger{0} {%class %method} - %msg%n 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/sysdiagrams/data_type_validation.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "String", 3 | "principal_id": "Integer", 4 | "diagram_id": "Integer", 5 | "version": "Integer", 6 | "definition": "String" 7 | } -------------------------------------------------------------------------------- /rdos-validation-tools/rdos-schema/src/main/resources/sysdiagrams/integrity_constraints.json: -------------------------------------------------------------------------------- 1 | { 2 | "primaryKeys": [ 3 | "diagram_id" 4 | ], 5 | "foreignKeys": [ 6 | ] 7 | } --------------------------------------------------------------------------------