1 11 package org.eclipse.pde.internal.core.product; 12 13 import java.io.PrintWriter ; 14 15 import org.eclipse.pde.internal.core.iproduct.IProductFeature; 16 import org.eclipse.pde.internal.core.iproduct.IProductModel; 17 import org.w3c.dom.Element ; 18 import org.w3c.dom.Node ; 19 20 public class ProductFeature extends ProductObject implements IProductFeature { 21 22 private static final long serialVersionUID = 1L; 23 private String fId; 24 private String fVersion; 25 26 public ProductFeature(IProductModel model) { 27 super(model); 28 } 29 30 public void parse(Node node) { 31 if (node.getNodeType() == Node.ELEMENT_NODE) { 32 Element element = (Element )node; 33 fId = element.getAttribute("id"); fVersion = element.getAttribute("version"); } 36 } 37 38 public void write(String indent, PrintWriter writer) { 39 writer.println(indent + "<feature id=\"" + fId + "\" version=\"" + fVersion + "\"/>"); } 41 42 public String getId() { 43 return fId; 44 } 45 46 public void setId(String id) { 47 fId = id; 48 } 49 50 public String getVersion() { 51 return fVersion; 52 } 53 54 public void setVersion(String version) { 55 fVersion = version; 56 } 57 58 } 59 | Popular Tags |