@Override public final DeathDetailsRequestDocument modelToXml() { Calendar calendar = Calendar.getInstance(); LocalTime localTime = new LocalTime(); Date date = null; DeathDetailsRequestDocument deathDetailsRequestDoc = DeathDetailsRequestDocument.Factory.newInstance(); DeathDetailsRequestDocument.DeathDetailsRequest deathDetailsRequest = deathDetailsRequestDoc.addNewDeathDetailsRequest(); super.fillCommonXmlInfo(deathDetailsRequest); int i = 0; deathDetailsRequest.setComment(getComment()); if (getCopies() != null) deathDetailsRequest.setCopies(new BigInteger(getCopies().toString())); deathDetailsRequest.setDeathCity(getDeathCity()); date = getDeathDate(); if (date != null) { calendar.setTime(date); deathDetailsRequest.setDeathDate(calendar); } deathDetailsRequest.setDeathFirstNames(getDeathFirstNames()); deathDetailsRequest.setDeathLastName(getDeathLastName()); deathDetailsRequest.setDeathPostalCode(getDeathPostalCode()); if (getFormat() != null) deathDetailsRequest.setFormat( fr.cg95.cvq.xml.request.civil.DeathCertificateFormatType.Enum.forString( getFormat().toString())); if (getMotive() != null) deathDetailsRequest.setMotive( fr.cg95.cvq.xml.request.civil.DeathCertificateMotiveType.Enum.forString( getMotive().toString())); return deathDetailsRequestDoc; }
@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; }