List of usage examples for org.jdom2 Element setName
public Element setName(final String name)
From source file:scrum.server.ScrumEntityfilePreparator.java
License:Open Source License
private void prepareIssue(File file) throws IOException { boolean modified = false; Document doc;/*ww w . j ava 2 s . c om*/ try { doc = new SAXBuilder().build(file); } catch (JDOMException ex) { throw new RuntimeException(ex); } Element root = doc.getRootElement(); Element value = root.getChild("urgent"); if (value != null) { value.setName("bug"); modified = true; } if (modified) save(doc, file); }
From source file:se.miun.itm.input.model.param.ParamStore.java
License:Open Source License
private void initElementByType(String referentType, Element referent, Element type) { Element newChoice = type.clone(); String localId = referent.getAttributeValue(Q.ID_ATTR); addAlias(referent, type);//from w w w .ja v a 2 s . co m newChoice.setAttribute(Q.ID_ATTR, localId); newChoice.setName(referentType); overrideSubElementsIfExist(referent, newChoice); Element parent = referent.getParentElement(); parent.removeContent(referent); parent.addContent(newChoice); }