@Override
  public final MarriageDetailsRequestDocument modelToXml() {

    Calendar calendar = Calendar.getInstance();
    LocalTime localTime = new LocalTime();
    Date date = null;
    MarriageDetailsRequestDocument marriageDetailsRequestDoc =
        MarriageDetailsRequestDocument.Factory.newInstance();
    MarriageDetailsRequestDocument.MarriageDetailsRequest marriageDetailsRequest =
        marriageDetailsRequestDoc.addNewMarriageDetailsRequest();
    super.fillCommonXmlInfo(marriageDetailsRequest);
    int i = 0;

    if (getFormat() != null)
      marriageDetailsRequest.setFormat(
          fr.cg95.cvq.xml.request.civil.MarriageCertificateFormatType.Enum.forString(
              getFormat().toString()));

    if (getCopies() != null)
      marriageDetailsRequest.setCopies(new BigInteger(getCopies().toString()));
    MarriageHusbandInformationType marriageHusbandInformationTypeMarriageHusband =
        marriageDetailsRequest.addNewMarriageHusband();
    marriageHusbandInformationTypeMarriageHusband.setMarriageHusbandLastName(
        getMarriageHusbandLastName());
    MarriageWifeInformationType marriageWifeInformationTypeMarriageWife =
        marriageDetailsRequest.addNewMarriageWife();
    marriageWifeInformationTypeMarriageWife.setMarriageWifeFirstNames(getMarriageWifeFirstNames());

    marriageDetailsRequest.setComment(getComment());

    marriageDetailsRequest.setRequesterQualityPrecision(getRequesterQualityPrecision());
    MarriageFatherInformationType marriageFatherInformationTypeFatherInformation =
        marriageDetailsRequest.addNewFatherInformation();
    marriageFatherInformationTypeFatherInformation.setFatherFirstNames(getFatherFirstNames());
    MarriageInformationType marriageInformationTypeMarriage =
        marriageDetailsRequest.addNewMarriage();
    marriageInformationTypeMarriage.setMarriagePostalCode(getMarriagePostalCode());
    MarriageMotherInformationType marriageMotherInformationTypeMotherInformation =
        marriageDetailsRequest.addNewMotherInformation();
    marriageMotherInformationTypeMotherInformation.setMotherMaidenName(getMotherMaidenName());

    marriageHusbandInformationTypeMarriageHusband.setMarriageHusbandFirstNames(
        getMarriageHusbandFirstNames());

    if (getRequesterQuality() != null)
      marriageDetailsRequest.setRequesterQuality(
          fr.cg95.cvq.xml.request.civil.MarriageRequesterQualityType.Enum.forString(
              getRequesterQuality().toString()));

    marriageInformationTypeMarriage.setMarriageCity(getMarriageCity());

    marriageWifeInformationTypeMarriageWife.setMarriageWifeLastName(getMarriageWifeLastName());

    date = getMarriageDate();
    if (date != null) {
      calendar.setTime(date);
      marriageInformationTypeMarriage.setMarriageDate(calendar);
    }

    marriageFatherInformationTypeFatherInformation.setFatherLastName(getFatherLastName());

    if (getRelationship() != null)
      marriageDetailsRequest.setRelationship(
          fr.cg95.cvq.xml.request.civil.MarriageRelationshipType.Enum.forString(
              getRelationship().toString()));

    marriageMotherInformationTypeMotherInformation.setMotherFirstNames(getMotherFirstNames());

    if (getMotive() != null)
      marriageDetailsRequest.setMotive(
          fr.cg95.cvq.xml.request.civil.MarriageCertificateMotiveType.Enum.forString(
              getMotive().toString()));

    return marriageDetailsRequestDoc;
  }