public String getPrevID() { for (Interpretation ip = getParent(); ip != null; ip = ip.getParent()) { if (ip.isSectionHead()) { return ip.getID(); } } return ""; }
public Interpretation getSectionHeadInterpretation() { Interpretation ip; for (ip = this; ; ip = ip.getParent()) { if (ip == null) return null; if (ip.isSectionHead()) break; } return ip; }
private String generateID() { StringBuffer buf = new StringBuffer(); for (Interpretation ip = this; ip != null; ip = ip.getParent()) { if (!ip.isSectionHead()) continue; if (buf.length() > 0) buf.insert(0, " "); String name = ip.action.getName(); buf.insert(0, name); } return buf.toString(); }