![JAR search and dependency download from the Maven repository](/logo.png)
ixa.kaflib.TreeNode Maven / Gradle / Ivy
package ixa.kaflib;
import org.jdom2.Element;
import java.util.List;
import java.io.Serializable;
public abstract class TreeNode implements Serializable {
/** The ID of the node */
private String id;
/** The id of the edge between this node and its parent. */
private String edgeId;
/** Wether the edge between this node and its parent is the "head" or not. */
private boolean head;
private boolean isTerminal;
public TreeNode(String id, boolean head, boolean isTerminal) {
this.id = id;
this.head = head;
this.isTerminal = isTerminal;
}
public String getId() {
return this.id;
}
public void setId(String id) {
this.id = id;
}
public boolean hasEdgeId() {
return this.edgeId != null;
}
public String getEdgeId() {
return this.edgeId;
}
public void setEdgeId(String edgeId) {
this.edgeId = edgeId;
}
public boolean getHead() {
return this.head;
}
public void setHead(boolean head) {
this.head = head;
}
public boolean isTerminal() {
return isTerminal;
}
public abstract void addChild(TreeNode tn) throws Exception;
public abstract List getChildren();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy