Package org.xmlBlaster.contrib.dbwriter.info

Examples of org.xmlBlaster.contrib.dbwriter.info.SqlInfo.toXml()


            SqlInfo dbUpdateInfo = parser.parse(msg);
            String createStatement = dbSpecific.getCreateTableStatement(dbUpdateInfo.getDescription(), null);
            log.fine("=============================================");
            log.fine(createStatement);
            log.fine("=============================================");
            String msg1 = dbUpdateInfo.toXml("");
            log.fine("original message: " + message);
            log.fine("parsed message: " + msg1);
            int numOfCols = dbUpdateInfo.getDescription().getColumns().length;
            assertTrue("Number of columns must be at least one (to detect that metadata is retrieved)", numOfCols > 0);
            assertXMLEqual("Parsing of message is working correctly: output xml is not the same as input xml", msg, msg1);
View Full Code Here


                }
             }
             if(content != null) {
                if(sqlInfoParser != null) {
                   SqlInfo obj = sqlInfoParser.parse(content);
                   content = obj.toXml("");
                }
                System.out.println("Date (old):  " + new Date(nextTime));
                System.out.println("Date (new):  " + new Date(calculateNewTime(nextTime)));
                System.out.println("Date (old):  " + new Time(nextTime));
                System.out.println("Date (new):  " + new Time(calculateNewTime(nextTime)));
View Full Code Here

          }
         
          if(content != null) {
             if(sqlInfoParser != null) {
                SqlInfo obj = sqlInfoParser.parse(content);
                content = obj.toXml("");
             }
             long fireTime = calculateNewTime(nextTime);
             long delay = fireTime - System.currentTimeMillis();
             if(delay < 0L || immediate)
                delay = minDelay;
View Full Code Here

      }
     
      prop = new ClientProperty(DUMP_CONTENT_ATTR, oldContent);
      description.setAttribute(prop);
      sqlInfo.setDescription(description);
      String ret = sqlInfo.toXml("");
      if (log.isLoggable(Level.FINEST))
         log.finest(ret);
      return ret.getBytes();
   }
View Full Code Here

         endMsg.setStringProperty(INITIAL_FILES_LOCATION, initialFilesLocation);
         description.setAttribute(INITIAL_DATA_ID, dumpId);
         endMsg.setStringProperty(INITIAL_DATA_ID, dumpId);
      }
      sqlInfo.setDescription(description);
      endMsg.setText(sqlInfo.toXml(""));
      producer.send(endMsg);
   }
  
   public MsgQosData preparePubQos(MsgQosData qosData) {
      if (qosData == null)
View Full Code Here

         assertEquals("wrong number of columns for row '" + i+ "'", 4, row.getColumnNames().length);
         assertEquals("wrong number of attributes for row '" + i+ "'", attr[i], row.getAttributeNames().length);
      }
     
      System.out.println("\n\nshould be:\n" + xml);
      System.out.println("\nis:\n" + record.toXml(""));
      assertXMLEqual("output xml is not the same as input xml", xml, record.toXml(""));
      //assertXpathNotExists("/myRootTag/row[@num='0']", xml);
      //assertXpathEvaluatesTo("CREATE", "/myRootTag/desc/command/text()", xml);
      log.info("SUCCESS");
   }
View Full Code Here

         assertEquals("wrong number of attributes for row '" + i+ "'", attr[i], row.getAttributeNames().length);
      }
     
      System.out.println("\n\nshould be:\n" + xml);
      System.out.println("\nis:\n" + record.toXml(""));
      assertXMLEqual("output xml is not the same as input xml", xml, record.toXml(""));
      //assertXpathNotExists("/myRootTag/row[@num='0']", xml);
      //assertXpathEvaluatesTo("CREATE", "/myRootTag/desc/command/text()", xml);
      log.info("SUCCESS");
   }
  
View Full Code Here

         assertEquals("wrong number of columns for row '" + i+ "'", 4, row.getColumnNames().length);
         assertEquals("wrong number of attributes for row '" + i+ "'", attr[i], row.getAttributeNames().length);
      }
     
      System.out.println("\n\nshould be:\n" + xml);
      System.out.println("\nis:\n" + record.toXml(""));
      assertXMLEqual("output xml is not the same as input xml", xml, record.toXml(""));
      //assertXpathNotExists("/myRootTag/row[@num='0']", xml);
      //assertXpathEvaluatesTo("CREATE", "/myRootTag/desc/command/text()", xml);
      log.info("SUCCESS");
   }
View Full Code Here

         assertEquals("wrong number of attributes for row '" + i+ "'", attr[i], row.getAttributeNames().length);
      }
     
      System.out.println("\n\nshould be:\n" + xml);
      System.out.println("\nis:\n" + record.toXml(""));
      assertXMLEqual("output xml is not the same as input xml", xml, record.toXml(""));
      //assertXpathNotExists("/myRootTag/row[@num='0']", xml);
      //assertXpathEvaluatesTo("CREATE", "/myRootTag/desc/command/text()", xml);
      log.info("SUCCESS");
   }
  
View Full Code Here

               "</sql>\n";
     
      SqlInfoParser parser = new SqlInfoParser();
      parser.init(this.info);
      SqlInfo record = parser.parse(xml);
      log.info(record.toXml(""));
     
      xml = "" +
      "<?xml version='1.0' encoding='UTF-8' ?>\n" +
      "<sql>\n" +
      "  <row num='0'>\n" +
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.