1 package ixa.kaflib;
2
3 import java.io.Serializable;
4 import java.util.ArrayList;
5 import java.util.List;
6
7
8 public class NonTerminal extends TreeNode implements Serializable {
9
10
11 private String label;
12
13
14 private List<TreeNode> children;
15
16
17 NonTerminal(String id, String label) {
18 super(id, false, false);
19 this.label = label;
20 this.children = new ArrayList<TreeNode>();
21 }
22
23 public String getLabel() {
24 return this.label;
25 }
26
27 public void setLabel(String label) {
28 this.label = label;
29 }
30
31 public void addChild(TreeNode tn) throws Exception {
32 this.children.add(tn);
33 }
34
35 public List<TreeNode> getChildren() {
36 return this.children;
37 }
38
39 }