Java Code Examples for org.dom4j.tree.DefaultElement#getText()

The following examples show how to use org.dom4j.tree.DefaultElement#getText() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CPOrganization.java    From olat with Apache License 2.0 6 votes vote down vote up
/**
*/
  @Override
  public void buildChildren() {
      final Iterator<DefaultElement> children = this.elementIterator();
      // iterate through children
      while (children.hasNext()) {
          final DefaultElement child = children.next();
          if (child.getName().equals(CPCore.ITEM)) {
              final CPItem item = new CPItem(child, this);
              item.setParentElement(this);
              item.buildChildren();
              item.setPosition(items.size());
              items.add(item);
          } else if (child.getName().equals(CPCore.TITLE)) {
              title = child.getText();
          } else if (child.getName().equals(CPCore.METADATA)) {
              metadata = new CPMetadata(child);
              metadata.setParentElement(this);
          } else {
              errors.add("Invalid IMS-Manifest ( unallowed element under <organization> )");
          }
      }

      this.clearContent();
      validateElement();
  }
 
Example 2
Source File: CPItem.java    From olat with Apache License 2.0 6 votes vote down vote up
/**
*/
  @Override
  public void buildChildren() {
      final Iterator<DefaultElement> children = this.elementIterator();
      // iterate through children
      while (children.hasNext()) {
          final DefaultElement child = children.next();
          if (child.getName().equals(CPCore.ITEM)) {
              final CPItem item = new CPItem(child, this);
              item.buildChildren();
              item.setPosition(items.size());
              item.setParentElement(this);
              items.add(item);
          } else if (child.getName().equals(CPCore.TITLE)) {
              title = child.getText();
          } else if (child.getName().equals(CPCore.METADATA)) {
              // TODO: implement LOM METADATA
              metadata = new CPMetadata(child);
              metadata.setParentElement(this);
          }
      }
      this.clearContent();
      validateElement();
  }
 
Example 3
Source File: CPOrganization.java    From olat with Apache License 2.0 6 votes vote down vote up
/**
*/
  @Override
  public void buildChildren() {
      final Iterator<DefaultElement> children = this.elementIterator();
      // iterate through children
      while (children.hasNext()) {
          final DefaultElement child = children.next();
          if (child.getName().equals(CPCore.ITEM)) {
              final CPItem item = new CPItem(child, this);
              item.setParentElement(this);
              item.buildChildren();
              item.setPosition(items.size());
              items.add(item);
          } else if (child.getName().equals(CPCore.TITLE)) {
              title = child.getText();
          } else if (child.getName().equals(CPCore.METADATA)) {
              metadata = new CPMetadata(child);
              metadata.setParentElement(this);
          } else {
              errors.add("Invalid IMS-Manifest ( unallowed element under <organization> )");
          }
      }

      this.clearContent();
      validateElement();
  }
 
Example 4
Source File: CPItem.java    From olat with Apache License 2.0 6 votes vote down vote up
/**
*/
  @Override
  public void buildChildren() {
      final Iterator<DefaultElement> children = this.elementIterator();
      // iterate through children
      while (children.hasNext()) {
          final DefaultElement child = children.next();
          if (child.getName().equals(CPCore.ITEM)) {
              final CPItem item = new CPItem(child, this);
              item.buildChildren();
              item.setPosition(items.size());
              item.setParentElement(this);
              items.add(item);
          } else if (child.getName().equals(CPCore.TITLE)) {
              title = child.getText();
          } else if (child.getName().equals(CPCore.METADATA)) {
              // TODO: implement LOM METADATA
              metadata = new CPMetadata(child);
              metadata.setParentElement(this);
          }
      }
      this.clearContent();
      validateElement();
  }