List of usage examples for org.dom4j Node setName
void setName(String name);
Sets the text data of this node or this method will throw an UnsupportedOperationException
if it is read-only.
From source file:edu.ucsd.library.xdre.imports.RDFDAMS4ImportHandler.java
/** * Update record for resource linking/*w w w . j a va2 s .co m*/ * @param url * @param node */ public void toResourceLinking(String url, Node record) { Element pNode = record.getParent(); if (pNode.getName().endsWith("List") && !record.getName().toLowerCase().endsWith(pNode.getName().toLowerCase())) { //List elements record.setName("rdf:Description"); ((Element) record).clearContent(); ((Element) record).selectSingleNode("@rdf:about").setText(toDamsUrl(url)); } else { pNode.addAttribute("rdf:resource", toDamsUrl(url)); record.detach(); } }