コード例 #1
0
 @Override
 public final String modelToXmlString() {
   AlignmentCertificateRequestDocument object = this.modelToXml();
   XmlOptions opts = new XmlOptions();
   opts.setSavePrettyPrint();
   opts.setSavePrettyPrintIndent(4);
   opts.setUseDefaultNamespace();
   opts.setCharacterEncoding("UTF-8");
   return object.xmlText(opts);
 }
コード例 #2
0
  @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;
  }
コード例 #3
0
  public static AlignmentCertificateRequest xmlToModel(
      AlignmentCertificateRequestDocument alignmentCertificateRequestDoc) {
    AlignmentCertificateRequestDocument.AlignmentCertificateRequest alignmentCertificateRequestXml =
        alignmentCertificateRequestDoc.getAlignmentCertificateRequest();
    Calendar calendar = Calendar.getInstance();
    LocalTime localTime = new LocalTime();
    List list = new ArrayList();
    AlignmentCertificateRequest alignmentCertificateRequest = new AlignmentCertificateRequest();
    alignmentCertificateRequest.fillCommonModelInfo(
        alignmentCertificateRequest, alignmentCertificateRequestXml);

    if (alignmentCertificateRequestXml.getRequesterQuality() != null)
      alignmentCertificateRequest.setRequesterQuality(
          fr.cg95.cvq.business.request.urbanism.AcrRequesterQualityType.forString(
              alignmentCertificateRequestXml.getRequesterQuality().toString()));
    else
      alignmentCertificateRequest.setRequesterQuality(
          fr.cg95.cvq.business.request.urbanism.AcrRequesterQualityType
              .getDefaultAcrRequesterQualityType());

    alignmentCertificateRequest.setSection(alignmentCertificateRequestXml.getSection());

    alignmentCertificateRequest.setTransportationRoute(
        alignmentCertificateRequestXml.getTransportationRoute());

    alignmentCertificateRequest.setOwnerFirstNames(
        alignmentCertificateRequestXml.getOwnerFirstNames());

    alignmentCertificateRequest.setLocality(alignmentCertificateRequestXml.getLocality());

    alignmentCertificateRequest.setNumber(alignmentCertificateRequestXml.getNumber());

    alignmentCertificateRequest.setOwnerLastName(alignmentCertificateRequestXml.getOwnerLastName());

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

    return alignmentCertificateRequest;
  }