this.marshal(of.createDocument(doc), os, validate);
}
private CreditTransferTransactionInformationSCT createCreditTransferTransactionInformationSCT(Properties sepaParams, Integer index)
{
CreditTransferTransactionInformationSCT cdtTrxTxInf = new CreditTransferTransactionInformationSCT();
//Payment Information - Credit Transfer Transaction Information - Payment Identification
cdtTrxTxInf.setPmtId(new PaymentIdentificationSEPA());
cdtTrxTxInf.getPmtId().setEndToEndId(SepaUtil.getProperty(sepaParams,SepaUtil.insertIndex("endtoendid", index),AbstractSEPAGV.ENDTOEND_ID_NOTPROVIDED)); // sicherstellen, dass "NOTPROVIDED" eingetragen wird, wenn keine ID angegeben ist
//Payment Information - Credit Transfer Transaction Information - Creditor
cdtTrxTxInf.setCdtr(new PartyIdentificationSEPA2());
cdtTrxTxInf.getCdtr().setNm(sepaParams.getProperty(SepaUtil.insertIndex("dst.name", index)));
//Payment Information - Credit Transfer Transaction Information - Creditor Account
cdtTrxTxInf.setCdtrAcct(new CashAccountSEPA2());
cdtTrxTxInf.getCdtrAcct().setId(new AccountIdentificationSEPA());
cdtTrxTxInf.getCdtrAcct().getId().setIBAN(sepaParams.getProperty(SepaUtil.insertIndex("dst.iban", index)));
//Payment Information - Credit Transfer Transaction Information - Creditor Agent
cdtTrxTxInf.setCdtrAgt(new BranchAndFinancialInstitutionIdentificationSEPA1());
cdtTrxTxInf.getCdtrAgt().setFinInstnId(new FinancialInstitutionIdentificationSEPA1());
cdtTrxTxInf.getCdtrAgt().getFinInstnId().setBIC(sepaParams.getProperty(SepaUtil.insertIndex("dst.bic", index)));
//Payment Information - Credit Transfer Transaction Information - Amount
cdtTrxTxInf.setAmt(new AmountTypeSEPA());
cdtTrxTxInf.getAmt().setInstdAmt(new ActiveOrHistoricCurrencyAndAmountSEPA());
cdtTrxTxInf.getAmt().getInstdAmt().setValue(new BigDecimal(sepaParams.getProperty(SepaUtil.insertIndex("btg.value", index))));
cdtTrxTxInf.getAmt().getInstdAmt().setCcy(ActiveOrHistoricCurrencyCodeEUR.EUR); //FIXME: Schema sagt es gibt nur eur aber besser w�re bestimmt getSEPAParam("btg.curr")
//Payment Information - Credit Transfer Transaction Information - Usage
String usage = sepaParams.getProperty(SepaUtil.insertIndex("usage", index));
if (usage != null && usage.length() > 0)
{
cdtTrxTxInf.setRmtInf(new RemittanceInformationSEPA1Choice());
cdtTrxTxInf.getRmtInf().setUstrd(usage);
}
return cdtTrxTxInf;
}