Package org.dom4j

Examples of org.dom4j.Element.attribute()


        Element render_fib = content.element("render_fib");
        content.element("render_fib").element("flow_label");
        fibresponse.setType(FIBResponse.TYPE_BLANK);
        fibresponse.setIdent(ident);
        fibresponse.setSizeFromColumns(render_fib.attribute("columns"));
        fibresponse.setMaxLengthFromMaxChar(render_fib.attribute("maxchars"));
        List el_varequals = el_resprocessing.selectNodes(".//varequal[@respident='" + ident + "']");
        List processedSolutions = new ArrayList(); // list of already process strings
        if (el_varequals != null) {
          String correctBlank = "";
          String correctBlankCaseAttribute = "No";
View Full Code Here


      }
      n = root.element("comment");
      comment = (n != null) ? n.getText() : "";
      Element lockEl = root.element("lock");
      if(lockEl != null) {
        locked = "true".equals(lockEl.attribute("locked").getValue());
        try {
          lockedByIdentKey = new Long(n.getText());
        } catch (NumberFormatException nEx) {
          lockedByIdentKey = null;
        }
View Full Code Here

      XPath resourceXPath = rootElement.createXPath("//ns:resource[@identifier='" + identifierref + "']");
      resourceXPath.setNamespaceURIs(nsuris);
      Element elResource = (Element)resourceXPath.selectSingleNode(elResources);
      if (elResource == null) throw new AddingResourceException("resource.no.matching.resource");
      //check for scorm attribute
      Attribute scormAttr = elResource.attribute("scormtype");
      //some packages have attribute written like "scormType"
      Attribute scormAttrUpper = elResource.attribute("scormType");
      if (scormAttr == null && scormAttrUpper == null) throw new AddingResourceException("scorm.no.attribute.scormtype");
      String attr = "";
      if (scormAttr != null) attr = scormAttr.getStringValue();
View Full Code Here

      Element elResource = (Element)resourceXPath.selectSingleNode(elResources);
      if (elResource == null) throw new AddingResourceException("resource.no.matching.resource");
      //check for scorm attribute
      Attribute scormAttr = elResource.attribute("scormtype");
      //some packages have attribute written like "scormType"
      Attribute scormAttrUpper = elResource.attribute("scormType");
      if (scormAttr == null && scormAttrUpper == null) throw new AddingResourceException("scorm.no.attribute.scormtype");
      String attr = "";
      if (scormAttr != null) attr = scormAttr.getStringValue();
      if (scormAttrUpper != null) attr = scormAttrUpper.getStringValue();
      if (attr == null) throw new AddingResourceException("scorm.no.attribute.value");
View Full Code Here

      if (identifierref == null) continue;
      XPath resourceXPath = rootElement.createXPath("//ns:resource[@identifier='" + identifierref + "']");
      resourceXPath.setNamespaceURIs(nsuris);
      Element elResource = (Element)resourceXPath.selectSingleNode(elResources);
      if (elResource == null) throw new AddingResourceException("resource.no.matching.resource");
      if (elResource.attribute("scormtype") != null) return false;
      if (elResource.attribute("scormType") != null) return false;
      if (elResource.attribute("SCORMTYPE") != null) return false;
      if (elResource.attributeValue("href") != null) return true; // success.
    }
    return false;
View Full Code Here

      XPath resourceXPath = rootElement.createXPath("//ns:resource[@identifier='" + identifierref + "']");
      resourceXPath.setNamespaceURIs(nsuris);
      Element elResource = (Element)resourceXPath.selectSingleNode(elResources);
      if (elResource == null) throw new AddingResourceException("resource.no.matching.resource");
      if (elResource.attribute("scormtype") != null) return false;
      if (elResource.attribute("scormType") != null) return false;
      if (elResource.attribute("SCORMTYPE") != null) return false;
      if (elResource.attributeValue("href") != null) return true; // success.
    }
    return false;
    //throw new AddingResourceException("resource.general.error");
View Full Code Here

      resourceXPath.setNamespaceURIs(nsuris);
      Element elResource = (Element)resourceXPath.selectSingleNode(elResources);
      if (elResource == null) throw new AddingResourceException("resource.no.matching.resource");
      if (elResource.attribute("scormtype") != null) return false;
      if (elResource.attribute("scormType") != null) return false;
      if (elResource.attribute("SCORMTYPE") != null) return false;
      if (elResource.attributeValue("href") != null) return true; // success.
    }
    return false;
    //throw new AddingResourceException("resource.general.error");
  }
View Full Code Here

       
        Element root = document.getRootElement();
       
        for (Iterator i = root.elementIterator(); i.hasNext(); ) {
          Element itemObject = (Element) i.next();
          Long fieldvalues_id = Long.valueOf(itemObject.attribute("id").getText()).longValue();
          String fieldName = itemObject.attribute("name").getText();
          String value = itemObject.element("value").getText();
          log.error("CHECK "+language_id+","+fieldvalues_id+","+fieldName+","+value);
          this.addFieldValueById(language_id, fieldvalues_id, fieldName, value);
        }
View Full Code Here

        Element root = document.getRootElement();
       
        for (Iterator i = root.elementIterator(); i.hasNext(); ) {
          Element itemObject = (Element) i.next();
          Long fieldvalues_id = Long.valueOf(itemObject.attribute("id").getText()).longValue();
          String fieldName = itemObject.attribute("name").getText();
          String value = itemObject.element("value").getText();
          log.error("CHECK "+language_id+","+fieldvalues_id+","+fieldName+","+value);
          this.addFieldValueById(language_id, fieldvalues_id, fieldName, value);
        }
       
View Full Code Here

        Element thumbElement = i.next();
        //log.info("createListObjectLibraryByFileDocumentThumbs"+thumbElement);
        LibraryPresentationThumb singleThumb = new LibraryPresentationThumb();
        singleThumb.setName(thumbElement.getName());
        singleThumb.setFilename(thumbElement.getText());
        singleThumb.setLastmod(thumbElement.attribute("lastmod").getText());
        singleThumb.setSize(Long.valueOf(thumbElement.attribute("size").getText()).longValue());
        thumbMap.getThumbs()[k] = singleThumb;
        k++;
      }
     
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.