Package com.ufis_as.exco

Examples of com.ufis_as.exco.MSG


    try {
      StringWriter writer = new StringWriter();
      _ms.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
      HpUfisCalendar ufisCalendar = new HpUfisCalendar(TimeZone.getTimeZone("UTC"));

      MSG msg = new MSG();
      MSG.MSGSTREAMIN msgstream_in = new MSG.MSGSTREAMIN();

      // HEADER
      INFOBJGENERIC infobjgeneric = new INFOBJGENERIC();
      infobjgeneric.setACTIONTYPE(ACTIONTYPE.U);
      infobjgeneric.setMESSAGETYPE(HpEKConstants.JCEDA_SOURCE);
      infobjgeneric.setMESSAGEORIGIN(HpEKConstants.FLT_CONX_SOURCE);
      infobjgeneric.setURNO(idFlight);
      infobjgeneric.setTIMEID(TIMEID.UTC);
      infobjgeneric.setTIMESTAMP(ufisCalendar.getCedaString());

      // BODY
      MSGOBJECTS msgObjects = new MSGOBJECTS();
      INFOBJFLIGHT infobjFlight = new INFOBJFLIGHT();
      String cxCount = Integer.toString(criticalCount);
      String sxCount = Integer.toString(shortCount);
      //infobjFlight.setCXPX(cxpx);
      if (HpUfisAppConstants.CON_LOAD_BAG_SUMMARY.equalsIgnoreCase(tab)) {
        infobjFlight.setCXBG(cxCount);
        infobjFlight.setSXBG(sxCount);
      } else if (HpUfisAppConstants.CON_LOAD_PAX_SUMMARY.equalsIgnoreCase(tab)) {
        infobjFlight.setCXPX(cxCount);
        infobjFlight.setSXPX(sxCount);
      } else if (HpUfisAppConstants.CON_LOAD_ULD_SUMMARY.equalsIgnoreCase(tab)) {
        infobjFlight.setCXUD(cxCount);
        infobjFlight.setSXUD(sxCount);
      }
      msgObjects.setINFOBJFLIGHT(infobjFlight);

      // set HEADER and BODY to MSG
      msgstream_in.setINFOBJGENERIC(infobjgeneric);
      msgstream_in.setMSGOBJECTS(msgObjects);
      msg.setMSGSTREAMIN(msgstream_in);

      _ms.marshal(msg, writer);

      // String message = writer.toString();
      // message = message.replace("<INFOBJ_FLIGHT/>",
View Full Code Here


            _ms.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);

            HpUfisCalendar ufisCalendar = new HpUfisCalendar(TimeZone.getTimeZone("UTC"));

            MSG msg = new MSG();
            MSG.MSGSTREAMIN msgstream_in = new MSG.MSGSTREAMIN();

            INFOBJGENERIC infobjgeneric = infGeneric;
            if (HpUfisUtils.isNullOrEmptyStr(infobjgeneric.getURNO())
                && msgobjects.getINFOBJFLIGHT() != null) {
              if (infobjgeneric.getADID() == null) {
                infobjgeneric.setADID(msgobjects.getINFOBJFLIGHT().getADID());
              }
              if (HpUfisUtils.isNullOrEmptyStr(infobjgeneric.getFLNO())) {
                infobjgeneric.setFLNO(
                    msgobjects.getINFOBJFLIGHT().getALC2() + " " + msgobjects.getINFOBJFLIGHT().getFLTN());
              }
              if (HpUfisUtils.isNullOrEmptyStr(infobjgeneric.getFLNS())) {
                infobjgeneric.setFLNS(msgobjects.getINFOBJFLIGHT().getFLNS());
              }
//              if (HpUfisUtils.isNullOrEmptyStr(infobjgeneric.getFLDA())) {
//                infobjgeneric.setFLDA(msgobjects.getINFOBJFLIGHT().getFLDA());
//              }
               
                if (msgobjects.getINFOBJFLIGHT().getADID() != null) {
                  if (ADID.A.equals(msgobjects.getINFOBJFLIGHT().getADID())) {
                    //infobjgeneric.setSTDT(msgobjects.getINFOBJFLIGHT().getSTOD());
                      if (HpUfisUtils.isNullOrEmptyStr(infobjgeneric.getDES3())) {
                        infobjgeneric.setDES3(msgobjects.getINFOBJFLIGHT().getDES3());
                      }
                      if (HpUfisUtils.isNullOrEmptyStr(infobjgeneric.getDES4())) {
                        infobjgeneric.setDES4(msgobjects.getINFOBJFLIGHT().getDES4());
                      }
                    } else {
                    //infobjgeneric.setSTDT(msgobjects.getINFOBJFLIGHT().getSTOA());
                    if (HpUfisUtils.isNullOrEmptyStr(infobjgeneric.getORG3())) {
                      infobjgeneric.setORG3(msgobjects.getINFOBJFLIGHT().getORG3())
                    }
                    if (HpUfisUtils.isNullOrEmptyStr(infobjgeneric.getORG4())) {
                      infobjgeneric.setORG4(msgobjects.getINFOBJFLIGHT().getORG4())
                    }
                    }
                }
            }
            infobjgeneric.setACTIONTYPE(_msgActionType);
            infobjgeneric.setMESSAGEORIGIN(_msgOrigin);
            infobjgeneric.setMESSAGETYPE(_msgOriginType);
            infobjgeneric.setTIMEID(TIMEID.UTC);
            infobjgeneric.setTIMESTAMP(ufisCalendar.getCedaString());
            msgstream_in.setMSGOBJECTS(msgobjects);
            msgstream_in.setINFOBJGENERIC(infobjgeneric);
            msg.setMSGSTREAMIN(msgstream_in);

            _ms.marshal(msg, writer);

            LOG.info("{}", writer.toString());
            return writer.toString();
View Full Code Here

    try {
      StringWriter writer = new StringWriter();
      _ms.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
      HpUfisCalendar ufisCalendar = new HpUfisCalendar(TimeZone.getTimeZone("UTC"));

      MSG msg = new MSG();
      MSG.MSGSTREAMIN msgstream_in = new MSG.MSGSTREAMIN();

      // HEADER
      INFOBJGENERIC infobjgeneric = new INFOBJGENERIC();
      infobjgeneric.setACTIONTYPE(ACTIONTYPE.U);
      infobjgeneric.setMESSAGETYPE(HpEKConstants.JCEDA_SOURCE);
      infobjgeneric.setMESSAGEORIGIN(HpEKConstants.FLT_CONX_SOURCE);
      infobjgeneric.setURNO(idFlight);
      infobjgeneric.setTIMEID(TIMEID.UTC);
      infobjgeneric.setTIMESTAMP(ufisCalendar.getCedaString());

      // BODY
      MSGOBJECTS msgObjects = new MSGOBJECTS();
      INFOBJFLIGHT infobjFlight = new INFOBJFLIGHT();
      String count = Integer.toString(criticalCount);
      //infobjFlight.setCXPX(cxpx);
      if (HpUfisAppConstants.CON_LOAD_BAG_SUMMARY.equalsIgnoreCase(tab)) {
        infobjFlight.setCXBG(count);
      } else if (HpUfisAppConstants.CON_LOAD_PAX_SUMMARY.equalsIgnoreCase(tab)) {
        infobjFlight.setCXPX(count);
      } else if (HpUfisAppConstants.CON_LOAD_ULD_SUMMARY.equalsIgnoreCase(tab)) {
        infobjFlight.setCXUD(count);
      }
      msgObjects.setINFOBJFLIGHT(infobjFlight);

      // set HEADER and BODY to MSG
      msgstream_in.setINFOBJGENERIC(infobjgeneric);
      msgstream_in.setMSGOBJECTS(msgObjects);
      msg.setMSGSTREAMIN(msgstream_in);

      _ms.marshal(msg, writer);

      // String message = writer.toString();
      // message = message.replace("<INFOBJ_FLIGHT/>",
View Full Code Here

TOP

Related Classes of com.ufis_as.exco.MSG

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.