src/main/java/de/unixwork/uwproj/Flags.java

changeset 0
38775db5fdf5
equal deleted inserted replaced
-1:000000000000 0:38775db5fdf5
1 /*
2 * To change this license header, choose License Headers in Project Properties.
3 * To change this template file, choose Tools | Templates
4 * and open the template in the editor.
5 */
6 package de.unixwork.uwproj;
7
8 import org.w3c.dom.Element;
9
10 /**
11 *
12 * @author olaf
13 */
14 public class Flags {
15 private String varName;
16 private String value;
17 private boolean exec = false;
18
19 public static Flags parse(Element e) {
20 Flags f = new Flags();
21 f.varName = e.getNodeName().toUpperCase();
22 String value = Xml.getContent(e);
23 f.value = value == null ? "" : value;
24
25 String type = e.getAttribute("type");
26 if(type != null && type.equals("exec")) {
27 f.exec = true;
28 }
29
30 return f;
31 }
32
33 public String getVarName() {
34 return varName;
35 }
36
37 public void setVarName(String varName) {
38 this.varName = varName;
39 }
40
41 public String getValue() {
42 return value;
43 }
44
45 public void setValue(String value) {
46 this.value = value;
47 }
48
49 public boolean isExec() {
50 return exec;
51 }
52
53 public void setExec(boolean exec) {
54 this.exec = exec;
55 }
56 }

mercurial