Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vineet Kumar EquityProductModifications (CDM 6) - release #3278

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package cdm.product.template.processor;

import cdm.product.template.ExerciseTerms;
import cdm.product.template.ExpirationTimeTypeEnum;
import com.regnosys.rosetta.common.translation.MappingContext;
import com.regnosys.rosetta.common.translation.MappingProcessor;
import com.regnosys.rosetta.common.translation.Path;
import com.rosetta.model.lib.RosettaModelObjectBuilder;
import com.rosetta.model.lib.path.RosettaPath;

import java.util.List;
import java.util.Optional;

@SuppressWarnings("unused") // unused in generated code
public class ExpirationTimeTypeMappingProcessor extends MappingProcessor {

public ExpirationTimeTypeMappingProcessor(RosettaPath modelPath, List<Path> synonymPaths, MappingContext context) {
super(modelPath, synonymPaths, context);
}

@Override
public void map(Path synonymPath, RosettaModelObjectBuilder builder, RosettaModelObjectBuilder parent) {
ExerciseTerms.ExerciseTermsBuilder exerciseTermsBuilder = (ExerciseTerms.ExerciseTermsBuilder) parent;
if (isExpirationTimeSet(exerciseTermsBuilder)) {
exerciseTermsBuilder.setExpirationTimeType(ExpirationTimeTypeEnum.SPECIFIC_TIME);
}
}

private boolean isExpirationTimeSet(ExerciseTerms.ExerciseTermsBuilder exerciseTermsBuilder) {
return Optional.ofNullable(exerciseTermsBuilder.getExpirationTime())
.map(RosettaModelObjectBuilder::hasData)
.orElse(false);
}
}

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
{"fileName":"cdm-sample-files/fpml-5-10/products/dividend-swaps/div-ex01-dividend-swap.xml","excludedPaths":0,"externalPaths":78,"outstandingMappings":27,"validationFailures":12,"qualificationExpectation":{"success":true,"qualifyResults":[{"qualifiedName":"EquitySwap_ParameterReturnDividend_Index","qualifiedObjectClass":"cdm.product.template.EconomicTerms"}],"qualifiableObjectCount":1}},
{"fileName":"cdm-sample-files/fpml-5-10/products/dividend-swaps/div-ex02-dividend-swap-collateral.xml","excludedPaths":0,"externalPaths":97,"outstandingMappings":29,"validationFailures":14,"qualificationExpectation":{"success":true,"qualifyResults":[{"qualifiedName":"EquitySwap_ParameterReturnDividend_Index","qualifiedObjectClass":"cdm.product.template.EconomicTerms"}],"qualifiableObjectCount":1}},
{"fileName":"cdm-sample-files/fpml-5-10/products/dividend-swaps/div-ex03-dividend-swap-short-form-japanese-underlyer.xml","excludedPaths":0,"externalPaths":87,"outstandingMappings":27,"validationFailures":8,"qualificationExpectation":{"success":true,"qualifyResults":[{"qualifiedName":"EquitySwap_ParameterReturnDividend_Index","qualifiedObjectClass":"cdm.product.template.EconomicTerms"}],"qualifiableObjectCount":1}},
{"fileName":"cdm-sample-files/fpml-5-10/products/dividend-swaps/div-ex04-dividend-swap-option-transaction-supplement.xml","excludedPaths":0,"externalPaths":95,"outstandingMappings":28,"validationFailures":15,"qualificationExpectation":{"success":true,"qualifyResults":[{"qualifiedName":"EquityOption_ParameterReturnDividend_Index","qualifiedObjectClass":"cdm.product.template.EconomicTerms"},{"qualifiedName":"EquitySwap_ParameterReturnDividend_Index","qualifiedObjectClass":"cdm.product.template.EconomicTerms"}],"qualifiableObjectCount":2}},
{"fileName":"cdm-sample-files/fpml-5-10/products/dividend-swaps/div-ex05-dividend-swap-option-gs-example.xml","excludedPaths":0,"externalPaths":105,"outstandingMappings":33,"validationFailures":17,"qualificationExpectation":{"success":true,"qualifyResults":[{"qualifiedName":"EquityOption_ParameterReturnDividend_Index","qualifiedObjectClass":"cdm.product.template.EconomicTerms"},{"qualifiedName":"EquitySwap_ParameterReturnDividend_Index","qualifiedObjectClass":"cdm.product.template.EconomicTerms"}],"qualifiableObjectCount":2}},
{"fileName":"cdm-sample-files/fpml-5-10/products/dividend-swaps/div-ex06-dividend-swap-option-pred-clearing.xml","excludedPaths":0,"externalPaths":111,"outstandingMappings":33,"validationFailures":18,"qualificationExpectation":{"success":true,"qualifyResults":[{"qualifiedName":"EquityOption_ParameterReturnDividend_Index","qualifiedObjectClass":"cdm.product.template.EconomicTerms"},{"qualifiedName":"EquitySwap_ParameterReturnDividend_Index","qualifiedObjectClass":"cdm.product.template.EconomicTerms"}],"qualifiableObjectCount":2}}]
{"fileName":"cdm-sample-files/fpml-5-10/products/dividend-swaps/div-ex04-dividend-swap-option-transaction-supplement.xml","excludedPaths":0,"externalPaths":95,"outstandingMappings":28,"validationFailures":14,"qualificationExpectation":{"success":true,"qualifyResults":[{"qualifiedName":"EquityOption_ParameterReturnDividend_Index","qualifiedObjectClass":"cdm.product.template.EconomicTerms"},{"qualifiedName":"EquitySwap_ParameterReturnDividend_Index","qualifiedObjectClass":"cdm.product.template.EconomicTerms"}],"qualifiableObjectCount":2}},
{"fileName":"cdm-sample-files/fpml-5-10/products/dividend-swaps/div-ex05-dividend-swap-option-gs-example.xml","excludedPaths":0,"externalPaths":105,"outstandingMappings":33,"validationFailures":16,"qualificationExpectation":{"success":true,"qualifyResults":[{"qualifiedName":"EquityOption_ParameterReturnDividend_Index","qualifiedObjectClass":"cdm.product.template.EconomicTerms"},{"qualifiedName":"EquitySwap_ParameterReturnDividend_Index","qualifiedObjectClass":"cdm.product.template.EconomicTerms"}],"qualifiableObjectCount":2}},
{"fileName":"cdm-sample-files/fpml-5-10/products/dividend-swaps/div-ex06-dividend-swap-option-pred-clearing.xml","excludedPaths":0,"externalPaths":111,"outstandingMappings":33,"validationFailures":17,"qualificationExpectation":{"success":true,"qualifyResults":[{"qualifiedName":"EquityOption_ParameterReturnDividend_Index","qualifiedObjectClass":"cdm.product.template.EconomicTerms"},{"qualifiedName":"EquitySwap_ParameterReturnDividend_Index","qualifiedObjectClass":"cdm.product.template.EconomicTerms"}],"qualifiableObjectCount":2}}]
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[
{"fileName":"cdm-sample-files/fpml-5-10/products/equity/eqd-ex01-american-call-stock-long-form.xml","excludedPaths":0,"externalPaths":76,"outstandingMappings":27,"validationFailures":5,"qualificationExpectation":{"success":true,"qualifyResults":[{"qualifiedName":"EquityOption_PriceReturnBasicPerformance_SingleName","qualifiedObjectClass":"cdm.product.template.EconomicTerms"}],"qualifiableObjectCount":1}},
{"fileName":"cdm-sample-files/fpml-5-10/products/equity/eqd-ex04-european-call-index-long-form.xml","excludedPaths":0,"externalPaths":63,"outstandingMappings":19,"validationFailures":3,"qualificationExpectation":{"success":true,"qualifyResults":[{"qualifiedName":"EquityOption_PriceReturnBasicPerformance_Index","qualifiedObjectClass":"cdm.product.template.EconomicTerms"}],"qualifiableObjectCount":1}},
{"fileName":"cdm-sample-files/fpml-5-10/products/equity/eqd-ex01-american-call-stock-long-form.xml","excludedPaths":0,"externalPaths":76,"outstandingMappings":27,"validationFailures":4,"qualificationExpectation":{"success":true,"qualifyResults":[{"qualifiedName":"EquityOption_PriceReturnBasicPerformance_SingleName","qualifiedObjectClass":"cdm.product.template.EconomicTerms"}],"qualifiableObjectCount":1}},
{"fileName":"cdm-sample-files/fpml-5-10/products/equity/eqd-ex04-european-call-index-long-form.xml","excludedPaths":0,"externalPaths":63,"outstandingMappings":19,"validationFailures":2,"qualificationExpectation":{"success":true,"qualifyResults":[{"qualifiedName":"EquityOption_PriceReturnBasicPerformance_Index","qualifiedObjectClass":"cdm.product.template.EconomicTerms"}],"qualifiableObjectCount":1}},
{"fileName":"cdm-sample-files/fpml-5-10/products/equity/eqs-ex01-single-underlyer-execution-long-form-other-party.xml","excludedPaths":0,"externalPaths":149,"outstandingMappings":28,"validationFailures":2,"qualificationExpectation":{"success":true,"qualifyResults":[{"qualifiedName":"EquitySwap_TotalReturnBasicPerformance_SingleName","qualifiedObjectClass":"cdm.product.template.EconomicTerms"}],"qualifiableObjectCount":1}},
{"fileName":"cdm-sample-files/fpml-5-10/products/equity/eqs-ex01-single-underlyer-execution-long-form.xml","excludedPaths":0,"externalPaths":146,"outstandingMappings":28,"validationFailures":2,"qualificationExpectation":{"success":true,"qualifyResults":[{"qualifiedName":"EquitySwap_TotalReturnBasicPerformance_SingleName","qualifiedObjectClass":"cdm.product.template.EconomicTerms"}],"qualifiableObjectCount":1}},
{"fileName":"cdm-sample-files/fpml-5-10/products/equity/eqs-ex06-single-index-long-form.xml","excludedPaths":0,"externalPaths":136,"outstandingMappings":31,"validationFailures":1,"qualificationExpectation":{"success":true,"qualifyResults":[{"qualifiedName":"EquitySwap_PriceReturnBasicPerformance_Index","qualifiedObjectClass":"cdm.product.template.EconomicTerms"}],"qualifiableObjectCount":1}},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[
{"fileName":"cdm-sample-files/fpml-5-10/products/inflation-swaps/inflation-swap-ex01-yoy.xml","excludedPaths":0,"externalPaths":95,"outstandingMappings":9,"validationFailures":1,"qualificationExpectation":{"success":true,"qualifyResults":[{"qualifiedName":"InterestRate_InflationSwap_FixedFloat_YearOn_Year","qualifiedObjectClass":"cdm.product.template.EconomicTerms"}],"qualifiableObjectCount":1}},
{"fileName":"cdm-sample-files/fpml-5-10/products/inflation-swaps/inflation-swap-ex01-yoy.xml","excludedPaths":0,"externalPaths":95,"outstandingMappings":9,"validationFailures":0,"qualificationExpectation":{"success":true,"qualifyResults":[{"qualifiedName":"InterestRate_InflationSwap_FixedFloat_YearOn_Year","qualifiedObjectClass":"cdm.product.template.EconomicTerms"}],"qualifiableObjectCount":1}},
{"fileName":"cdm-sample-files/fpml-5-10/products/inflation-swaps/inflation-swap-ex02-yoy-bond-reference.xml","excludedPaths":0,"externalPaths":122,"outstandingMappings":11,"validationFailures":0,"qualificationExpectation":{"success":true,"qualifyResults":[{"qualifiedName":"InterestRate_InflationSwap_FixedFloat_YearOn_Year","qualifiedObjectClass":"cdm.product.template.EconomicTerms"}],"qualifiableObjectCount":1}},
{"fileName":"cdm-sample-files/fpml-5-10/products/inflation-swaps/inflation-swap-ex03-yoy-initial-level.xml","excludedPaths":0,"externalPaths":118,"outstandingMappings":9,"validationFailures":0,"qualificationExpectation":{"success":true,"qualifyResults":[{"qualifiedName":"InterestRate_InflationSwap_FixedFloat_YearOn_Year","qualifiedObjectClass":"cdm.product.template.EconomicTerms"}],"qualifiableObjectCount":1}},
{"fileName":"cdm-sample-files/fpml-5-10/products/inflation-swaps/inflation-swap-ex04-yoy-interp.xml","excludedPaths":0,"externalPaths":108,"outstandingMappings":9,"validationFailures":0,"qualificationExpectation":{"success":true,"qualifyResults":[{"qualifiedName":"InterestRate_InflationSwap_FixedFloat_YearOn_Year","qualifiedObjectClass":"cdm.product.template.EconomicTerms"}],"qualifiableObjectCount":1}},
{"fileName":"cdm-sample-files/fpml-5-10/products/inflation-swaps/inflation-swap-ex05-zc.xml","excludedPaths":0,"externalPaths":88,"outstandingMappings":9,"validationFailures":3,"qualificationExpectation":{"success":false,"qualifyResults":[],"qualifiableObjectCount":1}}]
{"fileName":"cdm-sample-files/fpml-5-10/products/inflation-swaps/inflation-swap-ex05-zc.xml","excludedPaths":0,"externalPaths":88,"outstandingMappings":9,"validationFailures":2,"qualificationExpectation":{"success":false,"qualifyResults":[],"qualifiableObjectCount":1}}]
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
{"fileName":"cdm-sample-files/fpml-5-10/products/variance-swaps/eqvs-ex03-conditional-variance-swap.xml","excludedPaths":0,"externalPaths":57,"outstandingMappings":16,"validationFailures":7,"qualificationExpectation":{"success":true,"qualifyResults":[{"qualifiedName":"EquitySwap_ParameterReturnVariance_SingleName","qualifiedObjectClass":"cdm.product.template.EconomicTerms"}],"qualifiableObjectCount":1}},
{"fileName":"cdm-sample-files/fpml-5-10/products/variance-swaps/eqvs-ex04-dispersion-variance-swap.xml","excludedPaths":0,"externalPaths":120,"outstandingMappings":43,"validationFailures":15,"qualificationExpectation":{"success":true,"qualifyResults":[{"qualifiedName":"EquitySwap_ParameterReturnDispersion","qualifiedObjectClass":"cdm.product.template.EconomicTerms"}],"qualifiableObjectCount":1}},
{"fileName":"cdm-sample-files/fpml-5-10/products/variance-swaps/eqvs-ex05-dispersion-variance-swap-transaction-supplement.xml","excludedPaths":0,"externalPaths":81,"outstandingMappings":20,"validationFailures":16,"qualificationExpectation":{"success":true,"qualifyResults":[{"qualifiedName":"EquitySwap_ParameterReturnDispersion","qualifiedObjectClass":"cdm.product.template.EconomicTerms"}],"qualifiableObjectCount":1}},
{"fileName":"cdm-sample-files/fpml-5-10/products/variance-swaps/eqvs-ex06-variance-option-transaction-supplement.xml","excludedPaths":0,"externalPaths":74,"outstandingMappings":15,"validationFailures":7,"qualificationExpectation":{"success":true,"qualifyResults":[{"qualifiedName":"EquityOption_ParameterReturnVariance_Index","qualifiedObjectClass":"cdm.product.template.EconomicTerms"},{"qualifiedName":"EquitySwap_ParameterReturnVariance_Index","qualifiedObjectClass":"cdm.product.template.EconomicTerms"}],"qualifiableObjectCount":2}},
{"fileName":"cdm-sample-files/fpml-5-10/products/variance-swaps/eqvs-ex07-variance-option-transaction-supplement-pred-clearing.xml","excludedPaths":0,"externalPaths":80,"outstandingMappings":16,"validationFailures":8,"qualificationExpectation":{"success":true,"qualifyResults":[{"qualifiedName":"EquityOption_ParameterReturnVariance_Index","qualifiedObjectClass":"cdm.product.template.EconomicTerms"},{"qualifiedName":"EquitySwap_ParameterReturnVariance_Index","qualifiedObjectClass":"cdm.product.template.EconomicTerms"}],"qualifiableObjectCount":2}}]
{"fileName":"cdm-sample-files/fpml-5-10/products/variance-swaps/eqvs-ex06-variance-option-transaction-supplement.xml","excludedPaths":0,"externalPaths":74,"outstandingMappings":15,"validationFailures":6,"qualificationExpectation":{"success":true,"qualifyResults":[{"qualifiedName":"EquityOption_ParameterReturnVariance_Index","qualifiedObjectClass":"cdm.product.template.EconomicTerms"},{"qualifiedName":"EquitySwap_ParameterReturnVariance_Index","qualifiedObjectClass":"cdm.product.template.EconomicTerms"}],"qualifiableObjectCount":2}},
{"fileName":"cdm-sample-files/fpml-5-10/products/variance-swaps/eqvs-ex07-variance-option-transaction-supplement-pred-clearing.xml","excludedPaths":0,"externalPaths":80,"outstandingMappings":16,"validationFailures":7,"qualificationExpectation":{"success":true,"qualifyResults":[{"qualifiedName":"EquityOption_ParameterReturnVariance_Index","qualifiedObjectClass":"cdm.product.template.EconomicTerms"},{"qualifiedName":"EquitySwap_ParameterReturnVariance_Index","qualifiedObjectClass":"cdm.product.template.EconomicTerms"}],"qualifiableObjectCount":2}}]
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[
{"fileName":"cdm-sample-files/fpml-5-12/products/equity/eqd-ex01-american-call-stock-long-form.xml","excludedPaths":0,"externalPaths":85,"outstandingMappings":36,"validationFailures":5,"qualificationExpectation":{"success":true,"qualifyResults":[{"qualifiedName":"EquityOption_PriceReturnBasicPerformance_SingleName","qualifiedObjectClass":"cdm.product.template.EconomicTerms"}],"qualifiableObjectCount":1}},
{"fileName":"cdm-sample-files/fpml-5-12/products/equity/eqd-ex04-european-call-index-long-form.xml","excludedPaths":0,"externalPaths":72,"outstandingMappings":28,"validationFailures":3,"qualificationExpectation":{"success":true,"qualifyResults":[{"qualifiedName":"EquityOption_PriceReturnBasicPerformance_Index","qualifiedObjectClass":"cdm.product.template.EconomicTerms"}],"qualifiableObjectCount":1}},
{"fileName":"cdm-sample-files/fpml-5-12/products/equity/eqd-ex01-american-call-stock-long-form.xml","excludedPaths":0,"externalPaths":85,"outstandingMappings":36,"validationFailures":4,"qualificationExpectation":{"success":true,"qualifyResults":[{"qualifiedName":"EquityOption_PriceReturnBasicPerformance_SingleName","qualifiedObjectClass":"cdm.product.template.EconomicTerms"}],"qualifiableObjectCount":1}},
{"fileName":"cdm-sample-files/fpml-5-12/products/equity/eqd-ex04-european-call-index-long-form.xml","excludedPaths":0,"externalPaths":72,"outstandingMappings":28,"validationFailures":2,"qualificationExpectation":{"success":true,"qualifyResults":[{"qualifiedName":"EquityOption_PriceReturnBasicPerformance_Index","qualifiedObjectClass":"cdm.product.template.EconomicTerms"}],"qualifiableObjectCount":1}},
{"fileName":"cdm-sample-files/fpml-5-12/products/equity/eqs-ex01-single-underlyer-execution-long-form.xml","excludedPaths":0,"externalPaths":156,"outstandingMappings":38,"validationFailures":2,"qualificationExpectation":{"success":true,"qualifyResults":[{"qualifiedName":"EquitySwap_TotalReturnBasicPerformance_SingleName","qualifiedObjectClass":"cdm.product.template.EconomicTerms"}],"qualifiableObjectCount":1}},
{"fileName":"cdm-sample-files/fpml-5-12/products/equity/eqs-ex05-single-stock-plus-fee-long-form.xml","excludedPaths":0,"externalPaths":169,"outstandingMappings":70,"validationFailures":3,"qualificationExpectation":{"success":true,"qualifyResults":[{"qualifiedName":"EquitySwap_TotalReturnBasicPerformance_SingleName","qualifiedObjectClass":"cdm.product.template.EconomicTerms"}],"qualifiableObjectCount":1}},
{"fileName":"cdm-sample-files/fpml-5-12/products/equity/eqs-ex06-single-index-long-form.xml","excludedPaths":0,"externalPaths":136,"outstandingMappings":31,"validationFailures":1,"qualificationExpectation":{"success":true,"qualifyResults":[{"qualifiedName":"EquitySwap_PriceReturnBasicPerformance_Index","qualifiedObjectClass":"cdm.product.template.EconomicTerms"}],"qualifiableObjectCount":1}},
Expand Down
Loading