Package tigase.xml

Examples of tigase.xml.Element.addAttribute()


      Element query = iq.getChild("query");
      List<StatRecord> stats = getAllStats();
      if (stats != null && stats.size() > 0) {
        for (StatRecord record: stats) {
          Element item = new Element("stat");
          item.addAttribute("name", record.getComponent() + "/"
            + record.getDescription());
          item.addAttribute("units", record.getUnit());
          item.addAttribute("value", record.getValue());
          query.addChild(item);
        } // end of for ()
View Full Code Here


      if (stats != null && stats.size() > 0) {
        for (StatRecord record: stats) {
          Element item = new Element("stat");
          item.addAttribute("name", record.getComponent() + "/"
            + record.getDescription());
          item.addAttribute("units", record.getUnit());
          item.addAttribute("value", record.getValue());
          query.addChild(item);
        } // end of for ()
      } // end of if (stats != null && stats.count() > 0)
      Packet result = new Packet(iq);
View Full Code Here

        for (StatRecord record: stats) {
          Element item = new Element("stat");
          item.addAttribute("name", record.getComponent() + "/"
            + record.getDescription());
          item.addAttribute("units", record.getUnit());
          item.addAttribute("value", record.getValue());
          query.addChild(item);
        } // end of for ()
      } // end of if (stats != null && stats.count() > 0)
      Packet result = new Packet(iq);
      //      Command.setData(result, statistics);
View Full Code Here

    String subscription, String item_type) {
    Element iq = new Element("iq",
      new String[] {"type", "id"},
      new String[] {iq_type, iq_id});
    if (from != null) {
      iq.addAttribute("from", from);
    }
    if (to != null) {
      iq.addAttribute("to", to);
    }
    Element query = new Element("query");
View Full Code Here

      new String[] {iq_type, iq_id});
    if (from != null) {
      iq.addAttribute("from", from);
    }
    if (to != null) {
      iq.addAttribute("to", to);
    }
    Element query = new Element("query");
    query.setXMLNS(XMLNS);
    iq.addChild(query);
    Element item = new Element("item",
View Full Code Here

    iq.addChild(query);
    Element item = new Element("item",
      new String[] {"jid"},
      new String[] {item_jid});
    if (item_type != null) {
      item.addAttribute("type", item_type);
    }
    if (item_name != null) {
      item.addAttribute(RosterAbstract.NAME, item_name);
    }
    if (subscription != null) {
View Full Code Here

      new String[] {item_jid});
    if (item_type != null) {
      item.addAttribute("type", item_type);
    }
    if (item_name != null) {
      item.addAttribute(RosterAbstract.NAME, item_name);
    }
    if (subscription != null) {
      item.addAttribute(RosterAbstract.SUBSCRIPTION, subscription);
    }
    if (item_group != null) {
View Full Code Here

    }
    if (item_name != null) {
      item.addAttribute(RosterAbstract.NAME, item_name);
    }
    if (subscription != null) {
      item.addAttribute(RosterAbstract.SUBSCRIPTION, subscription);
    }
    if (item_group != null) {
      Element group = new Element(RosterAbstract.GROUP, item_group);
      item.addChild(group);
    }
View Full Code Here

        String[] stanzas = session.getDataList(iNode, STANZAS);
        Element eItem = new Element(ITEM,
          new String[] {ORDER, ACTION},
          new String[] {item, action});
        if (type != null) {
          eItem.addAttribute(TYPE, type);
        } // end of if (type != null)
        if (value != null) {
          eItem.addAttribute(VALUE, value);
        } // end of if (value != null)
        if (stanzas != null) {
View Full Code Here

          new String[] {item, action});
        if (type != null) {
          eItem.addAttribute(TYPE, type);
        } // end of if (type != null)
        if (value != null) {
          eItem.addAttribute(VALUE, value);
        } // end of if (value != null)
        if (stanzas != null) {
          for (String stanza: stanzas) {
          eItem.addChild(new Element(stanza));
          } // end of for (String stanza: stanzas)
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.