Package cputils

Examples of cputils.DataItem


    try {
      org.dom4j.Document root = utils.getDocumentComm(Config.DATA_FILE_PATH + type +".xml");
      Element rootEl = root.getRootElement();
      Iterator<Element> it = rootEl.elementIterator();
      Element el;
      DataItem item1;
      while (it.hasNext()) {
        el = it.next();
        item1 = new DataItem(el.attributeValue("ID"),
            el.attributeValue("opencode"), el.attributeValue("type"));
        list.add(item1);
      }
     
      System.out.println("all size:" + list.size());
View Full Code Here


    try {
      org.dom4j.Document root = utils.getDocumentComm(Config.DATA_FILE_PATH + type +".xml");
      Element rootEl = root.getRootElement();
      Iterator<Element> it = rootEl.elementIterator();
      Element el;
      DataItem item1;
      while (it.hasNext()) {
        el = it.next();
        item1 = new DataItem(el.attributeValue("ID"),
            el.attributeValue("opencode"), el.attributeValue("type"));
        list.add(item1);
      }
     
      System.out.println("all size:" + list.size());
View Full Code Here

    try {
      org.dom4j.Document root = utils.getDocumentComm(Config.DATA_FILE_PATH + type +".xml");
      Element rootEl = root.getRootElement();
      Iterator<Element> it = rootEl.elementIterator();
      Element el;
      DataItem item1;
      while (it.hasNext()) {
        el = it.next();
        if (el.attributeValue("ID").indexOf(today) == -1) {
          continue;
        }
        item1 = new DataItem(el.attributeValue("ID"),
            el.attributeValue("opencode"), el.attributeValue("type"));
        list.add(item1);
      }
     
      printMsg(type,"all size:" + list.size());
View Full Code Here

    try {
      org.dom4j.Document root = utils.getDocumentComm(Config.DATA_FILE_PATH + fileName +".xml");
      Element rootEl = root.getRootElement();
      Iterator<Element> it = rootEl.elementIterator();
      Element el;
      DataItem item1;
      while (it.hasNext()) {
        el = it.next();
        if (StringUtils.isNotBlank(day) && el.attributeValue("ID").indexOf(day) == -1) {
          continue;
        }
        item1 = new DataItem(el.attributeValue("ID"),
            el.attributeValue("opencode"), el.attributeValue("type"));
        list.add(item1);
      }
     
      printMsg(fileName, "^^^^^^all size:" + list.size());
View Full Code Here

          JSONObject row = (JSONObject) object;
          if (row.getString("phase").indexOf(day) == -1) {
            skipout = true;
            continue;
          }
          DataItem item = new DataItem(row.getString("phase"), row.getString("code").replaceAll(",", " "), type);
         
          if (utils.addSSCItem(item)) {
            printMsg(id,row.getString("phase") +": "+row.getString("code")+ " insert...");
          }else {
            skipout = true;
View Full Code Here

          JSONObject row = (JSONObject) object;
          if (row.getString("phase").indexOf(today) == -1) {
            skipout = true;
            continue;
          }
          DataItem item = new DataItem();
          item = new DataItem(row.getString("phase"), row.getString("code").replaceAll(",", " "), "blssc");
          if (utils.addSSCItem(item)) {
            System.out.println(row.getString("phase") +": "+row.getString("code")+ " insert...");
          }else {
//            System.err.println(row.getString("phase")+" is inserted!");
            skipout = true;
View Full Code Here

          JSONObject row = (JSONObject) object;
          if (row.getString("phase").indexOf(today) == -1) {
            skipout = true;
            continue;
          }
          DataItem item = new DataItem(row.getString("phase"), row.getString("code").replaceAll(",", " "), type);
         
          if (utils.addSSCItem(item)) {
            printMsg(id, row.getString("phase") +": "+row.getString("code")+ " insert...");
            dataTipMsg += type + "  " + row.getString("phase") +": "+row.getString("code")+"\r\n";
          }else {
View Full Code Here

          JSONObject row = (JSONObject) object;
          if (row.getString("phase").indexOf(today) == -1) {
            skipout = true;
            continue;
          }
          DataItem item = new DataItem();
          item = new DataItem(row.getString("phase"), row.getString("code").replaceAll(",", " "), "ffc");
          if (utils.addSSCItem(item)) {
            System.out.println(row.getString("phase") + ": " + row.getString("code") + " insert...");
          }else {
            skipout = true;
            break;
View Full Code Here

      org.dom4j.Document root = utils.getDocumentComm(Config.DATA_FILE_PATH + fileName);
      Element rootEl = root.getRootElement();
     
      Iterator<Element> it = rootEl.elementIterator();
      Element el;
      DataItem item1;
      List<DataItem> list = new ArrayList<DataItem>();
      while (it.hasNext()) {
        el = it.next();
        item1 = new DataItem(el.attributeValue("ID"),
            el.attributeValue("opencode"), el.attributeValue("type"));
        list.add(item1);
        utils.delete(el.attributeValue("ID"), Config.DATA_FILE_PATH + fileName);
      }
     
View Full Code Here

        //System.out.print(e.getKey()+" ");
      }
      //System.out.println(bMap);
      //System.out.println(aMap);
      XmlUtils utils = new XmlUtils();
      DataItem dataitem = utils.getDataItem(issueNo);
      if(dataitem == null){
        logger.error(issueNo+":kj is null...");
        return null;
      }
      String[] allArr = dataitem.getOpencode().split(" ");
//      System.out.println("KJ:"+dataitem.getOpencode());
      List<Integer> bList = new ArrayList<Integer>(),aList = new ArrayList<Integer>();
      int maxIndex = issueNo.length() == 5?4:5;
      for (int i = 0; i < allArr.length; i++) {
        if (i<=maxIndex) {
View Full Code Here

TOP

Related Classes of cputils.DataItem

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.