Java Code Examples for org.dom4j.tree.DefaultElement#setText()
The following examples show how to use
org.dom4j.tree.DefaultElement#setText() .
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 |
/** */ @Override public void buildDocument(final DefaultElement parent) { final DefaultElement orgaElement = new DefaultElement(CPCore.ORGANIZATION); orgaElement.addAttribute(CPCore.IDENTIFIER, identifier); orgaElement.addAttribute(CPCore.STRUCTURE, structure); final DefaultElement titleElement = new DefaultElement(CPCore.TITLE); titleElement.setText(title); orgaElement.add(titleElement); if (metadata != null) { metadata.buildDocument(orgaElement); } for (final Iterator<CPItem> itItem = items.iterator(); itItem.hasNext();) { final CPItem item = itItem.next(); item.buildDocument(orgaElement); } parent.add(orgaElement); }
Example 2
Source File: CPOrganization.java From olat with Apache License 2.0 | 6 votes |
/** */ @Override public void buildDocument(final DefaultElement parent) { final DefaultElement orgaElement = new DefaultElement(CPCore.ORGANIZATION); orgaElement.addAttribute(CPCore.IDENTIFIER, identifier); orgaElement.addAttribute(CPCore.STRUCTURE, structure); final DefaultElement titleElement = new DefaultElement(CPCore.TITLE); titleElement.setText(title); orgaElement.add(titleElement); if (metadata != null) { metadata.buildDocument(orgaElement); } for (final Iterator<CPItem> itItem = items.iterator(); itItem.hasNext();) { final CPItem item = itItem.next(); item.buildDocument(orgaElement); } parent.add(orgaElement); }
Example 3
Source File: CPItem.java From olat with Apache License 2.0 | 5 votes |
/** */ @Override public void buildDocument(final DefaultElement parent) { final DefaultElement itemElement = new DefaultElement(CPCore.ITEM); itemElement.addAttribute(CPCore.IDENTIFIER, identifier); if (!identifierRef.equals("")) { itemElement.addAttribute(CPCore.IDENTIFIERREF, identifierRef); } itemElement.addAttribute(CPCore.ISVISIBLE, isVisibleString()); if (metadata != null) { metadata.buildDocument(itemElement); } final DefaultElement titleElement = new DefaultElement(CPCore.TITLE); titleElement.setText(title); itemElement.add(titleElement); for (final Iterator<CPItem> itItem = items.iterator(); itItem.hasNext();) { final CPItem item = itItem.next(); item.buildDocument(itemElement); } parent.add(itemElement); }
Example 4
Source File: CPItem.java From olat with Apache License 2.0 | 5 votes |
/** */ @Override public void buildDocument(final DefaultElement parent) { final DefaultElement itemElement = new DefaultElement(CPCore.ITEM); itemElement.addAttribute(CPCore.IDENTIFIER, identifier); if (!identifierRef.equals("")) { itemElement.addAttribute(CPCore.IDENTIFIERREF, identifierRef); } itemElement.addAttribute(CPCore.ISVISIBLE, isVisibleString()); if (metadata != null) { metadata.buildDocument(itemElement); } final DefaultElement titleElement = new DefaultElement(CPCore.TITLE); titleElement.setText(title); itemElement.add(titleElement); for (final Iterator<CPItem> itItem = items.iterator(); itItem.hasNext();) { final CPItem item = itItem.next(); item.buildDocument(itemElement); } parent.add(itemElement); }