@Override
  public final TechnicalInterventionRequestDocument modelToXml() {

    Calendar calendar = Calendar.getInstance();
    LocalTime localTime = new LocalTime();
    Date date = null;
    TechnicalInterventionRequestDocument technicalInterventionRequestDoc =
        TechnicalInterventionRequestDocument.Factory.newInstance();
    TechnicalInterventionRequestDocument.TechnicalInterventionRequest technicalInterventionRequest =
        technicalInterventionRequestDoc.addNewTechnicalInterventionRequest();
    super.fillCommonXmlInfo(technicalInterventionRequest);
    int i = 0;

    technicalInterventionRequest.setInterventionDescription(getInterventionDescription());

    if (getInterventionPlace() != null)
      technicalInterventionRequest.setInterventionPlace(Address.modelToXml(getInterventionPlace()));

    i = 0;
    if (getInterventionType() != null) {
      fr.cg95.cvq.xml.common.LocalReferentialDataType[] interventionTypeTypeTab =
          new fr.cg95.cvq.xml.common.LocalReferentialDataType[getInterventionType().size()];
      for (LocalReferentialData object : getInterventionType()) {
        interventionTypeTypeTab[i++] = LocalReferentialData.modelToXml(object);
      }
      technicalInterventionRequest.setInterventionTypeArray(interventionTypeTypeTab);
    }

    technicalInterventionRequest.setOtherInterventionLabel(getOtherInterventionLabel());

    return technicalInterventionRequestDoc;
  }
  @Override
  public final CompostableWasteCollectionRequestDocument modelToXml() {

    Calendar calendar = Calendar.getInstance();
    LocalTime localTime = new LocalTime();
    Date date = null;
    CompostableWasteCollectionRequestDocument compostableWasteCollectionRequestDoc =
        CompostableWasteCollectionRequestDocument.Factory.newInstance();
    CompostableWasteCollectionRequestDocument.CompostableWasteCollectionRequest
        compostableWasteCollectionRequest =
            compostableWasteCollectionRequestDoc.addNewCompostableWasteCollectionRequest();
    super.fillCommonXmlInfo(compostableWasteCollectionRequest);
    int i = 0;

    if (getCollectionAddress() != null)
      compostableWasteCollectionRequest.setCollectionAddress(
          Address.modelToXml(getCollectionAddress()));

    i = 0;
    if (getCompostableWasteType() != null) {
      fr.cg95.cvq.xml.common.LocalReferentialDataType[] compostableWasteTypeTypeTab =
          new fr.cg95.cvq.xml.common.LocalReferentialDataType[getCompostableWasteType().size()];
      for (LocalReferentialData object : getCompostableWasteType()) {
        compostableWasteTypeTypeTab[i++] = LocalReferentialData.modelToXml(object);
      }
      compostableWasteCollectionRequest.setCompostableWasteTypeArray(compostableWasteTypeTypeTab);
    }

    compostableWasteCollectionRequest.setOtherWaste(getOtherWaste());

    return compostableWasteCollectionRequestDoc;
  }
Ejemplo n.º 3
0
  @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 AlignmentCertificateRequestDocument modelToXml() {

    Calendar calendar = Calendar.getInstance();
    LocalTime localTime = new LocalTime();
    Date date = null;
    AlignmentCertificateRequestDocument alignmentCertificateRequestDoc =
        AlignmentCertificateRequestDocument.Factory.newInstance();
    AlignmentCertificateRequestDocument.AlignmentCertificateRequest alignmentCertificateRequest =
        alignmentCertificateRequestDoc.addNewAlignmentCertificateRequest();
    super.fillCommonXmlInfo(alignmentCertificateRequest);
    int i = 0;

    if (getRequesterQuality() != null)
      alignmentCertificateRequest.setRequesterQuality(
          fr.cg95.cvq.xml.request.urbanism.AcrRequesterQualityType.Enum.forString(
              getRequesterQuality().toString()));

    alignmentCertificateRequest.setSection(getSection());

    alignmentCertificateRequest.setTransportationRoute(getTransportationRoute());

    alignmentCertificateRequest.setOwnerFirstNames(getOwnerFirstNames());

    alignmentCertificateRequest.setLocality(getLocality());

    if (getNumber() != null)
      alignmentCertificateRequest.setNumber(new BigInteger(getNumber().toString()));

    alignmentCertificateRequest.setOwnerLastName(getOwnerLastName());

    if (getOwnerAddress() != null)
      alignmentCertificateRequest.setOwnerAddress(Address.modelToXml(getOwnerAddress()));

    return alignmentCertificateRequestDoc;
  }
  @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;
  }