Package org.dom4j

Examples of org.dom4j.Element.elementText()


          TileLodInfo tileLodInfo = new TileLodInfo();
          tileLodInfo.setLevel(Integer.valueOf(eLODInfo
              .elementText("LevelID")));
          tileLodInfo.setScale(Double.valueOf(eLODInfo
              .elementText("Scale")));
          tileLodInfo.setResolution(Double.valueOf(eLODInfo
              .elementText("Resolution")));

          LodItem item = new LodItem();
          item.setTileLodInfo(tileLodInfo);
          jListLevelsModel.addElement(item);
View Full Code Here


 
  public WxBaseMsgEntity parseXML(String xml) throws DocumentException,
      WxException {
    Element ele = DocumentHelper.parseText(xml).getRootElement();
    String msgType = null;
    if ((msgType = ele.elementText("MsgType")) == null) {
      throw new WxException("cannot find MsgType Node!\n" + xml);
    }
    WxMsgTypeEnum msgTypeEnum = WxMsgTypeEnum.inst(msgType);
    switch (msgTypeEnum) {
    case EVENT:
View Full Code Here

    // session valid interval in seconds.
    Element sessionConfigEle = doc.getRootElement().element(
        "session-config");
    if (sessionConfigEle != null) {
      String intervalStr = sessionConfigEle
          .elementText("session-timeout");
      if (intervalStr != null) {
        try {
          int interval = Integer.parseInt(intervalStr);
          // If interval set too big, the expiretion may be bigger the
View Full Code Here

    // session valid interval in seconds.
    Element sessionConfigEle = doc.getRootElement().element(
        "session-config");
    if (sessionConfigEle != null) {
      String intervalStr = sessionConfigEle
          .elementText("session-timeout");
      if (intervalStr != null) {
        try {
          int interval = Integer.parseInt(intervalStr);
          // If interval set too big, the expiretion may be bigger the
View Full Code Here

    Element extensions = root.element("members");
    for (@SuppressWarnings("unchecked")
      Iterator<Element> iter = extensions.elementIterator("member"); iter.hasNext();) {
     
      Element extensionElem = iter.next();
      String confno = extensionElem.elementText("confno");
      try {
        MeetMe meetMe = new MeetMe();
        meetMe.setConfno(unformatString(extensionElem
                .element("confno").getText()));
        meetMe.setPin(unformatString(extensionElem
View Full Code Here

    Element extensions = root.element("extensions");
    for (@SuppressWarnings("unchecked")
      Iterator<Element> iter = extensions.elementIterator("extension"); iter.hasNext();) {
     
      Element extensionElem = iter.next();
      String id = extensionElem.elementText("id");
      try {
        Extensions extension = new Extensions();
        //the primary key must be null for new objects if its an auto-increment
        extension.setExten(unformatString(extensionElem
            .element("exten").getText()));
View Full Code Here

    for (@SuppressWarnings("unchecked")
      Iterator<Element> iter = asterisksipusers.elementIterator("asterisksipuser"); iter.hasNext();) {
     
      Element asterisksipuserElem = iter.next();
     
      String id = asterisksipuserElem.elementText("id");
     
      try {
     
        AsteriskSipUsers asterisksipuser = new AsteriskSipUsers();
        //the primary key must be null for new objects if its an auto-increment
View Full Code Here

    Element configs = root.element("configs");
    for (@SuppressWarnings("unchecked")
      Iterator<Element> iter = configs.elementIterator("config"); iter.hasNext();) {
     
      Element cfgElem = iter.next();
      String key = cfgElem.elementText("key");
      try {
        Configuration cfg = cfgManagement.getConfKey(3L, key);
        if (cfg == null) {
          cfg = new Configuration();
          cfg.setConf_key(key);
View Full Code Here

        Configuration cfg = cfgManagement.getConfKey(3L, key);
        if (cfg == null) {
          cfg = new Configuration();
          cfg.setConf_key(key);
        }
        cfg.setConf_value(cfgElem.elementText("value"));
        cfg.setUpdatetime(new Date());
        cfg.setDeleted(cfgElem.elementText("deleted"));
        cfg.setComment(cfgElem.elementText("comment"));
        cfgManagement.updateConfig(cfg);
      } catch (Exception e) {
View Full Code Here

          cfg = new Configuration();
          cfg.setConf_key(key);
        }
        cfg.setConf_value(cfgElem.elementText("value"));
        cfg.setUpdatetime(new Date());
        cfg.setDeleted(cfgElem.elementText("deleted"));
        cfg.setComment(cfgElem.elementText("comment"));
        cfgManagement.updateConfig(cfg);
      } catch (Exception e) {
        log.debug("failed to add/update configuration: " + key, e);
      }
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.