/** * Adds the given text to the given node */ public static Text addText(Element element, String text) { Text textNode = new Text(text + " "); element.addNode(textNode); return textNode; }
public static Element addChildElement(Element parent, String elementName) { Element element = new Element(elementName); parent.addNode(element); return element; }
public static Element addChildElement(Element parent, String elementName) { Element element = new Element(elementName); parent.addNode(element); return element; }
/** * Adds the given text to the given node */ public static Text addText(Element element, String text) { Text textNode = new Text(text + " "); element.addNode(textNode); return textNode; }
public Element setText (String text) { clearText (); addNode (0, new Text (text)); return this; }
private boolean appendPath(Element from, Parent to, String appendPath) { Element append = to.getChild(appendPath); if (append == null) { throw new IllegalStateException("Cannot append " + name + " to path " + appendPath); } append.addNode(cleanup(from.copy())); return true; }
public void setDescriptionURL(String descriptionURL) { Element descElement = dom.getChild("description"); if (descElement == null) { descElement = new Element("description"); dom.addNode(descElement); } descElement.setAttribute("url", descriptionURL); }
public void addProperty(String name, String value) { Element properties = iuDom.getChild(PROPERTIES); if (properties == null) { iuDom.addNode(new Element(PROPERTIES)); properties = iuDom.getChild(PROPERTIES); } Element elt = new Element(PROPERTY); elt.setAttribute(NAME, name); elt.setAttribute("value", value); properties.addNode(elt); }
public void setCopyright(String description) { Element copyrightElement = dom.getChild("copyright"); if (copyrightElement == null) { copyrightElement = new Element("copyright"); dom.addNode(copyrightElement); } copyrightElement.setText(description); }
public void addArtifact(String classifier, String id, String version) { Element artifacts = iuDom.getChild(ARTIFACTS); if (artifacts == null) { artifacts = new Element(ARTIFACTS); iuDom.addNode(artifacts); } Element newArtifact = new Element(ARTIFACT); newArtifact.addAttribute(CLASSIFIER, classifier); newArtifact.addAttribute(ID, id); newArtifact.addAttribute(VERSION, version); artifacts.addNode(newArtifact); }
public void setLicenseURL(String licenseURL) { Element licenseElement = dom.getChild("license"); if (licenseElement == null) { licenseElement = new Element("license"); dom.addNode(licenseElement); } licenseElement.setAttribute("url", licenseURL); }
public void addProperty(String name, String value) { Element properties = iuDom.getChild(PROPERTIES); if (properties == null) { iuDom.addNode(new Element(PROPERTIES)); properties = iuDom.getChild(PROPERTIES); } Element elt = new Element(PROPERTY); elt.setAttribute(NAME, name); elt.setAttribute("value", value); properties.addNode(elt); }
public void setLicenseURL(String licenseURL) { Element licenseElement = dom.getChild("license"); if (licenseElement == null) { licenseElement = new Element("license"); dom.addNode(licenseElement); } licenseElement.setAttribute("url", licenseURL); }
public void setCopyrightURL(String copyrightURL) { Element copyrightElement = dom.getChild("copyright"); if (copyrightElement == null) { copyrightElement = new Element("copyright"); dom.addNode(copyrightElement); } copyrightElement.setAttribute("url", copyrightURL); }
public void setLicense(String license) { Element licenseElement = dom.getChild("license"); if (licenseElement == null) { licenseElement = new Element("license"); dom.addNode(licenseElement); } licenseElement.setText(license); }
public void setCopyright(String description) { Element copyrightElement = dom.getChild("copyright"); if (copyrightElement == null) { copyrightElement = new Element("copyright"); dom.addNode(copyrightElement); } copyrightElement.setText(description); }
public void setDescription(String description) { Element descElement = dom.getChild("description"); if (descElement == null) { descElement = new Element("description"); dom.addNode(descElement); } descElement.setText(description); }
public void setCopyrightURL(String copyrightURL) { Element copyrightElement = dom.getChild("copyright"); if (copyrightElement == null) { copyrightElement = new Element("copyright"); dom.addNode(copyrightElement); } copyrightElement.setAttribute("url", copyrightURL); }
public void setDescriptionURL(String descriptionURL) { Element descElement = dom.getChild("description"); if (descElement == null) { descElement = new Element("description"); dom.addNode(descElement); } descElement.setAttribute("url", descriptionURL); }
public void addSelfCapability() { Element provides = iuDom.getChild(PROVIDES); if (provides == null) { provides = new Element(PROVIDES); iuDom.addNode(provides); } Element newCapability = new Element(PROVIDED); newCapability.addAttribute(NAMESPACE, P2_IU_NAMESPACE); newCapability.addAttribute(NAME, getId()); newCapability.addAttribute(VERSION, getVersion()); provides.addNode(newCapability); }